To use OSPLink.py, place it in the same folder as your Python script.
(Update 30 Sept 2015: OSPLink.py now includes Python implementations of the AWebSvr classes from TAWQT.com and does not depend on .NET. There is a tutorial on the PyrrhoDB website containing a fully-worked-out sample.)
For example (assuming OSPSvr.exe is running on the local machine):
from OSPLink import *
conn = PyrrhoConnect("Files=Temp;User=Fred")conn.open()
try:
conn.act("create table a(b date)")
except DatabaseError as e:
print(e.message)
conn.act("insert into a values(current_date)")
com = conn.createCommand()
com.commandText = 'select * from a'
rdr = com.executeReader()
while rdr.read():
print(rdr.val(0))
rdr.close()
print("Done")
For full details, see section 6.8 of the PyrrhoDB Manual.