Any clarification on using os.popen() ?
#1
My script calls a module that performs a os.popen() and subsequently fails with a

"OSError: [Errno 2] No such file or directory"

I'm running it on Ubuntu 8.10 with Python2.4. After searching these forums I've found that some users report that os.popen doesn't work in the current XBMC. Other users, however, are recommending using it and claiming that it does in fact work. Any clarification on whether this particular os call actually works in XBMC or not. Maybe in Windows but not Linux?
Reply
#2
subprocess.Popen does not work. No idea about os.popen.

In any case that error looks like an issue with your path, it doesn't look like an issue with popen itself.

os.system definately works and may be just as suitable, depending on your needs.
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#3
rwparris2 Wrote:subprocess.Popen does not work. No idea about os.popen.

In any case that error looks like an issue with your path, it doesn't look like an issue with popen itself.

os.system definately works and may be just as suitable, depending on your needs.

Sorry, I wasn't clear. The program generates the error when it tries to read from the pipe, a.la. "os.popen(...).read()" which is in an imported third party module. I'm just wondering if I want to muck with somebody else's code so that it uses os.system or not. Thanks though.
Reply
#4
I use subprocess.Popen it work well but not os.popen
Reply

Logout Mark Read Team Forum Stats Members Help
Any clarification on using os.popen() ?0