Related to os module
aleaxit at yahoo.com
Sun Dec 10 19:27:56 CET 2000
"Venkatesh Prasad Ranganath" <rvprasad at cis.ksu.edu> wrote in message
news:m3k898yxaj.fsf at boss.dreamsoft.com...
> Following is the code in question
> >>>import os
> >>>os.execv("/bin/ls", ["-l"])
> The output should be that of executing "ls -l" instead it is of "ls".
> being discarded. What might be wrong?
The program-name must be repeated as the first item in the arguments-list.
os.execv('/bin/ls', ['ls', '-l'])
More information about the Python-list