[pdftex] Getting the -output-directory command-line option value from within TeX

Anthony Truchet Anthony.Truchet at logilab.fr
Tue Sep 6 17:29:50 CEST 2011


Hello,

I'm trying to revival the python.sty package [1] which enable executing 
an embedded python script during tex compilation and then inputing the 
python's output.
This implies playing with writing files through \openout and \write.
Those files are --- if the newbie I am is not too mistaken ;-) --- 
written in the directory given as  -output-directory command-line option 
to pdf(la)tex, which defaults to the current directory.
But then, I do need to invoke the python interpreter with a \write18, 
and for that I need to know the path to the file I just outputted.

The question is : how do I know from (La)Tex where are output the file / 
which is the value of  the -output-directory command-line option ?

Please don't hesitate to point me to a more relevant package instead of 
answering :I would be glad to help maintain such a work if it has 
already be done ;-)

Thanks for you help and happy texing.

--
Anthony

[1] http://www.texample.net/weblog/2008/oct/24/embedding-python-latex/ or
http://thewikiblog.appspot.com/blog/python-inside-latex.

The actual package disappeared ; here is its ghost :
http://web.archive.org/web/20090304001506/http://www.imada.sdu.dk/~ehmsen/python.sty 



More information about the pdftex mailing list