From: <bc...@wo...> - 2001-04-25 18:51:24
|
[Paolo Tortora] >I followed your istruction and I create a registry file where set up some >properties. > >How can I add (and not substitute!) an extra path. >In other words? > >In jyhton script I do: >/usr/j2se/jre/bin/java -Dpython.home=${HOME}/.jythonhome -Dpython.path >=/export/skel/omc-user/pythonmodules > >And in $HOME/.jythonhome/registry I wrote the following: >python.path=mylocaldir > >In this way I just substitute the path. Right. >I would like to know how to add mylocaldir to that is set in command line. >Anyone knows how to do that ? You can't by just using property files or commandlines arguments (actual you can but you will most likely not get a useful precedence. Se property "python.prepath" for details http://www.jython.org/cgi-bin/faqw.py?req=show&file=faq02.003.htp ). Instead I would suggest that you control the final sys.path from within your python program with something like: import sys, java sys.path.append(java.System.getProperty("mylocaldir.path")) regards, finn |