Re: alternative to hardcoding system util paths

2010-09-16 Thread Daniel da Silva
You could also use the subprocess module, which like os.system, doesn't care about the absolute path of the executable. import subprocess p = subprocess.Popen(['aptitude', 'search', 'gnome']) p.wait() On Thu, Sep 16, 2010 at 7:07 PM, Cosme Domínguez wrote: > 2010/9/17 Stephen Burke : > > I'm wr

Re: alternative to hardcoding system util paths

2010-09-16 Thread Cosme Domínguez
2010/9/17 Stephen Burke : > I'm writing a python script and I'm using aptitude and update-grub in > the script.  Currently I just use the abolute path to the bins ie. > /usr/bin/aptitude.  Ultimately I'd like to package it and distribute > it as a deb.  What's the recommended way to get these paths