|
Apache/2.2.15 (CentOS) Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64 uid=48(apache) gid=48(apache) groups=48(apache) server ip : 172.67.192.52 | your ip : 10.244.126.0 safemode OFF > / usr / lib64 / python2.6 / |
| Filename | /usr/lib64/python2.6/rexec.pyo |
| Size | 23.65 kb |
| Permission | rw-r--r-- |
| Owner | apache |
| Create time | 23-Dec-2025 17:41 |
| Last modified | 20-Jun-2019 19:45 |
| Last accessed | 22-Apr-2026 05:27 |
| Actions | edit | rename | delete | download (gzip) |
| View | text | code | image |
Ñò
§ÚêLc @ s% d Z d d k l Z e d d d �[ d d k Z d d k Z d d k Z d d k Z d d k Z d g Z d f d � � YZ d
e f d � � YZ
d Z d
e f d � � YZ d e i
f d � � YZ e i Z e i Z d e i f d � � YZ d � Z e d j o e i e � � n d S( s9 Restricted execution facilities.
The class RExec exports methods r_exec(), r_eval(), r_execfile(), and
r_import(), which correspond roughly to the built-in operations
exec, eval(), execfile() and import, but executing the code in an
environment that only exposes those built-in operations that are
deemed safe. To this end, a modest collection of 'fake' modules is
created which mimics the standard modules by the same names. It is a
policy decision which built-in modules and operations are made
available; this module provides a reasonable default, but derived
classes can change the policies e.g. by overriding or extending class
variables like ok_builtin_modules or methods like make_sys().
XXX To do:
- r_open should allow writing tmp dir
- r_exec etc. with explicit globals/locals? (Use rexec("exec ... in ...")?)
iÿÿÿÿ( t warnpy3ks/ the rexec module has been removed in Python 3.0t
stackleveli Nt RExect FileBasec B s e Z d Z RS(
t filenot flusht isattyt readt readlinet readlinest seekt tellt writet
writelinest
xreadlinest __iter__( s filenos flushs isattys reads readlines readliness seeks tells writes
writeliness
xreadliness __iter__( t __name__t
__module__t ok_file_methods( ( ( s /usr/lib64/python2.6/rexec.pyR s t FileWrapperc B s e Z d � Z d � Z RS( c C sV xO | i D]D } t | | � o- t | | � o t | | t | | � � q
q
Wd S( N( R t hasattrt setattrt getattr( t selft ft m( ( s /usr/lib64/python2.6/rexec.pyt __init__+ s
!c C s | i � d S( N( R ( R ( ( s /usr/lib64/python2.6/rexec.pyt close0 s ( R R R R ( ( ( s /usr/lib64/python2.6/rexec.pyR ' s sL
def %s(self, *args):
return getattr(self.mod, self.name).%s(*args)
t FileDelegatec B s; e Z d � Z x' e i d D] Z e e e f d Uq WRS( c C s | | _ | | _ d S( N( t modt name( R R R ( ( s /usr/lib64/python2.6/rexec.pyR ; s R N( s close( R R R R R R t TEMPLATE( ( ( s /usr/lib64/python2.6/rexec.pyR 9 s t RHooksc B s} e Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z
d � Z d
� Z d � Z
d � Z RS(
c G s¯
§ÚêLc @ s% d Z d d k l Z e d d d �[ d d k Z d d k Z d d k Z d d k Z d d k Z d g Z d f d � � YZ d
e f d � � YZ
d Z d
e f d � � YZ d e i
f d � � YZ e i Z e i Z d e i f d � � YZ d � Z e d j o e i e � � n d S( s9 Restricted execution facilities.
The class RExec exports methods r_exec(), r_eval(), r_execfile(), and
r_import(), which correspond roughly to the built-in operations
exec, eval(), execfile() and import, but executing the code in an
environment that only exposes those built-in operations that are
deemed safe. To this end, a modest collection of 'fake' modules is
created which mimics the standard modules by the same names. It is a
policy decision which built-in modules and operations are made
available; this module provides a reasonable default, but derived
classes can change the policies e.g. by overriding or extending class
variables like ok_builtin_modules or methods like make_sys().
XXX To do:
- r_open should allow writing tmp dir
- r_exec etc. with explicit globals/locals? (Use rexec("exec ... in ...")?)
iÿÿÿÿ( t warnpy3ks/ the rexec module has been removed in Python 3.0t
stackleveli Nt RExect FileBasec B s e Z d Z RS(
t filenot flusht isattyt readt readlinet readlinest seekt tellt writet
writelinest
xreadlinest __iter__( s filenos flushs isattys reads readlines readliness seeks tells writes
writeliness
xreadliness __iter__( t __name__t
__module__t ok_file_methods( ( ( s /usr/lib64/python2.6/rexec.pyR s t FileWrapperc B s e Z d � Z d � Z RS( c C sV xO | i D]D } t | | � o- t | | � o t | | t | | � � q
q
Wd S( N( R t hasattrt setattrt getattr( t selft ft m( ( s /usr/lib64/python2.6/rexec.pyt __init__+ s
!c C s | i � d S( N( R ( R ( ( s /usr/lib64/python2.6/rexec.pyt close0 s ( R R R R ( ( ( s /usr/lib64/python2.6/rexec.pyR ' s sL
def %s(self, *args):
return getattr(self.mod, self.name).%s(*args)
t FileDelegatec B s; e Z d � Z x' e i d D] Z e e e f d Uq WRS( c C s | | _ | | _ d S( N( t modt name( R R R ( ( s /usr/lib64/python2.6/rexec.pyR ; s R N( s close( R R R R R R t TEMPLATE( ( ( s /usr/lib64/python2.6/rexec.pyR 9 s t RHooksc B s} e Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z
d � Z d
� Z d � Z
d � Z RS(
c G s¯