Yup if you use that command normally then it works fine. I added a line at the end of the script:
cursor.execute("COMMIT")
and it worked fine.
Thanks for the help,
Il