def runfcgi(func):
 from flup.server.fcgi import WSGIServer
 if (len(sys.argv) > 2):
  args = sys.argv[:]
  if ('fastcgi' in args):
   args.remove('fastcgi')
  elif ('fcgi' in args):
   args.remove('fcgi')
  hostport = validip(args[1])
 elif (len(sys.argv) > 1):
  hostport = ('localhost', 8000)
 else:
  hostport = None
 return makeserver(WSGIServer)(func, multiplexed=True, bindAddress=hostport).run()

def runfcgi ( func ) : from flup . server . fcgi import WSGIServer if ( len ( sys . argv ) > 2 ) : args = sys . argv [ : ] if ( 'fastcgi' in args ) : args . remove ( 'fastcgi' ) elif ( 'fcgi' in args ) : args . remove ( 'fcgi' ) hostport = validip ( args [ 1 ] ) elif ( len ( sys . argv ) > 1 ) : hostport = ( 'localhost' , 8000 ) else : hostport = None return makeserver ( WSGIServer ) ( func , multiplexed = True , bindAddress = hostport ) . run ( )
runs a wsgi-function with a fastcgi server .