Python Programming


jrrsteve

Still Fresh
Joined
Jun 5, 2006
Messages
25
Hi all. I've just started to program in Python using Pygame. Geting some great results. I've downloaded Python and Pygame for the GP2X and understand about puting the Python folder on the root of the SD card. However I don't understand how to create a .GPE script file to launch my projects. Anyone help?
 
try:

Code:
PYTHONHOME=/mnt/sd/python
export PYTHONHOME

PYTHONPATH=${PYTHONHOME}/lib/python2.4/site-packages:$PYTHONPATH
PYTHONPATH=${PYTHONHOME}/lib/python24.zip:$PYTHONPATH
PYTHONPATH=${PYTHONHOME}/lib/python2.4/lib-dynload:$PYTHONPATH
PYTHONPATH=${PYTHONHOME}/lib/python2.4:$PYTHONPATH
PYTHONPATH=${PYTHONHOME}:$PYTHONPATH
export PYTHONPATH

LD_LIBRARY_PATH=${PYTHONHOME}/extras:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH


/mnt/sd/python/python /mnt/sd/xxxx

cd /usr/gp2x
./gp2xmenu

where xxxx is a name of your app.
 
try:

Code:
PYTHONHOME=/mnt/sd/python
export PYTHONHOME

PYTHONPATH=${PYTHONHOME}/lib/python2.4/site-packages:$PYTHONPATH
PYTHONPATH=${PYTHONHOME}/lib/python24.zip:$PYTHONPATH
PYTHONPATH=${PYTHONHOME}/lib/python2.4/lib-dynload:$PYTHONPATH
PYTHONPATH=${PYTHONHOME}/lib/python2.4:$PYTHONPATH
PYTHONPATH=${PYTHONHOME}:$PYTHONPATH
export PYTHONPATH

LD_LIBRARY_PATH=${PYTHONHOME}/extras:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH


/mnt/sd/python/python /mnt/sd/xxxx

cd /usr/gp2x
./gp2xmenu

where xxxx is a name of your app.

Thanks - I'm using Windows 2000 so can I use a text editor to create the script and save it with a .gpe extension??
 
Last edited by a moderator:
try:

Code:
PYTHONHOME=/mnt/sd/python
export PYTHONHOME

PYTHONPATH=${PYTHONHOME}/lib/python2.4/site-packages:$PYTHONPATH
PYTHONPATH=${PYTHONHOME}/lib/python24.zip:$PYTHONPATH
PYTHONPATH=${PYTHONHOME}/lib/python2.4/lib-dynload:$PYTHONPATH
PYTHONPATH=${PYTHONHOME}/lib/python2.4:$PYTHONPATH
PYTHONPATH=${PYTHONHOME}:$PYTHONPATH
export PYTHONPATH

LD_LIBRARY_PATH=${PYTHONHOME}/extras:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH


/mnt/sd/python/python /mnt/sd/xxxx

cd /usr/gp2x
./gp2xmenu

where xxxx is a name of your app.

Thanks - I'm using Windows 2000 so can I use a text editor to create the script and save it with a .gpe extension??

You can use a text editor, but just not notepad as it doesn't have the same linebreak format as a Linux system.
 
Last edited by a moderator:
You can use a text editor, but just not notepad as it doesn't have the same linebreak format as a Linux system.
Allow me to recommend Crimson Editor if you still don't have an editor that supports different linebreaks. With this one you can configure which OS linebreaks to use, and it supports code highlighting for many different languages (Python included).
 
Last edited by a moderator:
Back
Top