windows active directory ldap output encoding

2008-07-08 Thread jo3c
Hi.. Im trying to get some information out of a windows sever 2003 chinese active directory system so let's say encoding is probably big5 or utf-8 what im doing is simliar to ldapsearch in shell with my python script using python ldap module the result is not the correct encoding.. i've look man

Re: use fileinput to read a specific line

2008-01-07 Thread jo3c
On Jan 8, 2:08 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > > Given that the OP is talking 2000 files to be processed, I think I'd > > recommend explicit open() and close() calls to avoid having lots of I/O > > structures floating around... > > Good point. I didn't think of that. It could als

Re: linecache and glob

2008-01-07 Thread jo3c
On Jan 4, 5:25 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > jo3c wrote: > > i have a 2000 files with header and data > > i need to get the date information from the header > > then insert it into my database > > i am doing it in batch so i use glob.glob('/

use fileinput to read a specific line

2008-01-07 Thread jo3c
hi everybody im a newbie in python i need to read line 4 from a header file using linecache will crash my computer due to memory loading, because i am working on 2000 files each is 8mb fileinput don't load the file into memory first how do i use fileinput module to read a specific line from a file

Re: Python's great, in a word

2008-01-07 Thread jo3c
On Jan 7, 9:09 pm, [EMAIL PROTECTED] wrote: > I'm a Java guy who's been doing Python for a month now and I'm > convinced that > > 1) a multi-paradigm language is inherently better than a mono-paradigm > language > > 2) Python writes like a talented figure skater skates. > > Would you Python old-tim

Re: linecache and glob

2008-01-03 Thread jo3c
) but if i use linecache.getline('glob.glob('/mydata/*/*/*.txt', 4) won't work i am running out of ideas thanks in advance for any help jo3c -- http://mail.python.org/mailman/listinfo/python-list

linecache and glob

2008-01-03 Thread jo3c
t;>> linecache.getline(glob.glob('/etc/*', 4) doens't work is there any better methods??? thank you very much in advance jo3c -- http://mail.python.org/mailman/listinfo/python-list

parse text files in a directory?

2008-01-01 Thread jo3c
hi everybody im a newbie in python, i have a question how do u parse a bunch of text files in a directory? directory: /dir files: H20080101.txt , H20080102.txt,H20080103.txt,H20080104.txt,H20080105.txt etc.. i already got a python script to read and insert a single text files into a postgres