Click to See Complete Forum and Search --> : From PHP to Python...


nko
02-26-2004, 08:37 PM
I've started making a dumb little text based game in my free time using PHP. I've begun recently to think that it might be fun to try doing it in Python, because I've heard Python is really easy and slick. I'd like to use some sort of database backend (most familiar with the ubiquitous MySQL, but up for suggestions). I'm very used to the whole LAMP setup. I started looking in to transisioning to Python, but I couldn't manage to hit the ground running, much less walking. I'm really posting here to ask for a tiny bit of hand holding, and maybe even some zealotry (to keep me feeling like if so many people love it so much, it can't be THAT hard!).

Also, I'd like it to have simple graphics. Something on the order of what PHP can easily produce (static images, append the text of a field to emulate a "history of events" type deal, etc).

So my basic wish list: simple, database, simple graphics. I've read that there are many GUI libraries available for Python, but I have no clue which would suit me best, or which ones I can expect to not have to package with my game should I ever share it with friends / the world at large.

I'm just really confused. If anyone would like to point me in the right direction, it'd be much appreciated :)

Thanks!

binaryDigit
02-26-2004, 09:58 PM
http://www.pygame.org/
http://www.wxpython.org/

nko
02-27-2004, 06:55 PM
PyGame looks awesome, thanks!

Here, however, is where everything usually goes wrong.

I installed the important dependancies of PyGame (SDL, SDL_image, SDL_ttf, SDL_mixer, etc), and when I go to install PyGame, it can't find any of them but SDL itself, which was installed with my distro (Slack). The others are installed to /usr/local/lib. Now, how do I get PyGame to detect that I've installed these libraries?

And does anyone else have any thoughts?

bwkaz
02-27-2004, 07:35 PM
Install them by specifying --prefix=/usr to their respective configure scripts.

Or, export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig before running pygame's configure script.

Or, if that doesn't work, look at the output of ./configure --help on pygame. There should be options for where to look for SDL_ttf, etc.

nko
02-27-2004, 08:13 PM
Alright, the first suggestion worked, but it was my last preference- I'd prefer to use the default installation paths for each library. I've got them installed to what I'd assume to be /usr/lib instead of /usr/local/lib, now. How would I go about letting /usr/local/lib be treated the same as /usr/lib?

I'm very new to this whole configuring-API-library stuff. Thanks for putting up with me :-)