Questions tagged [pweave]

Pweave is a Python library for creating documents that capture the results of Python computations.

Pweave is a scientific report generator and a literate programming tool for Python. Pweave can capture the results and plots from data analysis and works well with numpy, scipy and matplotlib. Pweave is inspired by Sweave, an excellent tool for R programmers, and the syntax is mostly compatible with it. Pweave supports reST, Sphinx, Latex, and Pandoc markdown markups.

Features:

  • Python 2.7 and 3.4 compatibility
  • Execute python code in the chunks and capture input and output to a report. Use hidden code chunks, i.e. code is executed, but not printed in the output file.
  • Capture matplotlib graphics.
  • Evaluate inline code in documentation chunks
  • Cache all code and results from previous runs for fast report generation when you are only working with documentation. Inline code will be hidden in documentation mode.
  • Supports reST, LaTeX, HTML or markdown for document chunks
  • Publish reports from Python scripts. Similar to R markdown.
  • Run from command line or interpreter.
  • Support also for Octave and Matlab code.

http://mpastell.com/pweave/

20 questions
0
votes
0 answers

Rendering pweave pmd with python module

I have a python code that generates a report in .pmd format, and then renders it as an html with this command: import subprocess cmd_pweave = "pweave -f md2html file.pmd" subprocess.run(cmd_pweave, shell=True, check=True) I want to avoid calling…
Luis dQ
  • 80
  • 5
0
votes
1 answer

Suppressing warnings in pweave

I have a warning in my LaTeX generated file, something like this: /home/jmerelo/.pyenv/versions/3.6.1/lib/python3.6/site- packages/pygraphviz/agraph.py:1367: RuntimeWarning: Warning: using box for unknown shape…
jjmerelo
  • 22,578
  • 8
  • 40
  • 86
0
votes
1 answer

pweave not printing value of variable in code chunk

I am trying to use pweave with LaTeX for reproducible research. I am seeing weird behavior trying to display the value of a variable in a code chunk. I hope someone can explain what is happening. When calling print() within a code chunk, depending…
0
votes
2 answers

How do you escape a $ character in pweave?

I'm using pweave to write an HTML document. I would like to express a $ sign in text, for example: Bob has $1, Sally has $2 However pweave thinks that 1, Sally has should be formatted as maths. If I use \$ then it stops the math environment but…
Cramer
  • 1,785
  • 1
  • 12
  • 20
0
votes
1 answer

Python Pweave code width

The default value of the code width is 70, this can be a waste of space in the output. I'm wondering how I can change it to 80 and make it the default value. I looked at the Pweave documentation, but didn't find the relevant information. Thanks.
Maxareo
  • 275
  • 2
  • 12
1
2