[Zope] importing an existing python module into Zope python
script?
Ed Leafe
ed at leafe.com
Fri Jan 30 12:14:34 EST 2004
On Jan 30, 2004, at 10:54 AM, Rachel Willmer wrote:
> d) I then create a Python Script file which looks like this:
>
> from Products.GlobalModules import base64
> def testing() :
> print base64.encodestring("hello")
> return printed
>
> e) I call the script and get
>
> Error Type: NameError
> Error Value: global name 'base64' is not defined
>
> What else do I need to do to get this to work? or, what am I doing
> wrong?
Just import base64 as you would in any other Python script:
import base64
No reference to the Product needed.
___/
/
__/
/
____/
Ed Leafe
Linux Love:
unzip;strip;touch;finger;mount;fsck;more;yes;umount;sleep
More information about the Zope
mailing list