Posted:
31-July-2008 12:16 Hi Steve, Been a long time since I looked at the python stuff - and I confess I'm not a python user. However I've uploaded some tests that should show you what you need... http://1060.org/upload/jython-examples.tar.gz First thing is that with the Unix heritage languages on NK3 we did not provide a PATH model to them - so Python loads libraries out of the address space as though it were the unix tree and you can't provide an offset (essentially what the PYTHON_PATH does for you). (Incidentally this is put right in NK4 (coming soon!) - NK4 feels exactly like Unix to Ruby/Python languages and supports the library PATH model of Unix. Its interesting to speculate how these languages could become more Resource Oriented by allowing imports to specified by URI - then they could get them from anywhere in the the address space - but for now they think that the Unix resource model is always planted at / (one day we'll get there... ;-)). Anyway this tar.gz contains a directory that was originally located in a module directory /test/jython/ which was mapped into the host modules' address space with <this><match>ffcpl:/test/hython/.*</match><this> Therefore all the python classes in that directory can be loaded with... from test.jython import xxxxxx |
Please have a play with the examples and let me know if you have any difficulties. Cheers, P. |