Experienced programmer evaluating Python

KefX keflimarcusx at aol.comNOSPAM
Sun Nov 2 21:09:39 EST 2003


>1] Embedding Python into a realtime game.  I'm willing to take a
>performance hit over strict c++ in the range of 10%, if the implementation
>can be elegant.  I've embedded Perl into a cross platform application
>(win32 & Linux) and I found it to be a nasty undertaking.  Perl.h had
>namespace conflicts with libraries, and I had crashes within the
>statically linked Perl library that essentially made traces impossible. I
>could go on, but it was basically an inelegant solution.

Most people believe that extending Python (Python calling C code) is much
easier and much better than embedding Python (C code calling Python code). It's
possible to embed, but it's a real pain in the butt (I know, I tried it.)
Anything too slow to run in Python can be done in C, and there's a library
called Psyco (psyco.sourceforge.net) that you'll definitely want to look at
(it's sort of a JIT compiler). Psyco's not a panacea, but it sure as heck can
help. This is the approach I'm using for my own game design, which is an RPG.
(By the way, I find XML DocBook to be a great format to write design documents
in, if you're also a designer.) Because most of the execution is in such a
small portion of the code, it shouldn't be a big deal.

>3] Redistributable end-user product development tools.  I know and love
>using wxWindows in C++.  Basically, I need the ability to distribute
>everything necessary for developers on the Internet (read: not average
>users) to run wxWindows based Python apps on Win32 development
>workstations.  Licenses and convenience come into play.  I don't mind a
>large download for this crowd, but asking them to compile anything is
>above and beyond.

wxPython is what you want. http://wxpython.org/

>Finally, is there any issues with me not distributing Python source if I
>include a compiled DLL with commercial software?

I'm not sure how you'll manage to use Python code without giving the Python
source in some for. You could distribute .pyc files, but I think they could be
reasonably decompiled (not sure).

- Kef





More information about the Python-list mailing list