ipython -q4thread file.py incompatible wtih subprocess

Bug #348935 reported by Guillaume Baty on 2009-03-26
2
Affects Status Importance Assigned to Milestone
IPython
Fix Committed
Undecided
Brian Granger

Bug Description

When -q4thread is used to launch a script,
subprocess commands fail.
A sample script is joined.
The error output is :

.../bug_ipython.py in <module>()
      1 import sys
      2 import subprocess
----> 3 subprocess.Popen('ls', shell=True, stdout=sys.stdout, stderr=sys.stderr)
      4
      5
/usr/lib/python2.5/subprocess.pyc in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags)
    585 (p2cread, p2cwrite,
    586 c2pread, c2pwrite,
--> 587 errread, errwrite) = self._get_handles(stdin, stdout, stderr)
    588
    589 self._execute_child(args, executable, preexec_fn, close_fds,

/usr/lib/python2.5/subprocess.pyc in _get_handles(self, stdin, stdout, stderr)
    946 else:
    947 # Assuming file-like object
--> 948 c2pwrite = stdout.fileno()
    949
    950 if stderr is None:
AttributeError: 'cStringIO.StringO' object has no attribute 'fileno'
WARNING: Failure executing file: <bug_ipython.py>

There isn't a bug with gthread, there isn't bug with
ipython -q4thread
In [1]:execfile('bug_ipython.py')

Guillaume Baty (guillaume-baty) wrote :
Brian Granger (ellisonbg) wrote :

Issues like this are completely fixed with the new PyOSInputHook based GUI support.

Changed in ipython:
assignee: nobody → Brian Granger (ellisonbg)
status: New → Won't Fix
status: Won't Fix → Fix Committed
Changed in ipython:
milestone: none → 0.11
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers