Seems like this fellow has added the ability to insert Javascript snippets to pyPdf:
http://blog.rsmoorthy.net/2012/01/add-javascript-to-existing-pdf-files.html
Suspect he used this code here:
http://blog.didierstevens.com/programs/pdf-tools/#make-pdf
Seems like a useful addition to pyPdf!