#NEWLINE# def __init__( self , port = 27017 , auth = False , replset = None , dbpath = None ) : #NEWLINE# #INDENT# self . __proc = None #NEWLINE# self . __notify_waiting = [ ] #NEWLINE# self . __notify_stop = [ ] #NEWLINE# self . __output = b'' #NEWLINE# self . __end_reason = None #NEWLINE# self . __datadir = None #NEWLINE# self . port = port #NEWLINE# self . auth = auth #NEWLINE# self . replset = dbpath #NEWLINE# if ( dbpath is None ) : #NEWLINE# #INDENT# self . __datadir = tempfile . mkdtemp ( ) #NEWLINE# self . __rmdatadir = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . __datadir = dbpath #NEWLINE# self . __rmdatadir = False #NEWLINE# #UNINDENT# if _PY3 : #NEWLINE# #INDENT# self . __datadir = FilePath ( self . __datadir ) . asBytesMode ( ) . path