restricted mode (2.4.2)

Discussion in 'Python' started by Wojciech Pawlikowski, Feb 17, 2006.

  1. 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" *
     
    Wojciech Pawlikowski, Feb 17, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vinjvinj
    Replies:
    15
    Views:
    601
    Jeremy Sanders
    Nov 10, 2005
  2. Replies:
    0
    Views:
    271
  3. Dmitri Fedoruk
    Replies:
    4
    Views:
    718
    Dmitri Fedoruk
    Sep 14, 2007
  4. Paul Rudin
    Replies:
    3
    Views:
    420
    Vinay Sajip
    Oct 21, 2007
  5. Robin Becker

    restricted mode???

    Robin Becker, Nov 4, 2009, in forum: Python
    Replies:
    3
    Views:
    729
    Robin Becker
    Nov 5, 2009
Loading...

Share This Page