<commit_before>'''
Created on 01.02.2010

@author: michi
'''
import os.path

from PyQt4.QtGui import QApplication


class MainApplication(QApplication):
    '''
    classdocs
    '''

    def __init__(self,argv,appPath=None):
        '''
        Constructor
        '''
        QApplication.__init__(self,argv)

        if appPath is None:
            self.appPath = os.path.abspath(os.path.dirname(argv[0]))
        else:
            self.appPath = appPath
            
    def getRelativePath(self,path):
        rPath = path.replace(self.appPath, "")
        if rPath.startswith(os.path.sep):
            return rPath[1:]
        return rPath 
        <commit_msg>getAbsolutePath für die andere Richtung eingebaut<commit_after>'''
Created on 01.02.2010

@author: michi
'''
import os.path

from PyQt4.QtGui import QApplication


class MainApplication(QApplication):
    '''
    classdocs
    '''

    def __init__(self,argv,appPath=None):
        '''
        Constructor
        '''
        QApplication.__init__(self,argv)

        if appPath is None:
            self.appPath = os.path.abspath(os.path.dirname(argv[0]))
        else:
            self.appPath = appPath
            
    def getRelativePath(self,path):
        rPath = path.replace(self.appPath, "")
        if rPath.startswith(os.path.sep):
            return rPath[1:]
        return rPath
    
    def getAbsolutePath(self, path):
        if os.path.isabs(path):
            return path
        if not path.startswith(os.path.sep):
            return os.path.join(self.appPath, path)
        return path
        
{'fraction_non_alphanumeric': 0.11047979797979798, 'fraction_numerical': 0.013888888888888888, 'mean_word_length': 2.0305927342256216, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6017606', 'n_tokens_mistral': 504, 'n_tokens_neox': 481, 'n_words': 96}