Python web-programming tools: several questions

Gerhard Häring gerhard.haering at opus-gmbh.net
Mon Mar 10 11:52:52 CET 2003


Giorgi Lekishvili <gleki at gol.ge> wrote:
> Hi all!
> 
> I wonder if anybody finds time to give me some hints regarding:
> - which module should be used to generate random names for uploaded
> files?

I'd just use a simple counter for the filenames. If you must use CGI (yuck!),
you can for example use a SQL database for storing the counter value. Using a
decent database backend, you can use sequences for this. In case of MySQL
(yuck!), you'll have to work around missing features again.

Another option is to roll your own. Perhaps with time.time() and
os.path.exists().

> - where is MySQLdb for windows? The links I have seem to be broken

At the same place where you can find the sources and Linux RPMs:
http://sourceforge.net/projects/mysql-python

> - I tried to install PIL for Python22 (on Win: on Linux everything is
> OK). It won't:( as it can't find tk installation. What's wrong? I must
> have missed something trivial.

Perhaps you de-selected TKinter when installing Python? Try installing Python
again with Tkinter enabled (this is the default, anyway).

-- Gerhard




More information about the Python-list mailing list