Publish Python Scripts with Pweave
I have been working on Pweave lately and one new feature for the next release is a new input format and a HTML template that allows easy publishing of regular python scripts. The feature is similar to MATLAB’s publish and the input format for doc and code chunks has been adopted from knitr’s spin. You can use the new format instead of the old noweb format for any document, one advantage is that you can also run the code without Pweave as a normal Python script which makes debugging easier.
Have a look at couple of examples about published scipts:
Try it out
I’d appreciate any feedback before the next version is released, so drop me a mail if you have any thoughts.
Publish a script to html from the command line.
And to pdf (requires pandoc and pdflatex):
pypublish -f pdf FIR_design.py