<commit_before>import os
import sys
import subprocess
import sublime
import sublime_plugin

class HaroopadCommand(sublime_plugin.WindowCommand):
    def run(self):
        filename = self.window.active_view().file_name()
        if filename is None:
            return

        proc_env = os.environ.copy()
        encoding = sys.getfilesystemencoding()
        for k, v in proc_env.items():
            proc_env[k] = os.path.expandvars(v).encode(encoding)
        try:
            if sublime.platform() == 'osx':
                subprocess.call(['open', '-a', 'Haroopad', filename], env=proc_env)
            else:
                subprocess.call(['Haroopad', filename], env=proc_env) 
        except:
            sublime.error_message('Unable to open current file with Haroopad, probably not add Haroopad into system PATH, check the Console.')

    def is_enabled(self):
        return True
<commit_msg>update the command under windows<commit_after>import os
import sys
import subprocess
import sublime
import sublime_plugin

class HaroopadCommand(sublime_plugin.WindowCommand):
    def run(self):
        filename = self.window.active_view().file_name()
        if filename is None:
            return

        proc_env = os.environ.copy()
        encoding = sys.getfilesystemencoding()
        for k, v in proc_env.items():
            proc_env[k] = os.path.expandvars(v).encode(encoding)
        try:
            if sublime.platform() == 'osx':
                subprocess.call(['open', '-a', 'Haroopad', filename], env=proc_env)
            else:
                subprocess.Popen(['Haroopad', filename]) 
        except:
            sublime.error_message('Unable to open current file with Haroopad, probably not add Haroopad into system PATH, check the Console.')

    def is_enabled(self):
        return True

{'fraction_non_alphanumeric': 0.10022026431718062, 'fraction_numerical': 0.0, 'mean_word_length': 2.5077220077220077, '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': '1911643', 'n_tokens_mistral': 524, 'n_tokens_neox': 507, 'n_words': 137}