raw stdin/out on WIN32?

Fredrik Lundh effbot at telia.com
Wed Mar 15 02:45:16 EST 2000


Yann SAMAMA <ysamama at cybercable.fr> wrote:
> I want to write for WIN32 platforms a tiny script similar to "split"
> on UNIX.
>
> for example :
>
> python split.py -s 100 < bigfile
> => splits the input (here, bigfile) in 100 kb files

piping binary data isn't a very common thing to do
under windows. maybe you should consider using
an ordinary argument instead, so you can control
how the files are opened?

> Any clue really welcomed!

here's one:

usage: python [option] ... [-c cmd | file | -] [arg] ...
Options and arguments (and corresponding environment variables):
...
-u     : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)
...

</F>





More information about the Python-list mailing list