Re: sys.stdin on windows

2008-09-03 Thread Gabriel Genellina
En Wed, 03 Sep 2008 07:16:12 -0300, Tim Golden <[EMAIL PROTECTED]> escribi�: Gabriel Genellina wrote: En Wed, 03 Sep 2008 06:16:03 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribi�: When I try to run the same thing on windows I get IOError: [Error 9] Bad file descriptor How can I make

Re: sys.stdin on windows

2008-09-03 Thread [EMAIL PROTECTED]
On Sep 3, 11:16 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > Gabriel Genellina wrote: > > En Wed, 03 Sep 2008 06:16:03 -0300, [EMAIL PROTECTED] > > <[EMAIL PROTECTED]> escribi : > > >> I often grep particular patterns out of large logfiles and then > >> pipeline the output to sort and uniq -c > >> I

Re: sys.stdin on windows

2008-09-03 Thread Tim Golden
Gabriel Genellina wrote: En Wed, 03 Sep 2008 06:16:03 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribi�: I often grep particular patterns out of large logfiles and then pipeline the output to sort and uniq -c I thought today to knock up a script to do the counting in a python dict. This s

Re: sys.stdin on windows

2008-09-03 Thread Gabriel Genellina
En Wed, 03 Sep 2008 06:16:03 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribi�: I often grep particular patterns out of large logfiles and then pipeline the output to sort and uniq -c I thought today to knock up a script to do the counting in a python dict. This seems work in linux $ cat

sys.stdin on windows

2008-09-03 Thread [EMAIL PROTECTED]
I often grep particular patterns out of large logfiles and then pipeline the output to sort and uniq -c I thought today to knock up a script to do the counting in a python dict. This seems work in linux $ cat count.py #!/usr/bin/env python import sys from collections import defaultdict accumulato