Re: Fwd: Python new user question - file writeline error

2007-02-08 Thread Gabriel Genellina
En Thu, 08 Feb 2007 14:20:57 -0300, Shawn Milo <[EMAIL PROTECTED]> escribió: > On 8 Feb 2007 09:05:51 -0800, Gabriel Genellina <[EMAIL PROTECTED]> > wrote: >> On 8 feb, 12:41, "Shawn Milo" <[EMAIL PROTECTED]> wrote: >> >> > I have come up with something that's working fine. However, I'm fairly

Re: Fwd: Python new user question - file writeline error

2007-02-08 Thread James
On Feb 8, 3:26 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Shawn Milo a écrit : > > > > > To the list: > > > I have come up with something that's working fine. However, I'm fairly > > new to Python, so I'd really appreciate any suggestions on how this > > can be made more Pythonic. > > > T

Re: Fwd: Python new user question - file writeline error

2007-02-08 Thread Bruno Desthuilliers
Shawn Milo a écrit : > To the list: > > I have come up with something that's working fine. However, I'm fairly > new to Python, so I'd really appreciate any suggestions on how this > can be made more Pythonic. > > Thanks, > Shawn > > > > > > > Okay, here's what I have come up with: > > >

Re: Fwd: Python new user question - file writeline error

2007-02-08 Thread Shawn Milo
On 2/8/07, Jussi Salmela <[EMAIL PROTECTED]> wrote: > Shawn Milo kirjoitti: > > To the list: > > > > I have come up with something that's working fine. However, I'm fairly > > new to Python, so I'd really appreciate any suggestions on how this > > can be made more Pythonic. > > > > Thanks, > > Shaw

Re: Fwd: Python new user question - file writeline error

2007-02-08 Thread Jussi Salmela
Shawn Milo kirjoitti: > To the list: > > I have come up with something that's working fine. However, I'm fairly > new to Python, so I'd really appreciate any suggestions on how this > can be made more Pythonic. > > Thanks, > Shawn > > > > > > > Okay, here's what I have come up with: What f

Re: Fwd: Python new user question - file writeline error

2007-02-08 Thread Shawn Milo
On 8 Feb 2007 09:05:51 -0800, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > On 8 feb, 12:41, "Shawn Milo" <[EMAIL PROTECTED]> wrote: > > > I have come up with something that's working fine. However, I'm fairly > > new to Python, so I'd really appreciate any suggestions on how this > > can be made

Re: Fwd: Python new user question - file writeline error

2007-02-08 Thread Gabriel Genellina
On 8 feb, 12:41, "Shawn Milo" <[EMAIL PROTECTED]> wrote: > I have come up with something that's working fine. However, I'm fairly > new to Python, so I'd really appreciate any suggestions on how this > can be made more Pythonic. A few comments: You don't need the formatDatePart function; delete

Fwd: Python new user question - file writeline error

2007-02-08 Thread Shawn Milo
To the list: I have come up with something that's working fine. However, I'm fairly new to Python, so I'd really appreciate any suggestions on how this can be made more Pythonic. Thanks, Shawn Okay, here's what I have come up with: #! /usr/bin/python import sys import re month ={'JAN':

Re: Python new user question - file writeline error

2007-02-07 Thread Bruno Desthuilliers
James a écrit : > On Feb 7, 4:59 pm, "Shawn Milo" <[EMAIL PROTECTED]> wrote: > (snip) >>I'm pretty new to Python myself, but if you'd like help with a >>Perl/regex solution, I'm up for it. For that matter, whipping up a >>Python/regex solution would probably be good for me. Let me know. >> >>Shaw

Re: Python new user question - file writeline error

2007-02-07 Thread Jerry Hill
On 7 Feb 2007 11:31:32 -0800, James <[EMAIL PROTECTED]> wrote: > I have this code: ... > infile.close > outfile.close ... > 1. the outfile doesn't complete with no error message. when I check > the last line in the python interpreter, it has read and processed the > last line, but the output file

Re: Python new user question - file writeline error

2007-02-07 Thread James
On Feb 7, 4:59 pm, "Shawn Milo" <[EMAIL PROTECTED]> wrote: > On 7 Feb 2007 11:31:32 -0800, James <[EMAIL PROTECTED]> wrote: > > > > > Hello, > > > I'm a newbie to Python & wondering someone can help me with this... > > > I have this code: > > -- > > #! /usr/bin/python > > >

Re: Python new user question - file writeline error

2007-02-07 Thread Shawn Milo
On 7 Feb 2007 11:31:32 -0800, James <[EMAIL PROTECTED]> wrote: > Hello, > > I'm a newbie to Python & wondering someone can help me with this... > > I have this code: > -- > #! /usr/bin/python > > import sys > > month ={'JAN':1,'FEB':2,'MAR':3,'APR':4,'MAY':5,'JUN':6,'JUL':7

Re: Python new user question - file writeline error

2007-02-07 Thread Bruno Desthuilliers
James a écrit : > Hello, > > I'm a newbie to Python & wondering someone can help me with this... > > I have this code: > -- > #! /usr/bin/python > > import sys > > month ={'JAN':1,'FEB':2,'MAR':3,'APR':4,'MAY':5,'JUN':6,'JUL':7,'AUG': > 8,'SEP':9,'OCT':10,'NOV':11,'DEC':

Python new user question - file writeline error

2007-02-07 Thread James
Hello, I'm a newbie to Python & wondering someone can help me with this... I have this code: -- #! /usr/bin/python import sys month ={'JAN':1,'FEB':2,'MAR':3,'APR':4,'MAY':5,'JUN':6,'JUL':7,'AUG': 8,'SEP':9,'OCT':10,'NOV':11,'DEC':12} infile=file('TVA-0316','r') outfile=