You can using the string module in Python Methods the same way you can in
DTML. There's no need to import anything.
Try _.string.split(...)
_______________________
Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Lee
> Sent: Saturday, January 13, 2001 8:55 PM
> To: [EMAIL PROTECTED]
> Subject: [Zope] importing string module in python METHOD - a problem
> that shouldn't be a problem problem
>
>
> Hi,
>
> I have a Python method that needs to use the string module. In the
> method body I have the 'import string' statement but when I try it =>
>
> Error Type: ImportError
> Error Value: __import__ not found
>
> The documentation collaborates that import statements (the string module
> specifically) can be used in Python methods. The method body is...
>
> import string
> text = details
> y = string.split(text,"x")
> studentMatric = y[0]
> studentRecord = y[1]
> return studentMatric + studentRecord
>
> .., which results in the above error. Can anyone suggest a reason for
> this? I think (hope) it'll work if I put it in my extensions directory.
_______________________________________________
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )