Popen: NameError: name 'PIPE' is not defined

M

Mathieu Prevot

Hi

I import subprocess and use Popen, but PIPE is not defined. I used
2.5.1, 2.5.2, Python 2.6a3+ (trunk:63576, May 24 2008, 12:13:40), it's
always the same. What am I missing ?

Thanks
Mathieu
 
D

Diez B. Roggisch

Mathieu said:
Hi

I import subprocess and use Popen, but PIPE is not defined. I used
2.5.1, 2.5.2, Python 2.6a3+ (trunk:63576, May 24 2008, 12:13:40), it's
always the same. What am I missing ?

Without showing code, it's hard to know. A guess is: if you use

import subprocess


then use


subprocess.PIPE

Or if using

from subprocess import Popen

make sure to do

from subprocess import Popen, PIPE

Diez
 
J

Jack Yu

On Sat, 24 May 2008 14:09:07 +0200,Mathieu Prevot wrote:
Hi

I import subprocess and use Popen, but PIPE is not defined. I used
2.5.1, 2.5.2, Python 2.6a3+ (trunk:63576, May 24 2008, 12:13:40), it's
always the same. What am I missing ?

Thanks
Mathieu

Try subprocess.PIPE.
 
M

Mathieu Prevot

2008/5/24 Diez B. Roggisch said:
Without showing code, it's hard to know. A guess is: if you use

import subprocess


then use


subprocess.PIPE

Or if using

from subprocess import Popen

make sure to do

from subprocess import Popen, PIPE

Diez

Indeed... thank you !

Mathieu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top