473,383 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

restricted mode (2.4.2)

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" *
Feb 17 '06 #1
0 1017

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Denis S. Otkidach | last post by:
When I execute python code from C++ application with PyEval_EvalCode and this code contains imports of other modules then I got the error "RuntimeError: cannot unmarshal code objects in restricted...
13
by: Rolf Magnus | last post by:
Hi, I would like to embed a python interpreter within a program, but since that program would be able to automatically download scripts from the internet, I'd like to run those in a restricted...
4
by: David Lozzi | last post by:
Session("UID") = 10 Session("Name") = "John Doe" I have an ASP application loaded on a Win2k SP3 server in Anonymous Authentication Mode. When I try to access the site, none of the session...
15
by: vinjvinj | last post by:
I have an application which allows multiple users to write models. These models get distributed on a grid of compute engines. users submit their models through a web interface. I want to 1....
0
by: SamIAm | last post by:
Hi I have the following in my web.config to specify that all my pages require authorization: <authentication mode="Forms"> <forms loginUrl="Login.aspx" timeout="60" path="/">
0
by: gabriel.becedillas | last post by:
Hi, At the company I work for we've embedded Python 2.4.1 in a C++ application. We execute multiple scripts concurrenlty, each one in its own interpreter (created using Py_NewInterpreter()). We...
18
by: Markalon | last post by:
I've tried to find the answer to this one already but couldn't find it in the forum. What does IOError: file() constructor not accessible in restricted mode mean? Here is the code that is...
3
by: Dmitri Fedoruk | last post by:
Hello everyone, I'm developing a mod_python application that is based on XML\XSLT transforming. I used 4Suite libraries for that, but as the speed was unacceptable for me, I switched to lxml....
3
by: Paul Rudin | last post by:
I'm occasionally seeing tracebacks like this: Traceback (most recent call last): File "logging/__init__.py", line 744, in emit File "logging/__init__.py", line 630, in format File...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.