[Tutor] Trying to read dBase files

Dave Angel davea at davea.name
Tue Mar 11 21:09:21 CET 2014


 Alan Gauld <alan.gauld at btinternet.com> Wrote in message:
> On 11/03/14 18:39, Al Bull wrote:
> 
>
> 
>> I am using Python 3.3.  I did some google searches and found something
>> called dbfpy to read dbase, so I downloaded and installed it.
>>
>>    File "C:\Python33\lib\site-packages\dbfpy\dbf.py", line 260
>>      print repr(_rec)
>>               ^
>> SyntaxError: invalid syntax
> 
> You are using Python 3.3 so print is a function.
> You need to use
> 
>        print( repr(_rec) )
> 
>> My assumption is that this module is written for an earlier release of
>> Python?
> 
> That may be true too, but your problem is in the print line.


Which is in the dbfpy code.
-- 
DaveA



More information about the Tutor mailing list