parsers/DataExporter.py
def createDir(self, prefix:str = 'OUTPUT', dryRun:bool = False) -> str:
        """Creates timestamped directory to save data into.

        :param prefix: directory name prefix.
        :param dryRun: whether to actually create the dir or just generate the path
        :return: Directory path str.
        """
        if self.settingsReader.check(full=True):
            now = datetime.now().strftime('%Y-%m-%d %H_%M_%S')
            dateTag = ET.Element('date')
            dateTag.text = now
            self.settingsReader.settings.append(dateTag)

            self.saveDir = '{0}/{1}_{2}'.format(self.settingsReader.dataDir, str(prefix), now)

            if not dryRun:
                os.makedirs(self.saveDir)
            return self.saveDir
        else:
            raise ValueError('No settings found')
Creates timestamped directory to save data into.

        :param prefix: directory name prefix.
        :param dryRun: whether to actually create the dir or just generate the path
        :return: Directory path str.
        
Creates timestamped directory to save data into.
Creates timestamped directory to save data into .
def createDir(self, prefix:str = 'OUTPUT', dryRun:bool = False) -> str:
        if self.settingsReader.check(full=True):
            now = datetime.now().strftime('%Y-%m-%d %H_%M_%S')
            dateTag = ET.Element('date')
            dateTag.text = now
            self.settingsReader.settings.append(dateTag)
            self.saveDir = '{0}/{1}_{2}'.format(self.settingsReader.dataDir, str(prefix), now)
            if not dryRun:
                os.makedirs(self.saveDir)
            return self.saveDir
        else:
            raise ValueError('No settings found')
def createDir ( self , prefix : str = 'OUTPUT' , dryRun : bool = False ) -> str : if self . settingsReader . check ( full = True ) : now = datetime . now ( ) . strftime ( '%Y-%m-%d %H_%M_%S' ) dateTag = ET . Element ( 'date' ) dateTag . text = now self . settingsReader . settings . append ( dateTag ) self . saveDir = '{0}/{1}_{2}' . format ( self . settingsReader . dataDir , str ( prefix ) , now ) if not dryRun : os . makedirs ( self . saveDir ) return self . saveDir else : raise ValueError ( 'No settings found' )
Creates timestamped directory to save data into.
Creates timestamped directory to save data into .
"""Creates timestamped directory to save data into.

        :param prefix: directory name prefix.
        :param dryRun: whether to actually create the dir or just generate the path
        :return: Directory path str.
        """
Directory path str.
Directory path str .
self
prefix
str
directory name prefix.
directory name prefix .
dryRun
bool
whether to actually create the dir or just generate the path
whether to actually create the dir or just generate the path