Back to index

moin  1.9.0~rc2
Public Member Functions Class Reference
Inheritance diagram for
Inheritance graph
Collaboration diagram for
Collaboration graph

List of all members.

Public Member Functions

def __getattr__
def __dir__
def __version__

Detailed Description

Automatically import objects from the modules.

Definition at line 110 of file

Member Function Documentation

Just show what we want to show.

Definition at line 123 of file

00124     def __dir__(self):
00125         """Just show what we want to show."""
00126         result = list(new_module.__all__)
00127         result.extend(('__file__', '__path__', '__doc__', '__all__',
00128                        '__docformat__', '__name__', '__path__',
00129                        '__package__', '__version__'))
00130         return result

Definition at line 113 of file

00114     def __getattr__(self, name):
00115         if name in object_origins:
00116             module = __import__(object_origins[name], None, None, [name])
00117             for extra_name in all_by_module[module.__name__]:
00118                 setattr(self, extra_name, getattr(module, extra_name))
00119             return getattr(module, name)
00120         elif name in attribute_modules:
00121             __import__('werkzeug.' + name)
00122         return ModuleType.__getattribute__(self, name)

Definition at line 132 of file

00133     def __version__(self):
00134         global version
00135         if version is None:
00136             try:
00137                 version = __import__('pkg_resources') \
00138                           .get_distribution('Werkzeug').version
00139             except:
00140                 version = 'unknown'
00141         return version
# keep a reference to this module so that it's not garbage collected

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