On Thu, May 1, 2008 at 3:51 AM, Ross Glover <[EMAIL PROTECTED]> wrote:
> Hi, I'm just learning python (as a first language) and I wrote this little
> snippet (cribbed from a website).  I'm wondering what 'put' is and how it's
> used.  I cannot seem to find much about it.
>
>
> > word = raw_input("enter your word >>")
> > put, get=os.popen4("dict -d wn " + (word))
> > for lines in get.readlines():
> >    print lines

put and get are variables that receive the result of the call to
popen4(). The docs for popen4() are here:
http://docs.python.org/lib/os-newstreams.html#os-newstreams

It says popen4() "returns the file objects (child_stdin,
child_stdout_and_stderr)", so put is linked to stdin for the child
process.

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to