Re: OT: Python Server Pages and uploading jpegs into MySQL

Date : Wed, 23 May 2007 15:06:32 -0400
To : XSI(at)Softimage.COM
From : Patrick Boucher <patrickb(at)buzzimage.com>
Subject : Re: OT: Python Server Pages and uploading jpegs into MySQL
Quite honestly I'd avoid plunking the entire jpeg into the db.

May I suggest creating your thumbnails, storing them with the originals (if you need them) somewhere on the filesystem and putting the path to the file into the database. Your database won't blow up in size and grind to a halt trying to dish out pictures. That's the filesystem's job.

As for db access check out the MySQLdb module and it's docs.
http://sourceforge.net/projects/mysql-python

Rather straigtforward.

I'd also encourage you to look at Django. Nice framework for web dev in Python and much more interresting than simple PSP.

--
Patrick Boucher
TD - Coder - Resident geek
Buzz Image Group
Tel 514.848.0579
Fax 514.848.6371

www.buzzimage.com
www.xsi-blog.com

Bradley Gabe wrote:
Sorry for the OT. Anyone else out there using Python Server Pages in tandem with MySQL?

I'm attempting to automate creation of thumbnails for some of our databases and am having a rough time finding documentation or examples on how to open and upload a jpeg into MySQL as a blob type. What I do find are plenty of examples using php, but that isn't helping me.

-Brad

--
Bradley R. Gabe | Senior Creature TD | Stan Winston Studio

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.