Python and MySQL

Sion Arrowsmith siona at chiark.greenend.org.uk
Thu Nov 3 09:13:31 EST 2005


Aquarius <stefan.kanev at gmail.com> wrote:
>I want to know if there is a way to interface a MySQL database without
>Python-MySQL or without installing anything that has C files that need
>to be compiled. The reason for this, is that I want to develop a
>certain web application, but my hosting provider (!#@$!@#%) isn't very
>eager to supply Python-MySQL (or any modules to python). Is there an
>alternative approach I could use to pass around this ridiculos lack of
>functionality?

If you've got MySQL installed, you probably have a command-line
mysql client, and you could use subprocess or popen to run that.
That's a little desperate though, and the error handling will suck.
(I've seen this trick used with other databases.)

-- 
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump



More information about the Python-list mailing list