Message222053
There are certainly some problems with subprocess on Windows.
Note .../python34> pip pyflakes installs in a second or two.
...> pyflakes -h # Windows Command Propmpt WCP
>>> import subprocess as s; s.check_output("pyflakes -h")
console interpreter CI or Idle, all produce help output
WCP> pyflakes c:\programs\python34\lib\turtle.py # or / instead of \
c:\programs\python34\lib\turtle.py:572: local variable 'rgb' is assigned to but never used
... 50+ lines (all < 1/2 second)
c:\programs\python34\lib\turtle.py:4139: undefined name 'exitonclick'
CI>>> s.check_output("pyflakes c:\programs\python34\lib\turtle.py")
pause, so almost think is hanging, then
c:\programs\python34\lib\lib2to3\tests\data\bom.py:2:17: invalid syntax print "BOM BOOM!"
...100 more error for various files.
pyflakes ignores file name given and checks entire stdlib.
ID>>> s.check_output("pyflakes c:\programs\python34\lib\turtle.py")
hangs indefinitely, no output
CI or ID >>> s.check_output("pyflakes c:/programs/python34/lib/turtle.py") # / instead of \ which was ok in WCP
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "F:\Python\dev\5\py35\lib\subprocess.py", line 627, in check_output
raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command 'pyflakes c:/programs/python34/lib/turtle
.py' returned non-zero exit status 1
Above is CI 3.5 and Idle 3.4. subprocess and pyflakes work fine on linux. We are trying to add a feature to Idle to do above on file in editor, and are stuck here. The actual provisional code is
+ proc = Popen(args, stdout=PIPE, stderr=PIPE)
+ proc.wait()
+ output, error = map(lambda b:b.decode('utf-8'), proc.communicate())
where args is list, which shows the same hang forever behavior. |
|
Date |
User |
Action |
Args |
2014-07-01 18:32:12 | terry.reedy | set | recipients:
+ terry.reedy, tim.golden, brian.curtin, Alex Quinn, BreamoreBoy, paroga, zach.ware, steve.dower |
2014-07-01 18:32:12 | terry.reedy | set | messageid: <1404239532.5.0.00907352540845.issue8631@psf.upfronthosting.co.za> |
2014-07-01 18:32:12 | terry.reedy | link | issue8631 messages |
2014-07-01 18:32:11 | terry.reedy | create | |
|