Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Users

need help importing python class into zope 2.11.2

 

 

Zope users RSS feed   Index | Next | Previous | View Threaded


Dganit.D at puresight

May 10, 2009, 5:48 AM

Post #1 of 2 (1048 views)
Permalink
need help importing python class into zope 2.11.2

HI



I'm new to zope and python, I wrote some basic python class and a test
program using this class.

The script is working fine when running python from command line.



Now I want to uses this class inside zope,

I tried to create the script, but it failed with the following error.

Line 5: "__init__" is an invalid variable name because it starts with
"_"



Can I write a constructor with different name?

Please advice what is the correct why to import this class to zope





Thanks Dganit


lists at zopyx

May 10, 2009, 5:55 AM

Post #2 of 2 (929 views)
Permalink
Re: need help importing python class into zope 2.11.2 [In reply to]

On 10.05.09 14:48, Dganit David wrote:
>
> HI
>
>
>
> I’m new to zope and python, I wrote some basic python class and a test
> program using this class.
>
> The script is working fine when running python from command line.
>
>
>
> Now I want to uses this class inside zope,
>
> I tried to create the script, but it failed with the following error.
>
> Line 5: "__init__" is an invalid variable name because it starts with "_"
>
>
>
> Can I write a constructor with different name?
>
> Please advice what is the correct why to import this class to zope
>

PythonScripts are *not* a replacement for pure Python code.
PythonScripts are restricted. Class definitions belong into "trusted code"
(browser views, externals method or a Zope product).

http://docs.zope.org/zope2/zdgbook/

-aj
Attachments: lists.vcf (0.32 KB)

Zope users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.