Profile cover photo
Profile photo
Egidio D.
67 followers
67 followers
About
Egidio's posts

Post has attachment
Hi everyone!

I use powerline in vim, and i wanted it to be loaded automatically with the right python version: python3 if it's installed or python2 if it's the only version available. There are also other plugin like jedi that must be forced to use python3, otherwise will use python2 by default. I wrote this in my .vimrc, but i'm new to vim scripting and i would like to know if it can be considered a good solution! I wait for your suggestions!

http://pastebin.com/CMU1QJvv






Post has shared content
True story 😂

Hey guys need your help!

The common way to pipe two subprocesses in python is this (just an example, i know that tar can use -z or -j or -J option for compression by itself)

from subprocess import PIPE, Popen

tar = Popen(['tar', '-cvpf', '-', '/home'], stdout=PIPE)
gzip =.Popen(['gzip', '-c',], stdin=tar.stdout, stdout=open('tarball.tar.gz', 'w+'))

tar.stdout.close()
gzip.communicate()

Now it's easy to check gzip returncode and raise an exception if it fails, but how can i raise an exception if tar (the left side of the pipe) fails? it's returncode will always be None ( i think because stdout it's closed).
Please enlighten me! :D
#subprocess   #PIPE   #raise   #exception  

Did anyone succeed in streaming to chromecast across subnets? #chromecast   #subnet   #multicast  

a - Yes (please explain how)
b - Forget it, it's not doable

Post has shared content

Post has shared content
Put a web designer in front of VIM and tell him/her to save and exit!

#Linux #Opensource #VIM
Photo

Post has attachment
Hi everyone, i've written this small wrapper around tar to produce a tarball backup of the entire system. I'd like to have your suggestions and tips to improve it as much as possible. See if it can be useful to you!
#python #tar #backup  
https://github.com/envinyatar/tarbackup/blob/master/tarbackup

Files(Nautilus) doesn't respect user umask, instead it uses always 0022 (default in fedora, for normal users is 0002). It is a bug, or it's a wanted thing?

Post has shared content
In case anyone was curious... Richard Stallman feels the Bern.  In Bern.

Credit: stallman.org

[Thanks to +Benjamin M Strozykowski for finding this.]
Photo

Post has shared content
Funny(?)
Wait while more posts are being loaded