>>PS. Redirecting with > from a script whose interpreter was started by
>>windows extension association
>>doesn't work on some version of windows. To be safe, invoke the
>>interpreter explicitly, e.g.,
>>     python myscript.py [whatever args here] > pi3003.txt

>Thanks very much for this.
>What kind of args could I use here?
Any that your script allows or understands.
an example:
 python c:/Python22/Lib/PySourceColor.py -i- -s -l < c:/MyFile.py >
c:/tmp/myfile.html

A few things that might help you write a well behaved script:
if sys.stdin.isatty():
    "direct"
else:
    "redirected"
This snippet can determine if you have redirected IO.

I just found this and it looks informative.
http://www.jpsdomain.org/windows/redirection.html

hth,
M.E.Farmer

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to