<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wiki.squi.fr/index.php?action=history&amp;feed=atom&amp;title=Python_%3A_Pygame</id>
	<title>Python : Pygame - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.squi.fr/index.php?action=history&amp;feed=atom&amp;title=Python_%3A_Pygame"/>
	<link rel="alternate" type="text/html" href="https://wiki.squi.fr/index.php?title=Python_:_Pygame&amp;action=history"/>
	<updated>2026-04-28T12:12:30Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.squi.fr/index.php?title=Python_:_Pygame&amp;diff=2241&amp;oldid=prev</id>
		<title>Justine le 22 juin 2022 à 12:07</title>
		<link rel="alternate" type="text/html" href="https://wiki.squi.fr/index.php?title=Python_:_Pygame&amp;diff=2241&amp;oldid=prev"/>
		<updated>2022-06-22T12:07:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 22 juin 2022 à 12:07&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Ligne 1 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 1 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:prog]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:python]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Attention, pygame ne marche qu&amp;#039;en 3.7. Utilisé ici avec venv.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Attention, pygame ne marche qu&amp;#039;en 3.7. Utilisé ici avec venv.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;https://fr.wikibooks.org/wiki/Pygame/Concevoir_des_jeux_avec_Pygame#Blitting&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;https://fr.wikibooks.org/wiki/Pygame/Concevoir_des_jeux_avec_Pygame#Blitting&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki-mediawiki:diff:1.41:old-1482:rev-2241:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Justine</name></author>
	</entry>
	<entry>
		<id>https://wiki.squi.fr/index.php?title=Python_:_Pygame&amp;diff=1482&amp;oldid=prev</id>
		<title>Justine le 22 février 2020 à 11:09</title>
		<link rel="alternate" type="text/html" href="https://wiki.squi.fr/index.php?title=Python_:_Pygame&amp;diff=1482&amp;oldid=prev"/>
		<updated>2020-02-22T11:09:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 22 février 2020 à 11:09&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Ligne 1 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 1 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Attention, pygame ne marche qu&amp;#039;en 3.7. Utilisé ici avec venv.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Attention, pygame ne marche qu&amp;#039;en 3.7. Utilisé ici avec venv.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;https://fr.wikibooks.org/wiki/Pygame/Concevoir_des_jeux_avec_Pygame#Blitting&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(tuto daté)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Premier &amp;quot;jeu&amp;quot; =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Premier &amp;quot;jeu&amp;quot; =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki-mediawiki:diff:1.41:old-1481:rev-1482:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Justine</name></author>
	</entry>
	<entry>
		<id>https://wiki.squi.fr/index.php?title=Python_:_Pygame&amp;diff=1481&amp;oldid=prev</id>
		<title>Justine : Page créée avec « Attention, pygame ne marche qu&#039;en 3.7. Utilisé ici avec venv.  = Premier &quot;jeu&quot; =  Ici, on affiche un texte dans une fenêtre:  &lt;syntaxhighlight lang=&#039;python&#039;&gt; #!/usr/bin/... »</title>
		<link rel="alternate" type="text/html" href="https://wiki.squi.fr/index.php?title=Python_:_Pygame&amp;diff=1481&amp;oldid=prev"/>
		<updated>2020-02-22T10:50:02Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « Attention, pygame ne marche qu&amp;#039;en 3.7. Utilisé ici avec venv.  = Premier &amp;quot;jeu&amp;quot; =  Ici, on affiche un texte dans une fenêtre:  &amp;lt;syntaxhighlight lang=&amp;#039;python&amp;#039;&amp;gt; #!/usr/bin/... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Attention, pygame ne marche qu&amp;#039;en 3.7. Utilisé ici avec venv.&lt;br /&gt;
&lt;br /&gt;
= Premier &amp;quot;jeu&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
Ici, on affiche un texte dans une fenêtre:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;#039;python&amp;#039;&amp;gt;&lt;br /&gt;
#!/usr/bin/env python3&lt;br /&gt;
#coding: utf-8&lt;br /&gt;
import pygame&lt;br /&gt;
from pygame.locals import *&lt;br /&gt;
&lt;br /&gt;
#Initialisation&lt;br /&gt;
pygame.init()&lt;br /&gt;
&lt;br /&gt;
###########!!! Gestion de la fenêtre&lt;br /&gt;
&lt;br /&gt;
#Création de l&amp;#039;écran en 800*600&lt;br /&gt;
#Noter les deux parenthèses&lt;br /&gt;
screen = pygame.display.set_mode((800,600))&lt;br /&gt;
&lt;br /&gt;
#On change le nom de la fenêtre&lt;br /&gt;
pygame.display.set_caption(&amp;quot;Justine Game&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
#On remplit l&amp;#039;arrière-plan&lt;br /&gt;
background = pygame.Surface(screen.get_size())&lt;br /&gt;
background = background.convert()&lt;br /&gt;
#Les chiffres sont la couleur&lt;br /&gt;
background.fill((250,250,250))&lt;br /&gt;
&lt;br /&gt;
###On affiche un texte&lt;br /&gt;
font = pygame.font.Font(None, 36)&lt;br /&gt;
#(Texte, anticrénelage (1 oui 0 non), couleur&lt;br /&gt;
text = font.render(&amp;quot;Salut à tous&amp;quot;, 1, (10, 10, 10))&lt;br /&gt;
#On fait un rectangle qui englobe le texte&lt;br /&gt;
textpos = text.get_rect()&lt;br /&gt;
#Le centre du rectangle est celui de la fenêtre&lt;br /&gt;
textpos.centerx = background.get_rect().centerx&lt;br /&gt;
textpos.centery = background.get_rect().centery&lt;br /&gt;
#On blitte le texte dans la fenêtre&lt;br /&gt;
background.blit(text, textpos)&lt;br /&gt;
&lt;br /&gt;
###On blitte le tout dans la fenêtre&lt;br /&gt;
screen.blit(background, (0,0))&lt;br /&gt;
#update de toute la surface&lt;br /&gt;
pygame.display.flip()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
###########!!! Boucle principale&lt;br /&gt;
&lt;br /&gt;
running = True&lt;br /&gt;
&lt;br /&gt;
while running:&lt;br /&gt;
    #On veut pouvoir fermer la fenêtre !&lt;br /&gt;
    for event in pygame.event.get():&lt;br /&gt;
        if event.type == QUIT:&lt;br /&gt;
            running = False&lt;br /&gt;
    screen.blit(background, (0, 0))&lt;br /&gt;
    pygame.display.flip()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justine</name></author>
	</entry>
</feed>