On 11.04.07, Andrea Valle wrote:
> Ok Michael.
>
> I'm running test.py from
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
> packages/PyX-0.9/test.py
>
> both with original file and with
>
> filename = "psfonts.cmz" #"psfonts.map"
>
> I have from terminal (nothing):
>
> polifilo:/ andreavalle$ python /Library/Frameworks/Python.framework/
> Versions/2.5/lib/python2.5/site-packages/PyX-0.9/test.py
> " gf": ----
> " pk": ----
> " bitmap font": ----
> " tfm": ----
> " afm": ----
> " base": ----
> " bib": ----
> " bst": ----
> " cnf": ----
> " ls-R": ----
> " fmt": ----
> " map": ----
> " mem": ----
> " mf": ----
> " mfpool": ----
> " mft": ----
> " mp": ----
> " mppool": ----
> " MetaPost support": ----
> " ocp": ----
> " ofm": ----
> " opl": ----
> " otp": ----
> " ovf": ----
> " ovp": ----
> " graphics/figure": ----
> " tex": ----
> "TeX system documentation": ----
> " texpool": ----
> " TeX system sources": ----
> " PostScript header": ----
> " Troff fonts": ----
> " type1 fonts": ----
> " vf": ----
> " dvips config": ----
> " ist": ----
> " truetype fonts": ----
> " type42 fonts": ----
> " web2c": ----
> " other text files": ----
> " other binary files": ----
> " misc fonts": ----
> " web": ----
> " cweb": ----
> polifilo:/ andreavalle$
Good. Now we have a consistent picture of the problem. Python, when
calling kpsewhich cannot find psfonts.map. On the contrary, when ran
from the shell, it can find it.
Now, we need a Python Guru who explains what happens when PyX calls
os.popen("kpsewhich ...") I never understood this. To me, it seems as
if a sub-shell is started and the command is run in it. The existing
environment of the shell running python is conserved. However,
aliases and the like do not work inside os.popen (at least with my
config)
Therefore, the output of the following
commands (executed from your shell) would yield at least some insight:
echo $SHELL
echo $ENV
echo $BASH_ENV
echo $TEXMFCNF
which kpsewhich
echo 'which kpsewhich' | sh
Maybe this helps. Otherwise, I have no idea what went wrong.
Michael.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user