Re: [Zope-dev] Python Script to import content into Zope?!

2003-10-26 Thread Andreas Jung
--On Sonntag, 26. Oktober 2003 19:59 Uhr +0100 Simone Unold [EMAIL PROTECTED] wrote: Hi, my question is if there is some kind of Python Script available to update Content into Zope. What do you meanwith update content. Check out the APIs provided by the content types and apply their methods

[Zope-dev] Python Script to import content into Zope?!

2003-10-26 Thread Simone Unold
Hi, my question is if there is some kind of Python Script available to update Content into Zope. Im programming C++ and thought, that there may be a possibility to call a Python Script in order to automatically import content to zope?! Can anybody help me, has anyone an idea? Thanks a

[Zope-dev] Python Script bug?

2001-07-10 Thread Chris Withers
Hi, The following code: objects = map(lambda b: b.getObject,brains) Results in: Error type: Unauthorized Error value: __len__ File E:\Zope\current\Products\CMFCore\FSPythonScript.py, line 187, in _exec (Object: index_html_postings) (Info: ({'script': FSPythonScript instance at

Re: [Zope-dev] Python Script bug?

2001-07-10 Thread Hannu Krosing
Chris Withers wrote: Hi, The following code: objects = map(lambda b: b.getObject,brains) try objects = map(lambda b: b.getObject(),brains) --- Hannu ___ Zope-Dev maillist - [EMAIL PROTECTED]

[Zope-dev] Python Script

2001-02-23 Thread Cyril Elkaim
Hi All, I must say that I have very hard time with both Scripts and Zclass. My problem is the context and the container proprties of a script inside a Zclass. If I understand well the context is an URL point of view, the object accessed through the web. The container is fixed, it's the

Re: [Zope-dev] Python Script

2001-02-23 Thread Steve Alexander
Cyril Elkaim wrote: Hi All, I must say that I have very hard time with both Scripts and Zclass. My problem is the context and the container proprties of a script inside a Zclass. If I understand well the context is an URL point of view, the object accessed through the web. The

Re: [Zope-dev] Python Script

2001-02-23 Thread Cyril Elkaim
Thanks Steve, In this case, container is the ZClass instance. Understood, that was my conclusion and it's logical. One more question please :-) How can I access the methods definitions of the zclass from an instance ? I don't talk about calling them but getting an 'attribute' of the

Re: [Zope-dev] Python Script

2001-02-23 Thread Steve Alexander
Cyril Elkaim wrote: How can I access the methods definitions of the zclass from an instance ? I don't talk about calling them but getting an 'attribute' of the zclass knowing only its name at _runtime_ not _compile_ time? I don't entirely understand what you want to do. Calling a method

Re: [Zope-dev] Python Script

2001-02-23 Thread Cyril Elkaim
Hi Steve, In the zclass definition I have a bunch of Image objects together with the following script. SCRIPT s_center(width, height, image): import string result = None for item in container.objectItems(): if string.strip(item[0]) == image: image_width =

Re: [Zope-dev] Python Script

2001-02-23 Thread Steve Alexander
Cyril Elkaim wrote: This script works fine if I test it inside the test tabs of the zclass. But if I run it from an instance 'container.objectItems()' returns nothing. I understand why but my problem is how to get access of the images from the instance. What I need is something giving

Re: [Zope-dev] Python Script

2001-02-23 Thread Cyril Elkaim
Steve Alexander wrote: for name,object in container.objectItems(): if string.strip(name) == image: image_width = int(object.getProperty("width")) image_height = int(object.getProperty("height")) Thanks again :-), I passed too much time with Javascript and not enough with

Re: [Zope-dev] Python Script

2001-02-23 Thread Cyril Elkaim
Thanks Steve, I will try... Cyril ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists -

[Zope-dev] Python Script Wish

2001-02-02 Thread Chris Withers
Hi, Python Scripts are great :-) I wish I could create them through FTP. Basically, if you try to save a something.py into Zope through FTP, it currently creates a file object with the MIME type set to x-python. It's be really great if it coudl create a Python Script instead. Is that hard to

Re: [Zope-dev] python script

2001-01-10 Thread Zope mailing lists
On Tue, 9 Jan 2001 [EMAIL PROTECTED] wrote: Damnnation, Chris, everyone knows that it is supposed to be spelled Python Thingy. "I recently released 'zopectl', a Python Thingy"... 'Please go wash your hands before your shake hands with me!' Hmm. All kidding aside, Chris is right. This

Re: [Zope-dev] python script

2001-01-09 Thread Chris Withers
Zope mailing lists wrote: I recently released 'zopectl', a python script ...gak... now is that a 'python script' or a 'Python Script'? ;-) *grinz* Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev