On Tue, Oct 20, 2009 at 10:44 AM, Matt Herzog <m...@blisses.org> wrote:

> Yes, thanks. What failed was the invocation of PIPE. Apparently I had to 
> explicitly import PIPE from subprocess or python had no clue as to what PIPE 
> was!
>
> Dare I say, "wtf?" since when fo I have to specify such? Shouldn't importing 
> the subprocess module make all its methods available? I can't remember having 
> to do this before.

That is standard behaviour of import. If you
  import subprocess
then you access its members as subprocess.Popen, subprocess.PIPE etc.
There is nothing special to subprocess or PIPE here.

You can use
  from subprocess import Popen, PIPE
if you want to be able to use unqualified names.

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to