I understand from the following post that Python equivalent of mysql_real_escape_string can be tested using two lines of code that can be found on the following stack link. I can not get the desired output so I figured I would reopen the discussion for help on my isolated matter.
Related stack overflow link:
Python equivalent of mysql_real_escape_string, for getting strings safely into MySQL?
Why would those two lines of code work for someone but not on my machine?
root@dev:~# python
Python 2.7.10 (default, Oct 14 2015, 16:09:02)
[GCC 5.2.1 20151010] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>> MySQLdb.escape_string("'")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: must be impossible<bad format char>, not str