public marks

PUBLIC MARKS from bcpbcp with tag python

March 2006

ASPN : Python Cookbook : Sudoku Solver using a 3D-metaphor

(via)
This script views a sudoku problem as a 3-dimensional binary cube. It solves the sudoku problem by wiping away x,y,z points from this cube until the solution appears.

February 2006

Introducing JSON

by 14 others (via)
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.

httpy -- a sane and robust HTTP library for Python

by 1 other (via)
This is my contribution to the wild and woolly world of Python web programming. For a short intro, check out the screencast (Flash; ~45 sec; ~2 MB). After that, the manual should answer most of your questions. If not, check the source, or the Google Group.

A PyGame Working Example: Starting a Game

In PyGame for Game Development, I showed you the very basics of PyGame's graphical side. However, creating a game with PyGame requires a bit more. All the concepts described before need to be glued together somehow, and new concepts will need to be introduced in order to create a functional game. In this article, we'll do just that by tackling a working example of PyGame's capabilities—a Python-powered game.

October 2005

Terra Nova: Nested Worlds

Python is a programming language often used to script games. Scripts are the bit of code where most game developers romp, it is the stuff separating the 'game engine' from the elves-in-tights that dance across your screen. Scripts make the elves dance and protect (somewhat) developers from the detail of the orcs-turning-creaking-cranks in the game engine.

Continuations And Stackless Python

In this paper, an implementation of "Stackless Python" (a Python which does not keep state on the C stack) is presented. Surprisingly, the necessary changes affect just a small number of C modules, and a major rewrite of the C library can be avoided. The key idea in this approach is a paradigm change for the Python code interpreter that is not easy to understand in the first place. Recursive interpreter calls are turned into tail recursion, which allows deferring evaluation by pushing frames to the frame stack, without the C stack involved.