os.execv
Nick Coghlan
ncoghlan at email.com
Wed Mar 5 07:30:09 EST 2003
Ulrich Petri wrote:
> "Skip Montanaro" <skip at pobox.com> schrieb im Newsbeitrag
> news:mailman.1046828168.14751.python-list at python.org...
>
>> >>> import os
>> >>> os.execv("/usr/bin/find", ("find", "/ -name test"))
>> find: / -name test: No such file or directory
>>
>>Maybe
>>
>> os.execv("/usr/bin/find", "find", "/", "-name", "test")
>>
I don't have an interpreter handy, but wouldn't the version below achieve the
'split literal on whitespace" effect?
>>> os.execv("/usr/bin/find", *"find / -name test".split())
Regards,
Nick.
--
Nick Coghlan | Brisbane, Australia
ICQ#: 68854767 | ncoghlan AT email DOT com
Mobile: 0409 573 268 | http://oneofthesedays.not.there
"Let go your prejudices,
lest they limit your thoughts and actions."
More information about the Python-list
mailing list