note: sorry about the huge fonts. working on it.
sliderepl is a little hack for hands-on Python code presentations, tutorials and classes. sliderepl bootstraps a file of "sample code" into an interactive Python session. Just drop some section delimiters into your code...
### slide:: hello = 'hello, world' print hello ### slide:: print hello[:6] + ' and goodbye!' ### slide:: end
...and sliderepl will load up an enhanced >>> session that injects the code into the session a section at a time. The injected code looks and runs just as if the user had typed it themselves at the >>> prompt. It's even added to their readline history. Users can just follow along the presentation, watching the output a section at a time, or dive in and explore the code being presented.
sliderepl is released under the MIT License. Go nutty. Patches welcome.
Tested with Python 2.3 through 2.6a, on most platforms. (Thanks to #pdxpython for pre-PyCon testing and all the folks in my PyCon tutorial for trial by fire!)
Docs are in sliderepl.py itself, in presentation format.
I whipped up sliderepl for my PyCon 2008 tutorial session- an advanced, hands-on session with a ton of sample code & hands-on exercises. With a tight schedule, I didn't want to lose any time getting people going with their environments. At the same time I didn't want to impose an environment or working style on the most advanced users.
I received a ton of positive feedback from the tutorial participants at PyCon (thanks!). sliderepl is very usable for presentations right now, but there are a few features I want to add before adding it to pypi.
Some observations from my own limited experience inflicting sliderepl on a big room full of folks:
sliderepl is available under the MIT License
Copyright (c) 2008 Jason Kirtland
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.