Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Python

Status
Not open for further replies.

TNGPicard

Technical User
Jun 23, 2003
153
US
Has anybody used (or is using) Python with Pervasive? Any bumps along the way??
 
I haven't tried it myself but as long as Python can call the ODBC driver (or Btrieve API if you're really adventurous), there shouldn't be a problem from the Pervasvie side.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Got a little curious so I downloaded ActivePython and tried it. The following very simple sample worked for me with PSQL v10.10:
Code:
import dbi
import odbc
Con = odbc.odbc('DEMODATA')
Cursor = Con.cursor()
Cursor.execute("select id, name from class")
Results = Cursor.fetchall()
for Data in Results:
  print str(Data[0]) + "." + Data[1]

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top