import mysqldb discrepancy between template and Pythonista.app
So in my Script folder I have a subfolder called mysqldb. The same files in my script folder are synced to Pythonista using dropbox for portability
Script/mysqldb/.....
"import mysqldb" from a file in my script folder worked just fine allowing me to make database calls.
After the new version of the template dropped yesterday, after migrating my project to it, I had an import error that says
' "module" object has no attribute connect.'
I fixed the error by changing
import mysqldb
to
from mysqldb import mysqldb
...Now the above change fixed the problem for the template. But if I run those same files from Pythonista I get "global name mysqldb is not defined"
I have the short term solution which is to do a
Try: import mysqldb except ImportError: from mysqldb import mysqldb
...but I sense there's a deeper issue here.
Update: the pythonista 3 beta is different. neither of the two approaches work....