Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

restricted mode???

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


robin at reportlab

Nov 4, 2009, 2:49 AM

Post #1 of 4 (61 views)
Permalink
restricted mode???

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

--
http://mail.python.org/mailman/listinfo/python-list


martin at v

Nov 4, 2009, 2:47 PM

Post #2 of 4 (50 views)
Permalink
Re: restricted mode??? [In reply to]

> 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
--
http://mail.python.org/mailman/listinfo/python-list


robin at reportlab

Nov 5, 2009, 1:50 AM

Post #3 of 4 (47 views)
Permalink
Re: restricted mode??? [In reply to]

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
--
http://mail.python.org/mailman/listinfo/python-list


robin at reportlab

Nov 5, 2009, 1:50 AM

Post #4 of 4 (47 views)
Permalink
Re: restricted mode??? [In reply to]

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

--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.