anaconda_wly has asked for the wisdom of the Perl Monks concerning the following question:
My Perl script for this test is very simple, just for test:
my $mycmd = "test.py";#test.pl my @res = qx/$mycmd/;
My test.py script is very simple too:
#!/usr/bin/env python import sys import os os.system("ping 127.0.0.1 > NUL")
execute perl test.pl produce error on Win2003: The handle could not be opened during redirection of handle 1.
No error message on win2008.
From some search on net I guess it's may because when calling the python, the standard output is not created. Any way to modify the Perl script to eliminate the error? Assuming the python file can not be modified.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: call python from perl cause error
by 2teez (Vicar) on Aug 09, 2013 at 08:56 UTC | |
|
Re: call python from perl cause error
by syphilis (Archbishop) on Aug 09, 2013 at 11:26 UTC | |
|
Re: call python from perl cause error
by Anonymous Monk on Aug 09, 2013 at 08:19 UTC | |
by anaconda_wly (Scribe) on Aug 09, 2013 at 08:52 UTC | |
by Anonymous Monk on Aug 09, 2013 at 09:58 UTC |