Closed m00nwtchr closed 3 years ago
Hello,
I've also considered doing this, but there is no elegant solution which makes this possible for every possible plotting toolkit.
My suggestion is to "upgrade" your PYTHONPATH variable so that the python interpreter will look for modules in e.g. mydir
:
PYTHONPATH="$PYTHONPATH":/mydir/
pandoc --filter pandoc-plot ............
disclaimer: I did not actually try this
ah yea changing the PYTHONPATH worked, but it'd be nice if the input file's directory was automatically added to it when you spawn the python process, but this works for me
I agree that it would be nice. However, since there's no unified way to do this for all plotting toolkits the PYTHONPATH hack will have to do.
Basically i'd like to import a python module that exists alongside the input .MD file, but it looks like the pyhton process is executed in
/tmp
so it doesn't pick up those modules without having to use absolute paths