15 Aug
2003
15 Aug
'03
3:52 a.m.
On Thu, 2003-08-14 at 19:34, Declan Shanaghy wrote:
Can someone tell me why i cant import types into my python script in CMF?
You can only import modules that are explicitly permitted. See the README file in the PythonScripts product directory for info. But there's rarely any value to importing the types module anyway. If you want to know if something is a list, you can usually just test to see if it has the characteristics of a list, eg: if hasattr(my_obj, 'sort'): Or you really must know, you can check this way: if type(my_obj) == type([]): HTH, Dylan