Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5568
| From | Andreas Mosmann <mosmann@expires-31-05-2011.news-group.org> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Newbie: Python 3.2, search for module dBase + Excel |
| Date | 2011-05-17 16:40 +0200 |
| Organization | Newsoffice.de - http://www.newsoffice.de |
| Message-ID | <1305643254.64@user.newsoffice.de> (permalink) |
Hi, I am new to python and so I decided to use python 3.2 But, if I found out correctly, the are no working modules concerning Excel and dBase for this python version. Did I only misunderstand anything or is this right? I tried to download and use pydbf and pyexcelerator but both gave me an syntax error inside the modules and I somewhere read, that both modules only exist for version 2.X Is there a way for me to use them anyway or do I have to change to any 2.X- Version? If last, which should I install? Thanks in advance Andreas remark: My task is to compare 2 directories incl. subdirs containing dBase- Files and find out differencers in FileNames and FileStructures. Up t now I devided it into 3 lists: OnlyInDir1, OnlyInDir2 and InBothDirs. Next step is to put it into an Excel- File with 3 worksheets. If this would be impossible, so I could save this in any other way. But I really need a module that handles dBase- files to compare Structures of files with equal names. My Code up to now is something like import os dirV1 = "C:\Path1" dirV2 = "C:\Path2" anzL1=0 listV1 = [] for root, dirs, files in os.walk(dirV1): for file in files: myFile=os.path.join(root[len(dirV1):], file) listV1.append(myFile) anzL1=anzL1+1 print(anzL1) anzL2=0 anzLG=0 listV2 = [] listGem = [] for root, dirs, files in os.walk(dirV2): for file in files: myFile=os.path.join(root[len(dirV2):], file) try: listV1.index(myFile) listV1.remove(myFile) listGem.append(myFile) anzL1=anzL1-1 anzLG=anzLG+1 except ValueError: listV2.append(myFile) anzL2=anzL2+1 print(anzL1) print(anzLG) print(anzL2) -- wenn email, dann AndreasMosmann <bei> web <punkt> de
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Newbie: Python 3.2, search for module dBase + Excel Andreas Mosmann <mosmann@expires-31-05-2011.news-group.org> - 2011-05-17 16:40 +0200
csiph-web