[Edu-sig] Writing presentation manager for OSCON, in Pygame

Kirby Urner urnerk at qwest.net
Mon Jul 18 20:18:18 CEST 2005


Sort of relevant to the queries below, I'm developing source materials for
my upcoming presentation at OSCON 2005.  I've determined that using closed
source presentation software i.e. PowerPoint, would not be appropriate to
this venue (smart me, huh?), and furthermore, using Impress or other
OpenOffice-like PPT clone wouldn't be sufficiently Pythonic.  Ergo, I'm
writing my own presentation management software in Pygame.

The basic structure is an outer event loop driven by keystrokes (no mouse)
and rather few of them at that (left/right arrow, Stop, Restart, Pause,
Unpause).  Class definitions define slide content in terms of various
resources:  Autoflipimage, Movieplayer, Scrolltextfile, Stillimage and so
on.  Each slide is composed by a function, which calls the necessary
parameters on the resources, all of which get sent as a list to a Scene
object, which actually operates the content objects at runtime (e.g. by
passing through keystrokes).  

Resources with internal dynamism (e.g. an Autoflipimage or MPEG movie clip)
get their own threads, i.e. are subclassed from threading.Thread (plus an
interface-like mixin).  This is necessary to keep the outmost keystroke
thread alive to the keyboard (it wouldn't do to get sucked into a resource
and have to sit through a boring MPEG, even if you were ready to move on).

In other words, I've leveraging that I know how to code, to cut right to the
runtime display engine, completely bypassing / ignoring any need for GUI
tools to define and structure the slides at design time.  That's all done
"programmatically" as they say -- which is too much work for most office
cubies, but is far less work than coding a design time GUI, if you're a
one-man-year-per-year type shop (my shop is somewhat more than that, but
this OSCON thing I'm doing on my own time).

I'm going to upload all this stuff with the GPL once my talk is done.  I
want the first venue (the showcase debut) to be at OSCON itself (first week
in August, here in PDX).

On my next Saturday Academy gig, I'll plan to keep using this Python +
Pygame solution, as I'll be able to guide 'em around the source code,
illustrating how one can do a lot with Python in < 1K lines of code.

Kirby


> -----Original Message-----
> From: edu-sig-bounces at python.org [mailto:edu-sig-bounces at python.org] On
> Behalf Of Peter Bowyer
> Sent: Saturday, July 09, 2005 2:58 AM
> To: edu-sig at python.org
> Subject: [Edu-sig] SOT: authoring course material
> 
> Hi,
> 
> As I sit down to write my course material I was wondering - what software
> do you use?  Traditionally material in the physics department has always
> been written in LaTeX (uugh), with a printed copy given to the student,
> and
> a PDF of the printed copy available online.
> 
> I need to produce a printable set of notes, but would also like to do a
> true web-based version.  We've talked about testing the students with
> online multiple-choice quizzes and I'm keen to have expandable sections of
> the notes online (so the more advanced students don't have to read the
> basics, but can see advanced questions the others cannot).  However, from
> past experience if there are not full printed notes there will be
> complaints, and as the computers aren't dual-monitor it would be hard to
> read online notes while working.
> 
> What have you found works when teaching introductory programming?
> 
> Also, have you found tools such as wikis useful when either developing the
> teaching material or writing the following report?
> 
> Thanks,
> Peter
> 
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig



More information about the Edu-sig mailing list