Blake O'Hare .com

Tag: Python

Asynchronous HTTP Requests in Python
Posted 2.3 years ago.
I found myself in the position of being disappointed with the lack of ability to make asynchronous H...
PyGame Tips & Tricks
Posted 5.1 years ago.
PyWeek 15 starts in one week. So here's a few tips and tricks for a more lovely pygame coding experi...
Modifying a WAVE File using Python
Posted 5.8 years ago.
You may find the Python snippet at the end of this post useful for simple sound editing and effects....
How to Parse Mathematical Expressions
Posted 5.8 years ago.
Update: This script is now hosted on GitHub and maintained by Louis Fisch and includes new features....
PyGame Tutorial Part 7 - Centralizing Scene Logic
Posted 5.9 years ago.
This isn't a PyGame-specific tutorial per-se. It's more of an application of good software design co...
PyGame Tutorial Part 6 - More on Input
Posted 5.9 years ago.
There are two basic ways to get the state of any input device. Those are checking the event queue or...
Python Script to Detect a Repeating Decimal
Posted 5.9 years ago.
Remember doing long division as a 2nd grader? And if you found that the decimal started to repeat, y...
PyGame Tutorial Part 5 - Fonts and Text
Posted 5.9 years ago.
If you're looking for the quick answer on how to render text, here it is: But of course, there'...
PyGame Tutorial Part 4 - Geometric Drawing
Posted 5.9 years ago.
Just like the mixer module, the drawing API is fairly straightforward with a few examples. Therefore...
PyGame Tutorial Part 3 - Music and Sound Effects
Posted 5.9 years ago.
The sound and music API's are fairly simple. I feel funny basically going through the documentation ...
PyGame Tutorial Part 2 - Working with Images
Posted 5.9 years ago.
In the previous installment, I briefly talked about and used Surface objects. You can instantiate a ...
PyGame Tutorial Part 1 - Getting Started
Posted 5.9 years ago.
So you want to make a game? You have choices. But basically, your choices are determined by three co...
How to Blit Images With Transparency at Lower Opacity in PyGame
Posted 6.1 years ago.
PyWeek started today. So I'll take a little detour from the regularly scheduled PHP tutorial and giv...
IronPython Shell In Your Browser
Posted 6.1 years ago.
This is not a complete implementation. I created it for debugging purposes in another Silverlight/Ir...
IronPython in Silverlight 2.0 and Higher
Posted 6.1 years ago.
IronPython was introduced to Silverlight back in the Silverlight 1.0 days. For the first time, peopl...
4 Minute Python Crash Course
Posted 6.7 years ago.
This is a crash course on steroids. It assumes you already know another language...or two...and buil...
Accepting Command Line Arguments in Python Scripts
Posted 6.7 years ago.
Since it's not quite as obvious as it is in other languages like Java and C# where the main function...
EOF exceptions with raw_input and stdin in Python
Posted 6.7 years ago.
If you've tried to take in input by piping a file into a python script and reading it via raw_input,...
Switch Statements and Ternary Expressions in Python
Posted 6.7 years ago.
Switch Statementselif's got you down? It's ok, I feel your pain. Python has extremely flexible synta...
Configuring the Joystick in PyGame
Posted 6.7 years ago.
One annoying thing about PyGame is the joystick API doesn't really give you much high level flexibil...
Python Imaging Library (PIL) Pixel Editing Crash Course
Posted 6.7 years ago.
I always seem to have trouble finding a reference that just cuts to the chase and tells me how to re...
Writing Long Python Scripts in One Line
Posted 6.7 years ago.
Before you comment on this article: I know this article has absolutely no practical application. It...