List Info

Thread: Re: findertools.launch reports "no eligible process"




Re: findertools.launch reports "no eligible process"
country flaguser name
Netherlands
2007-06-08 08:33:44
 
On Friday, June 08, 2007, at 02:57PM, "Kent
Johnson" <kent37tds.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-SIGpython.org
>http://mail.python.org/mailman/listinfo/pythonmac-sig
>
>
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: findertools.launch reports "no eligible process"
country flaguser name
United States
2007-06-08 09:33:57
Ronald Oussoren wrote:

  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.
> 

I use os.popen because it supports non-blocking output:
subprocess does 
not, at least not without some additional hacks. I'm glad it
will still 
be around for a while.


-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )