On Sat, 16 Dec 2000, Evan Simpson wrote:
From: "Itai Tavor" <itai@optusnet.com.au> [...] Sure. Since you've already got a MoreBuiltins module, that's probably a fine place to put this. In MoreBuiltins/__init__.py (or a brand new Product directory of your choice) put the following lines:
import urllib urllib.__allow_access_to_unprotected_subobjects__ = 1
...and similarly if you want to declare other modules PS-importable. As of 2.3, the proper way to do this will be:
from AccessControl import ModuleSecurityInfo ModuleSecurityInfo('urllib').setDefaultAccess(1)
I wonder whether that ought to be something like: from AccessControl import ModuleSecurityInfo, ENABLE_ACCESS ModuleSecurityInfo('urllib').setDefaultAccess(ENABLE_ACCESS) ? The benefit of having an explicit name for "enable" is marginal, but would become significant if there were other access modes besides ENABLE and DISABLE - eg, "ENABLE_METHODS", "ENABLE_ATTRIBUTES", etc... Ken Manheimer klm@digicool.com