3,069 reputation
816
bio website pythoncodereview.com
location Madrid, Spain
age
visits member for 3 years, 10 months
seen Sep 15 at 12:52

Hi there!

I spend most of my time writing python code for a security company. I enjoy learning new things everyday and helping out in solving small problems when I have some time.

I've recently started writing a blog with the things I've learned and/or considered interesting while doing python code reviews. I hope it's helpful to some of you.

You can know more about me by looking at my Careers 2.0 profile or at my LinkedIn profile.


Nov
28
comment Should I use jigit to save bandwidth when downloading daily CD images?
In summary, you need to install jigdo-file package and use jigdo-lite command (jigit package seems to contain tools to create the images, not to download them).
Nov
28
comment How to execute script on shutdown?
Possible duplicate
Nov
26
comment How to make error message?
You can redirect stdout to stderr in echo like this: echo "error message here" 1>&2. For more information, you can refer to the all about redirection article.
Nov
25
comment Why do packages fail to install from command line
Have you looked at /var/log/apt/*.log and /var/log/dpkg.log? Maybe there's some information there that can be used to troubleshoot the problem.
Nov
23
comment My Package Version Number Appears Greater Yet apt-get Doesn't Select It
The output of apt-cache policy nagios-nrpe-server could be also useful.
Nov
23
comment How to fix a ruined package catalog?
I don't think you have exactly that same problem, but instead of repairing the package database, you might want to try to recover it from a backup as explained here.
Nov
22
comment How do I force apt-get to install a package that will not install due to a bug introduced by Ubuntu 11.10?
One more thing, since you're probably going to copy the .py files to a directory with root permissions, then it's a good idea to byte compile those files using python -m compileall <dir>.
Nov
18
comment Recursively rename files - oneliner preferably
I believe that's the reason it didn't work for you. The answer from @ams with find -print0 and xargs -0 uses the null character as a separator to avoid whitespace problems in the file names.
Nov
18
comment Recursively rename files - oneliner preferably
What's the error you got when executing the command found in the other answer? Does any of your filenames contain a space in it?
Nov
18
comment Bash history handling with multiple terminals
@VineetMenon For more details look here. Interesting parts: When the shell starts up, the history is initialized from the file named by the HISTFILE variable (default `~/.bash_history'). [...] When an interactive shell exits, the last $HISTSIZE lines are copied from the history list to the file named by $HISTFILE.
Nov
17
comment I want to copy a directory from one place to another via the command line
@VineetMenon Yes, you're right, I didn't see that mv was already in the list. Anyway, my point was that, as far as I know, there isn't any ren command (unless you've got an alias or something set).
Nov
17
comment I want to copy a directory from one place to another via the command line
@VineetMenon You probably mean mv, not ren.
Nov
16
comment df -h shows incorrect free space
That's interesting. Indeed (1310720 blocks*4096 bytes/block)/1024**3 = 5 GB
Nov
16
comment How to re-install Software Center?
In similar questions regarding PPA removal, I've seen ppa-purge package recommended (and marked as an answer). Have your tried it?
Nov
14
comment How to install Chrome browser properly via command line?
@jrg I decided to give it a try and what I found is that indeed Chrome packaging scripts add a new file under /etc/apt/sources.list.d. The result of this is that Chrome installation didn't fail, but apt-get update now prints a "duplicate sources.list entry" warning; so, yes, this method shouldn't be used unless you want to fix the sources files later.
Nov
14
comment Software Center won't start: “AttributeError: 'gi.repository.Gtk' object has no attribute 'FontSelectionDialog' ”
This question is a duplicate of this one. However, the older question didn't get any answer.
Nov
14
comment How to install Chrome browser properly via command line?
I'd say that the name of the file isn't really important (not sure about the extension though). I'd name it google.list, but it could be chrome.list or some other random name not being already used.
Nov
12
comment What is UEFI and Secure Boot? How do they affect Ubuntu?
Another article about the same subject can be found here.
Nov
11
comment Is there a way to test packages I build for correct dependencies?
@GeorgeEdison - pbuilder can be used regardless of the programming language you use. In fact, there's a pbuilder section in the Python Packaging Guide. The point here is that pbuilder will let you check build dependencies as it can be used to create binary packages from the source package in a restricted environment. However, it won't be useful to check dependencies unless you add something to you packaging scripts like running unit tests that make use of all dependencies needed.
Nov
10
comment How do I create an encrypted archive containing specific files?
Depending on the permissions of the files added to the zip file, you might need to execute as root.