Re: parse date string having "EDT"

2011-06-21 Thread Junaid P V
Thanks, My script should be platform independent, so I think filtering out time zone info is better. -- http://mail.python.org/mailman/listinfo/python-list

parse date string having "EDT"

2011-06-20 Thread Junaid P V
I was trying to parse a date string containing "EDT" time zone eg: 'Mon Jun 20 14:00:57 EDT 2011' I tried: datetime.strptime('Mon Jun 20 14:00:57 EDT 2011', '%a %b %d %H:%M:%S %Z %Y') But I get error -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode text file

2009-10-03 Thread Junaid
On Sep 27, 6:39 pm, "Mark Tolonen" wrote: > "Junaid" wrote in message > > news:0267bef9-9548-4c43-bcdf-b624350c8...@p23g2000vbl.googlegroups.com... > > >I want to do replacements in a utf-8 text file. example > > > f=open("test.txt",&q

unicode text file

2009-09-27 Thread Junaid
I want to do replacements in a utf-8 text file. example f=open("test.txt","r") #this file is uft-8 encoded raw = f.read() txt = raw.decode("utf-8") txt.replace{'English', ur'ഇംഗ്ലീഷ്') #replacing raw unicode string, but not working f.write(txt) f.close() f.flush() please, help me thanks --