To use pweave, first write an input file (Pweave markdown, Pweave LaTeX, etc.) with code enclosed in noweb syntax (that's <<>>= on a new line at the top and @ on a new line at the bottom).
If you're using the interactive Atom environment:
language-weave adds Pweave input file types (.pmd, ptexw) to Atom's recognized languages, and provides appropriate syntax highlighting for the Python blocks.
We configure hydrogen to use the Python 3 kernel for files Atom recognizes as Pweave input files, enabling the interactive running of cells, or code blocks.
Once you've written your input file, use the command line utility to run the code blocks and incorporate their output into your analysis. All output is included by default. You can change the default to hide all output using rcParams, or disable it on a block-by-block basis using the echo option:
# A disabled code block
<< echo = False >>=
print("You can't see me")
@
To use pweave, first write an input file (Pweave markdown, Pweave LaTeX, etc.) with code enclosed in
noweb
syntax (that's<<>>=
on a new line at the top and@
on a new line at the bottom).If you're using the interactive Atom environment:
language-weave
adds Pweave input file types (.pmd
,ptexw
) to Atom's recognized languages, and provides appropriate syntax highlighting for the Python blocks.hydrogen
to use thePython 3
kernel for files Atom recognizes as Pweave input files, enabling the interactive running of cells, or code blocks.Once you've written your input file, use the command line utility to run the code blocks and incorporate their output into your analysis. All output is included by default. You can change the default to hide all output using
rcParams
, or disable it on a block-by-block basis using theecho
option: