OVH Cloud OVH Cloud

Programme en Python

7 réponses
Avatar
Olivier V
Bonjour,

J'ai un programme (jeu SolarWolf) écrit en Python.
Comment le compiler et/ou le faire tourner.
En cas d'installation par root dans l'arbre principal, peut-on créer un RPM,
pour ne pas détruire la base RPM ... ?

Merci.

Olivier V

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Le répertoire principal comprend :
- les dossiers :
code
data
- les fichiers :
lgpl.txt
readme.txt
solarwolf.py

7 réponses

Avatar
Daniel Déchelotte

| Bonjour,

Bonjour,

| J'ai un programme (jeu SolarWolf) écrit en Python.
| Comment le compiler et/ou le faire tourner.
|
| [...]
|
| Le répertoire principal comprend :
| [...]
| - les fichiers :
| lgpl.txt
| readme.txt

^^^^^^^^^^ Ah haa !

--
Daniel Déchelotte
http://yo.dan.free.fr/
Avatar
Olivier V
Daniel Déchelotte wrote:

| readme.txt

^^^^^^^^^^ Ah haa !


Qui a-t-il de drôle ?
Etant plus que novice en compilation, je ne vois pas ... car le fichier
readme.txt (que j'avais évidemment lu avant de poser une question débile
...) ne m'indique pas quoi faire ; le voila :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SolarWolf - http://pygame.org/shredwheat/solarwolf
by Pete "ShredWheat" Shinners" -

SolarWolf is an action/arcade game written entirely in Python.
It is entirely opensource and free.
It is released under the LGPL license.

It features quick and smooth fullscreen 800x600 graphics. There
is alpha transparent blitting, colorkeying, animated sprites,
scrolling starfield background, antialiased font rendering, and
more. The sound system supports multiple sound channel playback,
along with streaming music support. It also supports input from
keyboard or joystick.

The game and its dependencies are extremely cross platform,
allowing gameplay on just about all platforms; Windows, Linux,
BeOS, IRIX, Solaris, NT4, OSX, and more.

SolarWolf is built with Pygame. This library is a great set of
modules for game development in python, with a growing community
of users. It provides a "pythonic" object oriented interface for
the fantastic SDL media library.

The game is originally based of one of my childhood favorites,
SolarFox on the Atari 2600.

All this, yet the best feature of all is; It is a hecka lotta fun!
The point of the game is to scramble through 48 levels of patterns,
collecting all the boxes. The part that makes it tricky is avoiding
the relentless hailstorm of fire coming at you from all directions.

Avatar
Alex Marandon
On 2004-02-17, Olivier V wrote:
J'ai un programme (jeu SolarWolf) écrit en Python.
Comment le compiler et/ou le faire tourner.
[...]

solarwolf.py


Essayes :

python solarwolf.py

Avatar
TiChou
Dans l'article news:,
Olivier V écrivait :

Bonjour,


Bonjour,

J'ai un programme (jeu SolarWolf) écrit en Python.
Comment le compiler et/ou le faire tourner.

solarwolf.py


Suffit de le lancer comme n'importe quel autre programme ou dans un xterm
faire :

$ ./solarwolf.py

--
TiChou

Avatar
Tibi
Olivier V wrote:

J'ai un programme (jeu SolarWolf) écrit en Python.
Comment le compiler et/ou le faire tourner.


Je pense que tu as eu des réponses satisfaisantes, mais si tu veux en
savoir plus sur Python viens faire un tour sur fr.comp.lang.python

Avatar
Olivier V
Bonjour,

Avec "python solarwolf.py" ou "./solarwolf.py",
j'obtiens le même message d'erreur ...
Je vais donc aller, lorsque j'aurai un peu de temps, aller voir sur le forum
correspondant.

Merci à tous

Olivier V

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

[ solarwolf-1.3]$ python solarwolf.py
Traceback (most recent call last):
File "solarwolf.py", line 171, in ?
if __name__ == '__main__': main()
File "solarwolf.py", line 18, in main
checkdependencies()
File "solarwolf.py", line 70, in checkdependencies
if not pygame.font:
UnboundLocalError: local variable 'pygame' referenced before assignment
Avatar
TiChou
Dans l'article news:,
Olivier V écrivait :

Avec "python solarwolf.py" ou "./solarwolf.py",
j'obtiens le même message d'erreur ...

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

[ solarwolf-1.3]$ python solarwolf.py
Traceback (most recent call last):
File "solarwolf.py", line 171, in ?
if __name__ == '__main__': main()
File "solarwolf.py", line 18, in main
checkdependencies()
File "solarwolf.py", line 70, in checkdependencies
if not pygame.font:
UnboundLocalError: local variable 'pygame' referenced before assignment


Avez-vous installé la librairie pygame ?
De plus, il existe une version de ce jeu plus récente avec un installer
Linux qui vous installera tout ce dont vous avez besoin pour jouer à ce jeu
(libs, python, source du jeu).

--
TiChou