<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>The &#34;Invent with Python&#34; Blog &#187; Al Sweigart</title>
	<atom:link href="http://inventwithpython.com/blog/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://inventwithpython.com/blog</link>
	<description>News about the &#34;Invent Your Own Computer Games with Python&#34; book.</description>
	<lastBuildDate>Tue, 17 Jan 2012 22:34:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Pyganim &#8211; A Pygame module to make sprite animation dead simple.</title>
		<link>http://inventwithpython.com/blog/2011/12/09/pyganim-a-pygame-module-to-make-sprite-animation-dead-simple/</link>
		<comments>http://inventwithpython.com/blog/2011/12/09/pyganim-a-pygame-module-to-make-sprite-animation-dead-simple/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 01:20:06 +0000</pubDate>
		<dc:creator>Al Sweigart</dc:creator>
				<category><![CDATA[Blog]]></category>
		<guid isPermaLink="false">http://inventwithpython.com/blog/?p=519</guid>
		<description><![CDATA[Download pyganim.py and example programs. (Works on both Python 2 and 3.) Details at http://inventwithpython.com/pyganim/ Pyganim is a module that you can import into your Pygame games to handle sprite animation. Creating an animation is simply a matter of supplying a list of image filenames (or pygame.Surface objects) for each frame of animation, along with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://inventwithpython.com/pyganim/"><img alt="" src="http://inventwithpython.com/pyganim/images/pyganim_logo.jpg" class="alignnone" width="400" height="210" /></a></p>
<p><a href="http://inventwithpython.com/pyganim/pyganim_examples.zip">Download pyganim.py and example programs.</a> (Works on both Python 2 and 3.)</p>
<p>Details at <a href="http://inventwithpython.com/pyganim/">http://inventwithpython.com/pyganim/</a></p>
<p>Pyganim is a module that you can import into your Pygame games to handle sprite animation. Creating an animation is simply a matter of supplying a list of image filenames (or pygame.Surface objects) for each frame of animation, along with the duration that each frame lasts. Then call the play() method to start the animation and then call blit() each time you draw the window. The blit() function automatically draws the correct frame based on the amount of real time that has passed since the play() method was called. There are many, many other methods to provide finer levels of control as well.</p>
<p>There is more information available on the <a href="http://inventwithpython.com/pyganim/tutorial.html">Tutorial</a> and <a href="http://inventwithpython.com/pyganim/reference.html">Reference</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://inventwithpython.com/blog/2011/12/09/pyganim-a-pygame-module-to-make-sprite-animation-dead-simple/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Things I Hate About IDLE That I Wish Someone Would Fix</title>
		<link>http://inventwithpython.com/blog/2011/11/29/the-things-i-hate-about-idle-that-i-wish-someone-would-fix/</link>
		<comments>http://inventwithpython.com/blog/2011/11/29/the-things-i-hate-about-idle-that-i-wish-someone-would-fix/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 18:08:57 +0000</pubDate>
		<dc:creator>Al Sweigart</dc:creator>
				<category><![CDATA[Blog]]></category>
		<guid isPermaLink="false">http://inventwithpython.com/blog/?p=500</guid>
		<description><![CDATA[I’ve written a book on Python programming for kids and complete beginners. I’ve also done some classroom and one-on-one teaching with adults and teens. I have them use IDLE, the IDE that comes with Python, because it is simple and easier than having them set up some other IDE (like PyDev on Eclipse). But over [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve written a book on Python programming for kids and complete beginners. I’ve also done some classroom and one-on-one teaching with adults and teens. I have them use IDLE, the IDE that comes with Python, because it is simple and easier than having them set up some other IDE (like PyDev on Eclipse).</p>
<p>But over time I’ve noticed a lot of problems with IDLE that I wish someone would fix. (I’d like to do it myself but I don’t have the time currently.) I’m very, very grateful that Python comes batteries included vis-à-vis an IDE, but there are a lot of warts and user interface issues with IDLE. (These are different from <a href="http://bugs.python.org/issue?%40search_text=idle&amp;ignore=file%3Acontent&amp;title=&amp;%40columns=title&amp;id=&amp;%40columns=id&amp;stage=&amp;creation=&amp;creator=&amp;activity=&amp;%40columns=activity&amp;%40sort=activity&amp;actor=&amp;nosy=&amp;type=&amp;components=&amp;versions=&amp;dependencies=&amp;assignee=&amp;keywords=&amp;priority=&amp;%40group=priority&amp;status=1&amp;%40columns=status&amp;resolution=&amp;nosy_count=&amp;message_count=&amp;%40pagesize=50&amp;%40startwith=0&amp;%40action=search">the bugs listed on the python.org bug tracker</a>.)</p>
<p>First off, my philosophy is that no serious Python programmer uses IDLE as their dev environment. With that assumption, we can get rid of any need to cater to them and make IDLE aimed at people who are not only new to Python but new to programming in general. <strong>IDLE should be an education tool more than a development tool.</strong> This means that the IDLE default options should all be set for the basic user, not the power user.</p>
<p>With that in mind, these are things I’d like to see changed about the design of IDLE (roughly in order of importance and prior<ity.)<br />
<span id="more-500"></span><br />
<strong>1) PROBLEM: In the shell window, if you click anywhere but on the current line and move the cursor there, the window stops handling key strokes.</strong></p>
<p>This caused so many problems when I was teaching a dozen teenagers how to program in Python. Someone would accidentally click on the interactive shell window in the wrong place, and then the window would stop making text appear as they type and they have no idea why. I’d have to pause the entire class to figure out what happened, resume, just to have someone else do it ten minutes later.</p>
<p><img class="alignnone" src="http://inventwithpython.com/images/hateidle_cursor1.png" alt="" width="460" /></p>
<p><img class="alignnone" src="http://inventwithpython.com/images/hateidle_cursor2.png" alt="" width="460" /></p>
<p>What would we lose by getting rid of this “feature”? Well, we wouldn’t be able to highlight text by holding down shift and banging on the arrow keys. That… hasn’t really been something my students and readers really need. The “select all” covers the case for highlighting everything, and the mouse can be used for highlighting small bits of text. The in-between amounts (where holding down shift and pressing PgUp or PgDn) is a special case that isn’t special enough to break this rule.</p>
<p>Another UI problem that being able to move the cursor back up introduces: When my students&#8217; code would raise some exception, they thought they could correct it by scrolling back up, deleting the original code, and then re-typing it out (as if the interactive shell were a word processor). They would move the cursor up, but would be foiled when couldn&#8217;t change any of the existing text. Getting rid of this misleading cursor stops this issue much earlier in the process and reduces confusion.</p>
<p><strong>1.1) SUB-PROBLEM: Pressing the Home key moves the cursor before the &gt;&gt;&gt; prompt, which then makes the keyboard unresponsive.</strong></p>
<p>If you are typing at the interactive shell prompt, then want to go to the beginning of the line by hitting the Home key, you’ll then have to hit the right arrow key three times to *really* get to the front of the prompt. Until then, typing characters on the keyboard have no effect.</p>
<p><img class="alignnone" src="http://inventwithpython.com/images/hateidle_cursor3.png" alt="" width="460" /></p>
<p><strong>1.2) NEW FEATURE: Auto-Copy-On-Highlight</strong></p>
<p>Once we get rid of being able to move the cursor off the last line, that opens a new opportunity to implement an automatic copy-on-highlight feature that many terminal and IRC client programs implement. Since this text is read-only, the only reason a person has for highlighting it is to copy it (they can’t delete it.) As soon as the user highlights text in the shell window, it is copied to the clipboard.</p>
<p><strong>2) PROBLEM: When debugging, the current line of code loses its highlighting when the window loses focus.</strong> And the debugger window is a separate window so the file editor is forced to lose focus to operate the debugger.</p>
<p><img class="alignnone" src="http://inventwithpython.com/images/hateidle_debug_highlight1.png" alt="" width="460" /></p>
<p><img class="alignnone" src="http://inventwithpython.com/images/hateidle_debug_highlight2.png" alt="" width="460" /></p>
<p>I’m sure this is due to some sort of tk issue, but it’s annoying.</p>
<p><strong>3) PROBLEM: There’s no obvious way to stop a running program. (Don’t expect them to know Ctrl-C)</strong></p>
<p>Beginners won’t know or be able to remember the Ctrl-C trick to interrupt some infinite loop. MIT’s Scratch has a good idea where the program is started by clicking on a green flag and stopped by clicking on the red stop sign next to it. A small red icon with a “Stop the current program” tooltip would be great, or at least having a menu to invoke a keyboard interrupt would be better than expecting them to remember a keyboard combination.</p>
<p><strong>4) ANNOYANCE: Get rid of the detachable menus feature.</strong></p>
<p>Enough said. Clicking on those “&#8212;&#8212;&#8212;” options in the menu to make them into their own standalone windows is a weird feature that I don’t see anyone, especially beginner coders, make use of. Just get rid of them. No other software does that because if the user wants a shortcut to the menu, that’s what keyboard shortcuts are for.</p>
<p><strong>5) PROBLEM: Opening a file editor window or a shell window isn’t clear.</strong></p>
<p>On the shell window, you have File &gt; New Window. This isn’t clear that it is opening a file editor window, as opposed to another shell window. It should be renamed to File &gt; New Editor Window.</p>
<p>On the file editor window, you have Run &gt; Python Shell to re-open (or re-focus if it is open) the shell window. Two problems: The Run menu is in the middle of the menu bar. This is an option that belongs under File. And second, “Python Shell” isn’t a clear way to say that it is going to open a new window. It should be moved and renamed to File &gt; Python Shell Window (or maybe File &gt; Shell Window)</p>
<p><strong>6) PROBLEM: IDLE crashes when you quit a Pygame game without calling pygame.quit().</strong></p>
<p>I know this is probably some generic leftover-references problem, but Pygame is a fairly major library that new programmers use (game making being a big way people get into programming.) But I’d agree with <a href="http://www.joelonsoftware.com/articles/APIWar.html">the Raymond Chen/Sim City approach</a> and go ahead and make a specific change to check if Pygame was loaded and pygame.quit() was not called by the time sys.exit() was called.</p>
<p><strong>7) ANNOYANCE: It’s too easy to forget the .py extension when saving a file.</strong></p>
<p>My text editor detects when I’m trying to save a file without an extension, and offers to add the .txt extension. This is handy, especially given that IDLE’s file editor turns off syntax highlighting when the file doesn’t end with .py (even though you can still run this “non-python” file just the same).</p>
<p><strong>8) NEW FEATURE: Get rid of the Windows &gt; Zoom Height feature.</strong> Get rid of it and replace it with a standard “Tile Horizontally” and “Tile Vertically” option, so that  the shell window and the editor window can easily be both maximized and seen at the same time.</p>
<p><strong>9) ANNOYANCE: Get rid of the Edit &gt; “Show surrounding parens” feature.</strong> If anything, it should be done automatically all the time whenever the cursor moves around the file editor window.</p>
<p><strong>10) PROBLEM: The Debugger UI needs to be cleaned up.</strong></p>
<p>The user interface for the debugger is ugly. The four checkboxes are silly. The Locals and Globals displays don’t expand well when the debugger window expands. There are no keyboard shortcuts for the stepping buttons. You can’t adjust the size of the Locals display when the Globals display is open. Et cetera.</p>
<p><strong>11) PROBLEM: The Configure IDLE UI needs to be cleaned up.</strong></p>
<p>A slider bar for setting the standard indentation width? A select list for the font size instead of a combo box? The Ok and Apply buttons are always enabled even if no changes have been made? No “Reset to Defaults” button? The “Custom Highlighting” fieldset on the Highlighting tab needs to be redesigned. The “Autosave Preferences” should be settable from the dialog box that prompts you to save when you run a program.</p>
<p>And am I the only person who noticed that the Help button doesn’t actually do anything?</p>
<p><strong>12) NEW FEATURE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.</strong></p>
<p>The entire status bar is wasted screen real estate because it is only used for that tiny display of the current line and column. Also, why even bother having that status bar with line/column information for the shell window?</p>
<p><strong>13) ANNOYANCE: The Indent Region and Dedent Region lines use the keyboard shortcut Ctrl-] and Ctrl-[, even though nobody uses that because you can indent the region by pressing tab.</strong> However, there is no dedent by using Shift-Tab. Add that.</p>
<p><strong>14) IMPROVEMENT: Get rid of the Format &gt; “Strip trailing whitespace” option from the menu</strong>, and just have an option where the editor can do this automatically when you save the file.</p>
<p><strong>15) MODERNIZATION: The Save dialog asks “Do you want to save this untitled document before closing?” and then presents you with Yes, No, and Cancel buttons.</strong> Update this to use verbs instead of yes/no: Use Save, Don&#8217;t Save, and Cancel.</p>
<p><strong>16) ANNOYANCE: The Windows shortcuts for IDLE don&#8217;t have the version in their name.</strong> This wasn&#8217;t a problem for Windows XP and before, where you just go to the Python shortcut folder (which does have the version info in the name) and select IDLE. But in Windows 7, to launch a program you click Start and simply type &#8220;IDLE&#8221; to bring up all the IDLE-named shortcuts. Before I changed the shortcut names manually, it was impossible for me to tell which Python version&#8217;s IDLE I would be starting:</p>
<p><img class="alignnone" src="http://inventwithpython.com/images/hateidle_shortcutname.png" alt="" width="424" height="152" /></p>
<p>One last thing, I think it was a stroke of genius to include a small IDE bundled with the interpreter, especially one that was written in Python itself using the included GUI toolkit. It shows that the Python devs care not just about attracting seasoned developers but also about drawing new people into programming which (as PHP showed us) will turn into remarkable market share later on.</p>
<p>I also understand why IDLE isn&#8217;t at the top of the priority list: people code away with it for a while, and then move on to a bigger and better IDE. It&#8217;s a disposable IDE (though I mean that in the nicest possible way). But a few tweaks would improve its usability in that mode of improvement where people may not notice the quality, they just stop noticing any hangups. &#8220;It just works.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://inventwithpython.com/blog/2011/11/29/the-things-i-hate-about-idle-that-i-wish-someone-would-fix/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>My awesome exciting indie Pygame games: &#8220;Look At This Rock&#8221; and &#8220;Look At This Rock 2: A Different Rock&#8221;</title>
		<link>http://inventwithpython.com/blog/2011/10/21/my-awesome-exciting-indie-games-look-at-this-rock-and-look-at-this-rock-2-a-different-rock/</link>
		<comments>http://inventwithpython.com/blog/2011/10/21/my-awesome-exciting-indie-games-look-at-this-rock-and-look-at-this-rock-2-a-different-rock/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 19:03:29 +0000</pubDate>
		<dc:creator>Al Sweigart</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://inventwithpython.com/blog/?p=489</guid>
		<description><![CDATA[Here are a couple games I wrote. The first was so popular that I made a sequel: Win32 EXEs and source: Look At This Rock Look At This Rock 2: A Different Rock Source (requires Pygame to be installed along with Python): Source: LookAtThisRock.py and PNG Source: LookAtThisRock2.py and PNG Screenshots:]]></description>
			<content:encoded><![CDATA[<p>Here are a couple games I wrote. The first was so popular that I made a sequel:</p>
<p>Win32 EXEs and source:</p>
<p><a href="http://inventwithpython.com/LookAtThisRock.zip">Look At This Rock</a></p>
<p><a href="http://inventwithpython.com/LookAtThisRock2.zip">Look At This Rock 2: A Different Rock</a></p>
<p>Source (requires <a href="http://pygame.org">Pygame</a> to be installed along with Python):</p>
<p><a href="http://inventwithpython.com/LookAtThisRock.py">Source: LookAtThisRock.py</a> and <a href="http://inventwithpython.com/rock1.png">PNG</a></p>
<p><a href="http://inventwithpython.com/LookAtThisRock2.py">Source: LookAtThisRock2.py</a> and <a href="http://inventwithpython.com/rock2.png">PNG</a></p>
<p>Screenshots:</p>
<p><img src="http://inventwithpython.com/screenshot_rock.png" /></p>
<p><img src="http://inventwithpython.com/screenshot_rock2.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://inventwithpython.com/blog/2011/10/21/my-awesome-exciting-indie-games-look-at-this-rock-and-look-at-this-rock-2-a-different-rock/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Pygame Basics Chapter</title>
		<link>http://inventwithpython.com/blog/2011/10/21/pygame-basics-chapter/</link>
		<comments>http://inventwithpython.com/blog/2011/10/21/pygame-basics-chapter/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 16:57:13 +0000</pubDate>
		<dc:creator>Al Sweigart</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">http://inventwithpython.com/blog/?p=483</guid>
		<description><![CDATA[Here&#8217;s the introductory chapter to my next book on Python and Pygame. It assumes you have some Python and programming experience (if you don&#8217;t, give a look to Invent with Python), and offers a quick view of all of the major parts of Pygame. The chapter by itself is a good introduction to Pygame. If [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the introductory chapter to my next book on Python and Pygame. It assumes you have some Python and programming experience (if you don&#8217;t, give a look to <a href="http://inventwithpython.com">Invent with Python</a>), and offers a quick view of all of the major parts of Pygame.</p>
<p>The chapter by itself is a good introduction to Pygame. If you&#8217;ve been meaning to give Pygame a look, then download the chapter. Please email in any questions or suggestions you have: <a href="mailto://al@inventwithpython.com">al@inventwithpython.com</a></p>
<h1><a href="http://inventwithpython.com/PygameBasicsChapter.pdf">Chapter 2 &#8211; Pygame Basics <img src="http://inventwithpython.com/images/Icon_pdf.gif"></a></h1>
<p>Unfortunately, the links in the book aren&#8217;t working yet, but should be in a few days.</p>
]]></content:encoded>
			<wfw:commentRss>http://inventwithpython.com/blog/2011/10/21/pygame-basics-chapter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Chinese Translation of &#8220;Invent with Python&#8221; Started</title>
		<link>http://inventwithpython.com/blog/2011/10/16/chinese-translation-of-invent-with-python-started/</link>
		<comments>http://inventwithpython.com/blog/2011/10/16/chinese-translation-of-invent-with-python-started/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 22:44:05 +0000</pubDate>
		<dc:creator>Al Sweigart</dc:creator>
				<category><![CDATA[News]]></category>
		<guid isPermaLink="false">http://inventwithpython.com/blog/?p=471</guid>
		<description><![CDATA[Yuanle Qiu has started translating the &#8220;Invent Your Own Computer Games with Python&#8221; into Chinese. The first three five chapters are done, with more on the way. Thanks a lot Yuanle! Chinese translation: HTML, PDF, Word Doc Chapter 1 only: PDF, Word Doc Chapter 2 only: PDF, Word Doc Chapter 3 only: PDF, Word Doc [...]]]></description>
			<content:encoded><![CDATA[<p>Yuanle Qiu has started translating the &#8220;Invent Your Own Computer Games with Python&#8221; into Chinese. The first <del datetime="2011-10-31T18:46:03+00:00">three</del> five chapters are done, with more on the way. Thanks a lot Yuanle!</p>
<ul>
<li>Chinese translation: <a href="http://inventwithpython.com/translations/InventWithPython-Chinese.html">HTML</a>, <a href="http://inventwithpython.com/translations/InventWithPython-Chinese.pdf">PDF</a>, <a href="http://inventwithpython.com/translations/InventWithPython-Chinese.doc">Word Doc</a></li>
<li>Chapter 1 only: <a href="http://inventwithpython.com/translations/InventWithPython-Chinese-c1.pdf">PDF</a>, <a href="http://inventwithpython.com/translations/InventWithPython-Chinese-c1.doc">Word Doc</a></li>
<li>Chapter 2 only: <a href="http://inventwithpython.com/translations/InventWithPython-Chinese-c2.pdf">PDF</a>, <a href="http://inventwithpython.com/translations/InventWithPython-Chinese-c2.doc">Word Doc</a></li>
<li>Chapter 3 only: <a href="http://inventwithpython.com/translations/InventWithPython-Chinese-c3.pdf">PDF</a>, <a href="http://inventwithpython.com/translations/InventWithPython-Chinese-c3.doc">Word Doc</a></li>
<li>Chapter 4 only: <a href="http://inventwithpython.com/translations/InventWithPython-Chinese-c4.pdf">PDF</a>, <a href="http://inventwithpython.com/translations/InventWithPython-Chinese-c4.doc">Word Doc</a></li>
<li>Chapter 5 only: <a href="http://inventwithpython.com/translations/InventWithPython-Chinese-c5.pdf">PDF</a>, <a href="http://inventwithpython.com/translations/InventWithPython-Chinese-c5.doc">Word Doc</a></li>
</ul>
<p>If you or someone you know can participate in translating &#8220;Invent with Python&#8221; into other languages (Hindi, Spanish, French, German, etc.) please contact Al for more information. &#8220;Invent with Python&#8221; is released under a Creative Commons license, so the translated works would be freely available to those who want to learn programming.</p>
]]></content:encoded>
			<wfw:commentRss>http://inventwithpython.com/blog/2011/10/16/chinese-translation-of-invent-with-python-started/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Pygame Cheat Sheet</title>
		<link>http://inventwithpython.com/blog/2011/10/07/pygame-cheat-sheet/</link>
		<comments>http://inventwithpython.com/blog/2011/10/07/pygame-cheat-sheet/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 17:00:34 +0000</pubDate>
		<dc:creator>Al Sweigart</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">http://inventwithpython.com/blog/?p=464</guid>
		<description><![CDATA[If you already know a bit of programming and Python, and want to get up to speed on the Pygame 2D game framework, here&#8217;s a cheat sheet that you can look over. It implements a very short Pygame program covering most of Pygame&#8217;s basic features. View the Pygame Cheat Sheet. You can also download the [...]]]></description>
			<content:encoded><![CDATA[<p>If you already know a bit of programming and Python, and want to get up to speed on the Pygame 2D game framework, here&#8217;s a cheat sheet that you can look over. It implements a very short Pygame program covering most of Pygame&#8217;s basic features.</p>
<p><a href="http://inventwithpython.com/pygamecheatsheet.png"><strong>View the Pygame Cheat Sheet.</strong></a></p>
<p><a href="http://inventwithpython.com/pygamecheatsheet.png"><img class="alignnone" src="http://inventwithpython.com/pygamecheatsheet_thumb.png" alt="" width="325" height="325" /></a></p>
<p>You can also <a href="http://inventwithpython.com/pygamecheatsheet.py">download the Pygame program itself</a>, along with the <a href="http://inventwithpython.com/cat.png">cat.png</a> and <a href="http://inventwithpython.com/bounce.wav">bounce.wav</a> files it uses. You will need to install <a href="http://python.org">Python</a> and <a href="http://pygame.org">Pygame</a> first to run this program. The program looks like this when you run it:</p>
<p><a href="http://inventwithpython.com/pygamecheat_screenshot.png"><img class="alignnone" src="http://inventwithpython.com/pygamecheat_screenshot.png" alt="" width="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://inventwithpython.com/blog/2011/10/07/pygame-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://inventwithpython.com/bounce.wav" length="49888" type="audio/wav" />
		</item>
		<item>
		<title>55.6% off &#8220;Invent with Python&#8221; book until the end of the week.</title>
		<link>http://inventwithpython.com/blog/2011/10/05/55-6-off-invent-with-python-book-until-the-end-of-the-week/</link>
		<comments>http://inventwithpython.com/blog/2011/10/05/55-6-off-invent-with-python-book-until-the-end-of-the-week/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 18:04:40 +0000</pubDate>
		<dc:creator>Al Sweigart</dc:creator>
				<category><![CDATA[News]]></category>
		<guid isPermaLink="false">http://inventwithpython.com/blog/?p=445</guid>
		<description><![CDATA[(UPDATE: I&#8217;ve discontinued this sale, but I&#8217;ll leave this post up for the record. If you are an educator and would like to buy discount copies of the book, feel free to email me for a discount code.) I&#8217;m putting a sale on hard copies of the &#8220;Invent Your Own Computer Games with Python&#8221; book [...]]]></description>
			<content:encoded><![CDATA[<p><strong>(UPDATE: I&#8217;ve discontinued this sale, but I&#8217;ll leave this post up for the record. If you are an educator and would like to buy discount copies of the book, feel free to email me for a discount code.)</strong></p>
<p>I&#8217;m putting a sale on hard copies of the &#8220;Invent Your Own Computer Games with Python&#8221; book until the end of this Saturday. The discount is 55.6% (the max discount I can apply that brings my royalty down to $0.00 for each copy sold) which brings the price of the book to $11.11. To buy a hard copy of the book with this discount, use the following link and discount code:</p>
<p><a href="https://www.createspace.com/3430836">https://www.createspace.com/3430836</a></p>
<p><del datetime="2011-10-11T18:36:12+00:00">Discount code: <strong>E4VHZFT5</strong></del></p>
<p>The book is, of course, <strong>available online in full for free</strong> as <a href="http://inventwithpython.com/chapters/">HTML</a> or a <a href="http://inventwithpython.com/IYOCGwP_book1.pdf" onClick="javascript: pageTracker._trackPageview('/IYOCGwP_book1.pdf'); ">PDF</a>.</p>
<p>Textbooks and tech books (especially geared towards young adults) are ridiculously overpriced. I put &#8220;Invent with Python&#8221; at $25 to put it within reach of kids (and adults) who want to buy it for themselves (and $25 would qualify it for free shipping on Amazon). Programming is a fun, creative skill to learn, and I&#8217;d like to be able to put it in the hands of a few more people with an additional discount.</p>
<p><strong>Hey! Listen!</strong> If you&#8217;ve read the book before and liked it (or even hated it), the absolute best thing you could do to help me out (moreso than buying a copy) is <a href="http://www.amazon.com/Invent-Your-Computer-Games-Python/dp/0982106017/">writing a review on Amazon</a>.</p>
<p>Also, if you are an educator or would like to buy single or bulk copies of this book at this price in the future, email me for the discount code at <a href="mailto://al@inventwithpython.com">al@inventwithpython.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://inventwithpython.com/blog/2011/10/05/55-6-off-invent-with-python-book-until-the-end-of-the-week/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>List of Street Names, List of Last Names</title>
		<link>http://inventwithpython.com/blog/2011/09/28/list-of-street-names-list-of-last-names/</link>
		<comments>http://inventwithpython.com/blog/2011/09/28/list-of-street-names-list-of-last-names/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 17:00:52 +0000</pubDate>
		<dc:creator>Al Sweigart</dc:creator>
				<category><![CDATA[Blog]]></category>
		<guid isPermaLink="false">http://inventwithpython.com/blog/?p=437</guid>
		<description><![CDATA[I wrote some programs to go through 6 GB of OpenStreetMap data from http://metro.teczno.com so that I could extract a list of street names for an upcoming game project. The game will use procedural generation to create cities, so I need to have a dataset of street names but couldn&#8217;t easily find one. So I&#8217;ve created this [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote some programs to go through 6 GB of <a href="http://www.openstreetmap.org/">OpenStreetMap</a> data from <a href="http://metro.teczno.com/">http://metro.teczno.com</a> so that I could extract a list of street names for an upcoming game project. The game will use procedural generation to create cities, so I need to have a dataset of street names but couldn&#8217;t easily find one. So I&#8217;ve created this one and wanted to share it.</p>
<h2><a href="http://coffeeghost.net/files/city_street_names.zip">Download zip file of street names. (805 KB)</a></h2>
<p>I did a lot of tweaking to remove duplicates. Each street name is on its own line, and you can just add &#8220;Rd&#8221;, &#8220;St&#8221;, &#8220;Ln&#8221;, &#8220;Ave&#8221;, &#8220;Blvd&#8221;, &#8220;Pkwy&#8221; or any other suffix to the end of it. The zip file has a file of street names from each city, and then an allstreets.txt that has all of them combined into one file (with duplicates removed). Streets with numbers have been removed (there is no &#8220;7th&#8221; but there might be &#8220;Seventh&#8221;).</p>
<p>The street data comes from Boston, Chicago, Leeds, London, Manchester, St. Paul, New York, Seattle, the San Francisco Bay Area, Sydney, and DC, so you can expect that they mostly have Anglo names.</p>
<p>Then after looking at the data for a while, I realized that these could also be used for Anglo last names. I&#8217;ve removed any words that appear in a dictionary file I have, so some common last names like &#8220;Smith&#8221; or &#8220;Hunting&#8221; won&#8217;t show up. I would consider this list of moderate quality. Here&#8217;s the list:</p>
<h2><a href="http://coffeeghost.net/files/last_names_from_street_names.zip">Download zip file of last names. (171 KB)</a></h2>
<p>I can&#8217;t vouch for the quality of the lists, but from a cursory inspection they seem quite serviceable. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://inventwithpython.com/blog/2011/09/28/list-of-street-names-list-of-last-names/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JavaScript Cipher Wheel</title>
		<link>http://inventwithpython.com/blog/2011/09/20/javascript-cipher-wheel/</link>
		<comments>http://inventwithpython.com/blog/2011/09/20/javascript-cipher-wheel/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 05:19:40 +0000</pubDate>
		<dc:creator>Al Sweigart</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://inventwithpython.com/blog/?p=434</guid>
		<description><![CDATA[I&#8217;ve created a web version of the Caesar Cipher wheel using JQuery and CSS sprites. JavaScript Cipher Wheel I also have a Pygame version and Windows executable of this.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve created a web version of the Caesar Cipher wheel using JQuery and CSS sprites.</p>
<p><strong><a href="http://inventwithpython.com/cipherwheel">JavaScript Cipher Wheel</a></strong></p>
<p><a href="http://inventwithpython.com/cipherwheel"><img src="http://inventwithpython.com/cipherwheel/js_cipherwheel.png"></a></p>
<p>I also have a <a href="http://inventwithpython.com/blog/2011/09/18/virtual-caesar-cipher-wheel-program/">Pygame version and Windows executable</a> of this.</p>
]]></content:encoded>
			<wfw:commentRss>http://inventwithpython.com/blog/2011/09/20/javascript-cipher-wheel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Caesar Cipher Wheel program</title>
		<link>http://inventwithpython.com/blog/2011/09/18/virtual-caesar-cipher-wheel-program/</link>
		<comments>http://inventwithpython.com/blog/2011/09/18/virtual-caesar-cipher-wheel-program/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 02:54:41 +0000</pubDate>
		<dc:creator>Al Sweigart</dc:creator>
				<category><![CDATA[Games]]></category>
		<guid isPermaLink="false">http://inventwithpython.com/blog/?p=428</guid>
		<description><![CDATA[The Caesar Cipher Wheel is a paper cutout that can be used to perform encryption and decryption in the Caesar Cipher. However, if you don&#8217;t have a printer but do have Python and Pygame installed, you can use this Caesar Cipher Wheel program to rotate a virtual cipher disk instead. Download source and image files. [...]]]></description>
			<content:encoded><![CDATA[<p>The Caesar Cipher Wheel is a paper cutout that can be used to perform encryption and decryption in the Caesar Cipher. However, if you don&#8217;t have a printer but do have Python and Pygame installed, you can use this Caesar Cipher Wheel program to rotate a virtual cipher disk instead.</p>
<p><a href="http://inventwithpython.com/cipherwheel_src.zip"><strong>Download source and image files. (88 KB)</strong></a></p>
<p><a href="http://inventwithpython.com/cipherwheel_win32.zip"><strong>Download the executable for Windows (5.3 MB)</strong></a></p>
<p><a href="http://inventwithpython.com/images/cipherwheel_screenshot.png"><img class="alignnone" src="http://inventwithpython.com/images/cipherwheel_screenshot.png" alt="" width="360" /></a></p>
<p>You will need <a href="http://python.org">Python</a> (2 or 3) and <a href="http://pygame.org">Pygame</a> installed to run the program. Or, if you are running Windows, you can download the win32 binary.</p>
]]></content:encoded>
			<wfw:commentRss>http://inventwithpython.com/blog/2011/09/18/virtual-caesar-cipher-wheel-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

