A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/083552.html below:

reusing sys.stdin?

reusing sys.stdin? reusing sys.stdin?Graham Guttocks graham_guttocks at yahoo.co.nz
Thu Apr 12 20:28:32 EDT 2001
Greetings,

Something I don't understand.  In my program I need to access
sys.stdin from two different functions in the following manner:

   import rfc822,sys
   message_headers = rfc822.Message(sys.stdin)

The problem is that after the first Message instance is created,
sys.stdin seems to be absorbed so that it is no longer around for the
second call to rfc822.Message().  Why is this, and is there a way to
keep sys.stdin for disappearing so I can use it a second time?

Regards,
Graham

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4