monks wrote:
> 
> im trying to call test from my python script inside /Products like :
>   self.REQUEST.RESPONSE.test2(st=tmp_astat, id=410),
> but its giving error " AttributeError: ZServerHTTPResponse instance has 
> no attribute 'test2' ".
> i know , error is becoz, its not finding 'test2' inside /Products, as 
> 'test2' is in /custom.
> 

No, that's because that line is all wrong and is not going work under any
circumstances :)


monks wrote:
> 
> But now if i customize my script to /custom folder, and change calling 
> method with sth like : 
>   return context.test2(st=tmp_astat, id=410),
> its not picking this statm.

What is statm?


monks wrote:
> Its still reading 
> "self.REQUEST.RESPONSE.test2(st=tmp_astat, id=410)" from /Products dir.
> 

How exactly do you see that it's reading like that? Where do you check it?


monks wrote:
> so, I want to know, whether my Python script (in /Products) can read 
> 'test2' (in ZMI /cusom) in anyway or not with parameters, and if yes, how
> ?

a filesystem PythonScript (in
Products/yourproduct/skins/yourproduct_templates/a_script.py) definitely can
CALL a non-filesystem PythonScript which lives in ZODB provided the latter
can be found via acquisition. Actually, it's totally transparent and you
shouldn't worry about that. I think you're missing something very simple or
using the wrong terminology (i.e. "Python Scripts" not being real Python
Script objects etc.)

Try to customize one of standard Plone scripts and see how it works for you

-- 
View this message in context: 
http://n2.nabble.com/Python-script-differ-n-ZMI-tp1324556p1324749.html
Sent from the Product Developers mailing list archive at Nabble.com.


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to