Archive for September, 2008
RTFM: Python exec()
by David North on Sep.19, 2008, under Code
Do you write Python (not very well?).
Ever wondered why your calls to os.execvp() and its ilk don’t work as expected?
The answer may be that you’re doing this:
os.execvp('ls', ['/home/fred'])
When you actually mean this:
os.execvp('ls', ['ls', '/home/fred'])
As ever, reading the Python docs (help(os.execvp)) is usually better than randomly googling for an answer.