Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.swapon.de!fu-berlin.de!newsoffice.de!not-for-mail From: Andreas Mosmann Newsgroups: comp.lang.python Subject: Newbie: Python 3.2, search for module dBase + Excel Date: Tue, 17 May 2011 16:40:54 +0200 Organization: Newsoffice.de - http://www.newsoffice.de Lines: 63 Sender: Andreas Mosmann Message-ID: <1305643254.64@user.newsoffice.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: server.stgb.info 1305643254 2052 127.0.0.1 (17 May 2011 14:40:54 GMT) X-Complaints-To: usenet@server.stgb.info NNTP-Posting-Date: Tue, 17 May 2011 14:40:54 +0000 (UTC) User-Agent: Newsoffice.de - based on NewsPortal X-Abuse-Management: t7ewsqiRlbq5mI/e15bay86cqJalXpuaUIWqyJlRUWyKf5euWGNQn6iRUWpvbGBzn6pSjqBraGM= Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5568 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 web de