Back to index

moin  1.9.0~rc2
Namespaces | Functions
MoinMoin.web Namespace Reference

Namespaces

namespace  _fallback_cgi
namespace  contexts
namespace  exceptions
namespace  flup_frontend
namespace  frontend
namespace  profile
namespace  request
namespace  serving
namespace  session
namespace  static
namespace  utils

Functions

def _fixup_deps

Function Documentation

def MoinMoin.web._fixup_deps ( ) [private]
Alter the system path to import some 3rd party dependencies from
inside the MoinMoin.support package. This is meant for deps
used inside this package, which are mainly werkzeug and flup.

Definition at line 17 of file __init__.py.

00017 
00018 def _fixup_deps():
00019     """
00020     Alter the system path to import some 3rd party dependencies from
00021     inside the MoinMoin.support package. This is meant for deps
00022     used inside this package, which are mainly werkzeug and flup.
00023     """
00024     import sys, os
00025     from MoinMoin import support
00026     dirname = os.path.dirname(support.__file__)
00027     dirname = os.path.abspath(dirname)
00028     found = False
00029     for path in sys.path:
00030         if os.path.abspath(path) == dirname:
00031             found = True
00032             break
00033     if not found:
00034         sys.path.insert(0, dirname)
00035 
00036 try:
00037     _fixup_deps()
00038 finally:
00039     del _fixup_deps