don't understand popen2

Sion Arrowsmith siona at chiark.greenend.org.uk
Thu Mar 23 14:40:44 CET 2006


Martin P. Hellwig <mhellwig at xs4all.nl> wrote:
>std_out, std_in = popen2.popen2("F:\coding\pwSync\popen_test\testia.py")
                                                             ^^
Your problem is, I suspect, nothing to do with popen2(), which is
supported by the fact that the only thing other than OS different
between this and your working BSD version is the path:
>>> "F:\coding\pwSync\popen_test\testia.py"
'F:\\coding\\pwSync\\popen_test\testia.py' 

Try:
std_out, std_in = popen2.popen2("F:/coding/pwSync/popen_test/testia.py")
or:
std_out, std_in = popen2.popen2("F:\\coding\\pwSync\\popen_test\\testia.py")
(and please avoid the abuse of raw strings for Windows paths).

-- 
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump



More information about the Python-list mailing list