#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Add terminal output to table..


    I wrote a bit of code in python that gives me an output list. I want to put this list(which can be up to thousands of different words or values) in the first two colums of my MySQL database table. So I guess what I'm asking is how do I use both python and SQL in the terminal command line? And how do I open SQL from terminal? I've only ever used phpmyadmin and MySQL workbench--but neither of those allow python code.
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,851
    Rep Power
    481
    $ sqlite3
    sqlite> .help

    maybe it works for mysql too.

    python wrapper for mysqlhttp://zetcode.com/databases/mysqlpythontutorial/

    The zetcode tutorials I've used have been useful.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo