943,832 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 325
  • Python RSS
Aug 4th, 2009
0

Opening standard IO as a stream

Expand Post »
I'm wondering if there's a way to open standard I/O as a stream, so I can write and read character by character. Something like
Python Syntax (Toggle Plain Text)
  1. handle = open(stdio)
Any ideas?
Similar Threads
Reputation Points: 17
Solved Threads: 0
Light Poster
tdeck is offline Offline
31 posts
since Jul 2009
Aug 4th, 2009
1

Re: Opening standard IO as a stream

sys.stdin is an "always open" file handle to the stdin and likewise sys.stdout. To use them, import sys.
Reputation Points: 355
Solved Threads: 292
Veteran Poster
jlm699 is offline Offline
1,102 posts
since Jul 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: [matplotlib] How to set tight axis for log? axis('tight') doesn't work well?)
Next Thread in Python Forum Timeline: Collision Detection





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC