Python import security problem
Hi, (As you know) I'm a zope newbie. I didn't find a article describing my following problem. I can not import python objects like 'time'. If I use import time I'll become the error message You are not allowed to access 'time' in this context Is it not possible to do this???? Thank you very much Ferhat __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
--On 3. September 2006 07:13:33 -0700 Ferhat Ayaz <ferhatayaz@yahoo.com> wrote:
Hi,
(As you know) I'm a zope newbie. I didn't find a article describing my following problem.
I can not import python objects like 'time'. If I use
import time
I'll become the error message
You are not allowed to access 'time' in this context
-> lib/python/Products/PythonScripts/README.txt -aj
Ferhat Ayaz wrote at 2006-9-3 07:13 -0700:
... I can not import python objects like 'time'. If I use
import time
I'll become the error message
You are not allowed to access 'time' in this context
Is it not possible to do this????
Please read the Zope Book (2.7 edition, online on "plope.org"). You will learn there the difference between trusted and untrusted code. Untrusted code (like "Script (Python)" and "FSPythonScript") can import only a very small set of modules. As you observe, they cannot import "time". Reading the "README" in "Products/PythonScripts" will tell you how to allow the import of additional modules. -- Dieter
Ferhat Ayaz wrote:
Hi,
(As you know) I'm a zope newbie. I didn't find a article describing my following problem.
Funny: http://www.google.com/search?q=%22you+are+not+allowed+to+access%22 You could do with RTFMing and Googling a bit more. Just about every question you've asked so far has been asked a million times before... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (4)
-
Andreas Jung -
Chris Withers -
Dieter Maurer -
Ferhat Ayaz