<div dir="ltr"><div><div>Hi Karl and Akira,<br><br></div>Imports shouldn't be an issue.  Up to now, I and my users have used an installation script that copies the PythonTeX files into the texmf tree, creating a standard directory structure and a wrapper/symlink.  Basically, the installer replicates the configuration of a typical package in TeX Live.  That system has functioned fine.<br>
<br></div><div>Python's sys.path is a list of search paths for imports.  The first element, sys.path[0], is always the location of the initial script that was started.  So as long as the main script (pythontex.py) and all the other scripts are in the same directory, then pythontex.py can always import all the other code.  The only reason to use kpsewhich would be if the scripts were in multiple directories.  I actually used kpsewhich at first, until I realized that sys.path[0] already contained everything I needed.<br>
<br></div><div>Let me know if you do encounter any issues with import or self-location, and I'll find a fix.<br><br></div><div>Regards,<br></div><div>Geoff Poore<br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Sep 11, 2013 at 8:04 PM, Akira Kakuto <span dir="ltr"><<a href="mailto:kakuto@fuk.kindai.ac.jp" target="_blank">kakuto@fuk.kindai.ac.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Karl,<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for writing.  I looked at it when you first released it.  As far<br>
as I can tell, it wasn't self-locating, that is, those import statements<br>
in pythontex.py would fail when run from TL.  So it seemed pointless to add it.<br>
</blockquote>
<br></div>
I think the latest version is self-locating, because I've just confirmed that<br>
pythontex --help<br>
works with python scripts in $TEXMF/scripts/pythontex<br>
by using a wrapper pythontex.exe in W32TeX.<br>
<br>
Best regards,<br>
Akira KAKUTO<br>
</blockquote></div><br></div>