2008-08-27

 

Unbuffered IO in Python

I was looking around for a while on how to get unbuffered IO in Python, and eventually discovered the following entry in the man page:
       -u     Force  stdin, stdout and stderr to be totally unbuffered.  On systems
where it matters, also put stdin, stdout and stderr in binary mode. Note
that there is internal buffering in xreadlines(), readlines() and
file-object iterators ("for line in sys.stdin") which is not
influenced by this option. To work around this, you will want to use
"sys.stdin.readline()" inside a "while 1:" loop.

Pretty cool, except in Perl you can turn on and off unbuffered IO as you need. With Python it's wither on or off globally, but then you can use different methods for reading and writing buffered vs unbuffered IO.

Also check out this article explaining some other useful IO stuff...

Labels:


2008-08-10

 

Google on IPv6 network

Not really important, but just out of interest, google is now reachable via IPv6:
$ host ipv6.google.com
ipv6.google.com is an alias for ipv6.l.google.com.
ipv6.l.google.com has IPv6 address 2001:4860:0:1001::68



No I just need to find an IPv6 ready ISP in South Africa :-)

2008-08-09

 

Editing your web pages in OOo

So you have played with OpenOffice.org (OOo) and you now want to start editing web pages... Well - it's seems to more easy with ODF@WWW.

There is also some talk on Linux.com about this new handy tool and how to get going.


This page is powered by Blogger. Isn't yours?