Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > restricted mode???

Reply
Thread Tools

restricted mode???

 
 
Robin Becker
Guest
Posts: n/a
 
      11-04-2009
A reportlab user running via mod_python+django (Python 2.5.2 and mod_python
3.3.1) reports a strange intermittent error involving failure to read files
which are known to be present.

After some debugging efforts we got this clearer error message


File "/usr/lib/python2.5/site-packages/reportlab/lib/utils.py", line 810,
in dump
f = open(self.fn,'wb')

IOError: file() constructor not accessible in restricted mode

this is not the original error, but part of our efforts to debug; however, the
original error was during an attempt to read a file so presumably open was not
available there.

Googling the error indicates something to do with restricted
environments/mod_python+threads.

I thought that restricted mode died ages ago.

Any ideas what could be causing this?
--
Robin Becker

 
Reply With Quote
 
 
 
 
Martin v. L÷wis
Guest
Posts: n/a
 
      11-04-2009
> I thought that restricted mode died ages ago.
>
> Any ideas what could be causing this?


Restricted mode is still available, and activated whenever
a frame's builtins directory is different from the interpreter's;
see PyFrame_IsRestricted.

Regards,
Martin
 
Reply With Quote
 
 
 
 
Robin Becker
Guest
Posts: n/a
 
      11-05-2009
Martin v. L÷wis wrote:
>> I thought that restricted mode died ages ago.
>>
>> Any ideas what could be causing this?

>
> Restricted mode is still available, and activated whenever
> a frame's builtins directory is different from the interpreter's;
> see PyFrame_IsRestricted.
>
> Regards,
> Martin

thanks very much, I saw some references to mod_python & threading related to
this, but nothing very obvious.
--
Robin Becker
 
Reply With Quote
 
Robin Becker
Guest
Posts: n/a
 
      11-05-2009
Martin v. L÷wis wrote:
>> I thought that restricted mode died ages ago.
>>
>> Any ideas what could be causing this?

>
> Restricted mode is still available, and activated whenever
> a frame's builtins directory is different from the interpreter's;
> see PyFrame_IsRestricted.
>
> Regards,
> Martin

thanks very much, I saw some references to mod_python & threading related to
this, but nothing very obvious.
--
Robin Becker

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
restricted sites King of Red Lions Firefox 6 12-07-2007 05:30 PM
[newbie]Pix 515 - How to recognize Pix version : failover or restricted or UR officemicro1999@yahoo.fr Cisco 1 09-11-2005 10:21 PM
Router w/restricted access features? JJonson Cisco 0 05-23-2005 03:17 PM
Restricted access through VPN client BG Cisco 3 11-05-2004 09:27 AM
Accessing Cisco's Restricted Content JohnNews Cisco 23 11-06-2003 11:54 PM



Advertisments