wiki:pygame_touchpad

Version 16 (modified by Martin Kolman, 12 years ago) (diff)

--

PyGame on the HP Touchpad tablet

http://www.modrana.org/images/touchpad_pygame.jpg

This is a short guide on how to install Python and PyGame on the WebOS based HP Touchpad tablet. The Python and PyGame porting work and WebOS bindings were done by THP and are available from his WebOS page.

Prerequisites

Download the Python and PyGame binaries from THPs WebOS hacks website:
Python 2.7 runtime
PyGame build for WebOS
Python bindings for WebOS

Download some PyGame progam that can be used to test if PyGame is actually working. Possible candidates:

The startup script

this is a short startup script that makes it possible to just unpack the binaries to a random folder and use Python & PyGame without the need to install anything to system wide directories.

#!/bin/sh

## A setup and demonstration script for PyGame
## on the HP Touchpad WebOS tablet

## path to the Python runtime
## NOTE: content of the Python 2.7 runtime has been
## placed to the python2.7 folder
PY_PATH="/media/internal/pygame_test/python27"
export PY_PATH

## path to the Pygame runtime/library
PYGAME_PATH="/media/internal/pygame_test/"

## add the Python runtime to the system path
PATH=${PY_PATH}/bin:$PATH
export PATH

## add the Python runtime to the system library path
LD_LIBRARY_PATH=${PY_PATH}/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

## add Pygame to the Python path
PYTHONPATH=${PYGAME_PATH}:$PYTHONPATH
export PYTHONPATH

##
## the environment should now be ready for running
## Python applications using PyGame
##

## start the example application
## NOTE: the game folder has been renamed to a shorter name
cd tts
python main.py

Just dump this script to a file called for example start.sh (or download start.sh) and run it with:

sh start.sh