I am new to Python 3 and still learning but I need help. The first part of the script is:
import mysql.connector #this is failing as a .py but works in the shell<
I have the same question as your, and I found an answer in another website where you asked the same question. I'm pasting the answer here as reference.
The above happens because your script is named 'mysql.py', which is actually the same name as the 'mysql' package. Python correctly reports ImportError. Simply rename your 'mysql.py' to something else, like 'mysqlhacks.py'.
Taken from https://answers.launchpad.net/myconnpy/+question/226992