De: Ed Leafe <[EMAIL PROTECTED]> Data: Terça-Feira, 24 de Abril de 2007, 14:55 > On Apr 23, 2007, at 10:53 PM, Vince Teachout wrote: > > > "unable to connect." > > > > I'm now downloading python 2.5.1, wxpython 2.8.3, and the dabo > win.zip> files onto the XP Laptop a client lent me, as that > machine is only 2 > > years old instead of my ancient 1999 dell. > > [... cut text ...] > > Sounds like you don't have the database adapter installed. Did > you > install one of: a) MySQLdb, b) psycopg, c) kinterbasdb or d) > pymssql? > These are the modules that provide the connectivity from Python to > > MySQL, PostgreSQL, Firebird and MS SQL, respectively. > > Assuming you're following the screencast, which uses the MySQL > sample data, you'd need to install MySQLdb. Try this from cmd.exe: > > run 'python', and then from the Python prompt, type 'import > MySQLdb'. > Did it complain? > > -- Ed Leafe > -- http://leafe.com > -- http://dabodev.com
My advice for would be use SQLite to start with. Since your using Python 2.5 it's already included, saving you the trouble of having to download and install modules, db engine... You can get a SQLite db file from the dabodev.com site in the the download section: ftp://dabodev.com/dabo/webtest.zip In case your new to Python SQLite here's a few lines that will create a db for you. Just adapt them to your taste: # Python code makeSQLiteDB.py try: from sqlite3 import dbapi2 as sqlite except ImportError: # prior to Python 2.5 from pysqlite2 import dbapi2 as sqlite # data to populate tables authors = (('Jorge Luis Borges',), ('J.R.R. Tolkien',)) books = (('Aleph', 1),('Silmarilion', 1)) bookauthors = ((1, 1),(2, 2)) # make the db cx = sqlite.connect('bookdb.db') cr = cr.cursor() cr.execute("""CREATE TABLE book (book_id INTEGER PRIMARY KEY, title VARCHAR(50), author INTEGER);""") # ... same for other tables cx.commit() cr.executemany("""INSERT INTO book (title, author_id);""", authors) # ... same for other tables cx.commit() # end code Also you would like to check-out: www.sqlite.org/ I'm guessing that since SQLite is now a part of the Python distribution the Python docs should give you necessary. HTH, Miguel _______________________________________________________________________________________ Aqueca o seu Inverno com o credito pronto a usar! Saiba mais em http://www.iol.pt/correio/rodape.php?dst=0701181 _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]
