Importing External Methods
Hello, I have two external methods in the same zope folder. Is there a way to import one of the external methods into the other one? I need to access a datatype class from one to the other. Thanks a lot for your help. Bel�n
[<belen@netcom.no>] I have two external methods in the same zope folder. Is there a way to import one of the external methods into the other one? I need to access a datatype class from one to the other. [Tom P] Here's what I recommend. Use the methods in the Extensions directory only to invoke the real code, which would live somewhere else (not even in the Zope directory tree). Then make your code into a package with as many file as you want, like any other Python programming project. You will be able to import anything as usual, and you will keep the Extensions directory and its files clean and uncluttered. With this approach, you can also import any classes or methods you need into the external method. I use .pth files to get my code into the python path so Zope can find them. Cheers, Tom P
participants (2)
-
belen@netcom.no -
Thomas B. Passin