<div><h2id="pygame"><ahref="#pygame"name="pygame">#</a>Pygame</h2><div><h4id="opesawindowanddrawsasquarethatcanbemovedwitharrowkeys">Opes a window and draws a square that can be moved with arrow keys:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install pygame</span>
<Surf> = <Font>.render(text, antialias, color) <spanclass="hljs-comment"># Background color can be specified at the end.</span>
</code></pre></div>
</code></pre>
<div><h3id="sound">Sound</h3><pre><codeclass="python language-python hljs"><Sound> = pg.mixer.Sound(<path/file/bytes>) <spanclass="hljs-comment"># WAV file or bytes/array of signed shorts.</span>
<Sound>.play/stop() <spanclass="hljs-comment"># Also set_volume(<float>), fadeout(msec).</span>