Sion Arrowsmith wrote:
> Kent Johnson <[EMAIL PROTECTED]> wrote:
>
>>Sion Arrowsmith wrote:
>>
>>>(and please avoid the abuse of raw strings for Windows paths).
>>
>>Why do you consider that abuse of raw strings?
>
> I consider it abuse because it's not what they were invented for.
> I consider
Kent Johnson <[EMAIL PROTECTED]> wrote:
>Sion Arrowsmith wrote:
>> (and please avoid the abuse of raw strings for Windows paths).
>Why do you consider that abuse of raw strings?
I consider it abuse because it's not what they were invented for.
I consider discouraging it to be a good thing in orde
Sion Arrowsmith wrote:
> 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).
Why do you consider that abuse of raw strin
Sion Arrowsmith wrote:
"F:\coding\pwSync\popen_test\testia.py"
> 'F:\\coding\\pwSync\\popen_test\testia.py'
this might make it more obvious that something's not quite right with that
string literal:
>>> print "F:\coding\pwSync\popen_test\testia.py"
F:\coding\pwSync\popen_test es
Martin P. Hellwig <[EMAIL PROTECTED]> 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 th
Donn Cave wrote:
>
> Anyway, it seems unlikely he would get that INVARG error for this
> reason. That's an error from the host operating system, not the
> interpreter, and it mostly likely refers to the file descriptor.
> Since it works for me, I guess his problem is basically this:
>
> |> (pyt
gry@ll.mit.edu wrote:
>
> You gave it a single string, not a list(sequence) of strings. Try
> something like:
> std_in.writelines(["notgood"])
>
I got this output then:
>>>
something:
Traceback (most recent call last):
File "F:\coding\pwSync\popen_test\popen_test.py", line 8, in ?
Quoth gry@ll.mit.edu:
| Martin P. Hellwig wrote:
...
|> import popen2
|>
|> std_out, std_in = popen2.popen2("testia.py")
|>
|> x=std_out.readline()
|> print(x)
|>
|> std_in.writelines("notgood")
|>
|> x=std_out.readline()
|> print(x)
...
|> Traceback (most recent call last):
|>File "F:\coding\p
Martin P. Hellwig wrote:
> Hi all,
>
> I was doing some popen2 tests so that I'm more comfortable using it.
> I wrote a little python script to help me test that (testia.py):
>
> -
> someline = raw_input("something:")
>
> if someline == 'test':
> print("yup")
>