Python on NetKernel is able to access libraries in the ROC address space.
Python code is completely at home on NetKernel. Effectively the Python runtime sees NetKernel as identical to a Unix operating system.
res:/etc/PYTHONPATH may be specified in your address space. This resource must be a line delimited list of absolute resource path URIs which will be searched for Python packages.
For example to add the Python 2.7.0 library you would import urn:org:netkernel:lang:python:lib into your module address space and set the following entry in your res:/etc/PYTHONPATH resource...
//Path of the standard Python 2.7.0 Library resources res:/library/python/2.7.0/
The Python compiler will use the PYTHONPATH to resolve imports.
Lines beginning with # or // will be treated as comments.
With a module set up to use the Python 2.5.0 library (as described above). The following standard Python provides an HTML formatted month...
from calendar import HTMLCalendar c=HTMLCalendar(1) t=c.formatmonth(2009, 8) resp=context.createResponseFrom(t) resp.setMimeType("text/html")
As you can see - this is just standard Python import from the 2.7.0 library.
You can create your own libraries for Python on NetKernel. All that is necessary is that the directory location of your library specifies the file __init___.py