Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Private Attributes
runpy._ModifiedArgv0 Class Reference
Inheritance diagram for runpy._ModifiedArgv0:
Inheritance graph
[legend]
Collaboration diagram for runpy._ModifiedArgv0:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __enter__
def __exit__

Public Attributes

 value
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Private Attributes

 _saved_value
 _sentinel

Detailed Description

Definition at line 47 of file runpy.py.


Constructor & Destructor Documentation

def runpy._ModifiedArgv0.__init__ (   self,
  value 
)

Definition at line 48 of file runpy.py.

00048 
00049     def __init__(self, value):
00050         self.value = value
00051         self._saved_value = self._sentinel = object()

Here is the caller graph for this function:


Member Function Documentation

Definition at line 52 of file runpy.py.

00052 
00053     def __enter__(self):
00054         if self._saved_value is not self._sentinel:
00055             raise RuntimeError("Already preserving saved value")
00056         self._saved_value = sys.argv[0]
00057         sys.argv[0] = self.value

def runpy._ModifiedArgv0.__exit__ (   self,
  args 
)

Definition at line 58 of file runpy.py.

00058 
00059     def __exit__(self, *args):
00060         self.value = self._sentinel
00061         sys.argv[0] = self._saved_value

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 50 of file runpy.py.

Definition at line 50 of file runpy.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

Definition at line 49 of file runpy.py.


The documentation for this class was generated from the following file: