Hi!<br>I write this module in a Product (I import some module's functions in the product):<br><br>from AccessControl import ModuleSecurityInfo<br>modulesecurity = ModuleSecurityInfo()<br><br>def metodo(argumentos):<br>
here goes the method's code<br><br>modulesecurity.declarePublic('metodo')<br><br>modulesecurity.apply
(globals())<br><br clear="all">Then I try to import in a Script Python like:<br><br>from Products.Product'sDirectory.Module'sName import metodo<br><br>But fails (ImportError)<br><br>I try to add to the module's code allow_module('metodo') with the same result
<br><br>I try to import from Products.Product'sDirectory import metodo in the same way I can Import FormValidationError (from Products.Formulator.Form import FormValidationError where FormValidationError is on Errors.py
not in Form.py) but I have the same result (ImportError again)<br><br>Can you point me where is the mistake?<br><br>This is the traceback for more clues:<br><pre>Traceback (innermost last):<br> Module ZPublisher.Publish
, line 115, in publish<br> Module ZPublisher.mapply, line 88, in mapply<br> Module ZPublisher.Publish, line 41, in call_object<br> Module Products.Yanged.Yanged, line 166, in index_html<br> Module Products.Yanged.Yanged
, line 207, in __call__<br> Module Products.Yanged.Yanged, line 234, in Ejecutar<br> Module Products.Yanged.Yanged, line 207, in __call__<br> Module Products.Yanged.Yanged, line 234, in Ejecutar<br> Module Products.Yanged.Yanged
, line 207, in __call__<br> Module Products.Yanged.Yanged, line 234, in Ejecutar<br> Module Products.Yanged.Yanged, line 207, in __call__<br> Module Products.Yanged.Yanged, line 234, in Ejecutar<br> Module Products.Yanged.Yanged
, line 190, in __call__<br> Module Products.Yanged.Yanged, line 234, in Ejecutar<br> Module Shared.DC.Scripts.Bindings, line 311, in __call__<br> Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec<br> Module
Products.PythonScripts.PythonScript, line 326, in _exec<br> Module None, line 1, in ResolverEquivalencias<br> - <PythonScript at /sistes.net/clientes/escobarsl.com/Comandos/ResolverEquivalencias used for /sistes.net/clientes/escobarsl.com/Pagina/Editar/Sincronizar/ObtenerCaso/EditarArea/ResolverEquivalencias>
<br> - Line 1<br> Module AccessControl.ZopeGuards, line 266, in guarded_import<br> Module AccessControl.ZopeGuards, line 329, in load_module<br>Unauthorized: You are not allowed to access 'freemind' in this context
<br></pre><br>Thanks a lot! And sorry if I forget something :)<br>-- <br>Mis Cosas<br><a href="http://blogs.sistes.net/Garito">http://blogs.sistes.net/Garito</a>