[Zope] put python script in other directory.

J. Cameron Cooper jccooper at jcameroncooper.com
Fri Dec 5 14:41:14 EST 2003


Jianping Zhu wrote:

>Diretory stucture is 
>root
>  --subdir1
>     --ssubdir1
>     --ssubdir2
>  --dev
>     --mydev
>
>  
>I need to search some Zobject in subdir1 from diretory  mydev.
>  
>
Let acquisition work for you. Remember that 'context.subdir1.ssubdir1' 
works fine from 'mydev'. Your root method would work if 'root' were a 
bound name in Python scripts. It's not. Did Zope not tell you this when 
you tried to run the method? If you want to find the root, there are 
several methods: see the very nice ZopeLabs recipe for this.

          --jcc

-- 
"My point and period will be throughly wrought,
Or well or ill, as this day's battle's fought."





More information about the Zope mailing list