<commit_before># hack to return special attributes
from _sys import *

_getframe = Getframe
from javascript import JSObject
from browser import window

abiflags = 0 # required in sysconfig

brython_debug_mode = __BRYTHON__.debug

base_exec_prefix = __BRYTHON__.brython_path

base_prefix = __BRYTHON__.brython_path

builtin_module_names = __BRYTHON__.builtin_module_names

byteorder = 'little'

exec_prefix = __BRYTHON__.brython_path

executable = __BRYTHON__.brython_path + '/brython.js'

argv = __BRYTHON__.__ARGV

def exit(i=None):
    raise SystemExit('')

class flag_class:

  def __init__(self):
      self.debug = 0
      self.inspect = 0
      self.interactive = 0
      self.optimize = 0
      self.dont_write_bytecode = 0
      self.no_user_site = 0
      self.no_site = 0
      self.ignore_environment = 0
      self.verbose = 0
      self.bytes_warning = 0
      self.quiet = 0
      self.hash_randomization = 1

flags = flag_class()

class float_info:
    mant_dig = 53
    max = window.Number.MAX_VALUE
    min = window.Number.MIN_VALUE
    radix = 2

def getfilesystemencoding(*args, **kw):
    """getfilesystemencoding() -> string
    Return the encoding used to convert Unicode filenames in
    operating system filenames."""
    return 'utf-8'

def getfilesystemencodeerrors():
    return "utf-8"

def getrecursionlimit():
    return 200

def intern(string):
    return string

maxsize = 2 ** 63 - 1

maxunicode = 1114111

platform = "brython"

prefix = __BRYTHON__.brython_path

version = '.'.join(str(x) for x in __BRYTHON__.version_info[:3])
version += " (default, %s) \n[Javascript 1.5] on Brython" \
    % __BRYTHON__.compiled_date
hexversion = 0x03070000   # python 3.7

class _version_info:

    def __init__(self, version_info):
        self.version_info = version_info
        self.major = version_info[0]
        self.minor = version_info[1]
        self.micro = version_info[2]
        self.releaselevel = version_info[3]
        self.serial = version_info[4]

    def __getitem__(self, index):
        if isinstance(self.version_info[index], list):
           return tuple(self.version_info[index])
        return self.version_info[index]

    def hexversion(self):
        try:
            return '0%d0%d0%d' % (self.major, self.minor, self.micro)
        finally:  #probably some invalid char in minor (rc, etc)
            return '0%d0000' % (self.major)

    def __str__(self):
        _s = "sys.version(major=%d, minor=%d, micro=%d, releaselevel='%s', " \
            "serial=%d)"<commit_msg>Add function settrace to module sys (related to issue #853)<commit_after># hack to return special attributes
from _sys import *

_getframe = Getframe
from javascript import JSObject
from browser import window

abiflags = 0 # required in sysconfig

brython_debug_mode = __BRYTHON__.debug

base_exec_prefix = __BRYTHON__.brython_path

base_prefix = __BRYTHON__.brython_path

builtin_module_names = __BRYTHON__.builtin_module_names

byteorder = 'little'

exec_prefix = __BRYTHON__.brython_path

executable = __BRYTHON__.brython_path + '/brython.js'

argv = __BRYTHON__.__ARGV

def exit(i=None):
    raise SystemExit('')

class flag_class:

  def __init__(self):
      self.debug = 0
      self.inspect = 0
      self.interactive = 0
      self.optimize = 0
      self.dont_write_bytecode = 0
      self.no_user_site = 0
      self.no_site = 0
      self.ignore_environment = 0
      self.verbose = 0
      self.bytes_warning = 0
      self.quiet = 0
      self.hash_randomization = 1

flags = flag_class()

class float_info:
    mant_dig = 53
    max = window.Number.MAX_VALUE
    min = window.Number.MIN_VALUE
    radix = 2

def getfilesystemencoding(*args, **kw):
    """getfilesystemencoding() -> string
    Return the encoding used to convert Unicode filenames in
    operating system filenames."""
    return 'utf-8'

def getfilesystemencodeerrors():
    return "utf-8"

def getrecursionlimit():
    return 200

def intern(string):
    return string

maxsize = 2 ** 63 - 1

maxunicode = 1114111

platform = "brython"

prefix = __BRYTHON__.brython_path

def settrace(tracefunc):
    print("set trace")
    
version = '.'.join(str(x) for x in __BRYTHON__.version_info[:3])
version += " (default, %s) \n[Javascript 1.5] on Brython" \
    % __BRYTHON__.compiled_date
hexversion = 0x03070000   # python 3.7

class _version_info:

    def __init__(self, version_info):
        self.version_info = version_info
        self.major = version_info[0]
        self.minor = version_info[1]
        self.micro = version_info[2]
        self.releaselevel = version_info[3]
        self.serial = version_info[4]

    def __getitem__(self, index):
        if isinstance(self.version_info[index], list):
           return tuple(self.version_info[index])
        return self.version_info[index]

    def hexversion(self):
        try:
            return '0%d0%d0%d' % (self.major, self.minor, self.micro)
        finally:  #probably some invalid char in minor (rc, etc)
            return '0%d0000' % (self.major)

    def __str__(self):
        _s = "sys.version(major=%d, minor=%d, micro=%d, releaselevel='%s', " \
            "serial=%d)"
{'fraction_non_alphanumeric': 0.10095127159774801, 'fraction_numerical': 0.023490584352552902, 'mean_word_length': 3.105179282868526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4780255', 'n_tokens_mistral': 1839, 'n_tokens_neox': 1727, 'n_words': 410}