Copyright | (c) Laurent P René de Cotret 2018 |
---|---|
License | MIT |
Maintainer | laurent.decotret@outlook.com |
Stability | internal |
Portability | portable |
Safe Haskell | Unsafe |
Language | Haskell2010 |
This module defines types and functions that help with running Python scripts.
Synopsis
- runTempPythonScript :: PythonScript -> IO ScriptResult
- addPlotCapture :: FilePath -> PythonScript -> PythonScript
- hasBlockingShowCall :: PythonScript -> Bool
- type PythonScript = String
- data ScriptResult
Documentation
:: PythonScript | Content of the script |
-> IO ScriptResult | Result with exit code. |
Take a python script in string form, write it in a temporary directory, then execute it.
:: FilePath | Path where to save the figure |
-> PythonScript | Raw code block |
-> PythonScript | Code block with added capture |
Modify a Python plotting script to save the figure to a filename.
hasBlockingShowCall :: PythonScript -> Bool Source #
Detect the presence of a blocking show call, for example "plt.show()"
type PythonScript = String Source #
String representation of a Python script