bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def set_cache_size(n): context.cache_size = n
def set_cache_size(n): context.cache_size = n
464,200
def test_new(self): with raises(TypeError, "cannot create 'djvu.decode.Document' instances"): Document()
def test_bad_new(self): with raises(TypeError, "cannot create 'djvu.decode.Document' instances"): Document()
464,201
def test_nonexistent(self): context = Context() with raises(JobFailed): document = context.new_document(FileUri('__nonexistent__')) message = context.get_message() assert_equal(type(message), ErrorMessage) assert_equal(type(message.message), str) # TODO: check if 'Unrecognized DjVu Message' in message.message: assert_e...
def test_nonexistent(self): context = Context() with raises(JobFailed): document = context.new_document(FileUri('__nonexistent__')) message = context.get_message() assert_equal(type(message), ErrorMessage) assert_equal(type(message.message), str) # TODO: check if 'Unrecognized DjVu Message' in message.message: assert_...
464,202
def test_export_ps(self): context = Context() document = context.new_document(FileUri(images + 'test0.djvu')) message = document.get_message() assert_equal(type(message), DocInfoMessage) assert_true(document.decoding_done) assert_false(document.decoding_error) assert_equal(document.decoding_status, JobOK) assert_equal(...
def test_export_ps(self): context = Context() document = context.new_document(FileUri(images + 'test0.djvu')) message = document.get_message() assert_equal(type(message), DocInfoMessage) assert_true(document.decoding_done) assert_false(document.decoding_error) assert_equal(document.decoding_status, JobOK) assert_equal(...
464,203
def test_packed_bits(self): pf = PixelFormatPackedBits('<') assert_equal(repr(pf), "djvu.decode.PixelFormatPackedBits('<')") assert_equal(pf.bpp, 1) pf = PixelFormatPackedBits('>') assert_equal(repr(pf), "djvu.decode.PixelFormatPackedBits('>')") assert_equal(pf.bpp, 1)
def test_packed_bits(self): pf = PixelFormatPackedBits('<') assert_equal(repr(pf), "djvu.decode.PixelFormatPackedBits('<')") assert_equal(pf.bpp, 1) pf = PixelFormatPackedBits('>') assert_equal(repr(pf), "djvu.decode.PixelFormatPackedBits('>')") assert_equal(pf.bpp, 1)
464,204
def test_new(self): with raises(TypeError, "cannot create 'djvu.decode.Message' instances"): Message()
def test_bad_new(self): with raises(TypeError, "cannot create 'djvu.decode.Message' instances"): Message()
464,205
def test_bad_construction(self): with raises(TypeError, "Argument 'document' has incorrect type (expected djvu.decode.Document, got NoneType)"): Stream(None, 42)
def test_bad_new(self): with raises(TypeError, "Argument 'document' has incorrect type (expected djvu.decode.Document, got NoneType)"): Stream(None, 42)
464,206
def get_version(): changelog = open(os.path.join('doc', 'changelog')) try: return changelog.readline().split()[1].strip('()') finally: changelog.close()
def get_version(): if sys.version_info >= (3, 0): extra = dict(encoding='UTF-8') else: extra = {} changelog = open(os.path.join('doc', 'changelog'), **extra) try: return changelog.readline().split()[1].strip('()') finally: changelog.close()
464,207
def ext_modules(): for pyx_file in glob.glob(os.path.join('djvu', '*.pyx')): module, _ = os.path.splitext(os.path.basename(pyx_file)) yield module
def ext_modules(): for pyx_file in glob.glob(os.path.join('djvu', '*.pyx')): module, _ = os.path.splitext(os.path.basename(pyx_file)) yield module
464,208
def set_cache_size(n): context.cache_size = n
def set_cache_size(n): context.cache_size = n
464,209
def set_cache_size(n): context.cache_size = n
def set_cache_size(n): context.cache_size = n
464,210
def test_decode(): r''' >>> context = Context() >>> document = context.new_document(FileUri(images + 'test1.djvu')) >>> message = document.get_message() >>> type(message) == DocInfoMessage True >>> page_job = document.pages[0].decode() >>> page_job.is_done True >>> type(page_job) == PageJob True >>> page_job.is_done Tr...
def test_decode(): r''' >>> context = Context() >>> document = context.new_document(FileUri(images + 'test1.djvu')) >>> message = document.get_message() >>> type(message) == DocInfoMessage True >>> page_job = document.pages[0].decode() >>> page_job.is_done True >>> type(page_job) == PageJob True >>> page_job.is_done Tr...
464,211
def get_version(): changelog = file(os.path.join('doc', 'changelog')) try: return changelog.readline().split()[1].strip('()') finally: changelog.close()
def get_version(): changelog = open(os.path.join('doc', 'changelog')) try: return changelog.readline().split()[1].strip('()') finally: changelog.close()
464,212
def ext_modules(): for pyx_file in glob.glob(os.path.join('djvu', '*.pyx')): module, _ = os.path.splitext(os.path.basename(pyx_file)) yield module
def ext_modules(): for pyx_file in glob.glob(os.path.join('djvu', '*.pyx')): module, _ = os.path.splitext(os.path.basename(pyx_file)) yield module
464,213
def ext_modules(): for pyx_file in glob.glob(os.path.join('djvu', '*.pyx')): module, _ = os.path.splitext(os.path.basename(pyx_file)) yield module
def ext_modules(): for pyx_file in glob.glob(os.path.join('djvu', '*.pyx')): module, _ = os.path.splitext(os.path.basename(pyx_file)) yield module
464,214
def __restore_or_erase(self,path): "Returns True to carry on or erase and False to maintain" #Do nothing with the deposit if it's inside a home directory if path.startswith(self.deposit): debug('Deposit path: ' + path,DEBUG_MEDIUM) return False
def __restore_or_erase(self,path): "Returns True to carry on or erase and False to maintain" #Do nothing with the deposit if it's inside a home directory if path.startswith(self.deposit): debug('Deposit path: ' + path,DEBUG_MEDIUM) return False
464,215
def __restore_or_erase(self,path): "Returns True to carry on or erase and False to maintain" #Do nothing with the deposit if it's inside a home directory if path.startswith(self.deposit): debug('Deposit path: ' + path,DEBUG_MEDIUM) return False
def __restore_or_erase(self,path): "Returns True to carry on or erase and False to maintain" #Do nothing with the deposit if it's inside a home directory if path.startswith(self.deposit): debug('Deposit path: ' + path,DEBUG_MEDIUM) return False
464,216
def debug(text, level=DEBUG_LOW): "Prints a text in the terminal if the debug level is higher than the requested" try: if level <= debug_level: if level == DEBUG_LOW: print "Debug L: "+ str(text.encode('utf-8')) if level == DEBUG_MEDIUM: print "Debug M: "+ str(text.encode('utf-8')) if level == DEBUG_HIGH: print "Debug ...
def debug(text, level=DEBUG_LOW): "Prints a text in the terminal if the debug level is higher than the requested" try: if level <= debug_level: if level == DEBUG_LOW: print "Debug L: "+ text if level == DEBUG_MEDIUM: print "Debug M: "+ str(text.encode('utf-8')) if level == DEBUG_HIGH: print "Debug H: "+ str(text.encode...
464,217
def debug(text, level=DEBUG_LOW): "Prints a text in the terminal if the debug level is higher than the requested" try: if level <= debug_level: if level == DEBUG_LOW: print "Debug L: "+ str(text.encode('utf-8')) if level == DEBUG_MEDIUM: print "Debug M: "+ str(text.encode('utf-8')) if level == DEBUG_HIGH: print "Debug ...
def debug(text, level=DEBUG_LOW): "Prints a text in the terminal if the debug level is higher than the requested" try: if level <= debug_level: if level == DEBUG_LOW: print "Debug L: "+ str(text.encode('utf-8')) if level == DEBUG_MEDIUM: print "Debug M: "+ text if level == DEBUG_HIGH: print "Debug H: "+ str(text.encode...
464,218
def debug(text, level=DEBUG_LOW): "Prints a text in the terminal if the debug level is higher than the requested" try: if level <= debug_level: if level == DEBUG_LOW: print "Debug L: "+ str(text.encode('utf-8')) if level == DEBUG_MEDIUM: print "Debug M: "+ str(text.encode('utf-8')) if level == DEBUG_HIGH: print "Debug ...
def debug(text, level=DEBUG_LOW): "Prints a text in the terminal if the debug level is higher than the requested" try: if level <= debug_level: if level == DEBUG_LOW: print "Debug L: "+ str(text.encode('utf-8')) if level == DEBUG_MEDIUM: print "Debug M: "+ str(text.encode('utf-8')) if level == DEBUG_HIGH: print "Debug ...
464,219
def print_error(text,level=ERROR): "Prints a error or warning message in the terminal" try: if level == WARNING: print "Warning: "+ str(text.encode('utf-8')) return print "Error : "+ str(text.encode('utf-8')) except: print "Error : Can't print error message"
def print_error(text,level=ERROR): "Prints a error or warning message in the terminal" try: if level == WARNING: print "Warning: "+ text return print "Error : "+ str(text.encode('utf-8')) except: print "Error : Can't print error message"
464,220
def print_error(text,level=ERROR): "Prints a error or warning message in the terminal" try: if level == WARNING: print "Warning: "+ str(text.encode('utf-8')) return print "Error : "+ str(text.encode('utf-8')) except: print "Error : Can't print error message"
def print_error(text,level=ERROR): "Prints a error or warning message in the terminal" try: if level == WARNING: print "Warning: "+ str(text.encode('utf-8')) return print "Error : "+ text except: print "Error : Can't print error message"
464,221
def match_specs(specs, str, i, (line, pos)): for spec in specs: m = spec.re.match(str, i) if m is not None: value = m.group() nls = value.count(u'\n') n_line = line + nls if nls == 0: n_pos = pos + len(value) else: n_pos = len(value) - value.rfind(u'\n') - 1 return Token(spec.type, value, ((line, pos), (n_line, n_pos))...
def match_specs(specs, str, i, (line, pos)): for spec in specs: m = spec.re.match(str, i) if m is not None: value = m.group() nls = value.count(u'\n') n_line = line + nls if nls == 0: n_pos = pos + len(value) else: n_pos = len(value) - value.rfind(u'\n') - 1 return Token(spec.type, value, ((line, pos), (n_line, n_pos))...
464,222
def ExecProcess(cmd): try: pipe = os.popen4(cmd)[1] except AttributeError: pipe = os.popen(cmd) result = "" for line in pipe.readlines(): result = result + line[:-1] pipe.close() return result
def ExecProcess(cmd): try: pipe = os.popen4(cmd)[1] except AttributeError: pipe = os.popen(cmd) result = "" for line in pipe.readlines(): result = result + line[:-1] pipe.close() return result
464,223
def ExecProcess(cmd): try: pipe = os.popen4(cmd)[1] except AttributeError: pipe = os.popen(cmd) result = "" for line in pipe.readlines(): result = result + line[:-1] pipe.close() return result
def ExecProcess(cmd): try: pipe = os.popen4(cmd)[1] except AttributeError: pipe = os.popen(cmd) result = "" for line in pipe.readlines(): result = result + line[:-1] pipe.close() return result
464,224
def ExecProcess(cmd): try: pipe = os.popen4(cmd)[1] except AttributeError: pipe = os.popen(cmd) result = "" for line in pipe.readlines(): result = result + line[:-1] pipe.close() return result
def ExecProcess(cmd): try: pipe = os.popen4(cmd)[1] except AttributeError: pipe = os.popen(cmd) result = "" for line in pipe.readlines(): result = result + line[:-1] pipe.close() return result
464,225
def Glob(pattern): # needed because glob.glob() is buggy on Windows 95: # things like tests/t*.nim won't work global _baseDir (head, tail) = os.path.split(Path(pattern)) result = [] if os.path.exists(head): try: os.chdir(os.path.join(_baseDir, head)) try: for f in glob.glob(tail): result.append(os.path.join(head, f)) e...
def Glob(pattern): # needed because glob.glob() is buggy on Windows 95: # things like tests/t*.nim won't work global _baseDir (head, tail) = os.path.split(Path(pattern)) result = [] if os.path.exists(head): try: os.chdir(os.path.join(_baseDir, head)) try: for f in glob.glob(tail): result.append(os.path.join(head, f)) ...
464,226
def Compile(outputfile, files, ccflags="", linkflags="", target="exe", cc=CC): if target == "dll": ccflags += " -fPIC" linkflags += " -shared -fPIC" ofile = DllExt(outputfile) elif target == "exe": ofile = ExeExt(outputfile) else: Error("unknown target " + type) linkCmd = "" for f in files: Exec(Subs("$# -c $# -o $# $#...
def Compile(outputfile, files, ccflags="", linkflags="", target="exe", cc=CC): if target == "dll": if getHost() == "windows": linkflags += " -shared" else: ccflags += " -fPIC" linkflags += " -shared -fPIC" ofile = DllExt(outputfile) elif target == "exe": ofile = ExeExt(outputfile) else: Error("unknown target " + type) ...
464,227
def Compile(outputfile, files, ccflags="", linkflags="", target="exe", cc=CC): if target == "dll": ccflags += " -fPIC" linkflags += " -shared -fPIC" ofile = DllExt(outputfile) elif target == "exe": ofile = ExeExt(outputfile) else: Error("unknown target " + type) linkCmd = "" for f in files: Exec(Subs("$# -c $# -o $# $#...
def Compile(outputfile, files, ccflags="", linkflags="", target="exe", cc=CC): if target == "dll": ccflags += " -fPIC" linkflags += " -shared -fPIC" ofile = DllExt(outputfile) elif target == "exe": ofile = ExeExt(outputfile) else: Error("unknown target " + type) linkCmd = "" for f in files: Exec(Subs("$# -c $# -o $# $#...
464,228
def cmd_examples(ccflags): ccflags += ccflags + " -Iclaro" Compile("build/hello", ["examples/helloworld/hello.c"], ccflags) Compile("build/radio", ["examples/radio/radio.c"], ccflags) Compile("build/combo", ["examples/combo/combo.c"], ccflags) Compile("build/layout_test", ["examples/layout/layout_test.c"], ccflags) Com...
def cmd_examples(ccflags): ccflags += ccflags + " -Iinclude" Compile("build/hello", ["examples/helloworld/hello.c"], ccflags) Compile("build/radio", ["examples/radio/radio.c"], ccflags) Compile("build/combo", ["examples/combo/combo.c"], ccflags) Compile("build/layout_test", ["examples/layout/layout_test.c"], ccflags) C...
464,229
def connect(self): """ Connects to the STOMP server if not already connected. """ if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.error, exc: raise self.ConnectionError(*exc.args) except socket.timeout, exc: raise self.ConnectionTime...
def connect(self): """ Connects to the STOMP server if not already connected. """ if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.error, exc: raise ConnectionError(*exc.args) except socket.timeout, exc: raise self.ConnectionTimeoutEr...
464,230
def connect(self): """ Connects to the STOMP server if not already connected. """ if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.error, exc: raise self.ConnectionError(*exc.args) except socket.timeout, exc: raise self.ConnectionTime...
def connect(self): """ Connects to the STOMP server if not already connected. """ if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.error, exc: raise self.ConnectionError(*exc.args) except socket.timeout, exc: raise ConnectionTimeoutEr...
464,231
def disconnect(self, conf=None): """ Disconnect from the server, if connected. """ print "Trying to disconnect." if self._sock is None: return try: self._sock.close() except socket.error: pass self._sock = None self._buffer.clear()
def disconnect(self, conf=None): """ Disconnect from the server, if connected. """ if self._sock is None: return try: self._sock.close() except socket.error: pass self._sock = None self._buffer.clear()
464,232
def disconnect(self, conf=None, extra_headers=None): """Disconnect from the server.""" print repr(self.connection.connected) if self.connection.connected: disconnect = frame.DisconnectFrame(extra_headers=extra_headers) result = self.send_frame(disconnect) self.connection.disconnect() return result
def disconnect(self, conf=None, extra_headers=None): """Disconnect from the server.""" if self.connection.connected: disconnect = frame.DisconnectFrame(extra_headers=extra_headers) result = self.send_frame(disconnect) self.connection.disconnect() return result
464,233
def get_all_connections(self): "Return a list of all connection objects the manager knows about" return self.connections.values()
def get_all_connections(self): "Return a list of all connection objects the manager knows about" return self.connections.values()
464,234
def get_all_connections(self): "Return a list of all connection objects the manager knows about" return self.connections.values()
def get_all_connections(self): "Return a list of all connection objects the manager knows about" return self.connections.values()
464,235
def __init__(self, host, port=61613, socket_timeout=None): self.host = host self.port = port self.socket_timeout = socket_timeout self._sock = None self._buffer = FrameBuffer() self._connected = threading.Event()
defself._connect_lock = threading.RLock() self._send_lock = threading.RLock() self._read_lock = threading.RLock() __init__(self,self._connect_lock = threading.RLock() self._send_lock = threading.RLock() self._read_lock = threading.RLock() host,self._connect_lock = threading.RLock() self._send_lock = threading.RLock()...
464,236
def connect(self): """ Connects to the STOMP server if not already connected. """ if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.timeout as exc: raise ConnectionTimeoutError(*exc.args) except socket.error as exc: raise ConnectionErr...
def connect(self): """ Connects to the STOMP server if not already connected. """ with self._connect_lock: if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.timeout as exc: raise ConnectionTimeoutError(*exc.args) except socket.error as...
464,237
def disconnect(self, conf=None): """ Disconnect from the server, if connected. @raise NotConnectedError: If the connection is not currently connected. """ if self._sock is None: raise NotConnectedError() try: self._sock.close() except socket.error: pass self._sock = None self._buffer.clear() self._connected.clear()
def disconnect(self, conf=None): """ Disconnect from the server, if connected. @raise NotConnectedError: If the connection is not currently connected. """ with self._connect_lock: if self._sock is None: raise NotConnectedError() try: self._sock.close() except socket.error: pass self._sock = None self._buffer.clear() s...
464,238
def send(self, frame): """ Sends the specified frame to STOMP server. @param frame: The frame to send to server. @type frame: L{stompclient.frame.Frame} """ self.connect() try: self._sock.sendall(str(frame)) except socket.error, e: if e.args[0] == errno.EPIPE: self.disconnect() raise ConnectionError("Error %s while wr...
def send(self, frame): """ Sends the specified frame to STOMP server. @param frame: The frame to send to server. @type frame: L{stompclient.frame.Frame} """ self.connect() try: self._sock.sendall(str(frame)) except socket.error, e: if e.args[0] == errno.EPIPE: self.disconnect() raise ConnectionError("Error %s while wr...
464,239
def load_setup(self): """Loads CNT metadata from header.""" self.info = {} self.file.seek(0) self.info["rev"] = self.get('12s') self.info["nextfile"] = self.get('l') self.info["prevfile"] = self.get('L') self.info["type"] = self.get('b') self.info["id"] = se...
def begdata = 900 + (nchannels * 75) enddata = self.info["eventtablepos"] nsamples = ((enddata - begdata)/self.info["nchannels"])/2 self.info["nsamples"] = nsamples load_setup(self): begdata = 900 + (nchannels * 75) enddata = self.info["eventtablepos"] nsamples = ((enddata - begdata)/self.info["nchannel...
464,240
def save_events(self): self.get_event_table() self.load_events() shape = (2, len(self.events)) atom = tables.Int16Atom() filters = tables.Filters(complevel=5, complib='zlib') ca = self.h5.createCArray(self.h5.root, 'triggers', atom, shape, title="Trigger Data", filters=filters) for event in self.events: ca[:, even...
def save_events(self): self.get_event_table() self.load_events() shape = (len(self.events), 2) atom = tables.Int16Atom() filters = tables.Filters(complevel=5, complib='zlib') ca = self.h5.createCArray(self.h5.root, 'triggers', atom, shape, title="Trigger Data", filters=filters) for event in self.events: ca[:, even...
464,241
def save_events(self): self.get_event_table() self.load_events() shape = (2, len(self.events)) atom = tables.Int16Atom() filters = tables.Filters(complevel=5, complib='zlib') ca = self.h5.createCArray(self.h5.root, 'triggers', atom, shape, title="Trigger Data", filters=filters) for event in self.events: ca[:, even...
def save_events(self): self.get_event_table() self.load_events() shape = (2, len(self.events)) atom = tables.Int16Atom() filters = tables.Filters(complevel=5, complib='zlib') ca = self.h5.createCArray(self.h5.root, 'triggers', atom, shape, title="Trigger Data", filters=filters) for i, event in enumerate(self.event...
464,242
def convert_bytes_to_points(self, byte): data_offset = 900 + (75 * self.info["nchannels"]) point = (byte - data_offset) / (2 * self.info["nchannels"]) return point
def convert_bytes_to_points(self, byte): data_offset = 900 + (75 * self.info["nchannels"]) point = (byte - data_offset) / (2 * self.info["nchannels"])return point
464,243
def convert_bytes_to_points(self, byte): data_offset = 900 + (75 * self.info["nchannels"]) point = (byte - data_offset) / (2 * self.info["nchannels"]) return point
def convert_bytes_to_points(self, byte): data_offset = 900 + (75 * self.info["nchannels"]) point = (byte - data_offset) / (2 * self.info["nchannels"]) return point
464,244
def load_setup(self): """Loads CNT metadata from header.""" self.info = {} self.file.seek(0) self.info["rev"] = self.get('12s') self.info["nextfile"] = self.get('l') self.info["prevfile"] = self.get('L') self.info["type"] = self.get('b') self.info["id"] = se...
def load_setup(self): """Loads CNT metadata from header.""" self.info = {} self.file.seek(0) self.info["rev"] = self.get('12s') self.info["nextfile"] = self.get('l') self.info["prevfile"] = self.get('L') self.info["type"] = self.get('b') self.info["id"] = se...
464,245
def check(self, *args, **kwds): _rpmts.check(self, *args, **kwds)
def check(self, *args, **kwds): _rpmts.check(self, *args, **kwds)
464,246
def test_case(self): f = lambda sql: sqlparse.format(sql, reindent=True) s = 'case when foo = 1 then 2 when foo = 3 then 4 else 5 end' self.ndiffAssertEqual(f(s), '\n'.join(['case when foo = 1 then 2', ' when foo = 3 then 4', ' else 5', 'end']))
def test_case(self): f = lambda sql: sqlparse.format(sql, reindent=True) s = 'case when foo = 1 then 2 when foo = 3 then 4 else 5 end' self.ndiffAssertEqual(f(s), '\n'.join(['case', ' when foo = 1 then 2', ' when foo = 3 then 4', ' else 5', 'end']))
464,247
def _consume_cycle(tl, i): x = itertools.cycle(( lambda y: (y.match(T.Punctuation, '.') or y.ttype is T.Operator), lambda y: (y.ttype in (T.String.Symbol, T.Name, T.Wildcard)))) for t in tl.tokens[i:]: if x.next()(t): yield t else: raise StopIteration
def _consume_cycle(tl, i): x = itertools.cycle(( lambda y: (y.match(T.Punctuation, '.') or y.ttype is T.Operator), lambda y: (y.ttype in (T.String.Symbol, T.Name, T.Wildcard)))) for t in tl.tokens[i:]: if next(x)(t): yield t else: raise StopIteration
464,248
def __str__(self): return unicode(self).encode('utf-8')
def __str__(self): return unicode(self).encode('utf-8')
464,249
def __repr__(self): short = self._get_repr_value() return '<%s \'%s\' at 0x%07x>' % (self._get_repr_name(), short, id(self))
def __repr__(self): short = self._get_repr_value() return '<%s \'%s\' at 0x%07x>' % (self._get_repr_name(), short, id(self))
464,250
def __unicode__(self): return ''.join(unicode(x) for x in self.flatten())
def __unicode__(self): return ''.join(unicode(x) for x in self.flatten())
464,251
def __str__(self): return unicode(self).encode('utf-8')
def __str__(self): return unicode(self).encode('utf-8')
464,252
def index(request): output = None data = {} proc_time = None if request.method == 'POST': logging.debug(request.POST) form = FormOptions(request.POST, request.FILES) if form.is_valid(): start = time.time() output = format_sql(form, format=request.POST.get('format', 'html')) proc_time = time.time()-start else: form = Fo...
def index(request): output = None data = {} proc_time = None if request.method == 'POST': logging.debug(request.POST) form = FormOptions(request.POST, request.FILES) if form.is_valid(): start = time.time() output = format_sql(form, format=request.POST.get('format', 'html')) proc_time = time.time()-start else: form = Fo...
464,253
def main(args): """Create a TestSuite and run it.""" loader = unittest.TestLoader() suite = unittest.TestSuite() fnames = [os.path.split(f)[-1] for f in args] for fname in os.listdir(os.path.dirname(__file__)): if (not fname.startswith('test_') or not fname.endswith('.py') or (fnames and fname not in fnames)): continue...
def main(args): """Create a TestSuite and run it.""" loader = unittest.TestLoader() suite = unittest.TestSuite() fnames = [os.path.split(f)[-1] for f in args] for fname in os.listdir(os.path.dirname(__file__)): if (not fname.startswith('test_') or not fname.endswith('.py') or (fnames and fname not in fnames)): continue...
464,254
def main(args): """Create a TestSuite and run it.""" loader = unittest.TestLoader() suite = unittest.TestSuite() fnames = [os.path.split(f)[-1] for f in args] for fname in os.listdir(os.path.dirname(__file__)): if (not fname.startswith('test_') or not fname.endswith('.py') or (fnames and fname not in fnames)): continue...
def main(args): """Create a TestSuite and run it.""" loader = unittest.TestLoader() suite = unittest.TestSuite() fnames = [os.path.split(f)[-1] for f in args] for fname in os.listdir(os.path.dirname(__file__)): if (not fname.startswith('test_') or not fname.endswith('.py') or (fnames and fname not in fnames)): continue...
464,255
def build_tree(search_path, outdir): """Build a directory tree under outdir containing symlinks to all LV2 extensions found in search_path, such that the symlink paths correspond to the extension URIs.""" for bundle in __bundles(search_path): # Load manifest into model manifest = RDF.Model() parser = RDF.Parser(name="g...
def build_tree(search_path, outdir): """Build a directory tree under outdir containing symlinks to all LV2 extensions found in search_path, such that the symlink paths correspond to the extension URIs.""" for bundle in __bundles(search_path): # Load manifest into model manifest = RDF.Model() parser = RDF.Parser(name="g...
464,256
def usage(): print """Usage: lv2compatgen.py DATA
def usage(): print """Usage: lv2compatgen.py DATA
464,257
def gendoc(specgen_dir, bundle_dir, ttl_filename, html_filename): subprocess.call([os.path.join(specgen_dir, 'lv2specgen.py'), os.path.join(bundle_dir, ttl_filename), os.path.join(specgen_dir, 'template.html'), os.path.join(specgen_dir, 'style.css'), os.path.join(out_base, html_filename), os.path.join('..', 'doc'), '-i...
def gendoc(specgen_dir, bundle_dir, ttl_filename, html_filename): subprocess.call([os.path.join(specgen_dir, 'lv2specgen.py'), os.path.join(bundle_dir, ttl_filename), os.path.join(specgen_dir, 'template.html'), os.path.join(specgen_dir, 'style.css'), os.path.join(out_base, html_filename), os.path.join('..', 'doc'), '-i...
464,258
def retrieveConfig(self): """ retrieves original configuration from vermont instance and replaces current configurations, both original and dynamic """ logger().debug("VermontInstance.retrieveConfig()") self.setConfig(self._retrieveConfig()) self.__cfgModified = False
def retrieveConfig(self): """ retrieves original configuration from vermont instance and replaces current configurations, both original and dynamic """ logger().debug("VermontInstance.retrieveConfig()") self.setConfig(self._retrieveConfig()) self.__cfgModified = False
464,259
def _gather_deleted_dir(self, path, dirdict): # List what the tree thought it had as deletes. pending = [(path, dirdict)] while pending: dirname, cwd = pending.pop(-1) for name, old_kind_details in cwd: path = dirname and ('%s/%s' % (dirname, name)) or name if type(old_kind_details) is dict: pending.append((path, old_k...
def _gather_deleted_dir(self, path, dirdict): # List what the tree thought it had as deletes. pending = [(path, dirdict)] while pending: dirname, cwd = pending.pop(-1) for name, old_kind_details in cwd.iteritems(): path = dirname and ('%s/%s' % (dirname, name)) or name if type(old_kind_details) is dict: pending.append(...
464,260
def finished(self): """Return the journal obtained by scanning the disk.""" pending = [''] while pending: dirname = pending.pop(-1) names = self.transport.list_dir(dirname) # NB: quadratic in lookup here due to presence in inner loop: # consider tuning. segments = dirname.split('/') cwd = self.tree for segment in segme...
def finished(self): """Return the journal obtained by scanning the disk.""" pending = [''] while pending: dirname = pending.pop(-1) names = self.transport.list_dir(dirname) # NB: quadratic in lookup here due to presence in inner loop: # consider tuning. segments = dirname.split('/') cwd = self.tree for segment in segme...
464,261
def finished(self): """Return the journal obtained by scanning the disk.""" pending = [''] while pending: dirname = pending.pop(-1) names = self.transport.list_dir(dirname) # NB: quadratic in lookup here due to presence in inner loop: # consider tuning. segments = dirname.split('/') cwd = self.tree for segment in segme...
deffinished(self):"""Returnthejournalobtainedbyscanningthedisk."""pending=['']whilepending:dirname=pending.pop(-1)names=self.transport.list_dir(dirname)#NB:quadraticinlookuphereduetopresenceininnerloop:#considertuning.segments=dirname.split('/')cwd=self.treeforsegmentinsegments:ifnotsegment:continuetry:cwd=cwd[segment]...
464,262
def finished(self): """Return the journal obtained by scanning the disk.""" pending = [''] while pending: dirname = pending.pop(-1) names = self.transport.list_dir(dirname) # NB: quadratic in lookup here due to presence in inner loop: # consider tuning. segments = dirname.split('/') cwd = self.tree for segment in segme...
def finished(self): """Return the journal obtained by scanning the disk.""" pending = [''] while pending: dirname = pending.pop(-1) names = self.transport.list_dir(dirname) # NB: quadratic in lookup here due to presence in inner loop: # consider tuning. segments = dirname.split('/') cwd = self.tree for segment in segme...
464,263
def replay(self): """Replay the journal.""" adds = [] deletes = [] replaces = [] for path, (action, content) in self.journal.paths.iteritems(): if action == 'new': adds.append((path, content)) elif action == 'del': deletes.append((path, content)) elif action == 'replace': replaces.append((path, content[0], content[1]))...
def replay(self): """Replay the journal.""" adds = [] deletes = [] replaces = [] for path, (action, content) in self.journal.paths.iteritems(): if action == 'new': adds.append((path, content)) elif action == 'del': deletes.append((path, content)) elif action == 'replace': replaces.append((path, content[0], content[1]))...
464,264
def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content.
def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content.
464,265
def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content.
deftemppath = self.contentdir.local_abspath(tempname) put_with_check(self,temppath = self.contentdir.local_abspath(tempname) path,temppath = self.contentdir.local_abspath(tempname) content):temppath = self.contentdir.local_abspath(tempname) """Puttemppath = self.contentdir.local_abspath(tempname) a_filetemppath = self....
464,266
def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content.
def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content.
464,267
def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content.
def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content.
464,268
def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content.
def put_with_check(self, path, content): """Put a_file at path checking that as received it matches content.
464,269
def get_data_files(root, data_dir): return [ (root + parent[len(data_dir):], [ os.path.join(parent, fn) for fn in files ]) for parent, dirs, files in os.walk(data_dir) if files ]
def get_data_files(root, data_dir): return [ (root + parent[len(data_dir):], [ os.path.join(parent, fn) for fn in files ]) for parent, dirs, files in os.walk(data_dir) if files ]
464,270
def get_data_files(root, data_dir): return [ (root + parent[len(data_dir):], [ os.path.join(parent, fn) for fn in files ]) for parent, dirs, files in os.walk(data_dir) if files ]
def get_data_files(root, data_dir): return [ (root + parent[len(data_dir):], [ os.path.join(parent, fn) for fn in files ]) for parent, dirs, files in os.walk(data_dir) if files ]
464,271
def crack_request(params): raw_json = urllib.unquote(params[1]) print raw_json request_info = dict([(k.encode('utf8'), v) for k, v in json.loads(raw_json).items()]) args = ( request_info['uuid'] , request_info['method'] , request_info['url'] , request_info['params'] , request_info['headers']) th = threading.Thread(targ...
def crack_request(params): raw_json = urllib.unquote(params[1]) request_info = dict([(k.encode('utf8'), v) for k, v in json.loads(raw_json).items()]) args = ( request_info['uuid'] , request_info['method'] , request_info['url'] , request_info['params'] , request_info['headers']) th = threading.Thread(target = request, a...
464,272
def webkit_set_proxy_uri(uri): if uri and '://' not in uri: uri = 'https://' + uri pass try: if os.name == 'nt': libgobject = ctypes.CDLL('libgobject-2.0-0.dll') libsoup = ctypes.CDLL('libsoup-2.4-1.dll') libwebkit = ctypes.CDLL('libwebkit-1.0-2.dll') pass else: libgobject = ctypes.CDLL('libgobject-2.0.so.0') libsoup =...
def webkit_set_proxy_uri(uri): if uri and '://' not in uri: uri = 'https://' + uri pass try: if os.name == 'nt': libgobject = ctypes.CDLL('libgobject-2.0-0.dll') libsoup = ctypes.CDLL('libsoup-2.4-1.dll') libwebkit = ctypes.CDLL('libwebkit-1.0-2.dll') pass else: libgobject = ctypes.CDLL('libgobject-2.0.so.0') libsoup =...
464,273
def webkit_set_proxy_uri(uri): if uri and '://' not in uri: uri = 'https://' + uri pass try: if os.name == 'nt': libgobject = ctypes.CDLL('libgobject-2.0-0.dll') libsoup = ctypes.CDLL('libsoup-2.4-1.dll') libwebkit = ctypes.CDLL('libwebkit-1.0-2.dll') pass else: libgobject = ctypes.CDLL('libgobject-2.0.so.0') libsoup =...
def webkit_set_proxy_uri(uri): if uri and '://' not in uri: uri = 'https://' + uri pass try: if os.name == 'nt': libgobject = ctypes.CDLL('libgobject-2.0-0.dll') libsoup = ctypes.CDLL('libsoup-2.4-1.dll') libwebkit = ctypes.CDLL('libwebkit-1.0-2.dll') pass else: libgobject = ctypes.CDLL('libgobject-2.0.so.0') libsoup =...
464,274
def crack_system(params): if params[1] == 'notify' or params[1] == 'notify_with_sound': if not get_prefs('use_native_notify'): return summary = urllib.unquote(params[2]) body = urllib.unquote(params[3]) notify.update(summary, body) notify.show() if params[1] == 'notify_with_sound': gobject.idle_add(os.system, 'aplay -q...
def crack_system(params): if params[1] == 'notify' or params[1] == 'notify_with_sound': if not get_prefs('use_native_notify'): return summary = urllib.unquote(params[2]) body = urllib.unquote(params[3]) notify.update(summary, body) notify.show() if params[1] == 'notify_with_sound': subprocess.Popen(['aplay', '-q', '-N'...
464,275
def apply_config(): version = 'ver %s (%s)'% (hotot.__version__, hotot.__codename__) exts_enabled = json.dumps(get_prefs('exts_enabled')) webv.execute_script(''' $('#version').text('%s'); ext.exts_enabled = %s; ''' % (version , exts_enabled)) apply_prefs() pass
def apply_config(): version = 'ver %s (%s)'% (hotot.__version__, hotot.__codename__) exts_enabled = json.dumps(get_prefs('exts_enabled')) webv.execute_script(''' $('#version').text('%s'); ext.exts_enabled = %s; ''' % (version , exts_enabled)) apply_prefs() pass
464,276
def request(uuid, method, url, params={}, headers={},files=[],additions=''): scripts = '' try: if (method == 'POST'): result = _post(url, params, headers, files, additions) else: result = _get(url, params, headers) pass except urllib2.HTTPError, e: msg = 'Unknow Errors ... ' if http_code_msg_table.has_key(e.getcode()):...
def request(uuid, method, url, params={}, headers={},files=[],additions=''): scripts = '' try: if (method == 'POST'): result = _post(url, params, headers, files, additions) else: result = _get(url, params, headers) pass except urllib2.HTTPError, e: msg = 'Unknown Errors ... ' if http_code_msg_table.has_key(e.getcode())...
464,277
def __init__(self): WebView.__init__(self) self.load_finish_flag = False self.set_property('can-focus', True) self.set_property('can-default', True) self.set_full_content_zoom(1) self.clipbord = gtk.Clipboard()
def __init__(self): WebView.__init__(self) self.load_finish_flag = False self.set_property('can-focus', True) self.set_property('can-default', True) self.set_full_content_zoom(1) self.clipbord = gtk.Clipboard()
464,278
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png'))
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png'))
464,279
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png'))
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png'))
464,280
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png'))
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png'))
464,281
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png'))
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png'))
464,282
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png'))
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png'))
464,283
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png'))
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png')) self.window.set_icon_from_file( utils.get_ui_object('imgs/ic64_hotot_classics.png'))
464,284
def build_inputw(self): # input window self.inputw = gtk.Window() self.inputw.set_default_size(300, 10) self.inputw.set_position(gtk.WIN_POS_CENTER) self.inputw.set_title(_("What's happening?")) hbox = gtk.HBox()
def build_inputw(self): # input window self.inputw = gtk.Window() self.inputw.set_default_size(300, 10) self.inputw.set_position(gtk.WIN_POS_CENTER) self.inputw.set_title(_("What's happening?")) hbox = gtk.HBox()
464,285
def _on_hotkey_compose(self): if config.get(self.active_profile, 'use_native_input'): if not self.tbox_status.is_focus(): self.inputw.hide() pass self.inputw.present() self.tbox_status.grab_focus() else: if not self.webv.is_focus(): self.window.hide() pass self.window.present() self.webv.grab_focus()
def _on_hotkey_compose(self): if config.get(self.active_profile, 'use_native_input'): if not self.tbox_status.is_focus(): self.inputw.hide() self.inputw.present() self.tbox_status.grab_focus() else: if not self.webv.is_focus(): self.window.hide() self.window.present() self.webv.grab_focus()
464,286
def _on_hotkey_compose(self): if config.get(self.active_profile, 'use_native_input'): if not self.tbox_status.is_focus(): self.inputw.hide() pass self.inputw.present() self.tbox_status.grab_focus() else: if not self.webv.is_focus(): self.window.hide() pass self.window.present() self.webv.grab_focus()
def _on_hotkey_compose(self): if config.get(self.active_profile, 'use_native_input'): if not self.tbox_status.is_focus(): self.inputw.hide() self.inputw.present() self.tbox_status.grab_focus() else: if not self.webv.is_focus(): self.window.hide() self.window.present() self.webv.grab_focus()
464,287
def main(): global HAS_INDICATOR gtk.gdk.threads_init() config.loads(); config.load_sys_conf() if not config.sys_get('use_ubuntu_indicator'): HAS_INDICATOR = False try: import dl libc = dl.open('/lib/libc.so.6') libc.call('prctl', 15, 'hotot', 0, 0, 0) except: pass agent.init_notify() app = Hotot() agent.app = app if H...
def main(): global HAS_INDICATOR gtk.gdk.threads_init() config.loads() config.load_sys_conf() if not config.sys_get('use_ubuntu_indicator'): HAS_INDICATOR = False try: import dl libc = dl.open('/lib/libc.so.6') libc.call('prctl', 15, 'hotot', 0, 0, 0) except: pass agent.init_notify() app = Hotot() agent.app = app if HA...
464,288
def __init__(self): webkit.WebView.__init__(self) self.load_finish_flag = False self.set_property('can-focus', True) self.set_property('can-default', True) self.set_full_content_zoom(1) self.clipbord = gtk.Clipboard()
def __init__(self): webkit.WebView.__init__(self) self.load_finish_flag = False self.set_property('can-focus', True) self.set_property('can-default', True) self.set_full_content_zoom(1) self.clipbord = gtk.Clipboard()
464,289
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_name("gtk-dnd") self.window.set_icon_name("gtk-dnd") self.window.set_default_size(750, 550) self.window.set_title("Hotot") self.window.set_position(gtk.WIN_POS_CENTER)
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_from_file( config.abspath + '/imgs/ic64_hotot.png') self.window.set_icon_from_file( config.abspath + '/imgs/ic64_hotot.png') self.window.set_default_size(750, 550) self.window.set_title("Hotot") self.window.set_position(gtk.WIN_POS_CENTER)
464,290
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_name("gtk-dnd") self.window.set_icon_name("gtk-dnd") self.window.set_default_size(750, 550) self.window.set_title("Hotot") self.window.set_position(gtk.WIN_POS_CENTER)
def build_gui(self): self.window = gtk.Window() gtk.window_set_default_icon_name("gtk-dnd") self.window.set_icon_name("gtk-dnd") self.window.set_default_size(750, 550) self.window.set_title('Hotot') self.window.set_position(gtk.WIN_POS_CENTER)
464,291
def webkit_set_proxy_uri(uri): if uri and '://' not in uri: uri = 'https://' + uri pass try: if os.name == 'nt': libgobject = ctypes.CDLL('libgobject-2.0-0.dll') libsoup = ctypes.CDLL('libsoup-2.4-1.dll') libwebkit = ctypes.CDLL('libwebkit-1.0-2.dll') pass else: libgobject = ctypes.CDLL('libgobject-2.0.so.0') libsoup =...
def webkit_set_proxy_uri(uri): if uri and '://' not in uri: uri = 'https://' + uri pass try: if os.name == 'nt': libgobject = ctypes.CDLL('libgobject-2.0-0.dll') libsoup = ctypes.CDLL('libsoup-2.4-1.dll') libwebkit = ctypes.CDLL('libwebkit-1.0-2.dll') pass else: libgobject = ctypes.CDLL('libgobject-2.0.so.0') libsoup =...
464,292
def apply_proxy_setting(): if get_prefs('use_http_proxy'): proxy_uri = "https://%s:%s" % ( get_prefs('http_proxy_host') , get_prefs('http_proxy_port')) webkit_set_proxy_uri(proxy_uri) pass else: webkit_set_proxy_uri("") pass gobject.idle_add(webv.execute_script, "new Image().src='http://mobile.twitter.com/';") pass
def apply_proxy_setting(): if get_prefs('use_http_proxy'): proxy_uri = "https://%s:%s" % ( get_prefs('http_proxy_host') , get_prefs('http_proxy_port')) webkit_set_proxy_uri(proxy_uri) pass else: webkit_set_proxy_uri("") pass gobject.idle_add(webv.execute_script, "new Image().src='http://google.com/';") pass
464,293
def push_prefs(): # account settings remember_password = 'true' if config.remember_password else 'false' consumer_key = config.consumer_key consumer_secret = config.consumer_secret # system settings shortcut_summon_hotot = config.shortcut_summon_hotot # display settings font_family_list = [ff.get_name() for ff in gtk...
def push_prefs(): # account settings remember_password = 'true' if config.remember_password else 'false' consumer_key = config.consumer_key consumer_secret = config.consumer_secret # system settings shortcut_summon_hotot = config.shortcut_summon_hotot # display settings font_family_list = [ff.get_name() for ff in gtk...
464,294
def push_prefs(): # account settings remember_password = 'true' if config.remember_password else 'false' consumer_key = config.consumer_key consumer_secret = config.consumer_secret # system settings shortcut_summon_hotot = config.shortcut_summon_hotot # display settings font_family_list = [ff.get_name() for ff in gtk...
def push_prefs(): # account settings remember_password = 'true' if config.remember_password else 'false' consumer_key = config.consumer_key consumer_secret = config.consumer_secret # system settings shortcut_summon_hotot = config.shortcut_summon_hotot # display settings font_family_list = [ff.get_name() for ff in gtk...
464,295
def get_data_files(root, data_dir): return [ (root + parent[len(data_dir):], [ os.path.join(parent, fn) for fn in files ]) for parent, dirs, files in os.walk(data_dir) if files ]
def get_data_files(root, data_dir): return [ (root + parent[len(data_dir):], [ os.path.join(parent, fn) for fn in files ]) for parent, dirs, files in os.walk(data_dir) if files ]
464,296
def get_data_files(root, data_dir): return [ (root + parent[len(data_dir):], [ os.path.join(parent, fn) for fn in files ]) for parent, dirs, files in os.walk(data_dir) if files ]
def get_data_files(root, data_dir): return [ (root + parent[len(data_dir):], [ os.path.join(parent, fn) for fn in files ]) for parent, dirs, files in os.walk(data_dir) if files ]
464,297
def select_config(protocol): if protocol == 'identica': config.set(app.active_profile, 'api_base', 'https://identi.ca/api/') execute_script("lib.twitterapi.api_base='https://identi.ca/api/'") pass
def select_config(protocol): if protocol == 'identica': set_prefs('api_base', 'https://identi.ca/api/') execute_script("lib.twitterapi.api_base='https://identi.ca/api/'") pass
464,298
def get_screen_name(webv): if CAN_EVAL_SCRIPT: return webv.ctx().EvaluateScript(''' utility.DB.json(utility.DB.auto_complete_list) ''') else: return DEFAULT_SCREEN_NAME
def get_screen_name(webv): if CAN_EVAL_SCRIPT: return webv.ctx().EvaluateScript(''' utility.DB.json(utility.DB.auto_complete_list) ''') else: return json.dumps(DEFAULT_SCREEN_NAME)
464,299