[Pythonmac-SIG] findertools.launch reports "no eligible process"
Ronald Oussoren
ronaldoussoren at mac.com
Fri Jun 8 15:33:44 CEST 2007
On Friday, June 08, 2007, at 02:57PM, "Kent Johnson" <kent37 at tds.net> wrote:
>has wrote:
>> Anyway, simplest solution here is:
>>
>> import subprocess
>> subprocess.call(['open', '/Users/drew/Documents'])
>
>or
>import open
import os # ;-)
>os.system('open /Users/drew/Documents')
That works but is non-trivial to get entirely correct due to quoting. Using subprocess is much better because you don't have to worry about quoting for the shell. Os.popen and os.system should basically be deprecated, but that will probably not happen anytime soon because they are used a lot in existing code.
Ronald
>
>Kent
>_______________________________________________
>Pythonmac-SIG maillist - Pythonmac-SIG at python.org
>http://mail.python.org/mailman/listinfo/pythonmac-sig
>
>
More information about the Pythonmac-SIG
mailing list