473,508 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Popen: NameError: name 'PIPE' is not defined

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
Jun 27 '08 #1
3 44367
Mathieu Prevot schrieb:
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
Jun 27 '08 #2
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.
Jun 27 '08 #3
2008/5/24 Diez B. Roggisch <de***@nospam.web.de>:
Mathieu Prevot schrieb:
>>
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
Indeed... thank you !

Mathieu
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
6687
by: NetKev | last post by:
I added a function 'warn_Admin' and defined it just before another function 'process_log'. 'process_log' calls this warn_Admin' function. However, when it gets called i get the following error...
3
7773
by: Jesse | last post by:
Hi all, I have a problem using wget and Popen. I hope someone can help. -- Problem -- I want to use the command: wget -nv -O "dir/cpan.txt" "http://search.cpan.org" and capture all it's...
2
27425
by: jolly | last post by:
hey guys, When i try to run my code I get an error. NameError name 'main is not defined' if __name__ == "__main__": main() filename = "addbook.dat"
3
6344
by: willkab6 | last post by:
I am very new to both programming and Pyhton and while trying to do some practice using A byte of python an Error pops up on the IDLE shell. I am using windows XP. PLease see below. while running:...
1
29975
by: tshravan | last post by:
Hello All, I am newbie to python. I was trying to use a=zeros(5) in python shell, but it is throwing the following exception in the shell Traceback (most recent call last): File...
1
9591
by: manojnkumar | last post by:
#This is to add, sub, mul and div using functions def menu(): print "" print "Welcome to the calculator" print "===== These are some of the options =====" print "1-->...
3
6553
by: cirfu | last post by:
im doing the python challenge and well, i solved this problem with ruby :) phrase = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb...
4
3749
by: Harry | last post by:
Hi there. I am trying to download a file(sn.last) from a public FTP server with the following code: from ftplib import FTP ftp=FTP('tgftp.nws.noaa.gov') ftp.login()...
25
2747
by: Jeremy Banks | last post by:
Hi. I wondered if anyone knew the rationale behind the naming of the Popen class in the subprocess module. Popen sounds like the a suitable name for a function that created a subprocess, but the...
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5049
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1550
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.