Re: PIL problem: IOError: cannot identify image file

2006-08-20 Thread h112211
Doh! Apparently Image.open() wants a path, not a file. So i = Image.open('c:\\image2.png') works fine. -- http://mail.python.org/mailman/listinfo/python-list

PIL problem: IOError: cannot identify image file

2006-08-20 Thread h112211
Hi, I installed the newest available PIL (1.1.5 for Python 2.4) from their site, but cannot seem to open any files. The following from PIL import Image i = Image.open(file('c:\\image2.png')) results in File "C:\Program Files\Python24\lib\site-packages\PIL\Image.py", line 1745, in open ra

Re: Rendering Vector Graphics

2006-08-11 Thread h112211
> I need to render high-quality vector graphics with Python. I was > thinking of something like 'cairo', though I need to run under win32 > and can't find a pycairo package for it. Suggestions? I've had good experiences doing simple 3d vector stuff with Pygame. It's wraps SDL so it has pretty nice

Re: Make Object Oriented?

2006-08-10 Thread h112211
Michael Yanowitz wrote: > Hello: > >Are there any tools to convert non-object-oriented code > into object-oriented code? Nope, but you can have the next best thing: rewrite it from scratch yourself. I did that to a smallish (about 50k lines) C program once, and the resulting 70k lines or so C

Re: Which Python API for PostgreSQL?

2006-08-05 Thread h112211
Hi, > I also recommend psycopg. Any specific reasons to go for psycopg instead of PyGreSQL? -- http://mail.python.org/mailman/listinfo/python-list

DLL search path, IDLE versus command line

2006-08-01 Thread h112211
Hi, Does anyone have any clues why I can import a module (pgdb) from the python command line, but trying to run a script doing it from IDLE I get "ImportError: DLL load failed: The specified module could not be found."? How does the search path differ between IDLE and the Python command line? I'

PyGreSQL, DLL search path, IDLE versus python command line

2006-08-01 Thread h112211
Hi all, I'm using the Windows version of Python 2.4.3 and everything worked okay until I installed PyGreSQL. Well, in fact the installation went fine, but when I try to run my script from IDLE I get: Traceback (most recent call last): File "\main.py", line 3, in -toplevel- import pgdb Fil