def run(self, *args, **kwargs):
        compile_dir = settings_get('compileDir')
        source_file = self.view.file_name()
        source_dir = os.path.normcase(os.path.dirname(source_file))
        try:
            project_file = self.view.window().project_file_name()
        except __HOLE__:
            project_file = ''
        if project_file:
            project_dir = os.path.normcase(os.path.dirname(project_file))
        compile_paths = settings_get('compilePaths')
        compress = settings_get('compress', False)

        args = [source_file]
        if compress:
            args = ['-c'] + args

        use_autoprefixer = settings_get('useAutoPrefixer', False)
        if use_autoprefixer is True:
            print("Using autoprefixer...")
            args = ['--use', 'autoprefixer-stylus'] + args

        # check instance of compile_paths
        if isinstance(compile_paths, dict):
            appendix_len = None
            for key_path in compile_paths:
                norm_path = os.path.normcase(key_path)
                if not os.path.isabs(norm_path) and project_file:
                    norm_path = os.path.join(project_dir, norm_path)
                appendix = os.path.relpath(source_dir, norm_path)
                if not appendix.startswith('..') and (appendix_len is None or len(appendix) < appendix_len):
                    appendix_len = len(appendix)
                    compile_dir = compile_paths[key_path]
                    if not os.path.isabs(compile_dir):
                        compile_dir = os.path.join(norm_path, compile_dir)
                    compile_dir = os.path.join(compile_dir, appendix)

        if compile_dir and (isinstance(compile_dir, str)):
            # Check for absolute path or relative path for compile_dir
            if not os.path.isabs(compile_dir):
                compile_dir = os.path.join(source_dir, compile_dir)
            print("Compile to:" + compile_dir)
            # create folder if not exist
            if not os.path.exists(compile_dir):
                os.makedirs(compile_dir)
                print("Compile dir did not exist, created folder: " + compile_dir)
            folder, file_nm = os.path.split(source_file)
            args = ['--out', compile_dir] + args
        else:
            compile_dir = source_dir
            print("Compile to same directory")

        cwd = None
        result = run("stylus", args=args, cwd=cwd)

        if result['okay'] is True:
            status = 'Compilation Succeeded'
        else:
            lines = result['err'].splitlines()
            if len(lines) >= 3:
                line = lines[2]
                if re.search("throw err;$", line):
                    # Remove useless lines
                    lines = lines[4:]
                    index = 0
                    linenb = 0
                    for line in lines:
                        if re.search("^    at ", line):
                            linenb = index
                            break
                        index += 1
                    if linenb > 0:
                        # remove useless lines
                        lines = lines[:linenb - 1]

            status = 'Compilation FAILED ' + lines[0]
            sublime.error_message("\n".join(lines))

        later = lambda: sublime.status_message(status)
        sublime.set_timeout(later, 300)
dataset/ETHPy150Open billymoon/Stylus/Stylus.py/StyluscompileCommand.run