by rupe

How do I read from standard input using a Python script?

Just read from sys.__stdin__ (aka sys.stdin).. for example, sys.stdin.read() sys.stdin is a file object, and can be operated on as such.

 


 
Read more of   The Yak's Frequently Questioned Answers   (mod.2010-02-10)

436.   How should an American use their cellphone on a short trip to Europe?   [strick/2006-07-25]
428.   What is emo surfing (emosurfing)?   [jake/2006-01-21]
410.   What is naked sushi? What is Nyataimori? What is Nyotaimori? Or how do I ask for a "Naked Sushi" bar?   [jake/2006-05-21] ( novalis/2005-03-30 )
381.   What is that pesky System.map file anyway?   [jake/2003-09-25]
351.   How can I setup netware services / mount netware servers in linux?   [jake/2003-02-25]
323.   what does a tftp boot error "too many packages" mean?   [jesse/2002-09-05]
305.   Why was strick's workstation at Versant named GWARN?   [strick/2002-01-23]
273.   Where do I find a free comma delimited file with all USA zipcodes, including longitude and latitude?   [les/2001-09-06]
215.   what is the maximum length of a file name in mac os 9?   [jesse/2001-04-18]
211.   Who are strick's net.gods?   [strick/2001-04-08] ( rupe/2001-05-22 rupe/2001-05-22 )
204.   Now that Mir's gone, where can I find images and information about the station and its reentry?   [rupe/2001-03-22]
140.   What was programming the Royal McBee LGP-30 like?   [rupe/2000-10-25]
87.   How do i OPT OUT of doubleclick's user-tracking cookies?   [strick/2000-05-11]
74.   How many roads must a man walk down?   [vonguard/2000-04-04]
70.   How can I get info from my (email-capable) cellfon?   [robey/2000-02-29]
10.   are there ICKY THINGS on the internet?   [strick/2000-01-17]