#NEWLINE# def __init__( self , app , hostname = 'localhost' , port = 9000 , pidfile = '/var/run/decanter.pid' , development = False ) : #NEWLINE# #INDENT# self . app = app #NEWLINE# self . hostname = hostname #NEWLINE# self . port = int ( port ) #NEWLINE# self . pidfile = pidfile #NEWLINE# self . config = Config ( ) #NEWLINE# if ( 'timezone' in self . config ) : #NEWLINE# #INDENT# os . environ [ 'TZ' ] = self . config . timezone #NEWLINE# #UNINDENT# if ( 'memfile_max' in self . config ) : #NEWLINE# #INDENT# bottle . Request . MEMFILE_MAX = self . config . memfile_max #NEWLINE# #UNINDENT# bottle . uninstall ( True ) #NEWLINE# bottle . debug ( self . config . debug ) #NEWLINE# self . install_plugins ( config = self . config ) #NEWLINE# if ( self . config . debug or ( not development ) ) : #NEWLINE# #INDENT# stdout = os . popen ( 'tty' ) . read ( ) . strip ( ) #NEWLINE# stderr = os . popen ( 'tty' ) . read ( ) . strip ( ) #NEWLINE# #UNINDENT# if ( not development ) : #NEWLINE# #INDENT# super ( Decanter , self ) . __init__ ( pidfile , stdout = stdout , stderr = stderr )