Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes
MoinMoin.support.werkzeug.debug.console.ThreadedStream Class Reference

List of all members.

Public Member Functions

def push
def fetch
def displayhook
def __setattr__
def __dir__
def __getattribute__
def __repr__

Static Public Attributes

tuple push = staticmethod(push)
tuple fetch = staticmethod(fetch)
tuple displayhook = staticmethod(displayhook)

Detailed Description

Thread-local wrapper for sys.stdout for the interactive console.

Definition at line 52 of file console.py.


Member Function Documentation

Definition at line 83 of file console.py.

00083 
00084     def __dir__(self):
00085         return dir(sys.__stdout__)

Definition at line 86 of file console.py.

00086 
00087     def __getattribute__(self, name):
00088         if name == '__members__':
00089             return dir(sys.__stdout__)
00090         try:
00091             stream = _local.stream
00092         except AttributeError:
00093             stream = sys.__stdout__
00094         return getattr(stream, name)

Definition at line 95 of file console.py.

00095 
00096     def __repr__(self):
00097         return repr(sys.__stdout__)
00098 
00099 
# add the threaded stream as display hook

Definition at line 80 of file console.py.

00080 
00081     def __setattr__(self, name, value):
00082         raise AttributeError('read only attribute %s' % name)

Definition at line 69 of file console.py.

00069 
00070     def displayhook(obj):
00071         try:
00072             stream = _local.stream
00073         except AttributeError:
00074             return _displayhook(obj)
00075         # stream._write bypasses escaping as debug_repr is
00076         # already generating HTML for us.
00077         if obj is not None:
            stream._write(debug_repr(obj))

Here is the call graph for this function:

Definition at line 61 of file console.py.

00061 
00062     def fetch():
00063         try:
00064             stream = _local.stream
00065         except AttributeError:
00066             return ''
        return stream.reset()

Definition at line 55 of file console.py.

00055 
00056     def push():
00057         if sys.stdout is sys.__stdout__:
00058             sys.stdout = ThreadedStream()
        _local.stream = HTMLStringO()

Member Data Documentation

Definition at line 78 of file console.py.

Definition at line 67 of file console.py.

Definition at line 59 of file console.py.


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