Back to index

moin  1.9.0~rc2
Functions
MoinMoin.support.flup.server.paste_factory Namespace Reference

Functions

def asbool
def aslist
def run_ajp_thread
def run_ajp_fork
def run_fcgi_thread
def run_fcgi_fork
def run_scgi_thread
def run_scgi_fork

Function Documentation

Definition at line 6 of file paste_factory.py.

00006 
00007 def asbool(obj):
00008     if isinstance(obj, (str, unicode)):
00009         obj = obj.strip().lower()
00010         if obj in ['true', 'yes', 'on', 'y', 't', '1']:
00011             return True
00012         elif obj in ['false', 'no', 'off', 'n', 'f', '0']:
00013             return False
00014         else:
00015             raise ValueError(
00016                 "String is not true/false: %r" % obj)
00017     return bool(obj)

Here is the caller graph for this function:

def MoinMoin.support.flup.server.paste_factory.aslist (   obj,
  sep = None,
  strip = True 
)

Definition at line 18 of file paste_factory.py.

00018 
00019 def aslist(obj, sep=None, strip=True):
00020     if isinstance(obj, (str, unicode)):
00021         lst = obj.split(sep)
00022         if strip:
00023             lst = [v.strip() for v in lst]
00024         return lst
00025     elif isinstance(obj, (list, tuple)):
00026         return obj
00027     elif obj is None:
00028         return []
00029     else:
00030         return [obj]

Here is the call graph for this function:

Here is the caller graph for this function:

def MoinMoin.support.flup.server.paste_factory.run_ajp_fork (   wsgi_app,
  global_conf,
  scriptName = '',
  host = 'localhost',
  port = '8009',
  allowedServers = '127.0.0.1',
  debug = NoDefault 
)

Definition at line 50 of file paste_factory.py.

00050 
00051                  allowedServers='127.0.0.1', debug=NoDefault):
00052     import flup.server.ajp_fork
00053     addr = (host, int(port))
00054     if debug is NoDefault:
00055         debug = global_conf.get('debug', False)
00056     debug = asbool(debug)
00057     s = flup.server.ajp_fork.WSGIServer(
00058         wsgi_app,
00059         scriptName=scriptName,
00060         bindAddress=addr,
00061         allowedServers=aslist(allowedServers),
00062         debug=debug,
00063         )
00064     s.run()

Here is the call graph for this function:

Here is the caller graph for this function:

def MoinMoin.support.flup.server.paste_factory.run_ajp_thread (   wsgi_app,
  global_conf,
  scriptName = '',
  host = 'localhost',
  port = '8009',
  allowedServers = '127.0.0.1',
  debug = NoDefault 
)

Definition at line 33 of file paste_factory.py.

00033 
00034                    allowedServers='127.0.0.1', debug=NoDefault):
00035     import flup.server.ajp
00036     addr = (host, int(port))
00037     if debug is NoDefault:
00038         debug = global_conf.get('debug', False)
00039     debug = asbool(debug)
00040     s = flup.server.ajp.WSGIServer(
00041         wsgi_app,
00042         scriptName=scriptName,
00043         bindAddress=addr,
00044         allowedServers=aslist(allowedServers),
00045         debug=debug,
00046         )
00047     s.run()

Here is the call graph for this function:

Here is the caller graph for this function:

def MoinMoin.support.flup.server.paste_factory.run_fcgi_fork (   wsgi_app,
  global_conf,
  host = None,
  port = None,
  socket = None,
  umask = None,
  multiplexed = False,
  debug = NoDefault 
)

Definition at line 94 of file paste_factory.py.

00094 
00095                   debug=NoDefault):
00096     import flup.server.fcgi_fork
00097     if socket:
00098         assert host is None and port is None
00099         sock = socket
00100     elif host:
00101         assert host is not None and port is not None
00102         sock = (host, int(port))
00103     else:
00104         sock = None
00105     if umask is not None:
00106         umask = int(umask)
00107     if debug is NoDefault:
00108         debug = global_conf.get('debug', False)
00109     debug = asbool(debug)
00110     s = flup.server.fcgi_fork.WSGIServer(
00111         wsgi_app,
00112         bindAddress=sock, umask=umask,
00113         multiplexed=asbool(multiplexed),
00114         debug=debug)
00115     s.run()

Here is the call graph for this function:

Here is the caller graph for this function:

def MoinMoin.support.flup.server.paste_factory.run_fcgi_thread (   wsgi_app,
  global_conf,
  host = None,
  port = None,
  socket = None,
  umask = None,
  multiplexed = False,
  debug = NoDefault 
)

Definition at line 68 of file paste_factory.py.

00068 
00069                     multiplexed=False, debug=NoDefault):
00070     import flup.server.fcgi
00071     if socket:
00072         assert host is None and port is None
00073         sock = socket
00074     elif host:
00075         assert host is not None and port is not None
00076         sock = (host, int(port))
00077     else:
00078         sock = None
00079     if umask is not None:
00080         umask = int(umask)
00081     if debug is NoDefault:
00082         debug = global_conf.get('debug', False)
00083     debug = asbool(debug)
00084     s = flup.server.fcgi.WSGIServer(
00085         wsgi_app,
00086         bindAddress=sock, umask=umask,
00087         multiplexed=asbool(multiplexed),
00088         debug=debug)
00089     s.run()

Here is the call graph for this function:

Here is the caller graph for this function:

def MoinMoin.support.flup.server.paste_factory.run_scgi_fork (   wsgi_app,
  global_conf,
  scriptName = NoDefault,
  host = 'localhost',
  port = '4000',
  allowedServers = '127.0.0.1',
  debug = NoDefault 
)

Definition at line 137 of file paste_factory.py.

00137 
00138                   debug=NoDefault):
00139     import flup.server.scgi_fork
00140     addr = (host, int(port))
00141     if debug is NoDefault:
00142         debug = global_conf.get('debug', False)
00143     debug = asbool(debug)
00144     s = flup.server.scgi_fork.WSGIServer(
00145         wsgi_app,
00146         scriptName=scriptName,
00147         bindAddress=addr,
00148         allowedServers=aslist(allowedServers),
00149         debug=debug,
00150         )
00151     s.run()
00152 

Here is the call graph for this function:

Here is the caller graph for this function:

def MoinMoin.support.flup.server.paste_factory.run_scgi_thread (   wsgi_app,
  global_conf,
  scriptName = NoDefault,
  host = 'localhost',
  port = '4000',
  allowedServers = '127.0.0.1',
  debug = NoDefault 
)

Definition at line 119 of file paste_factory.py.

00119 
00120                     debug=NoDefault):
00121     import flup.server.scgi
00122     addr = (host, int(port))
00123     if debug is NoDefault:
00124         debug = global_conf.get('debug', False)
00125     debug = asbool(debug)
00126     s = flup.server.scgi.WSGIServer(
00127         wsgi_app,
00128         scriptName=scriptName,
00129         bindAddress=addr,
00130         allowedServers=aslist(allowedServers),
00131         debug=debug,
00132         )
00133     s.run()

Here is the call graph for this function:

Here is the caller graph for this function: