91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.69MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-11-04
  • 語言: 其他
  • 標簽: pyv8-win64??

資源簡介

pyv8-win64是為sublime text 中的emmet插件準備的

資源截圖

代碼片段和文件信息

#!/usr/bin/env?python
#?-*-?coding:?utf-8?-*-
from?__future__?import?with_statement

import?sys?os?re
import?thread
import?logging

try:
????from?cStringIO?import?StringIO
except?ImportError:
????from?StringIO?import?StringIO

try:
????import?json
except?ImportError:
????import?simplejson?as?json

import?_PyV8

__author__?=?‘Flier?Lu?
__version__?=?‘1.0‘

__all__?=?[“ReadOnly“?“DontEnum“?“DontDelete“?“Internal“
???????????“JSError“?“JSobject“?“JSArray“?“JSFunction“
???????????“JSClass“?“JSEngine“?“JSContext“
???????????“JSobjectSpace“?“JSAllocationAction“
???????????“JSStackTrace“?“JSStackframe“?“profiler“?
???????????“JSExtension“?“JSLocker“?“JSUnlocker“?“AST“]

class?JSAttribute(object):
????def?__init__(self?name):
????????self.name?=?name

????def?__call__(self?func):
????????setattr(func?“__%s__“?%?self.name?True)
????????
????????return?func

ReadOnly?=?JSAttribute(name=‘readonly‘)
DontEnum?=?JSAttribute(name=‘dontenum‘)
DontDelete?=?JSAttribute(name=‘dontdel‘)
Internal?=?JSAttribute(name=‘internal‘)

class?JSError(Exception):
????def?__init__(self?impl):
????????Exception.__init__(self)

????????self._impl?=?impl

????def?__str__(self):
????????return?str(self._impl)

????def?__unicode__(self?*args?**kwargs):
????????return?unicode(self._impl)

????def?__getattribute__(self?attr):
????????impl?=?super(JSError?self).__getattribute__(“_impl“)

????????try:
????????????return?getattr(impl?attr)
????????except?AttributeError:
????????????return?super(JSError?self).__getattribute__(attr)

????RE_frame?=?re.compile(r“\s+at\s(?:new\s)?(?P.+)\s\((?P[^:]+):?(?P\d+)?:?(?P\d+)?\)“)
????RE_FUNC?=?re.compile(r“\s+at\s(?:new\s)?(?P.+)\s\((?P[^\)]+)\)“)
????RE_FILE?=?re.compile(r“\s+at\s(?P[^:]+):?(?P\d+)?:?(?P\d+)?“)

????@staticmethod
????def?parse_stack(value):
????????stack?=?[]

????????def?int_or_nul(value):
????????????return?int(value)?if?value?else?None

????????for?line?in?value.split(‘\n‘)[1:]:
????????????m?=?JSError.RE_frame.match(line)

????????????if?m:
????????????????stack.append((m.group(‘func‘)?m.group(‘file‘)?int_or_nul(m.group(‘row‘))?int_or_nul(m.group(‘col‘))))
????????????????continue

????????????m?=?JSError.RE_FUNC.match(line)

????????????if?m:
????????????????stack.append((m.group(‘func‘)?m.group(‘file‘)?None?None))
????????????????continue

????????????m?=?JSError.RE_FILE.match(line)

????????????if?m:
????????????????stack.append((None?m.group(‘file‘)?int_or_nul(m.group(‘row‘))?int_or_nul(m.group(‘col‘))))
????????????????continue

????????????assert?line

????????return?stack

????@property
????def?frames(self):
????????return?self.parse_stack(self.stackTrace)

_PyV8._JSError._jsclass?=?JSError

JSobject?=?_PyV8.JSobject
JSArray?=?_PyV8.JSArray
JSFunction?=?_PyV8.JSFunction
JSExtension?=?_PyV8.JSExtension

def?func_apply(self?thisArg?argArray=[]):
????if?isinstance(thisArg?JSobject):
????????return?self.invoke(

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????79541??2012-08-28?18:27??PyV8.py
?????文件?????5011456??2012-08-28?18:27??_PyV8.pyd

評論

共有 條評論