# hack to return special attributes
from _sys import *

_getframe = Getframe
from javascript import JSObject
from browser import window

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'

def exc_info():
    exc = __BRYTHON__.current_exception
    if exc is None:
        return(None, None, None)
    return (exc.__class__,exc,exc.traceback)

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