PyPlay is a set of small tests, mostly of features of python, but it also includes some math experiments.
Note: use rest2html to check README.rst before checkin.
Determine how many samples we need to compute 1-sigma.
Peak fitting with gaussian vs. poisson statistics.
Test distribution of chisq values for nested models with BIC.
Counting until time vs counting until count gives different rate estimates.
Annotate a python exception, for example, by adding details of what operation was being performed when the exception occurred.
Does nosetest allow relative imports?
How do I use resource limits on python processes?
How do I use multiprocess map with functions that take multiple arguments?
Explore abstract base class support, checking that missing subclass methods get reported and method signatures on the subclass match the base class. It turns out that abc's do not check method signatures, so pyplay/abc contains the module quack which does the work of abc as well as checking method signatures.
Show that globals are defined by first assignment to the global, not by a module level global statement.
Explore ways to find the module path. Currently this uses fn.__module__ where fn is a function defined within the module. This meets my immediate needs, so I didn't explore any other solutions.
Implement line buffering on streams that don't have it. Turns out I don't need this code because the problem I was trying to solve (BZ2 files cutting off early because they used a flush each line) is already solved in python 3.2.
Find the file/line for the current python command.
Use test generators with yield work with pytest.
Test of floating notebooks.
Interactors on matplotlib graphs.
Play with simple web applications and python cgi.
Use PyQt4 with webkit as an app ui. Demonstrates calling python from javascript and javascript from python.