#NEWLINE# def create_logging_config( pathtologgingconf = None ) : #NEWLINE# #INDENT# "\n    If you want to use the sword logging configuration, you should call this to create the\n    basic logging configuration (if you haven't provided it yourself in the /data/sword2_logging.conf\n    file already.  This will write the basic config to the path provided, or to the SWORD2_LOGGING_CONFIG\n    directory if no path is provided.  Directories will be created recursively as needed.\n    " #NEWLINE# if ( fn is None ) : #NEWLINE# #INDENT# pathtologgingconf = SWORD2_LOGGING_CONFIG #NEWLINE# #UNINDENT# d = os . path . dirname ( pathtologgingconf ) #NEWLINE# os . makedirs ( d ) #NEWLINE# fn = open ( pathtologgingconf , 'wb' ) #NEWLINE# fn . write ( BASIC_CONFIG ) #NEWLINE# fn . close ( )