« Pygame/Chimp - Ligne par ligne » : différence entre les versions

Contenu supprimé Contenu ajouté
Seb.bernery (discussion | contributions)
Aucun résumé des modifications
Seb.bernery (discussion | contributions)
Aucun résumé des modifications
Ligne 24 :
 
 
Premièrement, nous importons les modules python standars "os" et "sys". Ceux-ci nous permettent de faire des choses comme créentutiliser les chemins indépendantssystemes de dossier de plateforme. These allow us to do things like createfichier platformpropres independentau filesysteme pathsd'exploitation.
 
InDans thela nextligne linesuivante, wenous importimportons thele pygamepack package.des Whenmodules de pygame. isQuand importedpygame itest importsimporté, alltous theles modules belongingsont to pygameimportés. SomeSauf pygameles modules areoptionnels optional,et andles ifmodules theynon aren't found, theirtrouvés. valueLeur isvaleur setest todonc "NoneFalse".
There is a special pygame module named "locals". This module contains a subset of pygame. The members of this module are commonly used constants and functions that have proven useful to put into your program's global namespace. This locals module includes functions like "Rect" to create a rectangle object, and many constants like "QUIT, HWSURFACE" that are used to interact with the rest of pygame. Importing the locals module into the global namespace like this is entirely optional. If you choose not to import it, all the members of locals are always available in the pygame module.