Hi Victor. You need to add your Extentions directory to $PYTHONPATH or you could just use: import sys sys.path.append("/usr/local/Zope/Extensions") import your_module -Fredrick Victor Ng wrote:
How do I use "import" in an external method? Zope just gives me an import error. Let's say these are the two files that I want to use (test1.py, test2.py).
test1.py -- import test2 test2.testMethod()
test2.py -- def testMethod(): print "output.txt"
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
-- ========================================== Fredrick Rybarczyk Research Engineer NetLab, Lund University