{"nwo":"75team\/SublimeJS","sha":"96e7d34ee1c3103b19e81debba3a4a934afc5028","path":"v8.py","language":"python","identifier":"init","parameters":"()","argument_list":"","return_statement":"","docstring":"Init sublime-v8 engine","docstring_summary":"Init sublime-v8 engine","docstring_tokens":["Init","sublime","-","v8","engine"],"function":"def init():\n\t\"Init sublime-v8 engine\"\n\n\t# setup environment for PyV8 loading\n\tpyv8_paths = [\n\t\tos.path.join(PACKAGES_PATH, 'PyV8'),\n\t\tos.path.join(PACKAGES_PATH, 'PyV8', pyv8loader.get_arch()),\n\t\tos.path.join(PACKAGES_PATH, 'PyV8', 'pyv8-%s' % pyv8loader.get_arch())\n\t]\n\n\tsys.path += pyv8_paths\n\n\t# unpack recently loaded binary, is exists\n\tfor p in pyv8_paths:\n\t\tpyv8loader.unpack_pyv8(p)\n\n\t###################################\n\t# if you need update PyV8, comment this\n\ttry:\n\t\timport PyV8\n\texcept:\n\t\tpass\n\t###################################\n\n\t# create JS environment\n\tdelegate = SublimeLoaderDelegate()\n\n\tpyv8loader.load(pyv8_paths[1], delegate)","function_tokens":["def","init","(",")",":","# setup environment for PyV8 loading","pyv8_paths","=","[","os",".","path",".","join","(","PACKAGES_PATH",",","'PyV8'",")",",","os",".","path",".","join","(","PACKAGES_PATH",",","'PyV8'",",","pyv8loader",".","get_arch","(",")",")",",","os",".","path",".","join","(","PACKAGES_PATH",",","'PyV8'",",","'pyv8-%s'","%","pyv8loader",".","get_arch","(",")",")","]","sys",".","path","+=","pyv8_paths","# unpack recently loaded binary, is exists","for","p","in","pyv8_paths",":","pyv8loader",".","unpack_pyv8","(","p",")","###################################","# if you need update PyV8, comment this","try",":","import","PyV8","except",":","pass","###################################","# create JS environment","delegate","=","SublimeLoaderDelegate","(",")","pyv8loader",".","load","(","pyv8_paths","[","1","]",",","delegate",")"],"url":"https:\/\/github.com\/75team\/SublimeJS\/blob\/96e7d34ee1c3103b19e81debba3a4a934afc5028\/v8.py#L179-L206"} {"nwo":"75team\/SublimeJS","sha":"96e7d34ee1c3103b19e81debba3a4a934afc5028","path":"v8.py","language":"python","identifier":"SublimeLoaderDelegate.setting","parameters":"(self, name, default=None)","argument_list":"","return_statement":"return self.settings.get(name, default)","docstring":"Returns specified setting name","docstring_summary":"Returns specified setting name","docstring_tokens":["Returns","specified","setting","name"],"function":"def setting(self, name, default=None):\n\t\t\"Returns specified setting name\"\n\t\treturn self.settings.get(name, default)","function_tokens":["def","setting","(","self",",","name",",","default","=","None",")",":","return","self",".","settings",".","get","(","name",",","default",")"],"url":"https:\/\/github.com\/75team\/SublimeJS\/blob\/96e7d34ee1c3103b19e81debba3a4a934afc5028\/v8.py#L269-L271"} {"nwo":"75team\/SublimeJS","sha":"96e7d34ee1c3103b19e81debba3a4a934afc5028","path":"SublimeJS\/core\/semver.py","language":"python","identifier":"parse","parameters":"(version)","argument_list":"","return_statement":"return verinfo","docstring":"Parse version to major, minor, patch, pre-release, build parts.","docstring_summary":"Parse version to major, minor, patch, pre-release, build parts.","docstring_tokens":["Parse","version","to","major","minor","patch","pre","-","release","build","parts","."],"function":"def parse(version):\n \"\"\"\n Parse version to major, minor, patch, pre-release, build parts.\n \"\"\"\n match = _REGEX.match(version)\n if match is None:\n raise ValueError('%s is not valid SemVer string' % version)\n\n verinfo = match.groupdict()\n\n verinfo['major'] = int(verinfo['major'])\n verinfo['minor'] = int(verinfo['minor'])\n verinfo['patch'] = int(verinfo['patch'] or '0')\n\n return verinfo","function_tokens":["def","parse","(","version",")",":","match","=","_REGEX",".","match","(","version",")","if","match","is","None",":","raise","ValueError","(","'%s is not valid SemVer string'","%","version",")","verinfo","=","match",".","groupdict","(",")","verinfo","[","'major'","]","=","int","(","verinfo","[","'major'","]",")","verinfo","[","'minor'","]","=","int","(","verinfo","[","'minor'","]",")","verinfo","[","'patch'","]","=","int","(","verinfo","[","'patch'","]","or","'0'",")","return","verinfo"],"url":"https:\/\/github.com\/75team\/SublimeJS\/blob\/96e7d34ee1c3103b19e81debba3a4a934afc5028\/SublimeJS\/core\/semver.py#L14-L28"} {"nwo":"75team\/SublimeJS","sha":"96e7d34ee1c3103b19e81debba3a4a934afc5028","path":"SublimeJS\/core\/context.py","language":"python","identifier":"should_use_unicode","parameters":"()","argument_list":"","return_statement":"return use_unicode","docstring":"WinXP unable to eval JS in unicode object (while other OSes requires it)\n\tThis function checks if we have to use unicode when reading files","docstring_summary":"WinXP unable to eval JS in unicode object (while other OSes requires it)\n\tThis function checks if we have to use unicode when reading files","docstring_tokens":["WinXP","unable","to","eval","JS","in","unicode","object","(","while","other","OSes","requires","it",")","This","function","checks","if","we","have","to","use","unicode","when","reading","files"],"function":"def should_use_unicode():\n\t\"\"\"\n\tWinXP unable to eval JS in unicode object (while other OSes requires it)\n\tThis function checks if we have to use unicode when reading files\n\t\"\"\"\n\tctx = PyV8.JSContext()\n\tctx.enter()\n\tuse_unicode = True\n\ttry:\n\t\tctx.eval(u'(function(){return;})()')\n\texcept:\n\t\tuse_unicode = False\n\n\tctx.leave()\n\n\treturn use_unicode","function_tokens":["def","should_use_unicode","(",")",":","ctx","=","PyV8",".","JSContext","(",")","ctx",".","enter","(",")","use_unicode","=","True","try",":","ctx",".","eval","(","u'(function(){return;})()'",")","except",":","use_unicode","=","False","ctx",".","leave","(",")","return","use_unicode"],"url":"https:\/\/github.com\/75team\/SublimeJS\/blob\/96e7d34ee1c3103b19e81debba3a4a934afc5028\/SublimeJS\/core\/context.py#L23-L38"} {"nwo":"75team\/SublimeJS","sha":"96e7d34ee1c3103b19e81debba3a4a934afc5028","path":"SublimeJS\/core\/child_process.py","language":"python","identifier":"_process","parameters":"(commands, callback=None, working_dir=None, wait_for_completion=None, **kwargs)","argument_list":"","return_statement":"","docstring":"Process one or more OS commands.","docstring_summary":"Process one or more OS commands.","docstring_tokens":["Process","one","or","more","OS","commands","."],"function":"def _process(commands, callback=None, working_dir=None, wait_for_completion=None, **kwargs):\n '''Process one or more OS commands.'''\n\n if wait_for_completion is None:\n wait_for_completion = False\n\n # We're expecting a list of commands, so if we only have one, convert\n # it to a list:\n #\n if isinstance(commands, str):\n commands = [commands]\n\n results = []\n\n # Windows needs STARTF_USESHOWWINDOW in order to start the process with a\n # hidden window.\n #\n # See:\n #\n # http:\/\/stackoverflow.com\/questions\/1016384\/cross-platform-subprocess-with-hidden-window\n #\n startupinfo = None\n if os.name == 'nt':\n startupinfo = subprocess.STARTUPINFO()\n startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW\n\n # Now we can execute each command:\n #\n for command in commands:\n\n # Split the command properly, in case it has options and\n # parameters:\n #\n command = shlex.split(command)\n\n try:\n\n proc = subprocess.Popen(command,\n stdin=subprocess.PIPE,\n stdout=subprocess.PIPE,\n stderr=subprocess.STDOUT,\n cwd=working_dir,\n startupinfo=startupinfo)\n\n # We're going to keep polling the command and either:\n #\n # 1. we get None to tell us that the command is still running, or;\n # 2. we get a return code to indicate that the command has finished.\n #\n return_code = None\n while return_code is None:\n return_code = proc.poll()\n\n # If there's no error then see what we got from the command:\n #\n if return_code is None or return_code == 0:\n r, _, _ = select.select([proc.stdout], [], [])\n if r:\n # Process whatever output we can get:\n #\n output = True\n while output:\n output = proc.stdout.readline().decode()\n\n # If the caller wants everything in one go, or\n # there is no callback function, then batch up\n # the output. Otherwise pass it back to the\n # caller as it becomes available:\n #\n if wait_for_completion is True or callback is None:\n results += output\n else:\n sublime.set_timeout_async(functools.partial(callback, *args, **kwargs), 0)\n\n except subprocess.CalledProcessError as e:\n\n sublime.set_timeout_async(functools.partial(callback, *args, **kwargs), 0)\n\n except OSError as e:\n\n if e.errno == 2:\n sublime.message_dialog('Command not found\\n\\nCommand is: %s' % command)\n else:\n raise e\n\n # Concatenate all of the results and return the value. If we've been\n # using the callback then just make one last call with 'None' to indicate\n # that we're finished:\n #\n result = ''.join(results)\n\n if callback is None:\n return result\n\n if wait_for_completion is True:\n sublime.set_timeout_async(functools.partial(callback, *args, **kwargs), 0)\n\n sublime.set_timeout_async(functools.partial(callback, *args, **kwargs), 0)","function_tokens":["def","_process","(","commands",",","callback","=","None",",","working_dir","=","None",",","wait_for_completion","=","None",",","*","*","kwargs",")",":","if","wait_for_completion","is","None",":","wait_for_completion","=","False","# We're expecting a list of commands, so if we only have one, convert","# it to a list:","#","if","isinstance","(","commands",",","str",")",":","commands","=","[","commands","]","results","=","[","]","# Windows needs STARTF_USESHOWWINDOW in order to start the process with a","# hidden window.","#","# See:","#","# http:\/\/stackoverflow.com\/questions\/1016384\/cross-platform-subprocess-with-hidden-window","#","startupinfo","=","None","if","os",".","name","==","'nt'",":","startupinfo","=","subprocess",".","STARTUPINFO","(",")","startupinfo",".","dwFlags","|=","subprocess",".","STARTF_USESHOWWINDOW","# Now we can execute each command:","#","for","command","in","commands",":","# Split the command properly, in case it has options and","# parameters:","#","command","=","shlex",".","split","(","command",")","try",":","proc","=","subprocess",".","Popen","(","command",",","stdin","=","subprocess",".","PIPE",",","stdout","=","subprocess",".","PIPE",",","stderr","=","subprocess",".","STDOUT",",","cwd","=","working_dir",",","startupinfo","=","startupinfo",")","# We're going to keep polling the command and either:","#","# 1. we get None to tell us that the command is still running, or;","# 2. we get a return code to indicate that the command has finished.","#","return_code","=","None","while","return_code","is","None",":","return_code","=","proc",".","poll","(",")","# If there's no error then see what we got from the command:","#","if","return_code","is","None","or","return_code","==","0",":","r",",","_",",","_","=","select",".","select","(","[","proc",".","stdout","]",",","[","]",",","[","]",")","if","r",":","# Process whatever output we can get:","#","output","=","True","while","output",":","output","=","proc",".","stdout",".","readline","(",")",".","decode","(",")","# If the caller wants everything in one go, or","# there is no callback function, then batch up","# the output. Otherwise pass it back to the","# caller as it becomes available:","#","if","wait_for_completion","is","True","or","callback","is","None",":","results","+=","output","else",":","sublime",".","set_timeout_async","(","functools",".","partial","(","callback",",","*","args",",","*","*","kwargs",")",",","0",")","except","subprocess",".","CalledProcessError","as","e",":","sublime",".","set_timeout_async","(","functools",".","partial","(","callback",",","*","args",",","*","*","kwargs",")",",","0",")","except","OSError","as","e",":","if","e",".","errno","==","2",":","sublime",".","message_dialog","(","'Command not found\\n\\nCommand is: %s'","%","command",")","else",":","raise","e","# Concatenate all of the results and return the value. If we've been","# using the callback then just make one last call with 'None' to indicate","# that we're finished:","#","result","=","''",".","join","(","results",")","if","callback","is","None",":","return","result","if","wait_for_completion","is","True",":","sublime",".","set_timeout_async","(","functools",".","partial","(","callback",",","*","args",",","*","*","kwargs",")",",","0",")","sublime",".","set_timeout_async","(","functools",".","partial","(","callback",",","*","args",",","*","*","kwargs",")",",","0",")"],"url":"https:\/\/github.com\/75team\/SublimeJS\/blob\/96e7d34ee1c3103b19e81debba3a4a934afc5028\/SublimeJS\/core\/child_process.py#L29-L126"} {"nwo":"75team\/SublimeJS","sha":"96e7d34ee1c3103b19e81debba3a4a934afc5028","path":"SublimeJS\/loader\/pyv8loader.py","language":"python","identifier":"load","parameters":"(dest_path, delegate=None)","argument_list":"","return_statement":"","docstring":"Main function that attempts to load or update PyV8 binary.\n First, it loads list of available PyV8 modules and check if\n PyV8 should be downloaded or updated.\n @param dest_path: Path where PyV8 lib should be downloaded \n @param delegate: instance of LoaderDelegate that will receive\n loader progress events\n @returns: `True` if download progress was initiated","docstring_summary":"Main function that attempts to load or update PyV8 binary.\n First, it loads list of available PyV8 modules and check if\n PyV8 should be downloaded or updated.","docstring_tokens":["Main","function","that","attempts","to","load","or","update","PyV8","binary",".","First","it","loads","list","of","available","PyV8","modules","and","check","if","PyV8","should","be","downloaded","or","updated","."],"function":"def load(dest_path, delegate=None):\n \"\"\"\n Main function that attempts to load or update PyV8 binary.\n First, it loads list of available PyV8 modules and check if\n PyV8 should be downloaded or updated.\n @param dest_path: Path where PyV8 lib should be downloaded \n @param delegate: instance of LoaderDelegate that will receive\n loader progress events\n @returns: `True` if download progress was initiated\n \"\"\"\n if delegate is None:\n delegate = LoaderDelegate()\n\n config = get_loader_config(dest_path)\n\n if 'PyV8' in sys.modules and (config['skip_update'] or time.time() < config['last_update'] + CHECK_INTERVAL):\n # No need to load anything: user already has PyV8 binary\n # or decided to disable update process\n delegate.log('No need to update PyV8')\n if(delegate.on_ready):\n \tdelegate.on_ready()\n return False\n\n def on_complete(result, *args, **kwargs):\n if result is not None:\n # Most recent version was downloaded\n config['last_id'] = result \n if 'PyV8' not in sys.modules:\n # PyV8 is not loaded yet, we can safely unpack it \n unpack_pyv8(dest_path)\n\n config['last_update'] = time.time()\n save_loader_config(dest_path, config)\n delegate.on_complete(*args, **kwargs)\n\n # try to download most recent version of PyV8\n # As PyV8 for Sublime Text spreads the world, it's possible\n # that multiple distinct PyV8Loader's may start doing the same\n # job at the same time. In this case, we should check if there's\n # already a thread that load PyV8 and hook on existing thread\n # rather that creating a new one\n thread = None\n thread_exists = False\n for t in threading.enumerate():\n if hasattr(t, 'is_pyv8_thread'):\n print('PyV8: Reusing thread')\n thread = t\n thread_exists = True\n break\n\n if not thread:\n print('PyV8: Creating new thread')\n thread = PyV8Loader(get_arch(), dest_path, config, delegate=delegate)\n thread.start()\n\n delegate.on_start()\n \n # watch on download progress\n prog = ThreadProgress(thread, delegate, thread_exists)\n prog.on('complete', on_complete if not thread_exists else delegate.on_complete)\n prog.on('error', delegate.on_error)","function_tokens":["def","load","(","dest_path",",","delegate","=","None",")",":","if","delegate","is","None",":","delegate","=","LoaderDelegate","(",")","config","=","get_loader_config","(","dest_path",")","if","'PyV8'","in","sys",".","modules","and","(","config","[","'skip_update'","]","or","time",".","time","(",")","<","config","[","'last_update'","]","+","CHECK_INTERVAL",")",":","# No need to load anything: user already has PyV8 binary","# or decided to disable update process","delegate",".","log","(","'No need to update PyV8'",")","if","(","delegate",".","on_ready",")",":","delegate",".","on_ready","(",")","return","False","def","on_complete","(","result",",","*","args",",","*","*","kwargs",")",":","if","result","is","not","None",":","# Most recent version was downloaded","config","[","'last_id'","]","=","result","if","'PyV8'","not","in","sys",".","modules",":","# PyV8 is not loaded yet, we can safely unpack it ","unpack_pyv8","(","dest_path",")","config","[","'last_update'","]","=","time",".","time","(",")","save_loader_config","(","dest_path",",","config",")","delegate",".","on_complete","(","*","args",",","*","*","kwargs",")","# try to download most recent version of PyV8","# As PyV8 for Sublime Text spreads the world, it's possible","# that multiple distinct PyV8Loader's may start doing the same","# job at the same time. In this case, we should check if there's","# already a thread that load PyV8 and hook on existing thread","# rather that creating a new one","thread","=","None","thread_exists","=","False","for","t","in","threading",".","enumerate","(",")",":","if","hasattr","(","t",",","'is_pyv8_thread'",")",":","print","(","'PyV8: Reusing thread'",")","thread","=","t","thread_exists","=","True","break","if","not","thread",":","print","(","'PyV8: Creating new thread'",")","thread","=","PyV8Loader","(","get_arch","(",")",",","dest_path",",","config",",","delegate","=","delegate",")","thread",".","start","(",")","delegate",".","on_start","(",")","# watch on download progress","prog","=","ThreadProgress","(","thread",",","delegate",",","thread_exists",")","prog",".","on","(","'complete'",",","on_complete","if","not","thread_exists","else","delegate",".","on_complete",")","prog",".","on","(","'error'",",","delegate",".","on_error",")"],"url":"https:\/\/github.com\/75team\/SublimeJS\/blob\/96e7d34ee1c3103b19e81debba3a4a934afc5028\/SublimeJS\/loader\/pyv8loader.py#L34-L94"} {"nwo":"75team\/SublimeJS","sha":"96e7d34ee1c3103b19e81debba3a4a934afc5028","path":"SublimeJS\/loader\/pyv8loader.py","language":"python","identifier":"get_arch","parameters":"()","argument_list":"","return_statement":"","docstring":"Returns architecture name for PyV8 binary","docstring_summary":"Returns architecture name for PyV8 binary","docstring_tokens":["Returns","architecture","name","for","PyV8","binary"],"function":"def get_arch():\n \"Returns architecture name for PyV8 binary\"\n suffix = is_python3 and '-p3' or ''\n p = lambda a: '%s%s' % (a, suffix)\n is_64bit = sys.maxsize > 2**32\n system_name = platform.system()\n if system_name == 'Darwin':\n try:\n if semver.match(platform.mac_ver()[0], '<10.7.0'):\n return p('mac106')\n except:\n pass\n\n return p('osx')\n if system_name == 'Windows':\n return p('win64') if is_64bit else p('win32')\n if system_name == 'Linux':\n return p('linux64') if is_64bit else p('linux32')","function_tokens":["def","get_arch","(",")",":","suffix","=","is_python3","and","'-p3'","or","''","p","=","lambda","a",":","'%s%s'","%","(","a",",","suffix",")","is_64bit","=","sys",".","maxsize",">","2","**","32","system_name","=","platform",".","system","(",")","if","system_name","==","'Darwin'",":","try",":","if","semver",".","match","(","platform",".","mac_ver","(",")","[","0","]",",","'<10.7.0'",")",":","return","p","(","'mac106'",")","except",":","pass","return","p","(","'osx'",")","if","system_name","==","'Windows'",":","return","p","(","'win64'",")","if","is_64bit","else","p","(","'win32'",")","if","system_name","==","'Linux'",":","return","p","(","'linux64'",")","if","is_64bit","else","p","(","'linux32'",")"],"url":"https:\/\/github.com\/75team\/SublimeJS\/blob\/96e7d34ee1c3103b19e81debba3a4a934afc5028\/SublimeJS\/loader\/pyv8loader.py#L96-L113"} {"nwo":"75team\/SublimeJS","sha":"96e7d34ee1c3103b19e81debba3a4a934afc5028","path":"SublimeJS\/loader\/pyv8loader.py","language":"python","identifier":"LoaderDelegate.on_start","parameters":"(self, *args, **kwargs)","argument_list":"","return_statement":"","docstring":"Invoked when download process is initiated","docstring_summary":"Invoked when download process is initiated","docstring_tokens":["Invoked","when","download","process","is","initiated"],"function":"def on_start(self, *args, **kwargs):\n \"Invoked when download process is initiated\"\n pass","function_tokens":["def","on_start","(","self",",","*","args",",","*","*","kwargs",")",":","pass"],"url":"https:\/\/github.com\/75team\/SublimeJS\/blob\/96e7d34ee1c3103b19e81debba3a4a934afc5028\/SublimeJS\/loader\/pyv8loader.py#L239-L241"} {"nwo":"75team\/SublimeJS","sha":"96e7d34ee1c3103b19e81debba3a4a934afc5028","path":"SublimeJS\/loader\/pyv8loader.py","language":"python","identifier":"LoaderDelegate.on_progress","parameters":"(self, *args, **kwargs)","argument_list":"","return_statement":"","docstring":"Invoked on download progress","docstring_summary":"Invoked on download progress","docstring_tokens":["Invoked","on","download","progress"],"function":"def on_progress(self, *args, **kwargs):\n \"Invoked on download progress\"\n pass","function_tokens":["def","on_progress","(","self",",","*","args",",","*","*","kwargs",")",":","pass"],"url":"https:\/\/github.com\/75team\/SublimeJS\/blob\/96e7d34ee1c3103b19e81debba3a4a934afc5028\/SublimeJS\/loader\/pyv8loader.py#L243-L245"} {"nwo":"75team\/SublimeJS","sha":"96e7d34ee1c3103b19e81debba3a4a934afc5028","path":"SublimeJS\/loader\/pyv8loader.py","language":"python","identifier":"LoaderDelegate.on_complete","parameters":"(self, *args, **kwargs)","argument_list":"","return_statement":"","docstring":"Invoked when download process was finished successfully","docstring_summary":"Invoked when download process was finished successfully","docstring_tokens":["Invoked","when","download","process","was","finished","successfully"],"function":"def on_complete(self, *args, **kwargs):\n \"Invoked when download process was finished successfully\"\n pass","function_tokens":["def","on_complete","(","self",",","*","args",",","*","*","kwargs",")",":","pass"],"url":"https:\/\/github.com\/75team\/SublimeJS\/blob\/96e7d34ee1c3103b19e81debba3a4a934afc5028\/SublimeJS\/loader\/pyv8loader.py#L247-L249"} {"nwo":"75team\/SublimeJS","sha":"96e7d34ee1c3103b19e81debba3a4a934afc5028","path":"SublimeJS\/loader\/pyv8loader.py","language":"python","identifier":"LoaderDelegate.on_error","parameters":"(self, *args, **kwargs)","argument_list":"","return_statement":"","docstring":"Invoked when error occured during download process","docstring_summary":"Invoked when error occured during download process","docstring_tokens":["Invoked","when","error","occured","during","download","process"],"function":"def on_error(self, *args, **kwargs):\n \"Invoked when error occured during download process\"\n pass","function_tokens":["def","on_error","(","self",",","*","args",",","*","*","kwargs",")",":","pass"],"url":"https:\/\/github.com\/75team\/SublimeJS\/blob\/96e7d34ee1c3103b19e81debba3a4a934afc5028\/SublimeJS\/loader\/pyv8loader.py#L251-L253"} {"nwo":"75team\/SublimeJS","sha":"96e7d34ee1c3103b19e81debba3a4a934afc5028","path":"SublimeJS\/loader\/pyv8loader.py","language":"python","identifier":"LoaderDelegate.setting","parameters":"(self, name, default=None)","argument_list":"","return_statement":"return self.settings[name] if name in self.settings else default","docstring":"Returns specified setting name","docstring_summary":"Returns specified setting name","docstring_tokens":["Returns","specified","setting","name"],"function":"def setting(self, name, default=None):\n \"Returns specified setting name\"\n return self.settings[name] if name in self.settings else default","function_tokens":["def","setting","(","self",",","name",",","default","=","None",")",":","return","self",".","settings","[","name","]","if","name","in","self",".","settings","else","default"],"url":"https:\/\/github.com\/75team\/SublimeJS\/blob\/96e7d34ee1c3103b19e81debba3a4a934afc5028\/SublimeJS\/loader\/pyv8loader.py#L255-L257"}