restricted mode (2.4.2)
Wojciech Pawlikowski
feedme at foo.org
Fri Feb 17 03:53:46 EST 2006
Hey,
I work on some project where main part (core) is coded in C
(for speed) and the rest is in Python. Python API is used
to launch python modules without using any exec() system()
calls (thread safe). During debugging I found that
many of Python modules fails to work because restricted mode:
Traceback (most recent call last):
File "../modules/scan/dns_forward.py", line 167, in scan_element
d = DNSForward(domainname)
File "../modules/scan/dns_forward.py", line 20, in __init__
self.__r = dns.resolver.Resolver()
File "/usr/lib/python2.4/site-packages/dns/resolver.py", line 270, in
__init__
self.read_resolv_conf(filename)
File "/usr/lib/python2.4/site-packages/dns/resolver.py", line 295, in
read_resolv_conf
f = open(f, 'r')
IOError: file() constructor not accessible in restricted mode
Is there any way to avoid this mode ?
--
___________________________________________________________________
* Wojciech Pawlikowski :: <wojtekp AT gmail.com> :: GG: 4155781 *
* http://www.knockdownhc.com || http://www.kingofthehillhc.com *
* "Loved by a few, Hated by many, But respected by ALL" *
More information about the Python-list
mailing list