From fijal at codespeak.net Fri Sep 1 15:41:05 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Fri, 1 Sep 2006 15:41:05 +0200 (CEST)
Subject: [py-svn] r31929 - in py/branch/distributed/py/test/rsession: .
testing
Message-ID: <20060901134105.AB92010060@code0.codespeak.net>
Author: fijal
Date: Fri Sep 1 15:41:03 2006
New Revision: 31929
Modified:
py/branch/distributed/py/test/rsession/hostmanage.py
py/branch/distributed/py/test/rsession/rsession.py
py/branch/distributed/py/test/rsession/testing/test_rsession.py
py/branch/distributed/py/test/rsession/web.py
py/branch/distributed/py/test/rsession/webjs.py
Log:
Fixed some web issues. So now one can still browse tests after web server finishes. Fixed some stuff about waiting for tests to complete (now we just wait forever, have to clear out that issue). Some minor web fixes.
Modified: py/branch/distributed/py/test/rsession/hostmanage.py
==============================================================================
--- py/branch/distributed/py/test/rsession/hostmanage.py (original)
+++ py/branch/distributed/py/test/rsession/hostmanage.py Fri Sep 1 15:41:03 2006
@@ -1,5 +1,6 @@
import sys, os
import py
+import time
import thread, threading
from py.__.test.rsession.master import (
setup_slave, MasterNode, dispatch_loop)
@@ -24,6 +25,7 @@
for basename in rsync_files:
sources.append(str(pkgdir.dirpath())+"/"+basename)
report.wrapcall(reporter, bin_rsync, sources, host, real_relpath)
+ #gw = py.execnet.SshGateway(host, remotepython="python2.4")
gw = py.execnet.SshGateway(host)
ch = setup_slave(gw, os.path.join(real_relpath, pkgdir.basename))
nodes.append(MasterNode(ch, reporter))
@@ -38,10 +40,19 @@
return nodes
-def teardown_hosts(reporter, channels):
+def teardown_hosts(reporter, channels, nodes, waiter=lambda : time.sleep(.1)):
for channel in channels:
channel.send(None)
+ clean = False
+ while not clean:
+ clean = True
+ for node in nodes:
+ if node.pending:
+ clean = False
+ waiter()
+
+
for channel in channels:
try:
report.wrapcall(reporter, channel.waitclose, int(option.waittime))
Modified: py/branch/distributed/py/test/rsession/rsession.py
==============================================================================
--- py/branch/distributed/py/test/rsession/rsession.py (original)
+++ py/branch/distributed/py/test/rsession/rsession.py Fri Sep 1 15:41:03 2006
@@ -228,13 +228,15 @@
startserverflag = self.config.getinitialvalue("startserver")
except:
startserverflag = False
- if startserverflag:
+ if startserverflag and reporter is None:
from py.__.test.rsession.web import start_server, exported_methods
reporter = exported_methods.report
start_server()
elif reporter is None:
reporter = Reporter(self.config, sshhosts).report
+ else:
+ startserverflag = False
reporter(report.TestStarted(sshhosts))
pkgdir = self.getpkgdir(args[0])
colitems = self.make_colitems(args, baseon=pkgdir.dirpath())
@@ -263,15 +265,11 @@
#assert 0, "\n".join([",".join(x.listnames()) for x in
# list(itemgenerator)])
dispatch_loop(nodes, itemgenerator, lambda : False)
- teardown_hosts(reporter, [node.channel for node in nodes])
+ teardown_hosts(reporter, [node.channel for node in nodes], nodes)
reporter(report.Nodes(nodes))
reporter(report.TestFinished())
if startserverflag:
from py.__.test.rsession.web import kill_server
- #try:
- # while 1:
- # time.sleep(.3)
- #except KeyboardInterrupt:
kill_server()
def make_colitems(paths, baseon):
Modified: py/branch/distributed/py/test/rsession/testing/test_rsession.py
==============================================================================
--- py/branch/distributed/py/test/rsession/testing/test_rsession.py (original)
+++ py/branch/distributed/py/test/rsession/testing/test_rsession.py Fri Sep 1 15:41:03 2006
@@ -158,7 +158,7 @@
nodes = init_hosts(setup_events.append, hosts, 'pytesttest', pkgdir)
teardown_hosts(teardown_events.append,
- [node.channel for node in nodes])
+ [node.channel for node in nodes], nodes)
count_rsyn_calls = [i for i in setup_events
if isinstance(i, report.CallStart)]
@@ -197,7 +197,7 @@
node.send(itemskip)
node.send(itemprint)
- teardown_hosts(allevents.append, [node.channel for node in nodes])
+ teardown_hosts(allevents.append, [node.channel for node in nodes], nodes)
events = [i for i in allevents
if isinstance(i, report.ReceivedItemOutcome)]
Modified: py/branch/distributed/py/test/rsession/web.py
==============================================================================
--- py/branch/distributed/py/test/rsession/web.py (original)
+++ py/branch/distributed/py/test/rsession/web.py Fri Sep 1 15:41:03 2006
@@ -8,6 +8,7 @@
from _findpy import py
import thread, threading
import re
+import random
from pypy.translator.js import commproxy
@@ -51,18 +52,18 @@
current = current.parent
return None
- @described(retval=["aa"])
+ @described(retval={"aa":"aa"})
def show_hosts(self):
self.start_event.wait()
return json.write(self.hosts)
- @described(retval="aa")
+ @described(retval={'aa':"aa"})
def show_skip(self, item_name="a"):
- return json.write(escape(self.skip_reasons[item_name]))
+ return json.write({'item_name':item_name, 'reason':escape(self.skip_reasons[item_name])})
- @described(retval="aa")
+ @described(retval={'aa':"aa"})
def show_fail(self, item_name="a"):
- return json.write(escape(str(self.fail_reasons[item_name])))
+ return json.write({'item_name':item_name, 'traceback':escape(str(self.fail_reasons[item_name]))})
@described(retval={"aa":"aa"})
def show_status_change(self):
@@ -98,7 +99,13 @@
elif isinstance(event, report.ItemStart):
args = add_item(event)
elif isinstance(event, report.HostReady):
- args = {'hostname' : event.hostname}
+ host = event.hostname
+ num = 0
+ while self.ready_hosts[host]:
+ host = event.hostname + "_" + str(num)
+ num += 1
+ self.ready_hosts[host] = True
+ args = {'hostname' : event.hostname, 'hostkey' : host}
else:
args = {}
args['event'] = escape(str(event))
@@ -134,7 +141,16 @@
self.pending_events.put(event)
def report_TestStarted(self, event):
- self.hosts = event.hosts
+ self.hosts = {}
+ self.ready_hosts = {}
+ for host in event.hosts:
+ host_str = host
+ num = 0
+ while host_str in self.hosts:
+ host_str = host + "_" + str(num)
+ num += 1
+ self.hosts[host_str] = host
+ self.ready_hosts[host_str] = False
self.start_event.set()
self.pending_events.put(event)
Modified: py/branch/distributed/py/test/rsession/webjs.py
==============================================================================
--- py/branch/distributed/py/test/rsession/webjs.py (original)
+++ py/branch/distributed/py/test/rsession/webjs.py Fri Sep 1 15:41:03 2006
@@ -11,6 +11,9 @@
def get_elem(el):
return dom.get_document().getElementById(el)
+tracebacks = {}
+skips = {}
+
def comeback(msg):
if len(msg) == 0:
return
@@ -27,43 +30,55 @@
tr.id = msg['fullitemname']
main_t.appendChild(tr)
elif msg['type'] == 'HostReady':
- dom.get_document().getElementById(msg['hostname']).style.background = \
+ dom.get_document().getElementById(msg['hostkey']).style.background = \
"#00ff00"
elif msg['type'] == 'ReceivedItemOutcome':
try:
module_part = get_elem(msg['fullmodulename'])
td = create_elem("td")
+ item_name = msg['fullitemname']
# TODO: dispatch output
if msg["passed"] == 'True':
td.innerHTML = "."
elif msg["skipped"] != 'None':
+ exported_methods.show_skip(item_name, skip_come_back)
td.innerHTML = 's'
else:
td.innerHTML = 'F'
+ exported_methods.show_fail(item_name, fail_come_back)
module_part.appendChild(td)
except:
dom.get_document().getElementById("testmain").innerHTML += "some error"
exported_methods.show_status_change(comeback)
def show_skip(item_name="a"):
- exported_methods.show_skip(item_name, show_skip_come_back)
+ set_msgbox(skips[item_name])
-def show_skip_come_back(skipped_data):
+def set_msgbox(data):
msgbox = get_elem("messagebox")
- msgbox.innerHTML = skipped_data
+ msgbox.innerHTML = data
def show_traceback(item_name="a"):
- exported_methods.show_fail(item_name, show_skip_come_back)
+ set_msgbox(tracebacks[item_name])
-def host_init(host_list):
- elem = dom.get_document().getElementById("hostrow")
- for host in host_list:
- td = create_elem("td")
- td.style.background = "#ff0000"
- td.innerHTML = host
- td.id = host
- elem.appendChild(td)
-## elem = dom.get_document().getElementById("testmain")
+def fail_come_back(msg):
+ tracebacks[msg['item_name']] = msg['traceback']
+
+def skip_come_back(msg):
+ skips[msg['item_name']] = msg['reason']
+
+def host_init(host_dict):
+ try:
+ elem = dom.get_document().getElementById("hostrow")
+ for host in host_dict.keys():
+ td = create_elem("td")
+ td.style.background = "#ff0000"
+ td.innerHTML = host_dict[host]
+ td.id = host
+ elem.appendChild(td)
+ except:
+ elem = dom.get_document().getElementById("testmain")
+ elem.innerHTML = "problem"
## elem.innerHTML = str(host_list.keys())
def main():
From arigo at codespeak.net Mon Sep 4 13:27:25 2006
From: arigo at codespeak.net (arigo at codespeak.net)
Date: Mon, 4 Sep 2006 13:27:25 +0200 (CEST)
Subject: [py-svn] r31982 - in py/branch/distributed/py/execnet: . testing
Message-ID: <20060904112725.327E71006C@code0.codespeak.net>
Author: arigo
Date: Mon Sep 4 13:27:23 2006
New Revision: 31982
Modified:
py/branch/distributed/py/execnet/channel.py
py/branch/distributed/py/execnet/gateway.py
py/branch/distributed/py/execnet/register.py
py/branch/distributed/py/execnet/testing/test_gateway.py
Log:
(pedronis, arigo)
- channel callbacks that are optionally called with an end marker when
the channel closes
- a repr for gateways that shows the remote address
- never allow new channels over an already-closed connexion - these
channels then just deadlock when we try to read from them!
Modified: py/branch/distributed/py/execnet/channel.py
==============================================================================
--- py/branch/distributed/py/execnet/channel.py (original)
+++ py/branch/distributed/py/execnet/channel.py Mon Sep 4 13:27:23 2006
@@ -19,6 +19,8 @@
# XXX do this better
print >> sys.stderr, "Warning: unhandled %r" % (self,)
+NO_ENDMARKER_WANTED = object()
+
class Channel(object):
"""Communication channel between two possibly remote threads of code. """
@@ -33,13 +35,14 @@
self._receiveclosed = threading.Event()
self._remoteerrors = []
- def setcallback(self, callback):
+ def setcallback(self, callback, endmarker=NO_ENDMARKER_WANTED):
queue = self._items
lock = self.gateway.channelfactory._receivelock
lock.acquire()
try:
_callbacks = self.gateway.channelfactory._callbacks
- if _callbacks.setdefault(self.id, callback) is not callback:
+ dictvalue = (callback, endmarker)
+ if _callbacks.setdefault(self.id, dictvalue) != dictvalue:
raise IOError("%r has callback already registered" %(self,))
self._items = None
while 1:
@@ -55,10 +58,7 @@
callback(olditem)
if self._closed or self._receiveclosed.isSet():
# no need to keep a callback
- try:
- del _callbacks[self.id]
- except KeyError:
- pass
+ self.gateway.channelfactory._close_callback(self.id)
finally:
lock.release()
@@ -201,11 +201,14 @@
self._receivelock = threading.RLock()
self.gateway = gateway
self.count = startcount
+ self.finished = False
def new(self, id=None):
""" create a new Channel with 'id' (or create new id if None). """
self._writelock.acquire()
try:
+ if self.finished:
+ raise IOError("connexion already closed: %s" % (self.gateway,))
if id is None:
id = self.count
self.count += 2
@@ -226,10 +229,16 @@
del self._channels[id]
except KeyError:
pass
+ self._close_callback(id)
+
+ def _close_callback(self, id):
try:
- del self._callbacks[id]
+ callback, endmarker = self._callbacks.pop(id)
except KeyError:
pass
+ else:
+ if endmarker is not NO_ENDMARKER_WANTED:
+ callback(endmarker)
def _local_close(self, id, remoteerror=None):
channel = self._channels.get(id)
@@ -265,23 +274,30 @@
# executes in receiver thread
self._receivelock.acquire()
try:
- callback = self._callbacks.get(id)
- if callback is not None:
- callback(data) # even if channel may be already closed
- else:
+ try:
+ callback, endmarker = self._callbacks[id]
+ except KeyError:
channel = self._channels.get(id)
queue = channel and channel._items
if queue is None:
pass # drop data
else:
queue.put(data)
+ else:
+ callback(data) # even if channel may be already closed
finally:
self._receivelock.release()
def _finished_receiving(self):
+ self._writelock.acquire()
+ try:
+ self.finished = True
+ finally:
+ self._writelock.release()
for id in self._channels.keys():
self._local_last_message(id)
- self._callbacks.clear()
+ for id in self._callbacks.keys():
+ self._close_callback(id)
class ChannelFile:
Modified: py/branch/distributed/py/execnet/gateway.py
==============================================================================
--- py/branch/distributed/py/execnet/gateway.py (original)
+++ py/branch/distributed/py/execnet/gateway.py Mon Sep 4 13:27:23 2006
@@ -49,14 +49,22 @@
self.pool = NamedThreadPool(receiver = self.thread_receiver,
sender = self.thread_sender)
- def __repr__(self):
+ def __repr__(self):
+ addr = self.getremoteaddress()
+ if addr:
+ addr = '[%s]' % (addr,)
+ else:
+ addr = ''
r = (len(self.pool.getstarted('receiver'))
and "receiving" or "not receiving")
s = (len(self.pool.getstarted('sender'))
and "sending" or "not sending")
i = len(self.channelfactory.channels())
- return "<%s %s/%s (%d active channels)>" %(
- self.__class__.__name__, r, s, i)
+ return "<%s%s %s/%s (%d active channels)>" %(
+ self.__class__.__name__, addr, r, s, i)
+
+ def getremoteaddress(self):
+ return None
## def _local_trystopexec(self):
## self._execpool.shutdown()
@@ -118,7 +126,8 @@
except:
excinfo = exc_info()
self.traceex(excinfo)
- msg.post_sent(self, excinfo)
+ if msg is not None:
+ msg.post_sent(self, excinfo)
raise
else:
self.trace('sent -> %r' % msg)
Modified: py/branch/distributed/py/execnet/register.py
==============================================================================
--- py/branch/distributed/py/execnet/register.py (original)
+++ py/branch/distributed/py/execnet/register.py Mon Sep 4 13:27:23 2006
@@ -110,6 +110,9 @@
io = inputoutput.SocketIO(sock)
InstallableGateway.__init__(self, io=io)
+ def getremoteaddress(self):
+ return '%s:%d' % (self.host, self.port)
+
def remote_install(cls, gateway, hostport=None):
""" return a connected socket gateway through the
given gateway.
@@ -151,6 +154,9 @@
cmdline.insert(0, cmd)
super(SshGateway, self).__init__(' '.join(cmdline))
+ def getremoteaddress(self):
+ return self.sshaddress
+
class ExecGateway(PopenGateway):
def remote_exec_sync_stdcapture(self, lines, callback):
# hack: turn the content of the cell into
Modified: py/branch/distributed/py/execnet/testing/test_gateway.py
==============================================================================
--- py/branch/distributed/py/execnet/testing/test_gateway.py (original)
+++ py/branch/distributed/py/execnet/testing/test_gateway.py Mon Sep 4 13:27:23 2006
@@ -240,6 +240,21 @@
channel = self.test_channel_callback_stays_active(False)
channel.waitclose(1.0) # freed automatically at the end of producer()
+ def test_channel_endmarker_callback(self):
+ l = []
+ channel = self.gw.remote_exec(source='''
+ channel.send(42)
+ channel.send(13)
+ channel.send(channel.gateway.newchannel())
+ ''')
+ channel.setcallback(l.append, 999)
+ py.test.raises(IOError, channel.receive)
+ channel.waitclose(1.0)
+ assert len(l) == 4
+ assert l[:2] == [42,13]
+ assert isinstance(l[2], channel.__class__)
+ assert l[3] == 999
+
def test_remote_redirect_stdout(self):
out = py.std.StringIO.StringIO()
handle = self.gw.remote_redirect(stdout=out)
@@ -391,3 +406,14 @@
def test_sshaddress(self):
assert self.gw.sshaddress == option.sshtarget
+ def test_failed_connexion(self):
+ gw = py.execnet.SshGateway('nowhere.codespeak.net')
+ try:
+ channel = gw.remote_exec("...")
+ except IOError:
+ pass # connexion failed already
+ else:
+ # connexion did not fail yet
+ py.test.raises(EOFError, channel.receive)
+ # now it did
+ py.test.raises(IOError, gw.remote_exec, "...")
From arigo at codespeak.net Mon Sep 4 14:09:36 2006
From: arigo at codespeak.net (arigo at codespeak.net)
Date: Mon, 4 Sep 2006 14:09:36 +0200 (CEST)
Subject: [py-svn] r31983 - in py/branch/distributed/py/test/rsession: .
testing
Message-ID: <20060904120936.7E3CA1006C@code0.codespeak.net>
Author: arigo
Date: Mon Sep 4 14:09:33 2006
New Revision: 31983
Added:
py/branch/distributed/py/test/rsession/rsync.py
- copied, changed from r31979, user/arigo/hack/misc/ftpy2.py
py/branch/distributed/py/test/rsession/testing/test_rsync.py (contents, props changed)
Modified:
py/branch/distributed/py/test/rsession/hostmanage.py
py/branch/distributed/py/test/rsession/report.py
py/branch/distributed/py/test/rsession/rsession.py
py/branch/distributed/py/test/rsession/testing/test_rsession.py
Log:
(pedronis, arigo)
Use rsync.py to send the files to the remote hosts in parallel.
Running all these tests hangs sometimes at the end, but that's not new
:-(
Modified: py/branch/distributed/py/test/rsession/hostmanage.py
==============================================================================
--- py/branch/distributed/py/test/rsession/hostmanage.py (original)
+++ py/branch/distributed/py/test/rsession/hostmanage.py Mon Sep 4 14:09:33 2006
@@ -5,38 +5,63 @@
from py.__.test.rsession.master import (
setup_slave, MasterNode, dispatch_loop)
from py.__.test.rsession import report
+from py.__.test.rsession.rsync import RSync
from py.__.test.rsession.conftest import option
-def init_hosts(reporter, sshhosts, relpath, pkgdir, rsync_files=['']):
+
+class HostRSync(RSync):
+
+ def __init__(self, rsync_files):
+ RSync.__init__(self, delete=True)
+ self.rsync_files = rsync_files
+
+ def filter(self, path):
+ if path.endswith('.pyc') or path.endswith('~'):
+ return False
+ dir, base = os.path.split(path)
+ if base == '.svn':
+ return False
+ if self.rsync_files is None or dir != self.sourcedir:
+ return True
+ else:
+ return base in self.rsync_files
+
+
+def init_hosts(reporter, sshhosts, relpath, pkgdir, rsync_roots=None):
assert pkgdir.join("__init__.py").check(), (
"%s probably wrong" %(pkgdir,))
assert relpath, relpath
nodes = []
- nodes_lock = threading.Condition()
exc_info = [None]
-
- def host_init(host, relpath):
- # XXX: because of NFS we do create different directories
- # otherwise, .pyc files overlap
- real_relpath = relpath + "-" + host
- sources = []
- for basename in rsync_files:
- sources.append(str(pkgdir.dirpath())+"/"+basename)
- report.wrapcall(reporter, bin_rsync, sources, host, real_relpath)
- #gw = py.execnet.SshGateway(host, remotepython="python2.4")
- gw = py.execnet.SshGateway(host)
- ch = setup_slave(gw, os.path.join(real_relpath, pkgdir.basename))
- nodes.append(MasterNode(ch, reporter))
- reporter(report.HostReady(ch.gateway.sshaddress))
-
+ hosts = []
+
for host in sshhosts:
if isinstance(relpath, str):
assert not os.path.isabs(relpath), relpath
- host_init(host, relpath)
+ remoterootpath = relpath
else:
- host_init(host, relpath[host])
+ remoterootpath = relpath[host]
+ # XXX: because of NFS we do create different directories
+ # otherwise, .pyc files overlap
+ remoterootpath += "-" + host
+ gw = py.execnet.SshGateway(host)
+ hosts.append((host, gw, remoterootpath))
+
+ # rsyncing
+ rsync = HostRSync(rsync_roots)
+ for host, gw, remoterootpath in hosts:
+ def done(host=host):
+ reporter(report.HostReady(host))
+ reporter(report.HostRSyncing(host, remoterootpath))
+ rsync.add_target(gw, remoterootpath, done)
+ rsync.send(pkgdir.dirpath())
+
+ # hosts ready
+ for host, gw, remoterootpath in hosts:
+ ch = setup_slave(gw, os.path.join(remoterootpath, pkgdir.basename))
+ nodes.append(MasterNode(ch, reporter))
return nodes
@@ -62,15 +87,15 @@
pass
channel.gateway.exit()
-def bin_rsync(sources, sshaddress, destpath):
- _rsync = py.path.local.sysfind("rsync")
- assert destpath
- args = ["-az", "--delete-excluded",
- "--delete", "--exclude=.svn/", "--exclude=*.pyc", '--exclude=*~']
- if isinstance(sources, list):
- args += sources
- else:
- args.append(str(sources) + "/")
- args.append(sshaddress + ":" + str(destpath))
- print '*', 'rsync', ' '.join(args)
- _rsync.sysexec(*args)
+##def bin_rsync(sources, sshaddress, destpath):
+## _rsync = py.path.local.sysfind("rsync")
+## assert destpath
+## args = ["-az", "--delete-excluded",
+## "--delete", "--exclude=.svn/", "--exclude=*.pyc", '--exclude=*~']
+## if isinstance(sources, list):
+## args += sources
+## else:
+## args.append(str(sources) + "/")
+## args.append(sshaddress + ":" + str(destpath))
+## print '*', 'rsync', ' '.join(args)
+## _rsync.sysexec(*args)
Modified: py/branch/distributed/py/test/rsession/report.py
==============================================================================
--- py/branch/distributed/py/test/rsession/report.py (original)
+++ py/branch/distributed/py/test/rsession/report.py Mon Sep 4 14:09:33 2006
@@ -69,6 +69,11 @@
class CallFinish(CallEvent):
pass
+class HostRSyncing(ReportEvent):
+ def __init__(self, hostname, remoterootpath):
+ self.hostname = hostname
+ self.remoterootpath = remoterootpath
+
class HostReady(ReportEvent):
def __init__(self, hostname):
self.hostname = hostname
Modified: py/branch/distributed/py/test/rsession/rsession.py
==============================================================================
--- py/branch/distributed/py/test/rsession/rsession.py (original)
+++ py/branch/distributed/py/test/rsession/rsession.py Mon Sep 4 14:09:33 2006
@@ -49,6 +49,10 @@
if self.config.option.verbose:
print "Sending %s to %s" % (item.item,
item.channel.gateway.sshaddress)
+
+ def report_HostRSyncing(self, item):
+ print "%10s: RSYNC ==> %s" % (item.hostname[:10],
+ item.remoterootpath)
def report_HostReady(self, item):
print "%10s: READY" % item.hostname[:10]
@@ -220,9 +224,9 @@
else:
directories[host] = "pytestcache"
try:
- rsync_files = self.config.getinitialvalue("distrsync_files")
+ rsync_roots = self.config.getinitialvalue("distrsync_roots")
except:
- rsync_files = [''] # all files and directories in the pkgdir
+ rsync_roots = None # all files and directories in the pkgdir
try:
# XXX: use it like a command line option, but how?
startserverflag = self.config.getinitialvalue("startserver")
@@ -242,7 +246,7 @@
colitems = self.make_colitems(args, baseon=pkgdir.dirpath())
nodes = init_hosts(reporter, sshhosts, directories, pkgdir,
- rsync_files)
+ rsync_roots)
reporter(report.RsyncFinished())
def reporterror(data):
Copied: py/branch/distributed/py/test/rsession/rsync.py (from r31979, user/arigo/hack/misc/ftpy2.py)
==============================================================================
--- user/arigo/hack/misc/ftpy2.py (original)
+++ py/branch/distributed/py/test/rsession/rsync.py Mon Sep 4 14:09:33 2006
@@ -1,4 +1,5 @@
import py, os, stat
+from Queue import Queue
class RSync(object):
@@ -7,33 +8,50 @@
for name in options:
assert name in ('delete',)
self.options = options
- self.channels = []
+ self.channels = {}
+ self.receivequeue = Queue()
def filter(self, path):
return True
- def add_target(self, gateway, destdir):
+ def add_target(self, gateway, destdir, finishedcallback=None):
+ def itemcallback(req):
+ self.receivequeue.put((channel, req))
channel = gateway.remote_exec(REMOTE_SOURCE)
+ channel.setcallback(itemcallback, endmarker = None)
channel.send((str(destdir), self.options))
- self.channels.append(channel)
+ self.channels[channel] = finishedcallback
def send(self, sourcedir):
- sourcedir = str(sourcedir)
+ self.sourcedir = str(sourcedir)
# send directory structure and file timestamps/sizes
- self._send_directory_structure(sourcedir)
- # send modified file in a round-robin fashion to clients
- # XXX good enough for now :-(
+ self._send_directory_structure(self.sourcedir)
+ # send modified file to clients
while self.channels:
- for channel in self.channels:
- try:
- modified_rel_path = channel.receive()
- except EOFError:
- self.channels.remove(channel)
- continue
- modifiedpath = os.path.join(sourcedir, *modified_rel_path)
+ channel, req = self.receivequeue.get()
+ if req == 42:
+ # completion marker, this host is done
+ finishedcallback = self.channels.pop(channel)
+ if finishedcallback:
+ finishedcallback()
+ elif req is None:
+ # end-of-channel
+ if channel in self.channels:
+ # too early! we must have got an error
+ channel.waitclose()
+ # or else we raise one
+ raise IOError('connexion unexpectedly closed: %s ' % (
+ channel.gateway,))
+ else:
+ modified_rel_path = req
+ modifiedpath = os.path.join(self.sourcedir, *modified_rel_path)
+ #print channel.gateway.getremoteaddress(),
+ #print '/'.join(modified_rel_path)
f = open(modifiedpath, 'rb')
data = f.read()
f.close()
+ data = intern(data) # ! there is a reason for this: sharing
+ # multiple copies of the file's data
channel.send(data)
del data
@@ -108,57 +126,15 @@
mystamp = None
if mystamp != msg:
channel.send(relcomponents)
- modifiedfiles.append(path)
+ modifiedfiles.append((path, msg))
receive_directory_structure(destdir, [])
- for path in modifiedfiles:
+ for path, (time, size) in modifiedfiles:
data = channel.receive()
+ assert len(data) == size
f = open(path, 'wb')
f.write(data)
f.close()
+ os.utime(path, (time, time))
del data
+ channel.send(42)
"""
-
-# ____________________________________________________________
-
-
-def setup_module(mod):
- mod.gw = py.execnet.PopenGateway()
- mod.gw2 = py.execnet.PopenGateway()
-
-def teardown_module(mod):
- mod.gw.exit()
- mod.gw2.exit()
-
-
-def test_dirsync():
- base = py.test.ensuretemp('dirsync')
- dest = base.join('dest')
- dest2 = base.join('dest2')
- source = base.mkdir('source')
-
- for s in ('content1', 'content2-a-bit-longer'):
- source.ensure('subdir', 'file1').write(s)
- rsync = RSync()
- rsync.add_target(gw, dest)
- rsync.add_target(gw2, dest2)
- rsync.send(source)
- assert dest.join('subdir').check(dir=1)
- assert dest.join('subdir', 'file1').check(file=1)
- assert dest.join('subdir', 'file1').read() == s
- assert dest2.join('subdir').check(dir=1)
- assert dest2.join('subdir', 'file1').check(file=1)
- assert dest2.join('subdir', 'file1').read() == s
-
- source.join('subdir').remove('file1')
- rsync = RSync()
- rsync.add_target(gw2, dest2)
- rsync.add_target(gw, dest)
- rsync.send(source)
- assert dest.join('subdir', 'file1').check(file=1)
- assert dest2.join('subdir', 'file1').check(file=1)
- rsync = RSync(delete=True)
- rsync.add_target(gw2, dest2)
- rsync.add_target(gw, dest)
- rsync.send(source)
- assert not dest.join('subdir', 'file1').check()
- assert not dest2.join('subdir', 'file1').check()
Modified: py/branch/distributed/py/test/rsession/testing/test_rsession.py
==============================================================================
--- py/branch/distributed/py/test/rsession/testing/test_rsession.py (original)
+++ py/branch/distributed/py/test/rsession/testing/test_rsession.py Mon Sep 4 14:09:33 2006
@@ -5,7 +5,7 @@
import py
from py.__.test.rsession import report
from py.__.test.rsession.rsession import RSession
-from py.__.test.rsession.hostmanage import bin_rsync, init_hosts, teardown_hosts
+from py.__.test.rsession.hostmanage import init_hosts, teardown_hosts
from py.__.test.rsession.testing.test_slave import (funcfail_spec,
funcpass_spec, funcskip_spec, funcprint_spec, funcprintfail_spec)
@@ -16,7 +16,7 @@
setup_events = []
hosts = ["alskdjalsdkjasldkajlsd"]
cmd = "init_hosts(setup_events.append, hosts, 'pytesttest', pkgdir)"
- py.test.raises(py.process.cmdexec.Error, cmd)
+ py.test.raises((py.process.cmdexec.Error, IOError, EOFError), cmd)
#assert setup_events
def test_getpkdir():
@@ -74,38 +74,38 @@
py.test.skip("no test distribution ssh hosts specified")
cls.hosts = option.disthosts.split(",")
- def test_rsync_does_what_it_should(self):
- host = self.hosts[0]
- gw = py.execnet.SshGateway(host)
- channel = gw.remote_exec("""
- import tempfile
- tmp = tempfile.mkdtemp()
- try:
- channel.send(tmp)
- channel.receive() # sync
- import os
- p = os.path.join(tmp, "a")
- assert os.path.exists(p)
- p2 = os.path.join(p, "__init__.py")
- assert os.path.exists(p2)
- p3 = os.path.join(p, "x.pyc")
- assert not os.path.exists(p3)
- p4 = os.path.join(p, "__init__.pyc")
- assert not os.path.exists(p4)
- channel.send("ok")
- finally:
- import shutil
- shutil.rmtree(tmp)
- """)
- tmpdir = py.test.ensuretemp("rsynctest")
- tmpdir.ensure("a", "__init__.py")
- tmpdir.ensure("a", "no.pyc")
- tmpdir.ensure("a", "__init__.pyc")
- remote_tmpdir = channel.receive()
- bin_rsync(tmpdir, host, remote_tmpdir)
- channel.send(None)
- res = channel.receive()
- assert res == "ok"
+## def test_rsync_does_what_it_should(self):
+## host = self.hosts[0]
+## gw = py.execnet.SshGateway(host)
+## channel = gw.remote_exec("""
+## import tempfile
+## tmp = tempfile.mkdtemp()
+## try:
+## channel.send(tmp)
+## channel.receive() # sync
+## import os
+## p = os.path.join(tmp, "a")
+## assert os.path.exists(p)
+## p2 = os.path.join(p, "__init__.py")
+## assert os.path.exists(p2)
+## p3 = os.path.join(p, "x.pyc")
+## assert not os.path.exists(p3)
+## p4 = os.path.join(p, "__init__.pyc")
+## assert not os.path.exists(p4)
+## channel.send("ok")
+## finally:
+## import shutil
+## shutil.rmtree(tmp)
+## """)
+## tmpdir = py.test.ensuretemp("rsynctest")
+## tmpdir.ensure("a", "__init__.py")
+## tmpdir.ensure("a", "no.pyc")
+## tmpdir.ensure("a", "__init__.pyc")
+## remote_tmpdir = channel.receive()
+## bin_rsync(tmpdir, host, remote_tmpdir)
+## channel.send(None)
+## res = channel.receive()
+## assert res == "ok"
def test_example_distribution(self):
# XXX find a better way for the below
@@ -161,11 +161,11 @@
[node.channel for node in nodes], nodes)
count_rsyn_calls = [i for i in setup_events
- if isinstance(i, report.CallStart)]
+ if isinstance(i, report.HostRSyncing)]
assert len(count_rsyn_calls) == len(hosts)
- count_rsyn_ends = [i for i in setup_events
- if isinstance(i, report.CallFinish)]
- assert len(count_rsyn_ends) == len(hosts)
+ count_ready_calls = [i for i in setup_events
+ if isinstance(i, report.HostReady)]
+ assert len(count_ready_calls) == len(hosts)
# same for teardown events
teardown_wait_starts = [i for i in teardown_events
Added: py/branch/distributed/py/test/rsession/testing/test_rsync.py
==============================================================================
--- (empty file)
+++ py/branch/distributed/py/test/rsession/testing/test_rsync.py Mon Sep 4 14:09:33 2006
@@ -0,0 +1,45 @@
+import py
+from py.__.test.rsession.rsync import RSync
+
+
+def setup_module(mod):
+ mod.gw = py.execnet.PopenGateway()
+ mod.gw2 = py.execnet.PopenGateway()
+
+def teardown_module(mod):
+ mod.gw.exit()
+ mod.gw2.exit()
+
+
+def test_dirsync():
+ base = py.test.ensuretemp('dirsync')
+ dest = base.join('dest')
+ dest2 = base.join('dest2')
+ source = base.mkdir('source')
+
+ for s in ('content1', 'content2-a-bit-longer'):
+ source.ensure('subdir', 'file1').write(s)
+ rsync = RSync()
+ rsync.add_target(gw, dest)
+ rsync.add_target(gw2, dest2)
+ rsync.send(source)
+ assert dest.join('subdir').check(dir=1)
+ assert dest.join('subdir', 'file1').check(file=1)
+ assert dest.join('subdir', 'file1').read() == s
+ assert dest2.join('subdir').check(dir=1)
+ assert dest2.join('subdir', 'file1').check(file=1)
+ assert dest2.join('subdir', 'file1').read() == s
+
+ source.join('subdir').remove('file1')
+ rsync = RSync()
+ rsync.add_target(gw2, dest2)
+ rsync.add_target(gw, dest)
+ rsync.send(source)
+ assert dest.join('subdir', 'file1').check(file=1)
+ assert dest2.join('subdir', 'file1').check(file=1)
+ rsync = RSync(delete=True)
+ rsync.add_target(gw2, dest2)
+ rsync.add_target(gw, dest)
+ rsync.send(source)
+ assert not dest.join('subdir', 'file1').check()
+ assert not dest2.join('subdir', 'file1').check()
From arigo at codespeak.net Mon Sep 4 14:29:33 2006
From: arigo at codespeak.net (arigo at codespeak.net)
Date: Mon, 4 Sep 2006 14:29:33 +0200 (CEST)
Subject: [py-svn] r31984 - py/branch/distributed/py/test/rsession
Message-ID: <20060904122933.47F171006C@code0.codespeak.net>
Author: arigo
Date: Mon Sep 4 14:29:32 2006
New Revision: 31984
Modified:
py/branch/distributed/py/test/rsession/hostmanage.py
py/branch/distributed/py/test/rsession/rsync.py
Log:
Bug fix in the presence of symlinks. A few more details.
Modified: py/branch/distributed/py/test/rsession/hostmanage.py
==============================================================================
--- py/branch/distributed/py/test/rsession/hostmanage.py (original)
+++ py/branch/distributed/py/test/rsession/hostmanage.py Mon Sep 4 14:29:32 2006
@@ -12,9 +12,9 @@
class HostRSync(RSync):
- def __init__(self, rsync_files):
+ def __init__(self, rsync_roots):
RSync.__init__(self, delete=True)
- self.rsync_files = rsync_files
+ self.rsync_roots = rsync_roots
def filter(self, path):
if path.endswith('.pyc') or path.endswith('~'):
@@ -22,10 +22,10 @@
dir, base = os.path.split(path)
if base == '.svn':
return False
- if self.rsync_files is None or dir != self.sourcedir:
+ if self.rsync_roots is None or dir != self.sourcedir:
return True
else:
- return base in self.rsync_files
+ return base in self.rsync_roots
def init_hosts(reporter, sshhosts, relpath, pkgdir, rsync_roots=None):
Modified: py/branch/distributed/py/test/rsession/rsync.py
==============================================================================
--- py/branch/distributed/py/test/rsession/rsync.py (original)
+++ py/branch/distributed/py/test/rsession/rsync.py Mon Sep 4 14:29:32 2006
@@ -24,6 +24,8 @@
def send(self, sourcedir):
self.sourcedir = str(sourcedir)
+ # normalize a trailing '/' away
+ self.sourcedir = os.path.dirname(os.path.join(self.sourcedir, 'x'))
# send directory structure and file timestamps/sizes
self._send_directory_structure(self.sourcedir)
# send modified file to clients
@@ -77,7 +79,7 @@
for p in subpaths:
self._send_directory_structure(p)
elif stat.S_ISLNK(st.st_mode):
- pass # ignore symlinks for now
+ self._broadcast(None) # ignore symlinks for now
else:
raise ValueError, "cannot sync %r" % (path,)
@@ -117,7 +119,7 @@
if othername not in entrynames:
otherpath = os.path.join(path, othername)
remove(otherpath)
- else:
+ elif msg is not None:
if st and stat.S_ISREG(st.st_mode):
mystamp = (st.st_mtime, st.st_size)
else:
From arigo at codespeak.net Mon Sep 4 14:41:04 2006
From: arigo at codespeak.net (arigo at codespeak.net)
Date: Mon, 4 Sep 2006 14:41:04 +0200 (CEST)
Subject: [py-svn] r31985 - py/branch/distributed/py/test/rsession
Message-ID: <20060904124104.F1DDC1006C@code0.codespeak.net>
Author: arigo
Date: Mon Sep 4 14:41:03 2006
New Revision: 31985
Modified:
py/branch/distributed/py/test/rsession/rsync.py
Log:
(pedronis, arigo)
Also use an md5 checksum to avoid sending the content of files whose
mtime does not match, but whose content matches.
Modified: py/branch/distributed/py/test/rsession/rsync.py
==============================================================================
--- py/branch/distributed/py/test/rsession/rsync.py (original)
+++ py/branch/distributed/py/test/rsession/rsync.py Mon Sep 4 14:41:03 2006
@@ -1,4 +1,4 @@
-import py, os, stat
+import py, os, stat, md5
from Queue import Queue
@@ -45,15 +45,19 @@
raise IOError('connexion unexpectedly closed: %s ' % (
channel.gateway,))
else:
- modified_rel_path = req
+ modified_rel_path, checksum = req
modifiedpath = os.path.join(self.sourcedir, *modified_rel_path)
#print channel.gateway.getremoteaddress(),
#print '/'.join(modified_rel_path)
f = open(modifiedpath, 'rb')
data = f.read()
f.close()
- data = intern(data) # ! there is a reason for this: sharing
- # multiple copies of the file's data
+ if checksum is not None and checksum == md5.md5(data).digest():
+ data = None # not really modified
+ else:
+ # ! there is a reason for the interning:
+ # sharing multiple copies of the file's data
+ data = intern(data)
channel.send(data)
del data
@@ -85,7 +89,7 @@
REMOTE_SOURCE = """
- import os, stat, shutil
+ import os, stat, shutil, md5
destdir, options = channel.receive()
modifiedfiles = []
@@ -120,22 +124,30 @@
otherpath = os.path.join(path, othername)
remove(otherpath)
elif msg is not None:
- if st and stat.S_ISREG(st.st_mode):
- mystamp = (st.st_mtime, st.st_size)
- else:
- if st:
+ checksum = None
+ if st:
+ if stat.S_ISREG(st.st_mode):
+ msg_mtime, msg_size = msg
+ if msg_size != st.st_size:
+ pass
+ elif msg_mtime != st.st_mtime:
+ f = open(path, 'rb')
+ checksum = md5.md5(f.read()).digest()
+ f.close()
+ else:
+ return # already fine
+ else:
remove(path)
- mystamp = None
- if mystamp != msg:
- channel.send(relcomponents)
- modifiedfiles.append((path, msg))
+ channel.send((relcomponents, checksum))
+ modifiedfiles.append((path, msg))
receive_directory_structure(destdir, [])
for path, (time, size) in modifiedfiles:
data = channel.receive()
- assert len(data) == size
- f = open(path, 'wb')
- f.write(data)
- f.close()
+ if data is not None:
+ assert len(data) == size
+ f = open(path, 'wb')
+ f.write(data)
+ f.close()
os.utime(path, (time, time))
del data
channel.send(42)
From guido at codespeak.net Wed Sep 6 14:07:49 2006
From: guido at codespeak.net (guido at codespeak.net)
Date: Wed, 6 Sep 2006 14:07:49 +0200 (CEST)
Subject: [py-svn] r32029 - in py/dist/py/path/local: . testing
Message-ID: <20060906120749.B142E1007A@code0.codespeak.net>
Author: guido
Date: Wed Sep 6 14:07:47 2006
New Revision: 32029
Modified:
py/dist/py/path/local/local.py
py/dist/py/path/local/testing/test_local.py
Log:
Check was a bit too tight, as it didn't allow creating a new path from e.g.
a py.path.svnwc instance.
Modified: py/dist/py/path/local/local.py
==============================================================================
--- py/dist/py/path/local/local.py (original)
+++ py/dist/py/path/local/local.py Wed Sep 6 14:07:47 2006
@@ -53,17 +53,17 @@
Note also that passing in a local path object will simply return
the exact same path object. Use new() to get a new copy.
"""
- if isinstance(path, cls):
+ if isinstance(path, common.FSPathBase):
if path.__class__ == cls:
return path
path = path.strpath
# initialize the path
self = object.__new__(cls)
- if not path:
+ if not path:
self.strpath = os.getcwd()
- elif isinstance(path, str):
+ elif isinstance(path, str):
self.strpath = os.path.abspath(os.path.normpath(str(path)))
- else:
+ else:
raise ValueError(
"can only pass None, Path instances "
"or non-empty strings to LocalPath")
@@ -155,26 +155,26 @@
if not args:
return self
strpath = self.strpath
- sep = self.sep
- strargs = [str(x) for x in args]
+ sep = self.sep
+ strargs = [str(x) for x in args]
if kwargs.get('abs', 0):
for i in range(len(strargs)-1, -1, -1):
if os.path.isabs(strargs[i]):
- strpath = strargs[i]
+ strpath = strargs[i]
strargs = strargs[i+1:]
break
- for arg in strargs:
- arg = arg.strip(sep)
- if py.std.sys.platform == 'win32':
- # allow unix style paths even on windows.
- arg = arg.strip('/')
+ for arg in strargs:
+ arg = arg.strip(sep)
+ if py.std.sys.platform == 'win32':
+ # allow unix style paths even on windows.
+ arg = arg.strip('/')
arg = arg.replace('/', sep)
- if arg:
- if not strpath.endswith(sep):
- strpath += sep
- strpath += arg
+ if arg:
+ if not strpath.endswith(sep):
+ strpath += sep
+ strpath += arg
obj = self.new()
- obj.strpath = strpath
+ obj.strpath = strpath
return obj
def __eq__(self, other):
@@ -276,7 +276,7 @@
return p._ensuredirs()
else:
p.dirpath()._ensuredirs()
- if not p.check(file=1):
+ if not p.check(file=1):
p.write("")
return p
@@ -324,77 +324,77 @@
""" return string representation of the Path. """
return self.strpath
- def pypkgpath(self, pkgname=None):
- """ return the path's package path by looking for the given
- pkgname. If pkgname is None then look for the last
- directory upwards which still contains an __init__.py.
- Return None if a pkgpath can not be determined.
- """
- pkgpath = None
- for parent in self.parts(reverse=True):
- if pkgname is None:
- if parent.check(file=1):
+ def pypkgpath(self, pkgname=None):
+ """ return the path's package path by looking for the given
+ pkgname. If pkgname is None then look for the last
+ directory upwards which still contains an __init__.py.
+ Return None if a pkgpath can not be determined.
+ """
+ pkgpath = None
+ for parent in self.parts(reverse=True):
+ if pkgname is None:
+ if parent.check(file=1):
+ continue
+ if parent.join('__init__.py').check():
+ pkgpath = parent
continue
- if parent.join('__init__.py').check():
- pkgpath = parent
- continue
- return pkgpath
- else:
- if parent.basename == pkgname:
- return parent
- return pkgpath
-
- def _prependsyspath(self, path):
- s = str(path)
- if s != sys.path[0]:
+ return pkgpath
+ else:
+ if parent.basename == pkgname:
+ return parent
+ return pkgpath
+
+ def _prependsyspath(self, path):
+ s = str(path)
+ if s != sys.path[0]:
#print "prepending to sys.path", s
- sys.path.insert(0, s)
+ sys.path.insert(0, s)
- def pyimport(self, modname=None, ensuresyspath=True):
- """ return path as an imported python module.
- if modname is None, look for the containing package
- and construct an according module name.
- The module will be put/looked up in sys.modules.
- """
- if not self.check():
- raise py.error.ENOENT(self)
+ def pyimport(self, modname=None, ensuresyspath=True):
+ """ return path as an imported python module.
+ if modname is None, look for the containing package
+ and construct an according module name.
+ The module will be put/looked up in sys.modules.
+ """
+ if not self.check():
+ raise py.error.ENOENT(self)
#print "trying to import", self
pkgpath = None
- if modname is None:
+ if modname is None:
pkgpath = self.pypkgpath()
- if pkgpath is not None:
- if ensuresyspath:
+ if pkgpath is not None:
+ if ensuresyspath:
self._prependsyspath(pkgpath.dirpath())
pkg = __import__(pkgpath.basename, None, None, [])
assert py.path.local(pkg.__file__).realpath().relto(
pkgpath.realpath())
- if hasattr(pkg, '__package__'):
- modname = pkg.__package__.getimportname(self)
+ if hasattr(pkg, '__package__'):
+ modname = pkg.__package__.getimportname(self)
assert modname is not None, "package %s doesn't know %s" % (
pkg.__name__, self)
- else:
+ else:
names = self.new(ext='').relto(pkgpath.dirpath())
- names = names.split(self.sep)
- modname = ".".join(names)
- else:
- # no package scope, still make it possible
- if ensuresyspath:
+ names = names.split(self.sep)
+ modname = ".".join(names)
+ else:
+ # no package scope, still make it possible
+ if ensuresyspath:
self._prependsyspath(self.dirpath())
- modname = self.purebasename
+ modname = self.purebasename
return __import__(modname, None, None, ['__doc__'])
- else:
- try:
+ else:
+ try:
return sys.modules[modname]
- except KeyError:
- # we have a custom modname, do a pseudo-import
+ except KeyError:
+ # we have a custom modname, do a pseudo-import
mod = py.std.new.module(modname)
- mod.__file__ = str(self)
+ mod.__file__ = str(self)
sys.modules[modname] = mod
- try:
- execfile(str(self), mod.__dict__)
- except:
- del sys.modules[modname]
- raise
+ try:
+ execfile(str(self), mod.__dict__)
+ except:
+ del sys.modules[modname]
+ raise
return mod
def getpymodule(self):
@@ -474,12 +474,12 @@
Note: This is probably not working on plain win32 systems
but may work on cygwin.
"""
- if os.path.isabs(name):
- p = py.path.local(name)
- if p.check(file=1):
- return p
- else:
- if py.std.sys.platform == 'win32':
+ if os.path.isabs(name):
+ p = py.path.local(name)
+ if p.check(file=1):
+ return p
+ else:
+ if py.std.sys.platform == 'win32':
paths = py.std.os.environ['Path'].split(';')
try:
systemroot = os.environ['SYSTEMROOT']
@@ -488,13 +488,13 @@
else:
paths = [re.sub('%SystemRoot%', systemroot, path)
for path in paths]
- tryadd = '', '.exe', '.com', '.bat' # XXX add more?
- else:
- paths = py.std.os.environ['PATH'].split(':')
+ tryadd = '', '.exe', '.com', '.bat' # XXX add more?
+ else:
+ paths = py.std.os.environ['PATH'].split(':')
tryadd = ('',)
- for x in paths:
- for addext in tryadd:
+ for x in paths:
+ for addext in tryadd:
p = py.path.local(x).join(name, abs=True) + addext
try:
if p.check(file=1):
@@ -527,7 +527,7 @@
dpath = cls(tempfile.mktemp())
try:
dpath.mkdir()
- except (py.error.EEXIST, py.error.EPERM, py.error.EACCES):
+ except (py.error.EEXIST, py.error.EPERM, py.error.EACCES):
continue
return dpath
raise py.error.ENOENT(dpath, "could not create tempdir, %d tries" % tries)
@@ -592,7 +592,7 @@
pass # assume that it means that there is no 'lf'
try:
path.remove(rec=1)
- except py.error.Error:
+ except py.error.Error:
pass
return udir
make_numbered_dir = classmethod(make_numbered_dir)
Modified: py/dist/py/path/local/testing/test_local.py
==============================================================================
--- py/dist/py/path/local/testing/test_local.py (original)
+++ py/dist/py/path/local/testing/test_local.py Wed Sep 6 14:07:47 2006
@@ -149,6 +149,16 @@
assert t == newfile
assert newfile.check(dir=1)
+ def test_init_from_path(self):
+ l = local()
+ l2 = local(l)
+ assert l2 is l
+
+ wc = py.path.svnwc('.')
+ l3 = local(wc)
+ assert l3 is not wc
+ assert l3.strpath == wc.strpath
+ assert not hasattr(l3, 'commit')
class TestExecutionOnWindows(LocalSetup):
disabled = py.std.sys.platform != 'win32'
From briandorsey at codespeak.net Mon Sep 11 12:42:11 2006
From: briandorsey at codespeak.net (briandorsey at codespeak.net)
Date: Mon, 11 Sep 2006 12:42:11 +0200 (CEST)
Subject: [py-svn] r32142 - py/dist/py/execnet
Message-ID: <20060911104211.6FAAC1007E@code0.codespeak.net>
Author: briandorsey
Date: Mon Sep 11 12:42:10 2006
New Revision: 32142
Modified:
py/dist/py/execnet/NOTES
Log:
Small spelling fix.
Modified: py/dist/py/execnet/NOTES
==============================================================================
--- py/dist/py/execnet/NOTES (original)
+++ py/dist/py/execnet/NOTES Mon Sep 11 12:42:10 2006
@@ -95,7 +95,7 @@
* waitclose() wait for a non-"opened" state
-Assuming the channel is connected and the connexion is alive, the local state
+Assuming the channel is connected and the connection is alive, the local state
eventually influences the state of the corresponding remote channel object:
local | opened sendonly closed deleted
From fijal at codespeak.net Mon Sep 11 12:49:24 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Mon, 11 Sep 2006 12:49:24 +0200 (CEST)
Subject: [py-svn] r32143 - in py/branch/distributed/py/test/rsession: .
webdata
Message-ID: <20060911104924.BD4171007E@code0.codespeak.net>
Author: fijal
Date: Mon Sep 11 12:49:20 2006
New Revision: 32143
Added:
py/branch/distributed/py/test/rsession/webdata/__init__.py (contents, props changed)
py/branch/distributed/py/test/rsession/webdata/json.py (contents, props changed)
py/branch/distributed/py/test/rsession/webdata/source.js
Modified:
py/branch/distributed/py/test/rsession/web.py
py/branch/distributed/py/test/rsession/webjs.py
Log:
Fixed web stuff to be not dependant on pypy.
Modified: py/branch/distributed/py/test/rsession/web.py
==============================================================================
--- py/branch/distributed/py/test/rsession/web.py (original)
+++ py/branch/distributed/py/test/rsession/web.py Mon Sep 11 12:49:20 2006
@@ -10,20 +10,13 @@
import re
import random
-from pypy.translator.js import commproxy
-
-commproxy.USE_MOCHIKIT = False
-
import sys
-from pypy.rpython.ootypesystem.bltregistry import MethodDesc, BasicExternal, \
- described
from py.__.test.rsession.rsession import RSession
from py.__.test.rsession import report
from py.__.test import collect
-from pypy.translator.js.main import rpython2javascript
import os
-from pypy.translator.js import json
+from py.__.test.rsession.webdata import json
import Queue
@@ -33,6 +26,25 @@
return s.replace("&", "&").replace("<", "<").replace(">", ">"). \
replace("'", "\\'").replace(" ", " ").replace("\n", "
")
+try:
+ from pypy.rpython.ootypesystem.bltregistry import MethodDesc, BasicExternal,\
+ described
+ from pypy.translator.js.main import rpython2javascript, Options
+ from pypy.translator.js import commproxy
+
+ Options.debug_transform = True
+ commproxy.USE_MOCHIKIT = False
+ IMPORTED_PYPY = True
+except ImportError:
+ class BasicExternal(object):
+ pass
+
+ def described(*args, **kwargs):
+ def decorator(func):
+ return func
+ return decorator
+
+ IMPORTED_PYPY = False
class ExportedMethods(BasicExternal):
_render_xmlhttp = True
@@ -222,8 +234,14 @@
self.serve_data("text/html", data)
def run_jssource(self):
- from py.__.test.rsession import webjs
- self.serve_data("text/javascript", rpython2javascript(webjs, ["main", "show_skip", "show_traceback"]))
+ if IMPORTED_PYPY:
+ from py.__.test.rsession import webjs
+ self.serve_data("text/javascript", rpython2javascript(webjs,
+ ["main", "show_skip", "show_traceback"], Options))
+ else:
+ js_name = py.path.local(__file__).dirpath("webdata").join("source.js")
+ js_source = open(str(js_name), "r").read()
+ self.serve_data("text/javascript", js_source)
def serve_data(self, content_type, data):
self.send_response(200)
Added: py/branch/distributed/py/test/rsession/webdata/__init__.py
==============================================================================
Added: py/branch/distributed/py/test/rsession/webdata/json.py
==============================================================================
--- (empty file)
+++ py/branch/distributed/py/test/rsession/webdata/json.py Mon Sep 11 12:49:20 2006
@@ -0,0 +1,310 @@
+import string
+import types
+
+## json.py implements a JSON (http://json.org) reader and writer.
+## Copyright (C) 2005 Patrick D. Logan
+## Contact mailto:patrickdlogan at stardecisions.com
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+class _StringGenerator(object):
+ def __init__(self, string):
+ self.string = string
+ self.index = -1
+ def peek(self):
+ i = self.index + 1
+ if i < len(self.string):
+ return self.string[i]
+ else:
+ return None
+ def next(self):
+ self.index += 1
+ if self.index < len(self.string):
+ return self.string[self.index]
+ else:
+ raise StopIteration
+ def all(self):
+ return self.string
+
+class WriteException(Exception):
+ pass
+
+class ReadException(Exception):
+ pass
+
+class JsonReader(object):
+ hex_digits = {'A': 10,'B': 11,'C': 12,'D': 13,'E': 14,'F':15}
+ escapes = {'t':'\t','n':'\n','f':'\f','r':'\r','b':'\b'}
+
+ def read(self, s):
+ self._generator = _StringGenerator(s)
+ result = self._read()
+ return result
+
+ def _read(self):
+ self._eatWhitespace()
+ peek = self._peek()
+ if peek is None:
+ raise ReadException, "Nothing to read: '%s'" % self._generator.all()
+ if peek == '{':
+ return self._readObject()
+ elif peek == '[':
+ return self._readArray()
+ elif peek == '"':
+ return self._readString()
+ elif peek == '-' or peek.isdigit():
+ return self._readNumber()
+ elif peek == 't':
+ return self._readTrue()
+ elif peek == 'f':
+ return self._readFalse()
+ elif peek == 'n':
+ return self._readNull()
+ elif peek == '/':
+ self._readComment()
+ return self._read()
+ else:
+ raise ReadException, "Input is not valid JSON: '%s'" % self._generator.all()
+
+ def _readTrue(self):
+ self._assertNext('t', "true")
+ self._assertNext('r', "true")
+ self._assertNext('u', "true")
+ self._assertNext('e', "true")
+ return True
+
+ def _readFalse(self):
+ self._assertNext('f', "false")
+ self._assertNext('a', "false")
+ self._assertNext('l', "false")
+ self._assertNext('s', "false")
+ self._assertNext('e', "false")
+ return False
+
+ def _readNull(self):
+ self._assertNext('n', "null")
+ self._assertNext('u', "null")
+ self._assertNext('l', "null")
+ self._assertNext('l', "null")
+ return None
+
+ def _assertNext(self, ch, target):
+ if self._next() != ch:
+ raise ReadException, "Trying to read %s: '%s'" % (target, self._generator.all())
+
+ def _readNumber(self):
+ isfloat = False
+ result = self._next()
+ peek = self._peek()
+ while peek is not None and (peek.isdigit() or peek == "."):
+ isfloat = isfloat or peek == "."
+ result = result + self._next()
+ peek = self._peek()
+ try:
+ if isfloat:
+ return float(result)
+ else:
+ return int(result)
+ except ValueError:
+ raise ReadException, "Not a valid JSON number: '%s'" % result
+
+ def _readString(self):
+ result = ""
+ assert self._next() == '"'
+ try:
+ while self._peek() != '"':
+ ch = self._next()
+ if ch == "\\":
+ ch = self._next()
+ if ch in 'brnft':
+ ch = self.escapes[ch]
+ elif ch == "u":
+ ch4096 = self._next()
+ ch256 = self._next()
+ ch16 = self._next()
+ ch1 = self._next()
+ n = 4096 * self._hexDigitToInt(ch4096)
+ n += 256 * self._hexDigitToInt(ch256)
+ n += 16 * self._hexDigitToInt(ch16)
+ n += self._hexDigitToInt(ch1)
+ ch = unichr(n)
+ elif ch not in '"/\\':
+ raise ReadException, "Not a valid escaped JSON character: '%s' in %s" % (ch, self._generator.all())
+ result = result + ch
+ except StopIteration:
+ raise ReadException, "Not a valid JSON string: '%s'" % self._generator.all()
+ assert self._next() == '"'
+ return result
+
+ def _hexDigitToInt(self, ch):
+ try:
+ result = self.hex_digits[ch.upper()]
+ except KeyError:
+ try:
+ result = int(ch)
+ except ValueError:
+ raise ReadException, "The character %s is not a hex digit." % ch
+ return result
+
+ def _readComment(self):
+ assert self._next() == "/"
+ second = self._next()
+ if second == "/":
+ self._readDoubleSolidusComment()
+ elif second == '*':
+ self._readCStyleComment()
+ else:
+ raise ReadException, "Not a valid JSON comment: %s" % self._generator.all()
+
+ def _readCStyleComment(self):
+ try:
+ done = False
+ while not done:
+ ch = self._next()
+ done = (ch == "*" and self._peek() == "/")
+ if not done and ch == "/" and self._peek() == "*":
+ raise ReadException, "Not a valid JSON comment: %s, '/*' cannot be embedded in the comment." % self._generator.all()
+ self._next()
+ except StopIteration:
+ raise ReadException, "Not a valid JSON comment: %s, expected */" % self._generator.all()
+
+ def _readDoubleSolidusComment(self):
+ try:
+ ch = self._next()
+ while ch != "\r" and ch != "\n":
+ ch = self._next()
+ except StopIteration:
+ pass
+
+ def _readArray(self):
+ result = []
+ assert self._next() == '['
+ done = self._peek() == ']'
+ while not done:
+ item = self._read()
+ result.append(item)
+ self._eatWhitespace()
+ done = self._peek() == ']'
+ if not done:
+ ch = self._next()
+ if ch != ",":
+ raise ReadException, "Not a valid JSON array: '%s' due to: '%s'" % (self._generator.all(), ch)
+ assert ']' == self._next()
+ return result
+
+ def _readObject(self):
+ result = {}
+ assert self._next() == '{'
+ done = self._peek() == '}'
+ while not done:
+ key = self._read()
+ if type(key) is not types.StringType:
+ raise ReadException, "Not a valid JSON object key (should be a string): %s" % key
+ self._eatWhitespace()
+ ch = self._next()
+ if ch != ":":
+ raise ReadException, "Not a valid JSON object: '%s' due to: '%s'" % (self._generator.all(), ch)
+ self._eatWhitespace()
+ val = self._read()
+ result[key] = val
+ self._eatWhitespace()
+ done = self._peek() == '}'
+ if not done:
+ ch = self._next()
+ if ch != ",":
+ raise ReadException, "Not a valid JSON array: '%s' due to: '%s'" % (self._generator.all(), ch)
+ assert self._next() == "}"
+ return result
+
+ def _eatWhitespace(self):
+ p = self._peek()
+ while p is not None and p in string.whitespace or p == '/':
+ if p == '/':
+ self._readComment()
+ else:
+ self._next()
+ p = self._peek()
+
+ def _peek(self):
+ return self._generator.peek()
+
+ def _next(self):
+ return self._generator.next()
+
+class JsonWriter(object):
+
+ def _append(self, s):
+ self._results.append(s)
+
+ def write(self, obj, escaped_forward_slash=False):
+ self._escaped_forward_slash = escaped_forward_slash
+ self._results = []
+ self._write(obj)
+ return "".join(self._results)
+
+ def _write(self, obj):
+ ty = type(obj)
+ if ty is types.DictType:
+ n = len(obj)
+ self._append("{")
+ for k, v in obj.items():
+ self._write(k)
+ self._append(":")
+ self._write(v)
+ n = n - 1
+ if n > 0:
+ self._append(",")
+ self._append("}")
+ elif ty is types.ListType or ty is types.TupleType:
+ n = len(obj)
+ self._append("[")
+ for item in obj:
+ self._write(item)
+ n = n - 1
+ if n > 0:
+ self._append(",")
+ self._append("]")
+ elif ty is types.StringType or ty is types.UnicodeType:
+ self._append('"')
+ obj = obj.replace('\\', r'\\')
+ if self._escaped_forward_slash:
+ obj = obj.replace('/', r'\/')
+ obj = obj.replace('"', r'\"')
+ obj = obj.replace('\b', r'\b')
+ obj = obj.replace('\f', r'\f')
+ obj = obj.replace('\n', r'\n')
+ obj = obj.replace('\r', r'\r')
+ obj = obj.replace('\t', r'\t')
+ self._append(obj)
+ self._append('"')
+ elif ty is types.IntType or ty is types.LongType:
+ self._append(str(obj))
+ elif ty is types.FloatType:
+ self._append("%f" % obj)
+ elif obj is True:
+ self._append("true")
+ elif obj is False:
+ self._append("false")
+ elif obj is None:
+ self._append("null")
+ else:
+ raise WriteException, "Cannot write in JSON: %s" % repr(obj)
+
+def write(obj, escaped_forward_slash=False):
+ return JsonWriter().write(obj, escaped_forward_slash)
+
+def read(s):
+ return JsonReader().read(s)
Added: py/branch/distributed/py/test/rsession/webdata/source.js
==============================================================================
--- (empty file)
+++ py/branch/distributed/py/test/rsession/webdata/source.js Mon Sep 11 12:49:20 2006
@@ -0,0 +1,3129 @@
+// starts hand written code
+MALLOC_ZERO_FILLED = 0
+
+try {
+ log;
+ print = log;
+} catch(e) {
+}
+
+Function.prototype.method = function (name, func) {
+ this.prototype[name] = func;
+ return this;
+};
+
+function inherits(child, parent) {
+ child.parent = parent;
+ for (i in parent.prototype) {
+ if (!child.prototype[i]) {
+ child.prototype[i] = parent.prototype[i];
+ }
+ }
+}
+
+function isinstanceof(self, what) {
+ t = self.constructor;
+ while ( t ) {
+ if (t == what) {
+ return (true);
+ }
+ t = t.parent;
+ }
+ return (false);
+}
+
+/*function delitem(fn, l, i) {
+ for(j = i; j < l.length-1; ++j) {
+ l[j] = l[j+1];
+ }
+ l.length--;
+}*/
+
+function strcmp(s1, s2) {
+ if ( s1 < s2 ) {
+ return ( -1 );
+ } else if ( s1 == s2 ) {
+ return ( 0 );
+ }
+ return (1);
+}
+
+function startswith(s1, s2) {
+ if (s1.lengths1.length) {
+ return(false);
+ }
+ for (i = s1.length-s2.length; i' );
+}
+
+inherits(pypy_translator_transformer_debug_TracebackHandler,Object);
+pypy_translator_transformer_debug_TracebackHandler.prototype.oenter_variant0 = function (tb_str_0,data_0,filename_0,lineno_0){
+ var v251,v252,v253,v254,v255,v256,v257,v258,v259;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v252 = this.otb;
+ v253 = v252;
+ v254 = new Object();
+ v254.item0 = tb_str_0;
+ v254.item1 = data_0;
+ v254.item2 = filename_0;
+ v254.item3 = lineno_0;
+ ll_append__List_Record_item2__String__ite_Record_i ( v253,v254 );
+ block = 1;
+ break;
+ case 1:
+ return ( v251 );
+ }
+ }
+}
+
+pypy_translator_transformer_debug_TracebackHandler.prototype.oleave_variant0 = function (tb_str_1){
+ var v268,v269,v270,v271,self_3,tb_str_2,num_0,v272,v273,self_4,tb_str_3,num_1,v274,v275,v276,v277,v278,self_5,tb_str_4,v279,v280,self_6,tb_str_5,num_2,v281,v282,v283,v284;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v269 = this.otb;
+ v270 = ll_len__List_Record_item2__String__ite ( v269 );
+ v271 = (v270-1);
+ self_3 = this;
+ tb_str_2 = tb_str_1;
+ num_0 = v271;
+ block = 1;
+ break;
+ case 1:
+ v272 = (num_0>=0);
+ v273 = v272;
+ if (v273 == true)
+ {
+ self_4 = self_3;
+ tb_str_3 = tb_str_2;
+ num_1 = num_0;
+ block = 3;
+ break;
+ }
+ else{
+ block = 2;
+ break;
+ }
+ case 2:
+ return ( v268 );
+ case 3:
+ v274 = self_4.otb;
+ v275 = ll_getitem_nonneg__dum_nocheckConst_List_Record_it ( undefined,v274,num_1 );
+ v276 = v275.item0;
+ v277 = ll_streq__String_String ( v276,tb_str_3 );
+ v278 = v277;
+ if (v278 == true)
+ {
+ self_6 = self_4;
+ tb_str_5 = tb_str_3;
+ num_2 = num_1;
+ block = 5;
+ break;
+ }
+ else{
+ self_5 = self_4;
+ tb_str_4 = tb_str_3;
+ v279 = num_1;
+ block = 4;
+ break;
+ }
+ case 4:
+ v280 = (v279-1);
+ self_3 = self_5;
+ tb_str_2 = tb_str_4;
+ num_0 = v280;
+ block = 1;
+ break;
+ case 5:
+ v281 = self_6.otb;
+ v282 = ll_newslice__Signed_Signed ( 0,num_2 );
+ v283 = ll_listslice__List_Record_item2__String__ite_List_ ( undefined,v281,v282 );
+ self_6.otb = v283;
+ self_5 = self_6;
+ tb_str_4 = tb_str_5;
+ v279 = num_2;
+ block = 4;
+ break;
+ }
+ }
+}
+
+pypy_translator_transformer_debug_TracebackHandler.prototype.otraceback_variant0 = function (){
+ var v324,v325;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v325 = this.otb;
+ v324 = v325;
+ block = 1;
+ break;
+ case 1:
+ return ( v324 );
+ }
+ }
+}
+
+function ll_len__List_Record_item2__String__ite (l_3) {
+ var v285,v286,v287;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v286 = l_3;
+ v287 = v286.length;
+ v285 = v287;
+ block = 1;
+ break;
+ case 1:
+ return ( v285 );
+ }
+ }
+}
+
+function __show_traceback (tb_0,exc_0) {
+ var v184,v185,v186,v187,v188,tb_1,exc_1,v189,tb_2,exc_2,debug_div_0,v190,v191,v192,v193,v194,v195,v196,v197,v198,v199,v200,v201,v202,v203,v204,exc_3,txt_0,v205,v206,last_exc_value_48,exc_4,txt_1,v207,v208,v209,v210,v211,v212,v213,v214,v215,v216,v217,v218,v219,v220,v221,v222,v223,v224,v225,v226,v227,v228,v229,v230,v231,v232,v233,v234,v235,v236,v237,v238,v239,v240,v241,v242,v243,v244,v245,exc_5,v246,v247,v248,v249,v250;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v185 = document;
+ v186 = v185;
+ v187 = v186.getElementById(__consts_0.const_str__10);
+ v188 = !!v187;
+ if (v188 == true)
+ {
+ tb_2 = tb_0;
+ exc_2 = exc_0;
+ debug_div_0 = v187;
+ block = 2;
+ break;
+ }
+ else{
+ tb_1 = tb_0;
+ exc_1 = exc_0;
+ block = 1;
+ break;
+ }
+ case 1:
+ v189 = create_debug_div ( );
+ tb_2 = tb_1;
+ exc_2 = exc_1;
+ debug_div_0 = v189;
+ block = 2;
+ break;
+ case 2:
+ v190 = document;
+ v191 = v190;
+ v192 = v191.createElement(__consts_0.const_str__11);
+ v193 = v192.style;
+ v193.color = __consts_0.const_str__12;
+ v195 = debug_div_0;
+ v195.appendChild(v192);
+ v197 = document;
+ v198 = v197;
+ v199 = v198.createTextNode(__consts_0.const_str__9);
+ v200 = v192;
+ v200.appendChild(v199);
+ v202 = 1;
+ v203 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,tb_2,v202 );
+ v204 = ll_listiter__Record_index__Signed__iterable_List_R ( undefined,v203 );
+ exc_3 = exc_2;
+ txt_0 = v199;
+ v205 = v204;
+ block = 3;
+ break;
+ case 3:
+ try {
+ v206 = ll_listnext__Record_index__Signed__iterable_ ( v205 );
+ exc_4 = exc_3;
+ txt_1 = txt_0;
+ v207 = v205;
+ v208 = v206;
+ block = 4;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_StopIteration))
+ {
+ exc_5 = exc_3;
+ v246 = txt_0;
+ block = 5;
+ break;
+ }
+ throw(exc);
+ }
+ case 4:
+ v209 = v208.item0;
+ v210 = v208.item1;
+ v211 = v208.item2;
+ v212 = v208.item3;
+ v213 = new Object();
+ v213.item0 = v209;
+ v213.item1 = v210;
+ v216 = v213.item0;
+ v217 = v213.item1;
+ v218 = new StringBuilder();
+ v219 = v216.toString();
+ v218.ll_append(v219);
+ v218.ll_append(__consts_0.const_str__13);
+ v222 = v217.toString();
+ v218.ll_append(v222);
+ v224 = v218.ll_build();
+ v225 = escape ( v224 );
+ v226 = new Object();
+ v226.item0 = v211;
+ v226.item1 = v212;
+ v229 = v226.item0;
+ v230 = v226.item1;
+ v231 = new StringBuilder();
+ v231.ll_append(__consts_0.const_str__14);
+ v233 = v229.toString();
+ v231.ll_append(v233);
+ v231.ll_append(__consts_0.const_str__15);
+ v236 = v230.toString();
+ v231.ll_append(v236);
+ v231.ll_append(__consts_0.const_str__16);
+ v239 = v231.ll_build();
+ v240 = escape ( v239 );
+ v241 = txt_1.nodeValue;
+ v242 = ll_strconcat__String_String ( v225,__consts_0.const_str__16 );
+ v243 = ll_strconcat__String_String ( v242,v240 );
+ v244 = ll_strconcat__String_String ( v241,v243 );
+ txt_1.nodeValue = v244;
+ exc_3 = exc_4;
+ txt_0 = txt_1;
+ v205 = v207;
+ block = 3;
+ break;
+ case 5:
+ v247 = v246.nodeValue;
+ v248 = ll_str__StringR_StringConst_String ( undefined,exc_5 );
+ v249 = ll_strconcat__String_String ( v247,v248 );
+ v246.nodeValue = v249;
+ block = 6;
+ break;
+ case 6:
+ return ( v184 );
+ }
+ }
+}
+
+function ll_listiter__Record_index__Signed__iterable_List_R (ITER_0,lst_0) {
+ var v349,v350,v351,v352;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v350 = new Object();
+ v350.iterable = lst_0;
+ v350.index = 0;
+ v349 = v350;
+ block = 1;
+ break;
+ case 1:
+ return ( v349 );
+ }
+ }
+}
+
+function ll_str__InstanceR_exceptions_Exception_Instance_ex (self_0,instance_0) {
+ var v180,v181,v182,v183;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ undefined;
+ v182 = ll_const__Signed_ ( -1 );
+ v183 = instance_0.toString();
+ v180 = v183;
+ block = 1;
+ break;
+ case 1:
+ return ( v180 );
+ }
+ }
+}
+
+function ll_listslice_startonly__List_Record_item2__String_ (RESLIST_0,l1_0,start_0) {
+ var v166,v167,v168,v169,v170,v171,l1_1,i_0,j_0,l_0,len1_0,v172,v173,l1_2,i_1,j_1,l_1,len1_1,v174,v175,v176,v177,v178,v179;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v167 = l1_0;
+ v168 = v167.length;
+ v169 = (v168-start_0);
+ undefined;
+ v171 = ll_newlist__List_Record_item2__String__ite_Signed ( undefined,v169 );
+ l1_1 = l1_0;
+ i_0 = start_0;
+ j_0 = 0;
+ l_0 = v171;
+ len1_0 = v168;
+ block = 1;
+ break;
+ case 1:
+ v172 = (i_0=v357);
+ v359 = v358;
+ if (v359 == true)
+ {
+ block = 3;
+ break;
+ }
+ else{
+ iter_1 = iter_0;
+ index_2 = v355;
+ l_7 = v354;
+ block = 1;
+ break;
+ }
+ case 1:
+ v360 = (index_2+1);
+ iter_1.index = v360;
+ v362 = l_7;
+ v363 = v362[index_2];
+ v353 = v363;
+ block = 2;
+ break;
+ case 2:
+ return ( v353 );
+ case 3:
+ v364 = __consts_0.exceptions_StopIteration;
+ v365 = v364.meta;
+ v366 = v364;
+ etype_0 = v365;
+ evalue_0 = v366;
+ block = 4;
+ break;
+ case 4:
+ throw(evalue_0);
+ }
+ }
+}
+
+function ll_const__Signed_ (c_0) {
+ var v372;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v372 = c_0;
+ block = 1;
+ break;
+ case 1:
+ return ( v372 );
+ }
+ }
+}
+
+function ll_newslice__Signed_Signed (start_1,stop_0) {
+ var v302,v303,v304,v305;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v303 = new Slice();
+ v303.start = start_1;
+ v303.stop = stop_0;
+ v302 = v303;
+ block = 1;
+ break;
+ case 1:
+ return ( v302 );
+ }
+ }
+}
+
+function escape (s_0) {
+ var v367;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v367 = s_0;
+ block = 1;
+ break;
+ case 1:
+ return ( v367 );
+ }
+ }
+}
+
+function ll_getitem_nonneg__dum_nocheckConst_List_ExternalT (func_1,l_8,index_3) {
+ var v375,index_4,v376,v377,v378;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ index_4 = index_3;
+ v376 = l_8;
+ block = 1;
+ break;
+ case 1:
+ v377 = v376;
+ v378 = v377[index_4];
+ v375 = v378;
+ block = 2;
+ break;
+ case 2:
+ return ( v375 );
+ }
+ }
+}
+
+function ll_listslice__List_Record_item2__String__ite_List_ (RESLIST_1,l1_3,slice_0) {
+ var v306,v307,v308,v309,v310,v311,v312,RESLIST_2,l1_4,stop_1,start_2,v313,v314,v315,l1_5,i_2,j_2,stop_2,l_5,v316,v317,l1_6,i_3,j_3,stop_3,l_6,v318,v319,v320,v321,v322,v323;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v307 = slice_0.start;
+ v308 = slice_0.stop;
+ v309 = l1_3;
+ v310 = v309.length;
+ v311 = (v308>v310);
+ v312 = v311;
+ if (v312 == true)
+ {
+ l1_4 = l1_3;
+ stop_1 = v310;
+ start_2 = v307;
+ block = 1;
+ break;
+ }
+ else{
+ l1_4 = l1_3;
+ stop_1 = v308;
+ start_2 = v307;
+ block = 1;
+ break;
+ }
+ case 1:
+ v313 = (stop_1-start_2);
+ undefined;
+ v315 = ll_newlist__List_Record_item2__String__ite_Signed ( undefined,v313 );
+ l1_5 = l1_4;
+ i_2 = start_2;
+ j_2 = 0;
+ stop_2 = stop_1;
+ l_5 = v315;
+ block = 2;
+ break;
+ case 2:
+ v316 = (i_2' );
+}
+
+inherits(exceptions_Exception,Object);
+function show_skip_ (item_name_12) {
+ var v157,v158,v5,v159,v160,v161,v162,v163,v164,v165;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v158 = ll_chr2str__Char ( item_name_12 );
+ v5 = ll_dict_getitem__Dict_String__String__String ( __consts_0.const_tuple,v158 );
+ v159 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v159.oenter_variant0(__consts_0.const_str__22,__consts_0.const_str__23,__consts_0.const_str__24,69);
+ undefined;
+ set_msgbox ( v5 );
+ v163 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v163.oleave_variant0(__consts_0.const_str__22);
+ undefined;
+ block = 1;
+ break;
+ case 1:
+ return ( v157 );
+ }
+ }
+}
+
+function ll_append__List_Record_item2__String__ite_Record_i (l_2,newitem_0) {
+ var v260,v261,v262,v263,v264,v265,v266,v267;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v261 = l_2;
+ v262 = v261.length;
+ v263 = l_2;
+ v264 = (v262+1);
+ v263.length = v264;
+ v266 = l_2;
+ v266[v262]=newitem_0;
+ block = 1;
+ break;
+ case 1:
+ return ( v260 );
+ }
+ }
+}
+
+function ll_newlist__List_Record_item2__String__ite_Signed (self_9,length_0) {
+ var v373,v374;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v374 = ll_newlist__List_Record_item2__String__ite_Signed_ ( undefined,length_0 );
+ v373 = v374;
+ block = 1;
+ break;
+ case 1:
+ return ( v373 );
+ }
+ }
+}
+
+function exceptions_StopIteration () {
+}
+
+exceptions_StopIteration.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_StopIteration,exceptions_Exception);
+function show_traceback (item_name_6) {
+ var v114,v115,item_name_7,v116,v117,last_exception_16,last_exc_value_32,item_name_8,v118,v119,v120,last_exception_17,last_exc_value_33,item_name_9,v121,v122,v123,v124,last_exception_18,last_exc_value_34,item_name_10,v125,v126,v127,v128,v129,last_exception_19,last_exc_value_35,item_name_11,v130,v131,v132,v133,v134,v135,last_exception_20,last_exc_value_36,v136,v137,last_exception_21,last_exc_value_37,v138,v139,v140,last_exception_22,last_exc_value_38,v141,v142,v143,last_exception_23,last_exc_value_39,last_exc_value_40,v144,e_2,v145,v146,v147,v148,v149,last_exc_value_41,v150,last_exc_value_42,v151,last_exc_value_43,v152,last_exc_value_44,v153,last_exc_value_45,v154,last_exc_value_46,v155,last_exc_value_47,v156;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v115 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ item_name_7 = item_name_6;
+ v116 = v115;
+ block = 1;
+ break;
+ case 1:
+ try {
+ v117 = __consts_0.const_str__8;
+ item_name_8 = item_name_7;
+ v118 = v116;
+ v119 = v117;
+ block = 2;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_47 = exc;
+ block = 19;
+ break;
+ }
+ throw(exc);
+ }
+ case 2:
+ try {
+ v120 = __consts_0.const_str__2;
+ item_name_9 = item_name_8;
+ v121 = v118;
+ v122 = v119;
+ v123 = v120;
+ block = 3;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_46 = exc;
+ block = 18;
+ break;
+ }
+ throw(exc);
+ }
+ case 3:
+ try {
+ v124 = __consts_0.const_str__9;
+ item_name_10 = item_name_9;
+ v125 = v121;
+ v126 = v122;
+ v127 = v123;
+ v128 = v124;
+ block = 4;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_45 = exc;
+ block = 17;
+ break;
+ }
+ throw(exc);
+ }
+ case 4:
+ try {
+ v129 = 0;
+ item_name_11 = item_name_10;
+ v130 = v125;
+ v131 = v126;
+ v132 = v127;
+ v133 = v128;
+ v134 = v129;
+ block = 5;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_44 = exc;
+ block = 16;
+ break;
+ }
+ throw(exc);
+ }
+ case 5:
+ try {
+ v130.oenter_variant0(v131,v132,v133,v134);
+ v136 = item_name_11;
+ block = 6;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_43 = exc;
+ block = 15;
+ break;
+ }
+ throw(exc);
+ }
+ case 6:
+ try {
+ show_traceback_ ( v136 );
+ block = 7;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_42 = exc;
+ block = 14;
+ break;
+ }
+ throw(exc);
+ }
+ case 7:
+ v138 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v139 = v138;
+ block = 8;
+ break;
+ case 8:
+ try {
+ v140 = __consts_0.const_str__8;
+ v141 = v139;
+ v142 = v140;
+ block = 9;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_41 = exc;
+ block = 13;
+ break;
+ }
+ throw(exc);
+ }
+ case 9:
+ try {
+ v141.oleave_variant0(v142);
+ block = 10;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_40 = exc;
+ block = 11;
+ break;
+ }
+ throw(exc);
+ }
+ case 10:
+ return ( v114 );
+ case 11:
+ v144 = last_exc_value_40;
+ e_2 = v144;
+ block = 12;
+ break;
+ case 12:
+ v145 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
+ v146 = 0;
+ v147 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v145,v146 );
+ v148 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_2 );
+ __show_traceback ( v147,v148 );
+ block = 10;
+ break;
+ case 13:
+ v150 = last_exc_value_41;
+ e_2 = v150;
+ block = 12;
+ break;
+ case 14:
+ v151 = last_exc_value_42;
+ e_2 = v151;
+ block = 12;
+ break;
+ case 15:
+ v152 = last_exc_value_43;
+ e_2 = v152;
+ block = 12;
+ break;
+ case 16:
+ v153 = last_exc_value_44;
+ e_2 = v153;
+ block = 12;
+ break;
+ case 17:
+ v154 = last_exc_value_45;
+ e_2 = v154;
+ block = 12;
+ break;
+ case 18:
+ v155 = last_exc_value_46;
+ e_2 = v155;
+ block = 12;
+ break;
+ case 19:
+ v156 = last_exc_value_47;
+ e_2 = v156;
+ block = 12;
+ break;
+ }
+ }
+}
+
+function main () {
+ var v29,v30,v31,v32,last_exception_0,last_exc_value_0,v33,v34,v35,last_exception_1,last_exc_value_1,v36,v37,v38,v39,last_exception_2,last_exc_value_2,v40,v41,v42,v43,v44,last_exception_3,last_exc_value_3,v45,v46,v47,v48,v49,v50,last_exception_4,last_exc_value_4,v51,last_exception_5,last_exc_value_5,v52,v53,v54,last_exception_6,last_exc_value_6,v55,v56,v57,last_exception_7,last_exc_value_7,last_exc_value_8,v58,e_0,v59,v60,v61,v62,v63,last_exc_value_9,v64,last_exc_value_10,v65,last_exc_value_11,v66,last_exc_value_12,v67,last_exc_value_13,v68,last_exc_value_14,v69,last_exc_value_15,v70;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v30 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v31 = v30;
+ block = 1;
+ break;
+ case 1:
+ try {
+ v32 = __consts_0.const_str__8;
+ v33 = v31;
+ v34 = v32;
+ block = 2;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_15 = exc;
+ block = 19;
+ break;
+ }
+ throw(exc);
+ }
+ case 2:
+ try {
+ v35 = __consts_0.const_str__2;
+ v36 = v33;
+ v37 = v34;
+ v38 = v35;
+ block = 3;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_14 = exc;
+ block = 18;
+ break;
+ }
+ throw(exc);
+ }
+ case 3:
+ try {
+ v39 = __consts_0.const_str__9;
+ v40 = v36;
+ v41 = v37;
+ v42 = v38;
+ v43 = v39;
+ block = 4;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_13 = exc;
+ block = 17;
+ break;
+ }
+ throw(exc);
+ }
+ case 4:
+ try {
+ v44 = 0;
+ v45 = v40;
+ v46 = v41;
+ v47 = v42;
+ v48 = v43;
+ v49 = v44;
+ block = 5;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_12 = exc;
+ block = 16;
+ break;
+ }
+ throw(exc);
+ }
+ case 5:
+ try {
+ v45.oenter_variant0(v46,v47,v48,v49);
+ block = 6;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_11 = exc;
+ block = 15;
+ break;
+ }
+ throw(exc);
+ }
+ case 6:
+ try {
+ main_ ( );
+ block = 7;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_10 = exc;
+ block = 14;
+ break;
+ }
+ throw(exc);
+ }
+ case 7:
+ v52 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v53 = v52;
+ block = 8;
+ break;
+ case 8:
+ try {
+ v54 = __consts_0.const_str__8;
+ v55 = v53;
+ v56 = v54;
+ block = 9;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_9 = exc;
+ block = 13;
+ break;
+ }
+ throw(exc);
+ }
+ case 9:
+ try {
+ v55.oleave_variant0(v56);
+ block = 10;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_8 = exc;
+ block = 11;
+ break;
+ }
+ throw(exc);
+ }
+ case 10:
+ return ( v29 );
+ case 11:
+ v58 = last_exc_value_8;
+ e_0 = v58;
+ block = 12;
+ break;
+ case 12:
+ v59 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
+ v60 = 0;
+ v61 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v59,v60 );
+ v62 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_0 );
+ __show_traceback ( v61,v62 );
+ block = 10;
+ break;
+ case 13:
+ v64 = last_exc_value_9;
+ e_0 = v64;
+ block = 12;
+ break;
+ case 14:
+ v65 = last_exc_value_10;
+ e_0 = v65;
+ block = 12;
+ break;
+ case 15:
+ v66 = last_exc_value_11;
+ e_0 = v66;
+ block = 12;
+ break;
+ case 16:
+ v67 = last_exc_value_12;
+ e_0 = v67;
+ block = 12;
+ break;
+ case 17:
+ v68 = last_exc_value_13;
+ e_0 = v68;
+ block = 12;
+ break;
+ case 18:
+ v69 = last_exc_value_14;
+ e_0 = v69;
+ block = 12;
+ break;
+ case 19:
+ v70 = last_exc_value_15;
+ e_0 = v70;
+ block = 12;
+ break;
+ }
+ }
+}
+
+function show_traceback_ (item_name_13) {
+ var v405,v406,v6,v407,v408,v409,v410,v411,v412,v413;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v406 = ll_chr2str__Char ( item_name_13 );
+ v6 = ll_dict_getitem__Dict_String__String__String ( __consts_0.const_tuple__25,v406 );
+ v407 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v407.oenter_variant0(__consts_0.const_str__22,__consts_0.const_str__26,__consts_0.const_str__24,76);
+ undefined;
+ set_msgbox ( v6 );
+ v411 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v411.oleave_variant0(__consts_0.const_str__22);
+ undefined;
+ block = 1;
+ break;
+ case 1:
+ return ( v405 );
+ }
+ }
+}
+
+function Slice () {
+}
+
+Slice.prototype.toString = function (){
+ return ( '' );
+}
+
+function set_msgbox (data_1) {
+ var v392,v393,v394,v395,v396,v397,v398,v399,v400;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v393 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v393.oenter_variant0(__consts_0.const_str__27,__consts_0.const_str__28,__consts_0.const_str__24,72);
+ undefined;
+ v396 = get_elem ( __consts_0.const_str__29 );
+ v397 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v397.oleave_variant0(__consts_0.const_str__27);
+ undefined;
+ v396.innerHTML = data_1;
+ block = 1;
+ break;
+ case 1:
+ return ( v392 );
+ }
+ }
+}
+
+function ll_dict_getitem__Dict_String__String__String (d_0,key_0) {
+ var v382,v383,v384,v385,v386,v387,v388,etype_1,evalue_1,key_1,v389,v390,v391;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v383 = d_0;
+ v384 = (v383[key_0]!=undefined);
+ v385 = v384;
+ if (v385 == true)
+ {
+ key_1 = key_0;
+ v389 = d_0;
+ block = 3;
+ break;
+ }
+ else{
+ block = 1;
+ break;
+ }
+ case 1:
+ v386 = __consts_0.exceptions_KeyError;
+ v387 = v386.meta;
+ v388 = v386;
+ etype_1 = v387;
+ evalue_1 = v388;
+ block = 2;
+ break;
+ case 2:
+ throw(evalue_1);
+ case 3:
+ v390 = v389;
+ v391 = v390[key_1];
+ v382 = v391;
+ block = 4;
+ break;
+ case 4:
+ return ( v382 );
+ }
+ }
+}
+
+function exceptions_StandardError () {
+}
+
+exceptions_StandardError.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_StandardError,exceptions_Exception);
+function exceptions_LookupError () {
+}
+
+exceptions_LookupError.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_LookupError,exceptions_StandardError);
+function exceptions_KeyError () {
+}
+
+exceptions_KeyError.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_KeyError,exceptions_LookupError);
+function ll_chr2str__Char (ch_0) {
+ var v379,v380,v381;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v380 = ll_const__Signed ( -1 );
+ v381 = ch_0.toString();
+ v379 = v381;
+ block = 1;
+ break;
+ case 1:
+ return ( v379 );
+ }
+ }
+}
+
+function get_elem (el_0) {
+ var v419,v420,v421,v422,v423,v424,v425,v426,v427,v428;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v420 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v420.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,12);
+ undefined;
+ v423 = document;
+ v424 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v424.oleave_variant0(__consts_0.const_str__17);
+ undefined;
+ v427 = v423;
+ v428 = v427.getElementById(el_0);
+ v419 = v428;
+ block = 1;
+ break;
+ case 1:
+ return ( v419 );
+ }
+ }
+}
+
+function ll_newlist__List_Record_item2__String__ite_Signed_ (LIST_0,length_1) {
+ var v401,v402,v403,v404;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v402 = new Array();
+ v403 = v402;
+ v403.length = length_1;
+ v401 = v402;
+ block = 1;
+ break;
+ case 1:
+ return ( v401 );
+ }
+ }
+}
+
+function main_ () {
+ var v414,v415,v416,v417,v418;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v415 = __consts_0.ExportedMethods;
+ v416 = v415.show_hosts(host_init);
+ v417 = __consts_0.ExportedMethods;
+ v418 = v417.show_status_change(comeback);
+ block = 1;
+ break;
+ case 1:
+ return ( v414 );
+ }
+ }
+}
+
+function host_init (host_dict_0) {
+ var v430,v431,v432,v433,v434,v435,v436,v437,v438,v439,v440,v441,v442,host_dict_1,elem_0,v443,v444,last_exc_value_49,host_dict_2,elem_1,host_0,v445,v446,v447,v448,v449,v450,v451,v452,v453,v454,v2,v455,v456,v457,v458,v459,v460,v461,v462,v463,v464,v465,v466;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v431 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v431.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,85);
+ undefined;
+ v434 = document;
+ v435 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v435.oleave_variant0(__consts_0.const_str__17);
+ undefined;
+ v438 = v434;
+ v439 = v438.getElementById(__consts_0.const_str__32);
+ v440 = host_dict_0;
+ v441 = ll_dict_kvi__Dict_String__String__List_String_LlT_ ( v440,undefined,undefined );
+ v442 = ll_listiter__Record_index__Signed__iterable_List_S ( undefined,v441 );
+ host_dict_1 = host_dict_0;
+ elem_0 = v439;
+ v443 = v442;
+ block = 1;
+ break;
+ case 1:
+ try {
+ v444 = ll_listnext__Record_index__Signed__iterable ( v443 );
+ host_dict_2 = host_dict_1;
+ elem_1 = elem_0;
+ host_0 = v444;
+ v445 = v443;
+ block = 2;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_StopIteration))
+ {
+ block = 3;
+ break;
+ }
+ throw(exc);
+ }
+ case 2:
+ v446 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v446.oenter_variant0(__consts_0.const_str__33,__consts_0.const_str__34,__consts_0.const_str__24,87);
+ undefined;
+ v449 = create_elem ( __consts_0.const_str__35 );
+ v450 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v450.oleave_variant0(__consts_0.const_str__33);
+ undefined;
+ v453 = v449.style;
+ v453.background = __consts_0.const_str__36;
+ v2 = ll_dict_getitem__Dict_String__String__String ( host_dict_2,host_0 );
+ v455 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v455.oenter_variant0(__consts_0.const_str__37,__consts_0.const_str__38,__consts_0.const_str__24,89);
+ undefined;
+ v458 = create_text_elem ( v2 );
+ v459 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v459.oleave_variant0(__consts_0.const_str__37);
+ undefined;
+ v462 = v449;
+ v462.appendChild(v458);
+ v449.id = host_0;
+ v465 = elem_1;
+ v465.appendChild(v449);
+ host_dict_1 = host_dict_2;
+ elem_0 = elem_1;
+ v443 = v445;
+ block = 1;
+ break;
+ case 3:
+ return ( v430 );
+ }
+ }
+}
+
+function comeback (msg_0) {
+ var v467,v468,v469,v470,msg_1,v471,v472,v473,v474,v475,v476,v477,v478,v479,v480,v481,v482,v483,v484,v485,v486,v487,v488,v489,v490,v491,msg_2,v492,v493,v494,msg_3,v495,v496,v497,v498,v499,msg_4,v500,last_exception_24,last_exc_value_50,msg_5,v3,v501,v502,v503,v504,v505,v506,last_exception_25,last_exc_value_51,v507,msg_6,v508,msg_7,module_part_0,v509,v510,v511,v512,v513,v514,last_exception_26,last_exc_value_52,module_part_1,msg_8,v515,v516,msg_9,module_part_2,td_0,v517,last_exception_27,last_exc_value_53,msg_10,item_name_14,module_part_3,td_1,v518,last_exception_28,last_exc_value_54,msg_11,item_name_15,module_part_4,td_2,v519,v520,v521,msg_12,item_name_16,module_part_5,td_3,v522,last_exception_29,last_exc_value_55,msg_13,item_name_17,module_part_6,td_4,v523,v524,v525,v526,msg_14,item_name_18,module_part_7,td_5,v527,v528,v529,v530,v531,v532,last_exception_30,last_exc_value_56,msg_15,v533,item_name_19,module_part_8,td_6,v534,msg_16,item_name_20,module_part_9,td_7,link_0,v535,item_name_21,module_part_10,td_8,link_1,v536,v537,v538,last_exception_31,last_exc_value_57,item_name_22,module_part_11,td_9,link_2,v539,v540,v541,v542,v543,v544,v545,v546,item_name_23,module_part_12,td_10,link_3,v547,v548,v549,last_exception_32,last_exc_value_58,item_name_24,module_part_13,td_11,link_4,v550,v551,v552,v553,v554,v555,last_exception_33,last_exc_value_59,v556,module_part_14,link_5,item_name_25,td_12,v557,item_name_26,module_part_15,td_13,txt_2,link_6,v558,item_name_27,module_part_16,td_14,link_7,v559,v560,v561,last_exception_34,last_exc_value_60,item_name_28,module_part_17,td_15,link_8,v562,item_name_29,module_part_18,td_16,v563,v564,v565,last_exception_35,last_exc_value_61,item_name_30,module_part_19,td_17,v566,module_part_20,td_18,v567,v568,v569,last_exception_36,last_exc_value_62,td_19,v570,v571,v572,v573,v574,last_exception_37,last_exc_value_63,v575,v576,v577,v578,v579,v580,v581,v582,v583,v584,v585,v586,msg_17,item_name_31,module_part_21,td_20,v587,msg_18,module_part_22,td_21,v588,v589,v590,last_exception_38,last_exc_value_64,msg_19,module_part_23,td_22,v591,v592,v593,v594,v595,v596,last_exception_39,last_exc_value_65,td_23,module_part_24,msg_20,v597,v598,msg_21,module_part_25,td_24,link_9,v599,module_part_26,td_25,link_10,v600,v601,v602,last_exception_40,last_exc_value_66,module_part_27,td_26,link_11,v603,v604,v605,v606,v607,v608,v609,v610,module_part_28,td_27,link_12,v611,v612,v613,last_exception_41,last_exc_value_67,module_part_29,td_28,link_13,v614,v615,v616,v617,v618,v619,last_exception_42,last_exc_value_68,td_29,link_14,module_part_30,v620,v621,module_part_31,td_30,txt_3,link_15,v622,module_part_32,td_31,link_16,v623,v624,v625,last_exception_43,last_exc_value_69,module_part_33,td_32,link_17,v626,module_part_34,td_33,v627,v628,v629,last_exception_44,last_exc_value_70,module_part_35,td_34,v630,v631,v632,v633,v634,v635,last_exception_45,last_exc_value_71,td_35,module_part_36,v636,v637,module_part_37,td_36,txt_4,v638,module_part_38,td_37,v639,v640,v641,last_exception_46,last_exc_value_72,msg_22,v642,v643,v644,v645,v646,v647,v648,v649,v650,v651,v652,v653,msg_23,main_t_0,v654,v655,v656,msg_24,main_t_1,v657,v658,v659,v660,v661,v662,v663,v664,v665,v666,v667,v668,v669,v670,v671,v672,v673,v4,v674,v675,v676,v677,v678,v679,v680,v681,v682,v683,v684,v685;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v468 = get_dict_len ( msg_0 );
+ v469 = (v468==0);
+ v470 = v469;
+ if (v470 == true)
+ {
+ block = 5;
+ break;
+ }
+ else{
+ msg_1 = msg_0;
+ block = 1;
+ break;
+ }
+ case 1:
+ v471 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v471.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,23);
+ undefined;
+ v474 = document;
+ v475 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v475.oleave_variant0(__consts_0.const_str__17);
+ undefined;
+ v478 = v474;
+ v479 = v478.getElementById(__consts_0.const_str__39);
+ v480 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v480.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,25);
+ undefined;
+ v483 = document;
+ v484 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v484.oleave_variant0(__consts_0.const_str__17);
+ undefined;
+ v487 = v483;
+ v488 = v487.getElementById(__consts_0.const_str__40);
+ v489 = ll_dict_getitem__Dict_String__String__String ( msg_1,__consts_0.const_str__41 );
+ v490 = ll_streq__String_String ( v489,__consts_0.const_str__42 );
+ v491 = v490;
+ if (v491 == true)
+ {
+ msg_23 = msg_1;
+ main_t_0 = v488;
+ block = 52;
+ break;
+ }
+ else{
+ msg_2 = msg_1;
+ block = 2;
+ break;
+ }
+ case 2:
+ v492 = ll_dict_getitem__Dict_String__String__String ( msg_2,__consts_0.const_str__41 );
+ v493 = ll_streq__String_String ( v492,__consts_0.const_str__43 );
+ v494 = v493;
+ if (v494 == true)
+ {
+ msg_22 = msg_2;
+ block = 51;
+ break;
+ }
+ else{
+ msg_3 = msg_2;
+ block = 3;
+ break;
+ }
+ case 3:
+ v495 = ll_dict_getitem__Dict_String__String__String ( msg_3,__consts_0.const_str__41 );
+ v496 = ll_streq__String_String ( v495,__consts_0.const_str__44 );
+ v497 = v496;
+ if (v497 == true)
+ {
+ msg_4 = msg_3;
+ block = 6;
+ break;
+ }
+ else{
+ block = 4;
+ break;
+ }
+ case 4:
+ v498 = __consts_0.ExportedMethods;
+ v499 = v498.show_status_change(comeback);
+ block = 5;
+ break;
+ case 5:
+ return ( v467 );
+ case 6:
+ try {
+ v500 = ll_dict_getitem__Dict_String__String__String ( msg_4,__consts_0.const_str__45 );
+ msg_5 = msg_4;
+ v3 = v500;
+ block = 7;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 7:
+ try {
+ v501 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v501.oenter_variant0(__consts_0.const_str__27,__consts_0.const_str__46,__consts_0.const_str__24,40);
+ undefined;
+ v504 = get_elem ( v3 );
+ v505 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v505.oleave_variant0(__consts_0.const_str__27);
+ v507 = v504;
+ msg_6 = msg_5;
+ block = 8;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 8:
+ undefined;
+ msg_7 = msg_6;
+ module_part_0 = v507;
+ block = 9;
+ break;
+ case 9:
+ try {
+ v509 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v509.oenter_variant0(__consts_0.const_str__33,__consts_0.const_str__34,__consts_0.const_str__24,41);
+ undefined;
+ v512 = create_elem ( __consts_0.const_str__35 );
+ v513 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v513.oleave_variant0(__consts_0.const_str__33);
+ module_part_1 = module_part_0;
+ msg_8 = msg_7;
+ v515 = v512;
+ block = 10;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 10:
+ undefined;
+ msg_9 = msg_8;
+ module_part_2 = module_part_1;
+ td_0 = v515;
+ block = 11;
+ break;
+ case 11:
+ try {
+ v517 = ll_dict_getitem__Dict_String__String__String ( msg_9,__consts_0.const_str__47 );
+ msg_10 = msg_9;
+ item_name_14 = v517;
+ module_part_3 = module_part_2;
+ td_1 = td_0;
+ block = 12;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 12:
+ try {
+ v518 = ll_dict_getitem__Dict_String__String__String ( msg_10,__consts_0.const_str__48 );
+ msg_11 = msg_10;
+ item_name_15 = item_name_14;
+ module_part_4 = module_part_3;
+ td_2 = td_1;
+ v519 = v518;
+ block = 13;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 13:
+ v520 = ll_streq__String_String ( v519,__consts_0.const_str__49 );
+ v521 = v520;
+ if (v521 == true)
+ {
+ module_part_35 = module_part_4;
+ td_34 = td_2;
+ block = 47;
+ break;
+ }
+ else{
+ msg_12 = msg_11;
+ item_name_16 = item_name_15;
+ module_part_5 = module_part_4;
+ td_3 = td_2;
+ block = 14;
+ break;
+ }
+ case 14:
+ try {
+ v522 = ll_dict_getitem__Dict_String__String__String ( msg_12,__consts_0.const_str__50 );
+ msg_13 = msg_12;
+ item_name_17 = item_name_16;
+ module_part_6 = module_part_5;
+ td_4 = td_3;
+ v523 = v522;
+ block = 15;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 15:
+ v524 = ll_streq__String_String ( v523,__consts_0.const_str__51 );
+ v525 = !v524;
+ v526 = v525;
+ if (v526 == true)
+ {
+ msg_17 = msg_13;
+ item_name_31 = item_name_17;
+ module_part_21 = module_part_6;
+ td_20 = td_4;
+ block = 33;
+ break;
+ }
+ else{
+ msg_14 = msg_13;
+ item_name_18 = item_name_17;
+ module_part_7 = module_part_6;
+ td_5 = td_4;
+ block = 16;
+ break;
+ }
+ case 16:
+ try {
+ v527 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v527.oenter_variant0(__consts_0.const_str__33,__consts_0.const_str__52,__consts_0.const_str__24,56);
+ undefined;
+ v530 = create_elem ( __consts_0.const_str__53 );
+ v531 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v531.oleave_variant0(__consts_0.const_str__33);
+ msg_15 = msg_14;
+ v533 = v530;
+ item_name_19 = item_name_18;
+ module_part_8 = module_part_7;
+ td_6 = td_5;
+ block = 17;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 17:
+ undefined;
+ msg_16 = msg_15;
+ item_name_20 = item_name_19;
+ module_part_9 = module_part_8;
+ td_7 = td_6;
+ link_0 = v533;
+ block = 18;
+ break;
+ case 18:
+ v535 = link_0;
+ item_name_21 = item_name_20;
+ module_part_10 = module_part_9;
+ td_8 = td_7;
+ link_1 = link_0;
+ v536 = v535;
+ v537 = msg_16;
+ block = 19;
+ break;
+ case 19:
+ try {
+ v538 = ll_dict_getitem__Dict_String__String__String ( v537,__consts_0.const_str__47 );
+ item_name_22 = item_name_21;
+ module_part_11 = module_part_10;
+ td_9 = td_8;
+ link_2 = link_1;
+ v539 = v536;
+ v540 = v538;
+ block = 20;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 20:
+ v541 = new StringBuilder();
+ v541.ll_append(__consts_0.const_str__54);
+ v543 = v540.toString();
+ v541.ll_append(v543);
+ v541.ll_append(__consts_0.const_str__55);
+ v546 = v541.ll_build();
+ item_name_23 = item_name_22;
+ module_part_12 = module_part_11;
+ td_10 = td_9;
+ link_3 = link_2;
+ v547 = v539;
+ v548 = v546;
+ block = 21;
+ break;
+ case 21:
+ try {
+ v547.setAttribute(__consts_0.const_str__56,v548);
+ item_name_24 = item_name_23;
+ module_part_13 = module_part_12;
+ td_11 = td_10;
+ link_4 = link_3;
+ block = 22;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 22:
+ try {
+ v550 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v550.oenter_variant0(__consts_0.const_str__37,__consts_0.const_str__57,__consts_0.const_str__24,59);
+ undefined;
+ v553 = create_text_elem ( __consts_0.const_str__58 );
+ v554 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v554.oleave_variant0(__consts_0.const_str__37);
+ v556 = v553;
+ module_part_14 = module_part_13;
+ link_5 = link_4;
+ item_name_25 = item_name_24;
+ td_12 = td_11;
+ block = 23;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 23:
+ undefined;
+ item_name_26 = item_name_25;
+ module_part_15 = module_part_14;
+ td_13 = td_12;
+ txt_2 = v556;
+ link_6 = link_5;
+ block = 24;
+ break;
+ case 24:
+ v558 = link_6;
+ item_name_27 = item_name_26;
+ module_part_16 = module_part_15;
+ td_14 = td_13;
+ link_7 = link_6;
+ v559 = v558;
+ v560 = txt_2;
+ block = 25;
+ break;
+ case 25:
+ try {
+ v559.appendChild(v560);
+ item_name_28 = item_name_27;
+ module_part_17 = module_part_16;
+ td_15 = td_14;
+ link_8 = link_7;
+ block = 26;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 26:
+ v562 = td_15;
+ item_name_29 = item_name_28;
+ module_part_18 = module_part_17;
+ td_16 = td_15;
+ v563 = v562;
+ v564 = link_8;
+ block = 27;
+ break;
+ case 27:
+ try {
+ v563.appendChild(v564);
+ item_name_30 = item_name_29;
+ module_part_19 = module_part_18;
+ td_17 = td_16;
+ block = 28;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 28:
+ v566 = __consts_0.ExportedMethods;
+ module_part_20 = module_part_19;
+ td_18 = td_17;
+ v567 = v566;
+ v568 = item_name_30;
+ block = 29;
+ break;
+ case 29:
+ try {
+ v569 = v567.show_fail(v568,fail_come_back);
+ td_19 = td_18;
+ v570 = module_part_20;
+ block = 30;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 30:
+ v571 = v570;
+ v572 = v571;
+ v573 = td_19;
+ block = 31;
+ break;
+ case 31:
+ try {
+ v572.appendChild(v573);
+ block = 4;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 32:
+ v575 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v575.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,65);
+ undefined;
+ v578 = document;
+ v579 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v579.oleave_variant0(__consts_0.const_str__17);
+ undefined;
+ v582 = v578;
+ v583 = v582.getElementById(__consts_0.const_str__39);
+ v584 = v583.innerHTML;
+ v585 = ll_strconcat__String_String ( v584,__consts_0.const_str__59 );
+ v583.innerHTML = v585;
+ block = 4;
+ break;
+ case 33:
+ v587 = __consts_0.ExportedMethods;
+ msg_18 = msg_17;
+ module_part_22 = module_part_21;
+ td_21 = td_20;
+ v588 = v587;
+ v589 = item_name_31;
+ block = 34;
+ break;
+ case 34:
+ try {
+ v590 = v588.show_skip(v589,skip_come_back);
+ msg_19 = msg_18;
+ module_part_23 = module_part_22;
+ td_22 = td_21;
+ block = 35;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 35:
+ try {
+ v591 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v591.oenter_variant0(__consts_0.const_str__33,__consts_0.const_str__52,__consts_0.const_str__24,49);
+ undefined;
+ v594 = create_elem ( __consts_0.const_str__53 );
+ v595 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v595.oleave_variant0(__consts_0.const_str__33);
+ td_23 = td_22;
+ module_part_24 = module_part_23;
+ msg_20 = msg_19;
+ v597 = v594;
+ block = 36;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 36:
+ undefined;
+ msg_21 = msg_20;
+ module_part_25 = module_part_24;
+ td_24 = td_23;
+ link_9 = v597;
+ block = 37;
+ break;
+ case 37:
+ v599 = link_9;
+ module_part_26 = module_part_25;
+ td_25 = td_24;
+ link_10 = link_9;
+ v600 = v599;
+ v601 = msg_21;
+ block = 38;
+ break;
+ case 38:
+ try {
+ v602 = ll_dict_getitem__Dict_String__String__String ( v601,__consts_0.const_str__47 );
+ module_part_27 = module_part_26;
+ td_26 = td_25;
+ link_11 = link_10;
+ v603 = v600;
+ v604 = v602;
+ block = 39;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 39:
+ v605 = new StringBuilder();
+ v605.ll_append(__consts_0.const_str__60);
+ v607 = v604.toString();
+ v605.ll_append(v607);
+ v605.ll_append(__consts_0.const_str__55);
+ v610 = v605.ll_build();
+ module_part_28 = module_part_27;
+ td_27 = td_26;
+ link_12 = link_11;
+ v611 = v603;
+ v612 = v610;
+ block = 40;
+ break;
+ case 40:
+ try {
+ v611.setAttribute(__consts_0.const_str__56,v612);
+ module_part_29 = module_part_28;
+ td_28 = td_27;
+ link_13 = link_12;
+ block = 41;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 41:
+ try {
+ v614 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v614.oenter_variant0(__consts_0.const_str__37,__consts_0.const_str__61,__consts_0.const_str__24,52);
+ undefined;
+ v617 = create_text_elem ( __consts_0.const_str__62 );
+ v618 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v618.oleave_variant0(__consts_0.const_str__37);
+ td_29 = td_28;
+ link_14 = link_13;
+ module_part_30 = module_part_29;
+ v620 = v617;
+ block = 42;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 42:
+ undefined;
+ module_part_31 = module_part_30;
+ td_30 = td_29;
+ txt_3 = v620;
+ link_15 = link_14;
+ block = 43;
+ break;
+ case 43:
+ v622 = link_15;
+ module_part_32 = module_part_31;
+ td_31 = td_30;
+ link_16 = link_15;
+ v623 = v622;
+ v624 = txt_3;
+ block = 44;
+ break;
+ case 44:
+ try {
+ v623.appendChild(v624);
+ module_part_33 = module_part_32;
+ td_32 = td_31;
+ link_17 = link_16;
+ block = 45;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 45:
+ v626 = td_32;
+ module_part_34 = module_part_33;
+ td_33 = td_32;
+ v627 = v626;
+ v628 = link_17;
+ block = 46;
+ break;
+ case 46:
+ try {
+ v627.appendChild(v628);
+ td_19 = td_33;
+ v570 = module_part_34;
+ block = 30;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 47:
+ try {
+ v630 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v630.oenter_variant0(__consts_0.const_str__37,__consts_0.const_str__63,__consts_0.const_str__24,45);
+ undefined;
+ v633 = create_text_elem ( __consts_0.const_str__64 );
+ v634 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v634.oleave_variant0(__consts_0.const_str__37);
+ td_35 = td_34;
+ module_part_36 = module_part_35;
+ v636 = v633;
+ block = 48;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 48:
+ undefined;
+ module_part_37 = module_part_36;
+ td_36 = td_35;
+ txt_4 = v636;
+ block = 49;
+ break;
+ case 49:
+ v638 = td_36;
+ module_part_38 = module_part_37;
+ td_37 = td_36;
+ v639 = v638;
+ v640 = txt_4;
+ block = 50;
+ break;
+ case 50:
+ try {
+ v639.appendChild(v640);
+ td_19 = td_37;
+ v570 = module_part_38;
+ block = 30;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 32;
+ break;
+ }
+ throw(exc);
+ }
+ case 51:
+ v642 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v642.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,36);
+ undefined;
+ v645 = document;
+ v646 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v646.oleave_variant0(__consts_0.const_str__17);
+ undefined;
+ v649 = v645;
+ v650 = ll_dict_getitem__Dict_String__String__String ( msg_22,__consts_0.const_str__65 );
+ v651 = v649.getElementById(v650);
+ v652 = v651.style;
+ v652.background = __consts_0.const_str__66;
+ block = 4;
+ break;
+ case 52:
+ v654 = ll_dict_getitem__Dict_String__String__String ( msg_23,__consts_0.const_str__67 );
+ v655 = ll_streq__String_String ( v654,__consts_0.const_str__68 );
+ v656 = v655;
+ if (v656 == true)
+ {
+ msg_24 = msg_23;
+ main_t_1 = main_t_0;
+ block = 53;
+ break;
+ }
+ else{
+ block = 4;
+ break;
+ }
+ case 53:
+ v657 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v657.oenter_variant0(__consts_0.const_str__33,__consts_0.const_str__69,__consts_0.const_str__24,29);
+ undefined;
+ v660 = create_elem ( __consts_0.const_str__70 );
+ v661 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v661.oleave_variant0(__consts_0.const_str__33);
+ undefined;
+ v664 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v664.oenter_variant0(__consts_0.const_str__33,__consts_0.const_str__34,__consts_0.const_str__24,30);
+ undefined;
+ v667 = create_elem ( __consts_0.const_str__35 );
+ v668 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v668.oleave_variant0(__consts_0.const_str__33);
+ undefined;
+ v671 = v660;
+ v671.appendChild(v667);
+ v673 = v667;
+ v4 = ll_dict_getitem__Dict_String__String__String ( msg_24,__consts_0.const_str__71 );
+ v674 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v674.oenter_variant0(__consts_0.const_str__37,__consts_0.const_str__72,__consts_0.const_str__24,32);
+ undefined;
+ v677 = create_text_elem ( v4 );
+ v678 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v678.oleave_variant0(__consts_0.const_str__37);
+ undefined;
+ v673.appendChild(v677);
+ v682 = ll_dict_getitem__Dict_String__String__String ( msg_24,__consts_0.const_str__47 );
+ v660.id = v682;
+ v684 = main_t_1;
+ v684.appendChild(v660);
+ block = 4;
+ break;
+ }
+ }
+}
+
+function skip_come_back (msg_26) {
+ var v743,v744,v745,v746;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v744 = ll_dict_getitem__Dict_String__String__String ( msg_26,__consts_0.const_str__73 );
+ v745 = ll_dict_getitem__Dict_String__String__String ( msg_26,__consts_0.const_str__74 );
+ __consts_0.const_tuple[v745]=v744;
+ block = 1;
+ break;
+ case 1:
+ return ( v743 );
+ }
+ }
+}
+
+function ll_const__Signed (c_1) {
+ var v429;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v429 = c_1;
+ block = 1;
+ break;
+ case 1:
+ return ( v429 );
+ }
+ }
+}
+
+function ll_listnext__Record_index__Signed__iterable (iter_2) {
+ var v705,v706,v707,v708,v709,v710,v711,iter_3,index_5,l_9,v712,v713,v714,v715,v716,v717,v718,etype_2,evalue_2;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v706 = iter_2.iterable;
+ v707 = iter_2.index;
+ v708 = v706;
+ v709 = v708.length;
+ v710 = (v707>=v709);
+ v711 = v710;
+ if (v711 == true)
+ {
+ block = 3;
+ break;
+ }
+ else{
+ iter_3 = iter_2;
+ index_5 = v707;
+ l_9 = v706;
+ block = 1;
+ break;
+ }
+ case 1:
+ v712 = (index_5+1);
+ iter_3.index = v712;
+ v714 = l_9;
+ v715 = v714[index_5];
+ v705 = v715;
+ block = 2;
+ break;
+ case 2:
+ return ( v705 );
+ case 3:
+ v716 = __consts_0.exceptions_StopIteration;
+ v717 = v716.meta;
+ v718 = v716;
+ etype_2 = v717;
+ evalue_2 = v718;
+ block = 4;
+ break;
+ case 4:
+ throw(evalue_2);
+ }
+ }
+}
+
+function ll_listiter__Record_index__Signed__iterable_List_S (ITER_1,lst_1) {
+ var v701,v702,v703,v704;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v702 = new Object();
+ v702.iterable = lst_1;
+ v702.index = 0;
+ v701 = v702;
+ block = 1;
+ break;
+ case 1:
+ return ( v701 );
+ }
+ }
+}
+
+function create_elem (s_2) {
+ var v719,v720,v721,v722,v723,v724,v725,v726,v727,v728;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v720 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v720.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,9);
+ undefined;
+ v723 = document;
+ v724 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v724.oleave_variant0(__consts_0.const_str__17);
+ undefined;
+ v727 = v723;
+ v728 = v727.createElement(s_2);
+ v719 = v728;
+ block = 1;
+ break;
+ case 1:
+ return ( v719 );
+ }
+ }
+}
+
+function fail_come_back (msg_25) {
+ var v739,v740,v741,v742;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v740 = ll_dict_getitem__Dict_String__String__String ( msg_25,__consts_0.const_str__75 );
+ v741 = ll_dict_getitem__Dict_String__String__String ( msg_25,__consts_0.const_str__74 );
+ __consts_0.const_tuple__25[v741]=v740;
+ block = 1;
+ break;
+ case 1:
+ return ( v739 );
+ }
+ }
+}
+
+function create_text_elem (txt_5) {
+ var v729,v730,v731,v732,v733,v734,v735,v736,v737,v738;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v730 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v730.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,15);
+ undefined;
+ v733 = document;
+ v734 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v734.oleave_variant0(__consts_0.const_str__17);
+ undefined;
+ v737 = v733;
+ v738 = v737.createTextNode(txt_5);
+ v729 = v738;
+ block = 1;
+ break;
+ case 1:
+ return ( v729 );
+ }
+ }
+}
+
+function ll_dict_kvi__Dict_String__String__List_String_LlT_ (d_1,LIST_1,func_2) {
+ var v686,v687,v688,v689,v690,v691,i_4,it_0,result_0,v692,v693,v694,i_5,it_1,result_1,v695,v696,v697,v698,it_2,result_2,v699,v700;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v687 = d_1;
+ v688 = get_dict_len ( v687 );
+ v689 = ll_newlist__List_String_LlT_Signed ( undefined,v688 );
+ v690 = d_1;
+ v691 = dict_items_iterator ( v690 );
+ i_4 = 0;
+ it_0 = v691;
+ result_0 = v689;
+ block = 1;
+ break;
+ case 1:
+ v692 = it_0;
+ v693 = v692.ll_go_next();
+ v694 = v693;
+ if (v694 == true)
+ {
+ i_5 = i_4;
+ it_1 = it_0;
+ result_1 = result_0;
+ block = 3;
+ break;
+ }
+ else{
+ v686 = result_0;
+ block = 2;
+ break;
+ }
+ case 2:
+ return ( v686 );
+ case 3:
+ v695 = result_1;
+ v696 = it_1;
+ v697 = v696.ll_current_key();
+ v695[i_5]=v697;
+ it_2 = it_1;
+ result_2 = result_1;
+ v699 = i_5;
+ block = 4;
+ break;
+ case 4:
+ v700 = (v699+1);
+ i_4 = v700;
+ it_0 = it_2;
+ result_0 = result_2;
+ block = 1;
+ break;
+ }
+ }
+}
+
+function ll_newlist__List_String_LlT_Signed (LIST_2,length_2) {
+ var v747,v748,v749,v750;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v748 = new Array();
+ v749 = v748;
+ v749.length = length_2;
+ v747 = v748;
+ block = 1;
+ break;
+ case 1:
+ return ( v747 );
+ }
+ }
+}
+
+__consts_0 = {};
+__consts_0.const_str__66 = '#00ff00';
+__consts_0.const_str__60 = "javascript:show_skip('";
+__consts_0.const_str__4 = 'show_skip';
+__consts_0.const_str__24 = '/home/fijal/lang/python/pypy-dist/py/test/rsession/webjs.py';
+__consts_0.const_list = [];
+__consts_0.const_str__39 = 'testmain';
+__consts_0.const_str__2 = '()';
+__consts_0.const_str__62 = 's';
+__consts_0.const_str__37 = 'create_text_elem';
+__consts_0.const_str__68 = 'Module';
+__consts_0.const_tuple = {};
+__consts_0.const_str__61 = "('s')";
+__consts_0.const_str__43 = 'HostReady';
+__consts_0.const_str__7 = '(v1)';
+__consts_0.const_str__72 = '(v4)';
+__consts_0.const_str__6 = 'show_traceback';
+__consts_0.const_str__38 = '(v2)';
+__consts_0.const_str__3 = '';
+__consts_0.const_str__28 = "('messagebox')";
+__consts_0.const_str__53 = 'a';
+__consts_0.const_str__19 = 'div';
+__consts_0.const_str__12 = '#FF0000';
+__consts_0.const_str__65 = 'hostkey';
+__consts_0.const_str__51 = 'None';
+__consts_0.const_str__26 = '(v6)';
+__consts_0.const_str__52 = "('a')";
+__consts_0.const_str__69 = "('tr')";
+__consts_0.const_str__5 = '(v0)';
+__consts_0.const_str__73 = 'reason';
+__consts_0.const_str__49 = 'True';
+__consts_0.const_str__32 = 'hostrow';
+__consts_0.const_str__54 = "javascript:show_traceback('";
+__consts_0.exceptions_StopIteration = new exceptions_StopIteration();
+__consts_0.const_str__44 = 'ReceivedItemOutcome';
+__consts_0.exceptions_KeyError = new exceptions_KeyError();
+__consts_0.const_str__10 = 'debug_div';
+__consts_0.const_str__58 = 'F';
+__consts_0.const_str__45 = 'fullmodulename';
+__consts_0.const_str__50 = 'skipped';
+__consts_0.const_str__14 = ' ';
+__consts_0.const_str__34 = "('td')";
+__consts_0.const_str__17 = 'get_document';
+__consts_0.const_str = 'main';
+__consts_0.const_str__35 = 'td';
+__consts_0.const_str__33 = 'create_elem';
+__consts_0.const_str__48 = 'passed';
+__consts_0.const_str__55 = "')";
+__consts_0.const_str__8 = 'entrypoint';
+__consts_0.ExportedMethods = new ExportedMethods();
+__consts_0.const_str__23 = '(v5)';
+__consts_0.const_str__64 = '.';
+__consts_0.pypy_translator_transformer_debug_TracebackHandler = new pypy_translator_transformer_debug_TracebackHandler();
+__consts_0.pypy_translator_transformer_debug_TracebackHandler.otb = __consts_0.const_list;
+__consts_0.const_str__36 = '#ff0000';
+__consts_0.const_str__74 = 'item_name';
+__consts_0.const_str__70 = 'tr';
+__consts_0.const_str__46 = '(v3)';
+__consts_0.const_str__67 = 'itemtype';
+__consts_0.const_str__40 = 'main_table';
+__consts_0.const_str__18 = '/home/fijal/lang/python/pypy-dist/pypy/translator/js/helper.py';
+__consts_0.const_str__29 = 'messagebox';
+__consts_0.const_str__13 = ' ';
+__consts_0.const_str__59 = 'some error';
+__consts_0.const_str__42 = 'ItemStart';
+__consts_0.const_str__71 = 'itemname';
+__consts_0.const_str__47 = 'fullitemname';
+__consts_0.const_str__22 = 'set_msgbox';
+__consts_0.const_str__41 = 'type';
+__consts_0.const_str__56 = 'href';
+__consts_0.const_str__57 = "('F')";
+__consts_0.const_str__27 = 'get_elem';
+__consts_0.const_str__15 = ': ';
+__consts_0.const_str__16 = '\n';
+__consts_0.const_tuple__25 = {};
+__consts_0.const_str__63 = "('.')";
+__consts_0.const_str__75 = 'traceback';
+__consts_0.const_str__11 = 'pre';
+__consts_0.const_str__9 = '';
Modified: py/branch/distributed/py/test/rsession/webjs.py
==============================================================================
--- py/branch/distributed/py/test/rsession/webjs.py (original)
+++ py/branch/distributed/py/test/rsession/webjs.py Mon Sep 11 12:49:20 2006
@@ -11,6 +11,9 @@
def get_elem(el):
return dom.get_document().getElementById(el)
+def create_text_elem(txt):
+ return dom.get_document().createTextNode(txt)
+
tracebacks = {}
skips = {}
@@ -26,7 +29,7 @@
tr = create_elem("tr")
td = create_elem("td")
tr.appendChild(td)
- td.innerHTML = msg['itemname']
+ td.appendChild(create_text_elem(msg['itemname']))
tr.id = msg['fullitemname']
main_t.appendChild(tr)
elif msg['type'] == 'HostReady':
@@ -39,12 +42,23 @@
item_name = msg['fullitemname']
# TODO: dispatch output
if msg["passed"] == 'True':
- td.innerHTML = "."
+ txt = create_text_elem(".")
+ td.appendChild(txt)
elif msg["skipped"] != 'None':
exported_methods.show_skip(item_name, skip_come_back)
- td.innerHTML = 's'
+ link = create_elem("a")
+ link.setAttribute("href", "javascript:show_skip('%s')" % \
+ msg['fullitemname'])
+ txt = create_text_elem('s')
+ link.appendChild(txt)
+ td.appendChild(link)
else:
- td.innerHTML = 'F'
+ link = create_elem("a")
+ link.setAttribute("href", "javascript:show_traceback('%s')" % \
+ msg['fullitemname'])
+ txt = create_text_elem('F')
+ link.appendChild(txt)
+ td.appendChild(link)
exported_methods.show_fail(item_name, fail_come_back)
module_part.appendChild(td)
except:
@@ -68,18 +82,14 @@
skips[msg['item_name']] = msg['reason']
def host_init(host_dict):
- try:
- elem = dom.get_document().getElementById("hostrow")
- for host in host_dict.keys():
- td = create_elem("td")
- td.style.background = "#ff0000"
- td.innerHTML = host_dict[host]
- td.id = host
- elem.appendChild(td)
- except:
- elem = dom.get_document().getElementById("testmain")
- elem.innerHTML = "problem"
-## elem.innerHTML = str(host_list.keys())
+ elem = dom.get_document().getElementById("hostrow")
+ for host in host_dict.keys():
+ td = create_elem("td")
+ td.style.background = "#ff0000"
+ txt = create_text_elem(host_dict[host])
+ td.appendChild(txt)
+ td.id = host
+ elem.appendChild(td)
def main():
exported_methods.show_hosts(host_init)
From fijal at codespeak.net Mon Sep 11 13:29:31 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Mon, 11 Sep 2006 13:29:31 +0200 (CEST)
Subject: [py-svn] r32144 - py/branch/distributed/py/test/rsession/testing
Message-ID: <20060911112931.C11E610079@code0.codespeak.net>
Author: fijal
Date: Mon Sep 11 13:29:30 2006
New Revision: 32144
Modified:
py/branch/distributed/py/test/rsession/testing/test_boxing.py
Log:
Added test.
Modified: py/branch/distributed/py/test/rsession/testing/test_boxing.py
==============================================================================
--- py/branch/distributed/py/test/rsession/testing/test_boxing.py (original)
+++ py/branch/distributed/py/test/rsession/testing/test_boxing.py Mon Sep 11 13:29:30 2006
@@ -52,3 +52,20 @@
assert b.exitstat == 0
assert b.signal == 0
assert b.retval == 3
+
+def test_box_in_a_box():
+ py.test.skip("fails")
+ def boxfun():
+ b = RealBox(example2.boxf2)
+ b.run()
+ print b.stdoutrepr
+ print >>sys.stderr, b.stderrrepr
+ return b.retval
+
+ b = RealBox(boxfun)
+ b.run()
+ assert b.stdoutrepr == "someout"
+ assert b.stderrrepr == "someerr"
+ assert b.exitstat == 0
+ assert b.signal == 0
+ assert b.retval == 2
From cfbolz at codespeak.net Mon Sep 11 14:05:15 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Mon, 11 Sep 2006 14:05:15 +0200 (CEST)
Subject: [py-svn] r32146 - in py/branch/distributed/py/test/rsession: .
testing
Message-ID: <20060911120515.34A0710083@code0.codespeak.net>
Author: cfbolz
Date: Mon Sep 11 14:05:14 2006
New Revision: 32146
Modified:
py/branch/distributed/py/test/rsession/box.py
py/branch/distributed/py/test/rsession/testing/test_boxing.py
Log:
(fijal, cfbolz, briandorsey): use files for storing the stdout and stderr (and
the retval as well). makes the box nesting test pass and therefore remote
testing hang less often.
Modified: py/branch/distributed/py/test/rsession/box.py
==============================================================================
--- py/branch/distributed/py/test/rsession/box.py (original)
+++ py/branch/distributed/py/test/rsession/box.py Mon Sep 11 14:05:14 2006
@@ -34,14 +34,14 @@
self.exitstat = 0
return 123
-class Box(object):
+class FifoBox(object):
def __init__(self, fun, args = [], kwargs = {}):
self.fun = fun
self.args = args
self.kwargs = kwargs
def run(self):
- dirname = tempfile.mkdtemp()
+ dirname = tempfile.mkdtemp("pytest")
self.dirname = dirname
self.PYTESTRETVAL = os.path.join(dirname, PYTESTRETVAL)
self.PYTESTSTDERR = os.path.join(dirname, PYTESTSTDERR)
@@ -128,4 +128,81 @@
except OSError:
pass
-RealBox = Box
+class FileBox(object):
+ def __init__(self, fun, args=None, kwargs=None):
+ if args is None:
+ args = []
+ if kwargs is None:
+ kwargs = {}
+ self.fun = fun
+ self.args = args
+ self.kwargs = kwargs
+
+ def run(self):
+ tempdir = py.test.ensuretemp("box")
+ self.tempdir = tempdir
+ self.PYTESTRETVAL = tempdir.join('retval')
+ self.PYTESTSTDOUT = tempdir.join('stdout')
+ self.PYTESTSTDERR = tempdir.join('stderr')
+ pid = os.fork()
+ if pid:
+ self.parent()
+ else:
+ try:
+ outcome = self.children()
+ except:
+ excinfo = py.code.ExceptionInfo()
+ print "Internal box error"
+ for i in excinfo.traceback:
+ print str(i)[2:-1]
+ print excinfo
+ os._exit(1)
+ os.close(1)
+ os.close(2)
+ os._exit(0)
+ return pid
+
+ def children(self):
+ # right now we need to call a function, but first we need to
+ # map all IO that might happen
+ # make sure sys.stdout points to file descriptor one
+ sys.stdout = stdout = self.PYTESTSTDOUT.open('w')
+ sys.stdout.flush()
+ fdstdout = stdout.fileno()
+ if fdstdout != 1:
+ os.dup2(fdstdout, 1)
+ sys.stderr = stderr = self.PYTESTSTDERR.open('w')
+ fdstderr = stderr.fileno()
+ if fdstderr != 2:
+ os.dup2(fdstderr, 2)
+ retvalf = self.PYTESTRETVAL.open("w")
+ try:
+ retval = self.fun(*self.args, **self.kwargs)
+ retvalf.write(marshal.dumps(retval))
+ finally:
+ stdout.close()
+ stderr.close()
+ retvalf.close()
+
+ def parent(self):
+ pid, exitstat = os.wait()
+ self.signal = exitstat & 0x7f
+ self.exitstat = exitstat & 0xff00
+
+ if not exitstat:
+ retval = self.PYTESTRETVAL.open()
+ try:
+ retval_data = retval.read()
+ finally:
+ retval.close()
+ self.retval = marshal.loads(retval_data)
+ else:
+ self.retval = None
+
+ self.stdoutrepr = self.PYTESTSTDOUT.read()
+ self.stderrrepr = self.PYTESTSTDERR.read()
+ return self.stdoutrepr, self.stderrrepr
+
+
+RealBox = FileBox
+Box = FileBox
Modified: py/branch/distributed/py/test/rsession/testing/test_boxing.py
==============================================================================
--- py/branch/distributed/py/test/rsession/testing/test_boxing.py (original)
+++ py/branch/distributed/py/test/rsession/testing/test_boxing.py Mon Sep 11 14:05:14 2006
@@ -54,7 +54,6 @@
assert b.retval == 3
def test_box_in_a_box():
- py.test.skip("fails")
def boxfun():
b = RealBox(example2.boxf2)
b.run()
@@ -64,8 +63,9 @@
b = RealBox(boxfun)
b.run()
- assert b.stdoutrepr == "someout"
- assert b.stderrrepr == "someerr"
+ assert b.stdoutrepr == "someout\n"
+ assert b.stderrrepr == "someerr\n"
assert b.exitstat == 0
assert b.signal == 0
assert b.retval == 2
+
From cfbolz at codespeak.net Mon Sep 11 14:15:07 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Mon, 11 Sep 2006 14:15:07 +0200 (CEST)
Subject: [py-svn] r32147 - in py/dist/py: . builtin builtin/testing
Message-ID: <20060911121507.476681006C@code0.codespeak.net>
Author: cfbolz
Date: Mon Sep 11 14:15:05 2006
New Revision: 32147
Added:
py/dist/py/builtin/sorted.py
py/dist/py/builtin/testing/test_sorted.py
Modified:
py/dist/py/__init__.py
Log:
(cfbolz, a bit of brian): something that I implemented a while ago but never
checked in: an implementation of sorted for py.builtin which should run on top
of 2.2 and 2.3.
Modified: py/dist/py/__init__.py
==============================================================================
--- py/dist/py/__init__.py (original)
+++ py/dist/py/__init__.py Mon Sep 11 14:15:05 2006
@@ -86,6 +86,7 @@
# backports and additions of builtins
'builtin.enumerate' : ('./builtin/enumerate.py', 'enumerate'),
'builtin.reversed' : ('./builtin/reversed.py', 'reversed'),
+ 'builtin.sorted' : ('./builtin/sorted.py', 'sorted'),
'builtin.BaseException' : ('./builtin/exception.py', 'BaseException'),
# gateways into remote contexts
Added: py/dist/py/builtin/sorted.py
==============================================================================
--- (empty file)
+++ py/dist/py/builtin/sorted.py Mon Sep 11 14:15:05 2006
@@ -0,0 +1,31 @@
+builtin_cmp = cmp # need to use cmp as keyword arg
+
+def _sorted(iterable, cmp=None, key=None, reverse=0):
+ use_cmp = None
+ if key is not None:
+ if cmp is None:
+ def use_cmp(x, y):
+ return builtin_cmp(x[0], y[0])
+ else:
+ def use_cmp(x, y):
+ return cmp(x[0], y[0])
+ l = [(key(element), element) for element in iterable]
+ else:
+ if cmp is not None:
+ use_cmp = cmp
+ l = list(iterable)
+ print l
+ if use_cmp is not None:
+ l.sort(cmp=use_cmp)
+ else:
+ l.sort()
+ if reverse:
+ l.reverse()
+ if key is not None:
+ return [element for (_, element) in l]
+ return l
+
+try:
+ sorted = sorted
+except NameError:
+ sorted = _sorted
Added: py/dist/py/builtin/testing/test_sorted.py
==============================================================================
--- (empty file)
+++ py/dist/py/builtin/testing/test_sorted.py Mon Sep 11 14:15:05 2006
@@ -0,0 +1,24 @@
+import py
+from py.__.builtin.sorted import _sorted
+
+def test_sorted():
+ for s in [_sorted, py.builtin.sorted]:
+ def test():
+ assert s([3, 2, 1]) == [1, 2, 3]
+ assert s([1, 2, 3], reverse=True) == [3, 2, 1]
+ l = s([1, 2, 3, 4, 5, 6], key=lambda x: x % 2)
+ assert l == [2, 4, 6, 1, 3, 5]
+ l = s([1, 2, 3, 4], cmp=lambda x, y: -cmp(x, y))
+ assert l == [4, 3, 2, 1]
+ l = s([1, 2, 3, 4], cmp=lambda x, y: -cmp(x, y),
+ key=lambda x: x % 2)
+ assert l == [1, 3, 2, 4]
+
+ def compare(x, y):
+ assert type(x) == str
+ assert type(y) == str
+ return cmp(x, y)
+ data = 'The quick Brown fox Jumped over The lazy Dog'.split()
+ s(data, cmp=compare, key=str.lower)
+ yield test
+
From fijal at codespeak.net Mon Sep 11 14:35:43 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Mon, 11 Sep 2006 14:35:43 +0200 (CEST)
Subject: [py-svn] r32148 - py/branch/distributed/py/test/rsession
Message-ID: <20060911123543.3E06B1006C@code0.codespeak.net>
Author: fijal
Date: Mon Sep 11 14:35:41 2006
New Revision: 32148
Modified:
py/branch/distributed/py/test/rsession/web.py
py/branch/distributed/py/test/rsession/webjs.py
Log:
Streamline events.
Modified: py/branch/distributed/py/test/rsession/web.py
==============================================================================
--- py/branch/distributed/py/test/rsession/web.py (original)
+++ py/branch/distributed/py/test/rsession/web.py Mon Sep 11 14:35:41 2006
@@ -77,7 +77,14 @@
def show_fail(self, item_name="a"):
return json.write({'item_name':item_name, 'traceback':escape(str(self.fail_reasons[item_name]))})
- @described(retval={"aa":"aa"})
+ @described(retval=[{"aa":"aa"}])
+ def show_all_statuses(self):
+ retlist = [self.show_status_change()]
+ while not self.pending_events.empty():
+ retlist.append(self.show_status_change())
+ retval = json.write(retlist)
+ return retval
+
def show_status_change(self):
def add_item(event):
item = event.item
@@ -122,7 +129,7 @@
args = {}
args['event'] = escape(str(event))
args['type'] = event.__class__.__name__
- return json.write(args)
+ return args
def repr_failure_tblong(self, item, excinfo, traceback):
lines = []
Modified: py/branch/distributed/py/test/rsession/webjs.py
==============================================================================
--- py/branch/distributed/py/test/rsession/webjs.py (original)
+++ py/branch/distributed/py/test/rsession/webjs.py Mon Sep 11 14:35:41 2006
@@ -17,9 +17,14 @@
tracebacks = {}
skips = {}
-def comeback(msg):
- if len(msg) == 0:
+def comeback(msglist):
+ if len(msglist) == 0:
return
+ for msg in msglist:
+ process(msg)
+ exported_methods.show_all_statuses(comeback)
+
+def process(msg):
elem = dom.get_document().getElementById("testmain")
#elem.innerHTML += '%s
' % msg['event']
main_t = dom.get_document().getElementById("main_table")
@@ -63,7 +68,6 @@
module_part.appendChild(td)
except:
dom.get_document().getElementById("testmain").innerHTML += "some error"
- exported_methods.show_status_change(comeback)
def show_skip(item_name="a"):
set_msgbox(skips[item_name])
@@ -93,5 +97,5 @@
def main():
exported_methods.show_hosts(host_init)
- exported_methods.show_status_change(comeback)
+ exported_methods.show_all_statuses(comeback)
From fijal at codespeak.net Mon Sep 11 14:38:37 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Mon, 11 Sep 2006 14:38:37 +0200 (CEST)
Subject: [py-svn] r32149 - py/branch/distributed/py/test/rsession
Message-ID: <20060911123837.A96EA1006C@code0.codespeak.net>
Author: fijal
Date: Mon Sep 11 14:38:36 2006
New Revision: 32149
Modified:
py/branch/distributed/py/test/rsession/webjs.py
Log:
Typo.
Modified: py/branch/distributed/py/test/rsession/webjs.py
==============================================================================
--- py/branch/distributed/py/test/rsession/webjs.py (original)
+++ py/branch/distributed/py/test/rsession/webjs.py Mon Sep 11 14:38:36 2006
@@ -25,6 +25,8 @@
exported_methods.show_all_statuses(comeback)
def process(msg):
+ if len(msg) == 0:
+ return
elem = dom.get_document().getElementById("testmain")
#elem.innerHTML += '%s
' % msg['event']
main_t = dom.get_document().getElementById("main_table")
From cfbolz at codespeak.net Mon Sep 11 14:40:40 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Mon, 11 Sep 2006 14:40:40 +0200 (CEST)
Subject: [py-svn] r32150 - in py/dist/py: . compat
Message-ID: <20060911124040.2E9621006C@code0.codespeak.net>
Author: cfbolz
Date: Mon Sep 11 14:40:38 2006
New Revision: 32150
Added:
py/dist/py/compat/subprocess.py
Modified:
py/dist/py/__init__.py
Log:
add subprocess to py.compat. Should be tested a bit to see whether it really
works on older version.
Modified: py/dist/py/__init__.py
==============================================================================
--- py/dist/py/__init__.py (original)
+++ py/dist/py/__init__.py Mon Sep 11 14:40:38 2006
@@ -125,4 +125,5 @@
'compat.doctest' : ('./compat/doctest.py', '*'),
'compat.optparse' : ('./compat/optparse.py', '*'),
'compat.textwrap' : ('./compat/textwrap.py', '*'),
+ 'compat.subprocess' : ('./compat/subprocess.py', '*'),
})
Added: py/dist/py/compat/subprocess.py
==============================================================================
--- (empty file)
+++ py/dist/py/compat/subprocess.py Mon Sep 11 14:40:38 2006
@@ -0,0 +1,1165 @@
+# subprocess - Subprocesses with accessible I/O streams
+#
+# For more information about this module, see PEP 324.
+#
+# Copyright (c) 2003-2004 by Peter Astrand
+#
+# By obtaining, using, and/or copying this software and/or its
+# associated documentation, you agree that you have read, understood,
+# and will comply with the following terms and conditions:
+#
+# Permission to use, copy, modify, and distribute this software and
+# its associated documentation for any purpose and without fee is
+# hereby granted, provided that the above copyright notice appears in
+# all copies, and that both that copyright notice and this permission
+# notice appear in supporting documentation, and that the name of the
+# author not be used in advertising or publicity pertaining to
+# distribution of the software without specific, written prior
+# permission.
+#
+# THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+r"""subprocess - Subprocesses with accessible I/O streams
+
+This module allows you to spawn processes, connect to their
+input/output/error pipes, and obtain their return codes. This module
+intends to replace several other, older modules and functions, like:
+
+os.system
+os.spawn*
+os.popen*
+popen2.*
+commands.*
+
+Information about how the subprocess module can be used to replace these
+modules and functions can be found below.
+
+
+
+Using the subprocess module
+===========================
+This module defines one class called Popen:
+
+class Popen(args, bufsize=0, executable=None,
+ stdin=None, stdout=None, stderr=None,
+ preexec_fn=None, close_fds=False, shell=False,
+ cwd=None, env=None, universal_newlines=False,
+ startupinfo=None, creationflags=0):
+
+
+Arguments are:
+
+args should be a string, or a sequence of program arguments. The
+program to execute is normally the first item in the args sequence or
+string, but can be explicitly set by using the executable argument.
+
+On UNIX, with shell=False (default): In this case, the Popen class
+uses os.execvp() to execute the child program. args should normally
+be a sequence. A string will be treated as a sequence with the string
+as the only item (the program to execute).
+
+On UNIX, with shell=True: If args is a string, it specifies the
+command string to execute through the shell. If args is a sequence,
+the first item specifies the command string, and any additional items
+will be treated as additional shell arguments.
+
+On Windows: the Popen class uses CreateProcess() to execute the child
+program, which operates on strings. If args is a sequence, it will be
+converted to a string using the list2cmdline method. Please note that
+not all MS Windows applications interpret the command line the same
+way: The list2cmdline is designed for applications using the same
+rules as the MS C runtime.
+
+bufsize, if given, has the same meaning as the corresponding argument
+to the built-in open() function: 0 means unbuffered, 1 means line
+buffered, any other positive value means use a buffer of
+(approximately) that size. A negative bufsize means to use the system
+default, which usually means fully buffered. The default value for
+bufsize is 0 (unbuffered).
+
+stdin, stdout and stderr specify the executed programs' standard
+input, standard output and standard error file handles, respectively.
+Valid values are PIPE, an existing file descriptor (a positive
+integer), an existing file object, and None. PIPE indicates that a
+new pipe to the child should be created. With None, no redirection
+will occur; the child's file handles will be inherited from the
+parent. Additionally, stderr can be STDOUT, which indicates that the
+stderr data from the applications should be captured into the same
+file handle as for stdout.
+
+If preexec_fn is set to a callable object, this object will be called
+in the child process just before the child is executed.
+
+If close_fds is true, all file descriptors except 0, 1 and 2 will be
+closed before the child process is executed.
+
+if shell is true, the specified command will be executed through the
+shell.
+
+If cwd is not None, the current directory will be changed to cwd
+before the child is executed.
+
+If env is not None, it defines the environment variables for the new
+process.
+
+If universal_newlines is true, the file objects stdout and stderr are
+opened as a text files, but lines may be terminated by any of '\n',
+the Unix end-of-line convention, '\r', the Macintosh convention or
+'\r\n', the Windows convention. All of these external representations
+are seen as '\n' by the Python program. Note: This feature is only
+available if Python is built with universal newline support (the
+default). Also, the newlines attribute of the file objects stdout,
+stdin and stderr are not updated by the communicate() method.
+
+The startupinfo and creationflags, if given, will be passed to the
+underlying CreateProcess() function. They can specify things such as
+appearance of the main window and priority for the new process.
+(Windows only)
+
+
+This module also defines two shortcut functions:
+
+call(*args, **kwargs):
+ Run command with arguments. Wait for command to complete, then
+ return the returncode attribute.
+
+ The arguments are the same as for the Popen constructor. Example:
+
+ retcode = call(["ls", "-l"])
+
+
+Exceptions
+----------
+Exceptions raised in the child process, before the new program has
+started to execute, will be re-raised in the parent. Additionally,
+the exception object will have one extra attribute called
+'child_traceback', which is a string containing traceback information
+from the childs point of view.
+
+The most common exception raised is OSError. This occurs, for
+example, when trying to execute a non-existent file. Applications
+should prepare for OSErrors.
+
+A ValueError will be raised if Popen is called with invalid arguments.
+
+
+Security
+--------
+Unlike some other popen functions, this implementation will never call
+/bin/sh implicitly. This means that all characters, including shell
+metacharacters, can safely be passed to child processes.
+
+
+Popen objects
+=============
+Instances of the Popen class have the following methods:
+
+poll()
+ Check if child process has terminated. Returns returncode
+ attribute.
+
+wait()
+ Wait for child process to terminate. Returns returncode attribute.
+
+communicate(input=None)
+ Interact with process: Send data to stdin. Read data from stdout
+ and stderr, until end-of-file is reached. Wait for process to
+ terminate. The optional stdin argument should be a string to be
+ sent to the child process, or None, if no data should be sent to
+ the child.
+
+ communicate() returns a tuple (stdout, stderr).
+
+ Note: The data read is buffered in memory, so do not use this
+ method if the data size is large or unlimited.
+
+The following attributes are also available:
+
+stdin
+ If the stdin argument is PIPE, this attribute is a file object
+ that provides input to the child process. Otherwise, it is None.
+
+stdout
+ If the stdout argument is PIPE, this attribute is a file object
+ that provides output from the child process. Otherwise, it is
+ None.
+
+stderr
+ If the stderr argument is PIPE, this attribute is file object that
+ provides error output from the child process. Otherwise, it is
+ None.
+
+pid
+ The process ID of the child process.
+
+returncode
+ The child return code. A None value indicates that the process
+ hasn't terminated yet. A negative value -N indicates that the
+ child was terminated by signal N (UNIX only).
+
+
+Replacing older functions with the subprocess module
+====================================================
+In this section, "a ==> b" means that b can be used as a replacement
+for a.
+
+Note: All functions in this section fail (more or less) silently if
+the executed program cannot be found; this module raises an OSError
+exception.
+
+In the following examples, we assume that the subprocess module is
+imported with "from subprocess import *".
+
+
+Replacing /bin/sh shell backquote
+---------------------------------
+output=`mycmd myarg`
+==>
+output = Popen(["mycmd", "myarg"], stdout=PIPE).communicate()[0]
+
+
+Replacing shell pipe line
+-------------------------
+output=`dmesg | grep hda`
+==>
+p1 = Popen(["dmesg"], stdout=PIPE)
+p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE)
+output = p2.communicate()[0]
+
+
+Replacing os.system()
+---------------------
+sts = os.system("mycmd" + " myarg")
+==>
+p = Popen("mycmd" + " myarg", shell=True)
+sts = os.waitpid(p.pid, 0)
+
+Note:
+
+* Calling the program through the shell is usually not required.
+
+* It's easier to look at the returncode attribute than the
+ exitstatus.
+
+A more real-world example would look like this:
+
+try:
+ retcode = call("mycmd" + " myarg", shell=True)
+ if retcode < 0:
+ print >>sys.stderr, "Child was terminated by signal", -retcode
+ else:
+ print >>sys.stderr, "Child returned", retcode
+except OSError, e:
+ print >>sys.stderr, "Execution failed:", e
+
+
+Replacing os.spawn*
+-------------------
+P_NOWAIT example:
+
+pid = os.spawnlp(os.P_NOWAIT, "/bin/mycmd", "mycmd", "myarg")
+==>
+pid = Popen(["/bin/mycmd", "myarg"]).pid
+
+
+P_WAIT example:
+
+retcode = os.spawnlp(os.P_WAIT, "/bin/mycmd", "mycmd", "myarg")
+==>
+retcode = call(["/bin/mycmd", "myarg"])
+
+
+Vector example:
+
+os.spawnvp(os.P_NOWAIT, path, args)
+==>
+Popen([path] + args[1:])
+
+
+Environment example:
+
+os.spawnlpe(os.P_NOWAIT, "/bin/mycmd", "mycmd", "myarg", env)
+==>
+Popen(["/bin/mycmd", "myarg"], env={"PATH": "/usr/bin"})
+
+
+Replacing os.popen*
+-------------------
+pipe = os.popen(cmd, mode='r', bufsize)
+==>
+pipe = Popen(cmd, shell=True, bufsize=bufsize, stdout=PIPE).stdout
+
+pipe = os.popen(cmd, mode='w', bufsize)
+==>
+pipe = Popen(cmd, shell=True, bufsize=bufsize, stdin=PIPE).stdin
+
+
+(child_stdin, child_stdout) = os.popen2(cmd, mode, bufsize)
+==>
+p = Popen(cmd, shell=True, bufsize=bufsize,
+ stdin=PIPE, stdout=PIPE, close_fds=True)
+(child_stdin, child_stdout) = (p.stdin, p.stdout)
+
+
+(child_stdin,
+ child_stdout,
+ child_stderr) = os.popen3(cmd, mode, bufsize)
+==>
+p = Popen(cmd, shell=True, bufsize=bufsize,
+ stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
+(child_stdin,
+ child_stdout,
+ child_stderr) = (p.stdin, p.stdout, p.stderr)
+
+
+(child_stdin, child_stdout_and_stderr) = os.popen4(cmd, mode, bufsize)
+==>
+p = Popen(cmd, shell=True, bufsize=bufsize,
+ stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
+(child_stdin, child_stdout_and_stderr) = (p.stdin, p.stdout)
+
+
+Replacing popen2.*
+------------------
+Note: If the cmd argument to popen2 functions is a string, the command
+is executed through /bin/sh. If it is a list, the command is directly
+executed.
+
+(child_stdout, child_stdin) = popen2.popen2("somestring", bufsize, mode)
+==>
+p = Popen(["somestring"], shell=True, bufsize=bufsize
+ stdin=PIPE, stdout=PIPE, close_fds=True)
+(child_stdout, child_stdin) = (p.stdout, p.stdin)
+
+
+(child_stdout, child_stdin) = popen2.popen2(["mycmd", "myarg"], bufsize, mode)
+==>
+p = Popen(["mycmd", "myarg"], bufsize=bufsize,
+ stdin=PIPE, stdout=PIPE, close_fds=True)
+(child_stdout, child_stdin) = (p.stdout, p.stdin)
+
+The popen2.Popen3 and popen3.Popen4 basically works as subprocess.Popen,
+except that:
+
+* subprocess.Popen raises an exception if the execution fails
+* the capturestderr argument is replaced with the stderr argument.
+* stdin=PIPE and stdout=PIPE must be specified.
+* popen2 closes all filedescriptors by default, but you have to specify
+ close_fds=True with subprocess.Popen.
+
+
+"""
+
+import sys
+mswindows = (sys.platform == "win32")
+
+import os
+import types
+import traceback
+
+if mswindows:
+ import threading
+ import msvcrt
+ if 0: # <-- change this to use pywin32 instead of the _subprocess driver
+ import pywintypes
+ from win32api import GetStdHandle, STD_INPUT_HANDLE, \
+ STD_OUTPUT_HANDLE, STD_ERROR_HANDLE
+ from win32api import GetCurrentProcess, DuplicateHandle, \
+ GetModuleFileName, GetVersion
+ from win32con import DUPLICATE_SAME_ACCESS, SW_HIDE
+ from win32pipe import CreatePipe
+ from win32process import CreateProcess, STARTUPINFO, \
+ GetExitCodeProcess, STARTF_USESTDHANDLES, \
+ STARTF_USESHOWWINDOW, CREATE_NEW_CONSOLE
+ from win32event import WaitForSingleObject, INFINITE, WAIT_OBJECT_0
+ else:
+ from _subprocess import *
+ class STARTUPINFO:
+ dwFlags = 0
+ hStdInput = None
+ hStdOutput = None
+ hStdError = None
+ class pywintypes:
+ error = IOError
+else:
+ import select
+ import errno
+ import fcntl
+ import pickle
+
+__all__ = ["Popen", "PIPE", "STDOUT", "call"]
+
+try:
+ MAXFD = os.sysconf("SC_OPEN_MAX")
+except:
+ MAXFD = 256
+
+# True/False does not exist on 2.2.0
+try:
+ False
+except NameError:
+ False = 0
+ True = 1
+
+_active = []
+
+def _cleanup():
+ for inst in _active[:]:
+ inst.poll()
+
+PIPE = -1
+STDOUT = -2
+
+
+def call(*args, **kwargs):
+ """Run command with arguments. Wait for command to complete, then
+ return the returncode attribute.
+
+ The arguments are the same as for the Popen constructor. Example:
+
+ retcode = call(["ls", "-l"])
+ """
+ return Popen(*args, **kwargs).wait()
+
+
+def list2cmdline(seq):
+ """
+ Translate a sequence of arguments into a command line
+ string, using the same rules as the MS C runtime:
+
+ 1) Arguments are delimited by white space, which is either a
+ space or a tab.
+
+ 2) A string surrounded by double quotation marks is
+ interpreted as a single argument, regardless of white space
+ contained within. A quoted string can be embedded in an
+ argument.
+
+ 3) A double quotation mark preceded by a backslash is
+ interpreted as a literal double quotation mark.
+
+ 4) Backslashes are interpreted literally, unless they
+ immediately precede a double quotation mark.
+
+ 5) If backslashes immediately precede a double quotation mark,
+ every pair of backslashes is interpreted as a literal
+ backslash. If the number of backslashes is odd, the last
+ backslash escapes the next double quotation mark as
+ described in rule 3.
+ """
+
+ # See
+ # http://msdn.microsoft.com/library/en-us/vccelng/htm/progs_12.asp
+ result = []
+ needquote = False
+ for arg in seq:
+ bs_buf = []
+
+ # Add a space to separate this argument from the others
+ if result:
+ result.append(' ')
+
+ needquote = (" " in arg) or ("\t" in arg)
+ if needquote:
+ result.append('"')
+
+ for c in arg:
+ if c == '\\':
+ # Don't know if we need to double yet.
+ bs_buf.append(c)
+ elif c == '"':
+ # Double backspaces.
+ result.append('\\' * len(bs_buf)*2)
+ bs_buf = []
+ result.append('\\"')
+ else:
+ # Normal char
+ if bs_buf:
+ result.extend(bs_buf)
+ bs_buf = []
+ result.append(c)
+
+ # Add remaining backspaces, if any.
+ if bs_buf:
+ result.extend(bs_buf)
+
+ if needquote:
+ result.extend(bs_buf)
+ result.append('"')
+
+ return ''.join(result)
+
+
+class Popen(object):
+ def __init__(self, args, bufsize=0, executable=None,
+ stdin=None, stdout=None, stderr=None,
+ preexec_fn=None, close_fds=False, shell=False,
+ cwd=None, env=None, universal_newlines=False,
+ startupinfo=None, creationflags=0):
+ """Create new Popen instance."""
+ _cleanup()
+
+ if not isinstance(bufsize, (int, long)):
+ raise TypeError("bufsize must be an integer")
+
+ if mswindows:
+ if preexec_fn is not None:
+ raise ValueError("preexec_fn is not supported on Windows "
+ "platforms")
+ if close_fds:
+ raise ValueError("close_fds is not supported on Windows "
+ "platforms")
+ else:
+ # POSIX
+ if startupinfo is not None:
+ raise ValueError("startupinfo is only supported on Windows "
+ "platforms")
+ if creationflags != 0:
+ raise ValueError("creationflags is only supported on Windows "
+ "platforms")
+
+ self.stdin = None
+ self.stdout = None
+ self.stderr = None
+ self.pid = None
+ self.returncode = None
+ self.universal_newlines = universal_newlines
+
+ # Input and output objects. The general principle is like
+ # this:
+ #
+ # Parent Child
+ # ------ -----
+ # p2cwrite ---stdin---> p2cread
+ # c2pread <--stdout--- c2pwrite
+ # errread <--stderr--- errwrite
+ #
+ # On POSIX, the child objects are file descriptors. On
+ # Windows, these are Windows file handles. The parent objects
+ # are file descriptors on both platforms. The parent objects
+ # are None when not using PIPEs. The child objects are None
+ # when not redirecting.
+
+ (p2cread, p2cwrite,
+ c2pread, c2pwrite,
+ errread, errwrite) = self._get_handles(stdin, stdout, stderr)
+
+ self._execute_child(args, executable, preexec_fn, close_fds,
+ cwd, env, universal_newlines,
+ startupinfo, creationflags, shell,
+ p2cread, p2cwrite,
+ c2pread, c2pwrite,
+ errread, errwrite)
+
+ if p2cwrite:
+ self.stdin = os.fdopen(p2cwrite, 'wb', bufsize)
+ if c2pread:
+ if universal_newlines:
+ self.stdout = os.fdopen(c2pread, 'rU', bufsize)
+ else:
+ self.stdout = os.fdopen(c2pread, 'rb', bufsize)
+ if errread:
+ if universal_newlines:
+ self.stderr = os.fdopen(errread, 'rU', bufsize)
+ else:
+ self.stderr = os.fdopen(errread, 'rb', bufsize)
+
+ _active.append(self)
+
+
+ def _translate_newlines(self, data):
+ data = data.replace("\r\n", "\n")
+ data = data.replace("\r", "\n")
+ return data
+
+
+ if mswindows:
+ #
+ # Windows methods
+ #
+ def _get_handles(self, stdin, stdout, stderr):
+ """Construct and return tupel with IO objects:
+ p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
+ """
+ if stdin == None and stdout == None and stderr == None:
+ return (None, None, None, None, None, None)
+
+ p2cread, p2cwrite = None, None
+ c2pread, c2pwrite = None, None
+ errread, errwrite = None, None
+
+ if stdin == None:
+ p2cread = GetStdHandle(STD_INPUT_HANDLE)
+ elif stdin == PIPE:
+ p2cread, p2cwrite = CreatePipe(None, 0)
+ # Detach and turn into fd
+ p2cwrite = p2cwrite.Detach()
+ p2cwrite = msvcrt.open_osfhandle(p2cwrite, 0)
+ elif type(stdin) == types.IntType:
+ p2cread = msvcrt.get_osfhandle(stdin)
+ else:
+ # Assuming file-like object
+ p2cread = msvcrt.get_osfhandle(stdin.fileno())
+ p2cread = self._make_inheritable(p2cread)
+
+ if stdout == None:
+ c2pwrite = GetStdHandle(STD_OUTPUT_HANDLE)
+ elif stdout == PIPE:
+ c2pread, c2pwrite = CreatePipe(None, 0)
+ # Detach and turn into fd
+ c2pread = c2pread.Detach()
+ c2pread = msvcrt.open_osfhandle(c2pread, 0)
+ elif type(stdout) == types.IntType:
+ c2pwrite = msvcrt.get_osfhandle(stdout)
+ else:
+ # Assuming file-like object
+ c2pwrite = msvcrt.get_osfhandle(stdout.fileno())
+ c2pwrite = self._make_inheritable(c2pwrite)
+
+ if stderr == None:
+ errwrite = GetStdHandle(STD_ERROR_HANDLE)
+ elif stderr == PIPE:
+ errread, errwrite = CreatePipe(None, 0)
+ # Detach and turn into fd
+ errread = errread.Detach()
+ errread = msvcrt.open_osfhandle(errread, 0)
+ elif stderr == STDOUT:
+ errwrite = c2pwrite
+ elif type(stderr) == types.IntType:
+ errwrite = msvcrt.get_osfhandle(stderr)
+ else:
+ # Assuming file-like object
+ errwrite = msvcrt.get_osfhandle(stderr.fileno())
+ errwrite = self._make_inheritable(errwrite)
+
+ return (p2cread, p2cwrite,
+ c2pread, c2pwrite,
+ errread, errwrite)
+
+
+ def _make_inheritable(self, handle):
+ """Return a duplicate of handle, which is inheritable"""
+ return DuplicateHandle(GetCurrentProcess(), handle,
+ GetCurrentProcess(), 0, 1,
+ DUPLICATE_SAME_ACCESS)
+
+
+ def _find_w9xpopen(self):
+ """Find and return absolut path to w9xpopen.exe"""
+ w9xpopen = os.path.join(os.path.dirname(GetModuleFileName(0)),
+ "w9xpopen.exe")
+ if not os.path.exists(w9xpopen):
+ # Eeek - file-not-found - possibly an embedding
+ # situation - see if we can locate it in sys.exec_prefix
+ w9xpopen = os.path.join(os.path.dirname(sys.exec_prefix),
+ "w9xpopen.exe")
+ if not os.path.exists(w9xpopen):
+ raise RuntimeError("Cannot locate w9xpopen.exe, which is "
+ "needed for Popen to work with your "
+ "shell or platform.")
+ return w9xpopen
+
+
+ def _execute_child(self, args, executable, preexec_fn, close_fds,
+ cwd, env, universal_newlines,
+ startupinfo, creationflags, shell,
+ p2cread, p2cwrite,
+ c2pread, c2pwrite,
+ errread, errwrite):
+ """Execute program (MS Windows version)"""
+
+ if not isinstance(args, types.StringTypes):
+ args = list2cmdline(args)
+
+ # Process startup details
+ default_startupinfo = STARTUPINFO()
+ if startupinfo == None:
+ startupinfo = default_startupinfo
+ if not None in (p2cread, c2pwrite, errwrite):
+ startupinfo.dwFlags |= STARTF_USESTDHANDLES
+ startupinfo.hStdInput = p2cread
+ startupinfo.hStdOutput = c2pwrite
+ startupinfo.hStdError = errwrite
+
+ if shell:
+ default_startupinfo.dwFlags |= STARTF_USESHOWWINDOW
+ default_startupinfo.wShowWindow = SW_HIDE
+ comspec = os.environ.get("COMSPEC", "cmd.exe")
+ args = comspec + " /c " + args
+ if (GetVersion() >= 0x80000000L or
+ os.path.basename(comspec).lower() == "command.com"):
+ # Win9x, or using command.com on NT. We need to
+ # use the w9xpopen intermediate program. For more
+ # information, see KB Q150956
+ # (http://web.archive.org/web/20011105084002/http://support.microsoft.com/support/kb/articles/Q150/9/56.asp)
+ w9xpopen = self._find_w9xpopen()
+ args = '"%s" %s' % (w9xpopen, args)
+ # Not passing CREATE_NEW_CONSOLE has been known to
+ # cause random failures on win9x. Specifically a
+ # dialog: "Your program accessed mem currently in
+ # use at xxx" and a hopeful warning about the
+ # stability of your system. Cost is Ctrl+C wont
+ # kill children.
+ creationflags |= CREATE_NEW_CONSOLE
+
+ # Start the process
+ try:
+ hp, ht, pid, tid = CreateProcess(executable, args,
+ # no special security
+ None, None,
+ # must inherit handles to pass std
+ # handles
+ 1,
+ creationflags,
+ env,
+ cwd,
+ startupinfo)
+ except pywintypes.error, e:
+ # Translate pywintypes.error to WindowsError, which is
+ # a subclass of OSError. FIXME: We should really
+ # translate errno using _sys_errlist (or simliar), but
+ # how can this be done from Python?
+ raise WindowsError(*e.args)
+
+ # Retain the process handle, but close the thread handle
+ self._handle = hp
+ self.pid = pid
+ ht.Close()
+
+ # Child is launched. Close the parent's copy of those pipe
+ # handles that only the child should have open. You need
+ # to make sure that no handles to the write end of the
+ # output pipe are maintained in this process or else the
+ # pipe will not close when the child process exits and the
+ # ReadFile will hang.
+ if p2cread != None:
+ p2cread.Close()
+ if c2pwrite != None:
+ c2pwrite.Close()
+ if errwrite != None:
+ errwrite.Close()
+
+
+ def poll(self):
+ """Check if child process has terminated. Returns returncode
+ attribute."""
+ if self.returncode == None:
+ if WaitForSingleObject(self._handle, 0) == WAIT_OBJECT_0:
+ self.returncode = GetExitCodeProcess(self._handle)
+ _active.remove(self)
+ return self.returncode
+
+
+ def wait(self):
+ """Wait for child process to terminate. Returns returncode
+ attribute."""
+ if self.returncode == None:
+ obj = WaitForSingleObject(self._handle, INFINITE)
+ self.returncode = GetExitCodeProcess(self._handle)
+ _active.remove(self)
+ return self.returncode
+
+
+ def _readerthread(self, fh, buffer):
+ buffer.append(fh.read())
+
+
+ def communicate(self, input=None):
+ """Interact with process: Send data to stdin. Read data from
+ stdout and stderr, until end-of-file is reached. Wait for
+ process to terminate. The optional input argument should be a
+ string to be sent to the child process, or None, if no data
+ should be sent to the child.
+
+ communicate() returns a tuple (stdout, stderr)."""
+ stdout = None # Return
+ stderr = None # Return
+
+ if self.stdout:
+ stdout = []
+ stdout_thread = threading.Thread(target=self._readerthread,
+ args=(self.stdout, stdout))
+ stdout_thread.setDaemon(True)
+ stdout_thread.start()
+ if self.stderr:
+ stderr = []
+ stderr_thread = threading.Thread(target=self._readerthread,
+ args=(self.stderr, stderr))
+ stderr_thread.setDaemon(True)
+ stderr_thread.start()
+
+ if self.stdin:
+ if input != None:
+ self.stdin.write(input)
+ self.stdin.close()
+
+ if self.stdout:
+ stdout_thread.join()
+ if self.stderr:
+ stderr_thread.join()
+
+ # All data exchanged. Translate lists into strings.
+ if stdout != None:
+ stdout = stdout[0]
+ if stderr != None:
+ stderr = stderr[0]
+
+ # Translate newlines, if requested. We cannot let the file
+ # object do the translation: It is based on stdio, which is
+ # impossible to combine with select (unless forcing no
+ # buffering).
+ if self.universal_newlines and hasattr(open, 'newlines'):
+ if stdout:
+ stdout = self._translate_newlines(stdout)
+ if stderr:
+ stderr = self._translate_newlines(stderr)
+
+ self.wait()
+ return (stdout, stderr)
+
+ else:
+ #
+ # POSIX methods
+ #
+ def _get_handles(self, stdin, stdout, stderr):
+ """Construct and return tupel with IO objects:
+ p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
+ """
+ p2cread, p2cwrite = None, None
+ c2pread, c2pwrite = None, None
+ errread, errwrite = None, None
+
+ if stdin == None:
+ pass
+ elif stdin == PIPE:
+ p2cread, p2cwrite = os.pipe()
+ elif type(stdin) == types.IntType:
+ p2cread = stdin
+ else:
+ # Assuming file-like object
+ p2cread = stdin.fileno()
+
+ if stdout == None:
+ pass
+ elif stdout == PIPE:
+ c2pread, c2pwrite = os.pipe()
+ elif type(stdout) == types.IntType:
+ c2pwrite = stdout
+ else:
+ # Assuming file-like object
+ c2pwrite = stdout.fileno()
+
+ if stderr == None:
+ pass
+ elif stderr == PIPE:
+ errread, errwrite = os.pipe()
+ elif stderr == STDOUT:
+ errwrite = c2pwrite
+ elif type(stderr) == types.IntType:
+ errwrite = stderr
+ else:
+ # Assuming file-like object
+ errwrite = stderr.fileno()
+
+ return (p2cread, p2cwrite,
+ c2pread, c2pwrite,
+ errread, errwrite)
+
+
+ def _set_cloexec_flag(self, fd):
+ try:
+ cloexec_flag = fcntl.FD_CLOEXEC
+ except AttributeError:
+ cloexec_flag = 1
+
+ old = fcntl.fcntl(fd, fcntl.F_GETFD)
+ fcntl.fcntl(fd, fcntl.F_SETFD, old | cloexec_flag)
+
+
+ def _close_fds(self, but):
+ for i in range(3, MAXFD):
+ if i == but:
+ continue
+ try:
+ os.close(i)
+ except:
+ pass
+
+
+ def _execute_child(self, args, executable, preexec_fn, close_fds,
+ cwd, env, universal_newlines,
+ startupinfo, creationflags, shell,
+ p2cread, p2cwrite,
+ c2pread, c2pwrite,
+ errread, errwrite):
+ """Execute program (POSIX version)"""
+
+ if isinstance(args, types.StringTypes):
+ args = [args]
+
+ if shell:
+ args = ["/bin/sh", "-c"] + args
+
+ if executable == None:
+ executable = args[0]
+
+ # For transferring possible exec failure from child to parent
+ # The first char specifies the exception type: 0 means
+ # OSError, 1 means some other error.
+ errpipe_read, errpipe_write = os.pipe()
+ self._set_cloexec_flag(errpipe_write)
+
+ self.pid = os.fork()
+ if self.pid == 0:
+ # Child
+ try:
+ # Close parent's pipe ends
+ if p2cwrite:
+ os.close(p2cwrite)
+ if c2pread:
+ os.close(c2pread)
+ if errread:
+ os.close(errread)
+ os.close(errpipe_read)
+
+ # Dup fds for child
+ if p2cread:
+ os.dup2(p2cread, 0)
+ if c2pwrite:
+ os.dup2(c2pwrite, 1)
+ if errwrite:
+ os.dup2(errwrite, 2)
+
+ # Close pipe fds. Make sure we doesn't close the same
+ # fd more than once.
+ if p2cread:
+ os.close(p2cread)
+ if c2pwrite and c2pwrite not in (p2cread,):
+ os.close(c2pwrite)
+ if errwrite and errwrite not in (p2cread, c2pwrite):
+ os.close(errwrite)
+
+ # Close all other fds, if asked for
+ if close_fds:
+ self._close_fds(but=errpipe_write)
+
+ if cwd != None:
+ os.chdir(cwd)
+
+ if preexec_fn:
+ apply(preexec_fn)
+
+ if env == None:
+ os.execvp(executable, args)
+ else:
+ os.execvpe(executable, args, env)
+
+ except:
+ exc_type, exc_value, tb = sys.exc_info()
+ # Save the traceback and attach it to the exception object
+ exc_lines = traceback.format_exception(exc_type,
+ exc_value,
+ tb)
+ exc_value.child_traceback = ''.join(exc_lines)
+ os.write(errpipe_write, pickle.dumps(exc_value))
+
+ # This exitcode won't be reported to applications, so it
+ # really doesn't matter what we return.
+ os._exit(255)
+
+ # Parent
+ os.close(errpipe_write)
+ if p2cread and p2cwrite:
+ os.close(p2cread)
+ if c2pwrite and c2pread:
+ os.close(c2pwrite)
+ if errwrite and errread:
+ os.close(errwrite)
+
+ # Wait for exec to fail or succeed; possibly raising exception
+ data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB
+ os.close(errpipe_read)
+ if data != "":
+ os.waitpid(self.pid, 0)
+ child_exception = pickle.loads(data)
+ raise child_exception
+
+
+ def _handle_exitstatus(self, sts):
+ if os.WIFSIGNALED(sts):
+ self.returncode = -os.WTERMSIG(sts)
+ elif os.WIFEXITED(sts):
+ self.returncode = os.WEXITSTATUS(sts)
+ else:
+ # Should never happen
+ raise RuntimeError("Unknown child exit status!")
+
+ _active.remove(self)
+
+
+ def poll(self):
+ """Check if child process has terminated. Returns returncode
+ attribute."""
+ if self.returncode == None:
+ try:
+ pid, sts = os.waitpid(self.pid, os.WNOHANG)
+ if pid == self.pid:
+ self._handle_exitstatus(sts)
+ except os.error:
+ pass
+ return self.returncode
+
+
+ def wait(self):
+ """Wait for child process to terminate. Returns returncode
+ attribute."""
+ if self.returncode == None:
+ pid, sts = os.waitpid(self.pid, 0)
+ self._handle_exitstatus(sts)
+ return self.returncode
+
+
+ def communicate(self, input=None):
+ """Interact with process: Send data to stdin. Read data from
+ stdout and stderr, until end-of-file is reached. Wait for
+ process to terminate. The optional input argument should be a
+ string to be sent to the child process, or None, if no data
+ should be sent to the child.
+
+ communicate() returns a tuple (stdout, stderr)."""
+ read_set = []
+ write_set = []
+ stdout = None # Return
+ stderr = None # Return
+
+ if self.stdin:
+ # Flush stdio buffer. This might block, if the user has
+ # been writing to .stdin in an uncontrolled fashion.
+ self.stdin.flush()
+ if input:
+ write_set.append(self.stdin)
+ else:
+ self.stdin.close()
+ if self.stdout:
+ read_set.append(self.stdout)
+ stdout = []
+ if self.stderr:
+ read_set.append(self.stderr)
+ stderr = []
+
+ while read_set or write_set:
+ rlist, wlist, xlist = select.select(read_set, write_set, [])
+
+ if self.stdin in wlist:
+ # When select has indicated that the file is writable,
+ # we can write up to PIPE_BUF bytes without risk
+ # blocking. POSIX defines PIPE_BUF >= 512
+ bytes_written = os.write(self.stdin.fileno(), input[:512])
+ input = input[bytes_written:]
+ if not input:
+ self.stdin.close()
+ write_set.remove(self.stdin)
+
+ if self.stdout in rlist:
+ data = os.read(self.stdout.fileno(), 1024)
+ if data == "":
+ self.stdout.close()
+ read_set.remove(self.stdout)
+ stdout.append(data)
+
+ if self.stderr in rlist:
+ data = os.read(self.stderr.fileno(), 1024)
+ if data == "":
+ self.stderr.close()
+ read_set.remove(self.stderr)
+ stderr.append(data)
+
+ # All data exchanged. Translate lists into strings.
+ if stdout != None:
+ stdout = ''.join(stdout)
+ if stderr != None:
+ stderr = ''.join(stderr)
+
+ # Translate newlines, if requested. We cannot let the file
+ # object do the translation: It is based on stdio, which is
+ # impossible to combine with select (unless forcing no
+ # buffering).
+ if self.universal_newlines and hasattr(open, 'newlines'):
+ if stdout:
+ stdout = self._translate_newlines(stdout)
+ if stderr:
+ stderr = self._translate_newlines(stderr)
+
+ self.wait()
+ return (stdout, stderr)
+
+
+def _demo_posix():
+ #
+ # Example 1: Simple redirection: Get process list
+ #
+ plist = Popen(["ps"], stdout=PIPE).communicate()[0]
+ print "Process list:"
+ print plist
+
+ #
+ # Example 2: Change uid before executing child
+ #
+ if os.getuid() == 0:
+ p = Popen(["id"], preexec_fn=lambda: os.setuid(100))
+ p.wait()
+
+ #
+ # Example 3: Connecting several subprocesses
+ #
+ print "Looking for 'hda'..."
+ p1 = Popen(["dmesg"], stdout=PIPE)
+ p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE)
+ print repr(p2.communicate()[0])
+
+ #
+ # Example 4: Catch execution error
+ #
+ print
+ print "Trying a weird file..."
+ try:
+ print Popen(["/this/path/does/not/exist"]).communicate()
+ except OSError, e:
+ if e.errno == errno.ENOENT:
+ print "The file didn't exist. I thought so..."
+ print "Child traceback:"
+ print e.child_traceback
+ else:
+ print "Error", e.errno
+ else:
+ print >>sys.stderr, "Gosh. No error."
+
+
+def _demo_windows():
+ #
+ # Example 1: Connecting several subprocesses
+ #
+ print "Looking for 'PROMPT' in set output..."
+ p1 = Popen("set", stdout=PIPE, shell=True)
+ p2 = Popen('find "PROMPT"', stdin=p1.stdout, stdout=PIPE)
+ print repr(p2.communicate()[0])
+
+ #
+ # Example 2: Simple execution of program
+ #
+ print "Executing calc..."
+ p = Popen("calc")
+ p.wait()
+
+
+if __name__ == "__main__":
+ if mswindows:
+ _demo_windows()
+ else:
+ _demo_posix()
From fijal at codespeak.net Mon Sep 11 14:50:40 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Mon, 11 Sep 2006 14:50:40 +0200 (CEST)
Subject: [py-svn] r32152 - py/branch/distributed/py/test/rsession
Message-ID: <20060911125040.0580C1007D@code0.codespeak.net>
Author: fijal
Date: Mon Sep 11 14:50:39 2006
New Revision: 32152
Modified:
py/branch/distributed/py/test/rsession/webjs.py
Log:
Fix test.
Modified: py/branch/distributed/py/test/rsession/webjs.py
==============================================================================
--- py/branch/distributed/py/test/rsession/webjs.py (original)
+++ py/branch/distributed/py/test/rsession/webjs.py Mon Sep 11 14:50:39 2006
@@ -17,9 +17,18 @@
tracebacks = {}
skips = {}
+class Pending(object):
+ def __init__(self):
+ self.pending = []
+
+glob = Pending()
+
def comeback(msglist):
if len(msglist) == 0:
return
+ for item in glob.pending[:]:
+ process(item)
+ glob.pending = []
for msg in msglist:
process(msg)
exported_methods.show_all_statuses(comeback)
@@ -45,6 +54,9 @@
elif msg['type'] == 'ReceivedItemOutcome':
try:
module_part = get_elem(msg['fullmodulename'])
+ if not module_part:
+ glob.pending.append(msg)
+ return
td = create_elem("td")
item_name = msg['fullitemname']
# TODO: dispatch output
From cfbolz at codespeak.net Mon Sep 11 15:51:43 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Mon, 11 Sep 2006 15:51:43 +0200 (CEST)
Subject: [py-svn] r32153 - py/branch/distributed/py/test/testing
Message-ID: <20060911135143.51DC01007B@code0.codespeak.net>
Author: cfbolz
Date: Mon Sep 11 15:51:41 2006
New Revision: 32153
Modified:
py/branch/distributed/py/test/testing/test_collect.py
Log:
fix this test (new stuff was added)
Modified: py/branch/distributed/py/test/testing/test_collect.py
==============================================================================
--- py/branch/distributed/py/test/testing/test_collect.py (original)
+++ py/branch/distributed/py/test/testing/test_collect.py Mon Sep 11 15:51:41 2006
@@ -365,8 +365,8 @@
l = []
list(col.tryiter(reporterror=l.append))
- assert len(l) == 1
- excinfo, item = l[0]
+ assert len(l) == 2
+ excinfo, item = l[1]
assert isinstance(excinfo, py.code.ExceptionInfo)
def test_tryiter_handles_keyboardinterrupt():
From cfbolz at codespeak.net Mon Sep 11 16:15:24 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Mon, 11 Sep 2006 16:15:24 +0200 (CEST)
Subject: [py-svn] r32155 - py/branch/distributed/py/test/rsession
Message-ID: <20060911141524.B05DB10079@code0.codespeak.net>
Author: cfbolz
Date: Mon Sep 11 16:15:23 2006
New Revision: 32155
Modified:
py/branch/distributed/py/test/rsession/web.py
Log:
fix imports
Modified: py/branch/distributed/py/test/rsession/web.py
==============================================================================
--- py/branch/distributed/py/test/rsession/web.py (original)
+++ py/branch/distributed/py/test/rsession/web.py Mon Sep 11 16:15:23 2006
@@ -4,21 +4,20 @@
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
-
-from _findpy import py
import thread, threading
import re
import random
-
+import Queue
+import os
import sys
+
+import py
from py.__.test.rsession.rsession import RSession
from py.__.test.rsession import report
from py.__.test import collect
-import os
from py.__.test.rsession.webdata import json
-import Queue
DATADIR = py.path.local(__file__).dirpath("webdata")
From cfbolz at codespeak.net Mon Sep 11 16:25:13 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Mon, 11 Sep 2006 16:25:13 +0200 (CEST)
Subject: [py-svn] r32158 - in py/dist/py: . bin code code/testing execnet
execnet/testing path/local test test/rsession
test/rsession/testing test/rsession/webdata test/terminal
test/testing test/tkinter
Message-ID: <20060911142513.1B0AD10079@code0.codespeak.net>
Author: cfbolz
Date: Mon Sep 11 16:25:05 2006
New Revision: 32158
Added:
py/dist/py/test/rsession/ (props changed)
- copied from r32155, py/branch/distributed/py/test/rsession/
py/dist/py/test/rsession/__init__.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/__init__.py
py/dist/py/test/rsession/box.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/box.py
py/dist/py/test/rsession/conftest.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/conftest.py
py/dist/py/test/rsession/executor.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/executor.py
py/dist/py/test/rsession/hostmanage.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/hostmanage.py
py/dist/py/test/rsession/master.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/master.py
py/dist/py/test/rsession/outcome.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/outcome.py
py/dist/py/test/rsession/report.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/report.py
py/dist/py/test/rsession/rsession.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/rsession.py
py/dist/py/test/rsession/rsync.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/rsync.py
py/dist/py/test/rsession/slave.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/slave.py
py/dist/py/test/rsession/testing/ (props changed)
- copied from r32155, py/branch/distributed/py/test/rsession/testing/
py/dist/py/test/rsession/testing/__init__.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/testing/__init__.py
py/dist/py/test/rsession/testing/example1.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/testing/example1.py
py/dist/py/test/rsession/testing/example2.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/testing/example2.py
py/dist/py/test/rsession/testing/test_boxing.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/testing/test_boxing.py
py/dist/py/test/rsession/testing/test_executor.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/testing/test_executor.py
py/dist/py/test/rsession/testing/test_master.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/testing/test_master.py
py/dist/py/test/rsession/testing/test_outcome.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/testing/test_outcome.py
py/dist/py/test/rsession/testing/test_report.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/testing/test_report.py
py/dist/py/test/rsession/testing/test_rsession.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/testing/test_rsession.py
py/dist/py/test/rsession/testing/test_rsync.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/testing/test_rsync.py
py/dist/py/test/rsession/testing/test_slave.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/testing/test_slave.py
py/dist/py/test/rsession/web.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/web.py
py/dist/py/test/rsession/webdata/
- copied from r32155, py/branch/distributed/py/test/rsession/webdata/
py/dist/py/test/rsession/webdata/__init__.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/webdata/__init__.py
py/dist/py/test/rsession/webdata/index.html
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/webdata/index.html
py/dist/py/test/rsession/webdata/json.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/webdata/json.py
py/dist/py/test/rsession/webdata/source.js
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/webdata/source.js
py/dist/py/test/rsession/webjs.py
- copied unchanged from r32155, py/branch/distributed/py/test/rsession/webjs.py
Modified:
py/dist/py/__init__.py
py/dist/py/bin/py.cleanup
py/dist/py/code/testing/test_excinfo.py
py/dist/py/code/traceback2.py
py/dist/py/execnet/channel.py
py/dist/py/execnet/gateway.py
py/dist/py/execnet/register.py
py/dist/py/execnet/testing/test_gateway.py
py/dist/py/path/local/local.py
py/dist/py/test/collect.py
py/dist/py/test/session.py
py/dist/py/test/terminal/out.py
py/dist/py/test/testing/test_collect.py
py/dist/py/test/tkinter/reportsession.py
Log:
svn merge -r 31432:32155 http://codespeak.net/svn/py/branch/distributed/py
Modified: py/dist/py/__init__.py
==============================================================================
--- py/dist/py/__init__.py (original)
+++ py/dist/py/__init__.py Mon Sep 11 16:25:05 2006
@@ -37,6 +37,7 @@
# for customization of collecting/running tests
'test.Session' : ('./test/session.py', 'Session'),
'test.TerminalSession' : ('./test/terminal/terminal.py', 'TerminalSession'),
+ 'test.RSession' : ('./test/rsession/rsession.py', 'RSession'),
'test.TkinterSession' : ('./test/tkinter/tksession.py', 'TkSession'),
'test.collect.Collector' : ('./test/collect.py', 'Collector'),
'test.collect.Directory' : ('./test/collect.py', 'Directory'),
Modified: py/dist/py/bin/py.cleanup
==============================================================================
--- py/dist/py/bin/py.cleanup (original)
+++ py/dist/py/bin/py.cleanup Mon Sep 11 16:25:05 2006
@@ -8,5 +8,5 @@
else:
path = py.path.local()
print "cleaning path", path
-for x in path.visit('*.pyc', lambda x: x.check(dotfile=0)):
+for x in path.visit('*.pyc', lambda x: x.check(dotfile=0, link=0)):
x.remove()
Modified: py/dist/py/code/testing/test_excinfo.py
==============================================================================
--- py/dist/py/code/testing/test_excinfo.py (original)
+++ py/dist/py/code/testing/test_excinfo.py Mon Sep 11 16:25:05 2006
@@ -182,3 +182,10 @@
def test_excinfo_errisinstance():
excinfo = py.test.raises(ValueError, h)
assert excinfo.errisinstance(ValueError)
+
+def test_excinfo_no_sourcecode():
+ try:
+ exec "raise ValueError()"
+ except ValueError:
+ excinfo = py.code.ExceptionInfo()
+ s = str(excinfo.traceback[-1])
Modified: py/dist/py/code/traceback2.py
==============================================================================
--- py/dist/py/code/traceback2.py (original)
+++ py/dist/py/code/traceback2.py Mon Sep 11 16:25:05 2006
@@ -66,7 +66,10 @@
except py.error.Error:
fn = '???'
name = self.frame.code.name
- line = str(self.statement).lstrip()
+ try:
+ line = str(self.statement).lstrip()
+ except EnvironmentError, e:
+ line = ""
return " File %r:%d in %s\n %s\n" %(fn, self.lineno+1, name, line)
class Traceback(list):
Modified: py/dist/py/execnet/channel.py
==============================================================================
--- py/dist/py/execnet/channel.py (original)
+++ py/dist/py/execnet/channel.py Mon Sep 11 16:25:05 2006
@@ -19,6 +19,8 @@
# XXX do this better
print >> sys.stderr, "Warning: unhandled %r" % (self,)
+NO_ENDMARKER_WANTED = object()
+
class Channel(object):
"""Communication channel between two possibly remote threads of code. """
@@ -33,13 +35,14 @@
self._receiveclosed = threading.Event()
self._remoteerrors = []
- def setcallback(self, callback):
+ def setcallback(self, callback, endmarker=NO_ENDMARKER_WANTED):
queue = self._items
lock = self.gateway.channelfactory._receivelock
lock.acquire()
try:
_callbacks = self.gateway.channelfactory._callbacks
- if _callbacks.setdefault(self.id, callback) is not callback:
+ dictvalue = (callback, endmarker)
+ if _callbacks.setdefault(self.id, dictvalue) != dictvalue:
raise IOError("%r has callback already registered" %(self,))
self._items = None
while 1:
@@ -55,10 +58,7 @@
callback(olditem)
if self._closed or self._receiveclosed.isSet():
# no need to keep a callback
- try:
- del _callbacks[self.id]
- except KeyError:
- pass
+ self.gateway.channelfactory._close_callback(self.id)
finally:
lock.release()
@@ -201,11 +201,14 @@
self._receivelock = threading.RLock()
self.gateway = gateway
self.count = startcount
+ self.finished = False
def new(self, id=None):
""" create a new Channel with 'id' (or create new id if None). """
self._writelock.acquire()
try:
+ if self.finished:
+ raise IOError("connexion already closed: %s" % (self.gateway,))
if id is None:
id = self.count
self.count += 2
@@ -226,10 +229,16 @@
del self._channels[id]
except KeyError:
pass
+ self._close_callback(id)
+
+ def _close_callback(self, id):
try:
- del self._callbacks[id]
+ callback, endmarker = self._callbacks.pop(id)
except KeyError:
pass
+ else:
+ if endmarker is not NO_ENDMARKER_WANTED:
+ callback(endmarker)
def _local_close(self, id, remoteerror=None):
channel = self._channels.get(id)
@@ -265,23 +274,30 @@
# executes in receiver thread
self._receivelock.acquire()
try:
- callback = self._callbacks.get(id)
- if callback is not None:
- callback(data) # even if channel may be already closed
- else:
+ try:
+ callback, endmarker = self._callbacks[id]
+ except KeyError:
channel = self._channels.get(id)
queue = channel and channel._items
if queue is None:
pass # drop data
else:
queue.put(data)
+ else:
+ callback(data) # even if channel may be already closed
finally:
self._receivelock.release()
def _finished_receiving(self):
+ self._writelock.acquire()
+ try:
+ self.finished = True
+ finally:
+ self._writelock.release()
for id in self._channels.keys():
self._local_last_message(id)
- self._callbacks.clear()
+ for id in self._callbacks.keys():
+ self._close_callback(id)
class ChannelFile:
Modified: py/dist/py/execnet/gateway.py
==============================================================================
--- py/dist/py/execnet/gateway.py (original)
+++ py/dist/py/execnet/gateway.py Mon Sep 11 16:25:05 2006
@@ -49,14 +49,22 @@
self.pool = NamedThreadPool(receiver = self.thread_receiver,
sender = self.thread_sender)
- def __repr__(self):
+ def __repr__(self):
+ addr = self.getremoteaddress()
+ if addr:
+ addr = '[%s]' % (addr,)
+ else:
+ addr = ''
r = (len(self.pool.getstarted('receiver'))
and "receiving" or "not receiving")
s = (len(self.pool.getstarted('sender'))
and "sending" or "not sending")
i = len(self.channelfactory.channels())
- return "<%s %s/%s (%d active channels)>" %(
- self.__class__.__name__, r, s, i)
+ return "<%s%s %s/%s (%d active channels)>" %(
+ self.__class__.__name__, addr, r, s, i)
+
+ def getremoteaddress(self):
+ return None
## def _local_trystopexec(self):
## self._execpool.shutdown()
@@ -118,7 +126,8 @@
except:
excinfo = exc_info()
self.traceex(excinfo)
- msg.post_sent(self, excinfo)
+ if msg is not None:
+ msg.post_sent(self, excinfo)
raise
else:
self.trace('sent -> %r' % msg)
Modified: py/dist/py/execnet/register.py
==============================================================================
--- py/dist/py/execnet/register.py (original)
+++ py/dist/py/execnet/register.py Mon Sep 11 16:25:05 2006
@@ -110,6 +110,9 @@
io = inputoutput.SocketIO(sock)
InstallableGateway.__init__(self, io=io)
+ def getremoteaddress(self):
+ return '%s:%d' % (self.host, self.port)
+
def remote_install(cls, gateway, hostport=None):
""" return a connected socket gateway through the
given gateway.
@@ -139,6 +142,7 @@
class SshGateway(PopenCmdGateway):
def __init__(self, sshaddress, remotepython='python', identity=None):
+ self.sshaddress = sshaddress
remotecmd = '%s -u -c "exec input()"' % (remotepython,)
cmdline = [sshaddress, remotecmd]
# XXX Unix style quoting
@@ -150,6 +154,9 @@
cmdline.insert(0, cmd)
super(SshGateway, self).__init__(' '.join(cmdline))
+ def getremoteaddress(self):
+ return self.sshaddress
+
class ExecGateway(PopenGateway):
def remote_exec_sync_stdcapture(self, lines, callback):
# hack: turn the content of the cell into
Modified: py/dist/py/execnet/testing/test_gateway.py
==============================================================================
--- py/dist/py/execnet/testing/test_gateway.py (original)
+++ py/dist/py/execnet/testing/test_gateway.py Mon Sep 11 16:25:05 2006
@@ -240,6 +240,21 @@
channel = self.test_channel_callback_stays_active(False)
channel.waitclose(1.0) # freed automatically at the end of producer()
+ def test_channel_endmarker_callback(self):
+ l = []
+ channel = self.gw.remote_exec(source='''
+ channel.send(42)
+ channel.send(13)
+ channel.send(channel.gateway.newchannel())
+ ''')
+ channel.setcallback(l.append, 999)
+ py.test.raises(IOError, channel.receive)
+ channel.waitclose(1.0)
+ assert len(l) == 4
+ assert l[:2] == [42,13]
+ assert isinstance(l[2], channel.__class__)
+ assert l[3] == 999
+
def test_remote_redirect_stdout(self):
out = py.std.StringIO.StringIO()
handle = self.gw.remote_redirect(stdout=out)
@@ -388,3 +403,17 @@
py.test.skip("no known ssh target, use -S to set one")
cls.gw = py.execnet.SshGateway(option.sshtarget)
+ def test_sshaddress(self):
+ assert self.gw.sshaddress == option.sshtarget
+
+ def test_failed_connexion(self):
+ gw = py.execnet.SshGateway('nowhere.codespeak.net')
+ try:
+ channel = gw.remote_exec("...")
+ except IOError:
+ pass # connexion failed already
+ else:
+ # connexion did not fail yet
+ py.test.raises(EOFError, channel.receive)
+ # now it did
+ py.test.raises(IOError, gw.remote_exec, "...")
Modified: py/dist/py/path/local/local.py
==============================================================================
--- py/dist/py/path/local/local.py (original)
+++ py/dist/py/path/local/local.py Mon Sep 11 16:25:05 2006
@@ -554,14 +554,25 @@
# compute the maximum number currently in use with the
# prefix
- maxnum = -1
- for path in rootdir.listdir():
- num = parse_num(path)
- if num is not None:
- maxnum = max(maxnum, num)
+ lastmax = None
+ while True:
+ maxnum = -1
+ for path in rootdir.listdir():
+ num = parse_num(path)
+ if num is not None:
+ maxnum = max(maxnum, num)
- # make the new directory
- udir = rootdir.mkdir(prefix + str(maxnum+1))
+ # make the new directory
+ try:
+ udir = rootdir.mkdir(prefix + str(maxnum+1))
+ except py.error.EEXIST:
+ # race condition: another thread/process created the dir
+ # in the meantime. Try counting again
+ if lastmax == maxnum:
+ raise
+ lastmax = maxnum
+ continue
+ break
# put a .lock file in the new directory that will be removed at
# process exit
Modified: py/dist/py/test/collect.py
==============================================================================
--- py/dist/py/test/collect.py (original)
+++ py/dist/py/test/collect.py Mon Sep 11 16:25:05 2006
@@ -147,6 +147,16 @@
def listnames(self):
return [x.name for x in self.listchain()]
+ def getitembynames(self, namelist):
+ if isinstance(namelist, str):
+ namelist = namelist.split("/")
+ cur = self
+ for name in namelist:
+ next = cur.join(name)
+ assert next is not None, (cur, name, namelist)
+ cur = next
+ return cur
+
def haskeyword(self, keyword):
return keyword in self.name
@@ -166,17 +176,54 @@
newl.append(x.name)
return ".".join(newl)
- def tryiter(self, stopitems=None):
+ # XXX: Copied from session
+ def skipbykeyword(self, keyword):
+ if not keyword:
+ return
+ chain = self.listchain()
+ for key in filter(None, keyword.split()):
+ eor = key[:1] == '-'
+ if eor:
+ key = key[1:]
+ if not (eor ^ self._matchonekeyword(key, chain)):
+ py.test.skip("test not selected by keyword %r" %(keyword,))
+
+ def _matchonekeyword(self, key, chain):
+ for subitem in chain:
+ if subitem.haskeyword(key):
+ return True
+ return False
+
+ def tryiter(self, yieldtype=None, reporterror=None, keyword=None):
""" yield stop item instances from flattening the collector.
+ XXX deprecated: this way of iteration is not safe in all
+ cases. Mostly fixed, need to introduce skipped-by-keyword
"""
- if stopitems is None:
- stopitems = py.test.Item
- if isinstance(self, stopitems):
- yield self
+
+ if yieldtype is None:
+ yieldtype = py.test.Item
+ if isinstance(self, yieldtype):
+ try:
+ self.skipbykeyword(keyword)
+ yield self
+ except py.test.Item.Skipped:
+ if reporterror is not None:
+ excinfo = py.code.ExceptionInfo()
+ reporterror((excinfo, self))
else:
- for x in self.run():
- for y in self.join(x).tryiter(stopitems):
- yield y
+ if not isinstance(self, py.test.Item):
+ try:
+ if reporterror is not None:
+ reporterror((None, self))
+ for x in self.run():
+ for y in self.join(x).tryiter(yieldtype, reporterror, keyword):
+ yield y
+ except KeyboardInterrupt:
+ raise
+ except:
+ if reporterror is not None:
+ excinfo = py.code.ExceptionInfo()
+ reporterror((excinfo, self))
def _prepare(self):
if not hasattr(self, '_name2items'):
@@ -275,21 +322,34 @@
if name in seen:
continue
seen[name] = True
- if self.classnamefilter(name) and isclass(obj):
- d[name] = self.Class(name, parent=self)
- elif self.funcnamefilter(name) and callable(obj):
- if obj.func_code.co_flags & 32: # generator function
- d[name] = self.Generator(name, parent=self)
- else:
- d[name] = self.Function(name, parent=self)
+ res = self.makeitem(name, obj)
+ if res is not None:
+ d[name] = res
return d
+ def makeitem(self, name, obj, usefilters=True):
+ if (not usefilters or self.classnamefilter(name)) and isclass(obj):
+ return self.Class(name, parent=self)
+ elif (not usefilters or self.funcnamefilter(name)) and callable(obj):
+ if obj.func_code.co_flags & 32: # generator function
+ return self.Generator(name, parent=self)
+ else:
+ return self.Function(name, parent=self)
+
class Module(PyCollectorMixin, FSCollector):
def run(self):
if getattr(self.obj, 'disabled', 0):
return []
return FSCollector.run(self)
+
+ def join(self, name):
+ res = super(Module, self).join(name)
+ if res is None:
+ attr = getattr(self.obj, name, None)
+ if attr is not None:
+ res = self.makeitem(name, attr, usefilters=False)
+ return res
def startcapture(self):
if not self.option.nocapture and not self.option.usepdb:
Modified: py/dist/py/test/session.py
==============================================================================
--- py/dist/py/test/session.py (original)
+++ py/dist/py/test/session.py Mon Sep 11 16:25:05 2006
@@ -35,9 +35,6 @@
def getitemoutcomepairs(self, cls):
return [x for x in self._memo if isinstance(x[1], cls)]
- def warning(self, msg):
- raise Warning(msg)
-
def main(self, args):
""" main loop for running tests. """
colitems = self._map2colitems(args)
Modified: py/dist/py/test/terminal/out.py
==============================================================================
--- py/dist/py/test/terminal/out.py (original)
+++ py/dist/py/test/terminal/out.py Mon Sep 11 16:25:05 2006
@@ -80,7 +80,7 @@
#
if file is None:
file = py.std.sys.stdout
- elif hasattr(file, 'send'):
+ elif hasattr(file, 'send'): # likely a channel like thing
file = WriteFile(file.send)
if hasattr(file, 'isatty') and file.isatty():
return TerminalOut(file)
Modified: py/dist/py/test/testing/test_collect.py
==============================================================================
--- py/dist/py/test/testing/test_collect.py (original)
+++ py/dist/py/test/testing/test_collect.py Mon Sep 11 16:25:05 2006
@@ -24,6 +24,19 @@
assert cur.parent == col.parent
assert cur.fspath == cur.fspath
+def test_collect_listnames_and_back():
+ col1 = py.test.collect.Directory(datadir.dirpath())
+ col2 = col1.join(datadir.basename)
+ col3 = col2.join('filetest.py')
+ l = col3.listnames()
+ assert len(l) == 3
+ x = col1.getitembynames(l[1:])
+ assert x.name == "filetest.py"
+ x = col1.getitembynames("/".join(l[1:]))
+ assert x.name == "filetest.py"
+ l2 = x.listnames()
+ assert len(l2) == 3
+
def test_finds_tests():
fn = datadir / 'filetest.py'
col = py.test.collect.Module(fn)
@@ -281,7 +294,6 @@
yield assert_order_of_execution
-
def test_order_of_execution_generator_different_codeline():
test_list = []
expected_list = range(3)
@@ -305,3 +317,62 @@
yield list_append_2
yield assert_order_of_execution
+
+def test_documentation_virtual_collector_interaction():
+ rootdir = py.path.local(py.__file__).dirpath("documentation")
+ # HACK
+ from py.__.documentation import conftest as conf
+ old = conf.option.forcegen
+ try:
+ conf.option.forcegen = 1
+ col = py.test.collect.Directory(rootdir)
+ x = list(col.tryiter(yieldtype=py.test.Function))
+ finally:
+ conf.option.forcegen = old
+
+
+def test_tryiter_ignores_skips():
+ tmp = py.test.ensuretemp("tryiterskip")
+ tmp.ensure("subdir", "conftest.py").write(py.code.Source("""
+ import py
+ class Directory(py.test.collect.Directory):
+ def run(self):
+ py.test.skip("intentional")
+ """))
+ col = py.test.collect.Directory(tmp)
+ try:
+ list(col.tryiter())
+ except KeyboardInterrupt:
+ raise
+ except:
+ exc = py.code.ExceptionInfo()
+ py.test.fail("should not have raised: %s" %(exc,))
+
+
+def test_tryiter_ignores_failing_collectors():
+ tmp = py.test.ensuretemp("tryiterfailing")
+ tmp.ensure("subdir", "conftest.py").write(py.code.Source("""
+ bla bla bla
+ """))
+ col = py.test.collect.Directory(tmp)
+ try:
+ list(col.tryiter())
+ except KeyboardInterrupt:
+ raise
+ except:
+ exc = py.code.ExceptionInfo()
+ py.test.fail("should not have raised: %s" %(exc,))
+
+ l = []
+ list(col.tryiter(reporterror=l.append))
+ assert len(l) == 2
+ excinfo, item = l[1]
+ assert isinstance(excinfo, py.code.ExceptionInfo)
+
+def test_tryiter_handles_keyboardinterrupt():
+ tmp = py.test.ensuretemp("tryiterkeyboard")
+ tmp.ensure("subdir", "conftest.py").write(py.code.Source("""
+ raise KeyboardInterrupt()
+ """))
+ col = py.test.collect.Directory(tmp)
+ py.test.raises(KeyboardInterrupt, list, col.tryiter())
Modified: py/dist/py/test/tkinter/reportsession.py
==============================================================================
--- py/dist/py/test/tkinter/reportsession.py (original)
+++ py/dist/py/test/tkinter/reportsession.py Mon Sep 11 16:25:05 2006
@@ -43,6 +43,4 @@
def sendreport(self, report):
self.channel.send(report.to_channel())
- def warning(self, msg):
- pass
From fijal at codespeak.net Mon Sep 11 16:51:42 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Mon, 11 Sep 2006 16:51:42 +0200 (CEST)
Subject: [py-svn] r32161 - py/dist/py/test/rsession
Message-ID: <20060911145142.24C2410078@code0.codespeak.net>
Author: fijal
Date: Mon Sep 11 16:51:41 2006
New Revision: 32161
Modified:
py/dist/py/test/rsession/hostmanage.py
py/dist/py/test/rsession/rsession.py
Log:
Added dist_remotepython option for specifying remotepython from commandline.
Modified: py/dist/py/test/rsession/hostmanage.py
==============================================================================
--- py/dist/py/test/rsession/hostmanage.py (original)
+++ py/dist/py/test/rsession/hostmanage.py Mon Sep 11 16:51:41 2006
@@ -28,7 +28,8 @@
return base in self.rsync_roots
-def init_hosts(reporter, sshhosts, relpath, pkgdir, rsync_roots=None):
+def init_hosts(reporter, sshhosts, relpath, pkgdir, rsync_roots=None, \
+ remote_python=None):
assert pkgdir.join("__init__.py").check(), (
"%s probably wrong" %(pkgdir,))
assert relpath, relpath
@@ -46,7 +47,10 @@
# XXX: because of NFS we do create different directories
# otherwise, .pyc files overlap
remoterootpath += "-" + host
- gw = py.execnet.SshGateway(host)
+ if remote_python is None:
+ gw = py.execnet.SshGateway(host)
+ else:
+ gw = py.execnet.SshGateway(host, remotepython=remote_python)
hosts.append((host, gw, remoterootpath))
# rsyncing
Modified: py/dist/py/test/rsession/rsession.py
==============================================================================
--- py/dist/py/test/rsession/rsession.py (original)
+++ py/dist/py/test/rsession/rsession.py Mon Sep 11 16:51:41 2006
@@ -244,9 +244,13 @@
reporter(report.TestStarted(sshhosts))
pkgdir = self.getpkgdir(args[0])
colitems = self.make_colitems(args, baseon=pkgdir.dirpath())
+ try:
+ remotepython = self.config.getinitialvalue("dist_remotepython")
+ except:
+ remotepython = None
nodes = init_hosts(reporter, sshhosts, directories, pkgdir,
- rsync_roots)
+ rsync_roots, remotepython)
reporter(report.RsyncFinished())
def reporterror(data):
From fijal at codespeak.net Mon Sep 11 17:14:11 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Mon, 11 Sep 2006 17:14:11 +0200 (CEST)
Subject: [py-svn] r32163 - py/dist/py/test/rsession
Message-ID: <20060911151411.CBFF110078@code0.codespeak.net>
Author: fijal
Date: Mon Sep 11 17:14:10 2006
New Revision: 32163
Modified:
py/dist/py/test/rsession/rsession.py
py/dist/py/test/rsession/web.py
Log:
Added -x option.
Modified: py/dist/py/test/rsession/rsession.py
==============================================================================
--- py/dist/py/test/rsession/rsession.py (original)
+++ py/dist/py/test/rsession/rsession.py Mon Sep 11 17:14:10 2006
@@ -197,6 +197,9 @@
itempath = " ".join(event.item.listnames()[1:])
print "%10s: %s %s" %(sshhost[:10], status, itempath)
+ def is_failing(self):
+ return len(self.failed_tests_outcome) != 0
+
def report_Nodes(self, event):
self.nodes = event.nodes
@@ -232,13 +235,18 @@
startserverflag = self.config.getinitialvalue("startserver")
except:
startserverflag = False
+
+ checkfun = lambda: None
if startserverflag and reporter is None:
from py.__.test.rsession.web import start_server, exported_methods
reporter = exported_methods.report
start_server()
elif reporter is None:
- reporter = Reporter(self.config, sshhosts).report
+ reporter_instance = Reporter(self.config, sshhosts)
+ reporter = reporter_instance.report
+ checkfun = lambda : self.config.option.exitfirst and \
+ reporter_instance.is_failing()
else:
startserverflag = False
reporter(report.TestStarted(sshhosts))
@@ -272,7 +280,7 @@
itemgenerator = itemgen()
#assert 0, "\n".join([",".join(x.listnames()) for x in
# list(itemgenerator)])
- dispatch_loop(nodes, itemgenerator, lambda : False)
+ dispatch_loop(nodes, itemgenerator, checkfun)
teardown_hosts(reporter, [node.channel for node in nodes], nodes)
reporter(report.Nodes(nodes))
reporter(report.TestFinished())
Modified: py/dist/py/test/rsession/web.py
==============================================================================
--- py/dist/py/test/rsession/web.py (original)
+++ py/dist/py/test/rsession/web.py Mon Sep 11 17:14:10 2006
@@ -242,8 +242,9 @@
def run_jssource(self):
if IMPORTED_PYPY:
from py.__.test.rsession import webjs
- self.serve_data("text/javascript", rpython2javascript(webjs,
- ["main", "show_skip", "show_traceback"], Options))
+ javascript_source = rpython2javascript(webjs,
+ ["main", "show_skip", "show_traceback"], Options)
+ self.serve_data("text/javascript", javascript_source)
else:
js_name = py.path.local(__file__).dirpath("webdata").join("source.js")
js_source = open(str(js_name), "r").read()
From cfbolz at codespeak.net Mon Sep 11 17:18:04 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Mon, 11 Sep 2006 17:18:04 +0200 (CEST)
Subject: [py-svn] r32164 - in py/dist/py/builtin: . testing
Message-ID: <20060911151804.25F4F10078@code0.codespeak.net>
Author: cfbolz
Date: Mon Sep 11 17:17:58 2006
New Revision: 32164
Modified:
py/dist/py/builtin/sorted.py
py/dist/py/builtin/testing/test_sorted.py
Log:
2.2 compatibility
Modified: py/dist/py/builtin/sorted.py
==============================================================================
--- py/dist/py/builtin/sorted.py (original)
+++ py/dist/py/builtin/sorted.py Mon Sep 11 17:17:58 2006
@@ -16,7 +16,7 @@
l = list(iterable)
print l
if use_cmp is not None:
- l.sort(cmp=use_cmp)
+ l.sort(use_cmp)
else:
l.sort()
if reverse:
Modified: py/dist/py/builtin/testing/test_sorted.py
==============================================================================
--- py/dist/py/builtin/testing/test_sorted.py (original)
+++ py/dist/py/builtin/testing/test_sorted.py Mon Sep 11 17:17:58 2006
@@ -1,3 +1,4 @@
+from __future__ import generators
import py
from py.__.builtin.sorted import _sorted
From cfbolz at codespeak.net Mon Sep 11 17:29:49 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Mon, 11 Sep 2006 17:29:49 +0200 (CEST)
Subject: [py-svn] r32167 - in py/dist/py: c-extension/greenlet code
path/local
Message-ID: <20060911152949.6A3FC1007E@code0.codespeak.net>
Author: cfbolz
Date: Mon Sep 11 17:29:46 2006
New Revision: 32167
Modified:
py/dist/py/c-extension/greenlet/test_generator_nested.py
py/dist/py/c-extension/greenlet/test_greenlet.py
py/dist/py/c-extension/greenlet/test_remote.py
py/dist/py/c-extension/greenlet/test_throw.py
py/dist/py/code/traceback2.py
py/dist/py/path/local/common.py
Log:
fix some 2.2 issues and issues if greenlets are not compileable
Modified: py/dist/py/c-extension/greenlet/test_generator_nested.py
==============================================================================
--- py/dist/py/c-extension/greenlet/test_generator_nested.py (original)
+++ py/dist/py/c-extension/greenlet/test_generator_nested.py Mon Sep 11 17:29:46 2006
@@ -1,7 +1,8 @@
+from __future__ import generators
import py
try:
from py.magic import greenlet
-except RuntimeError, e:
+except (ImportError, RuntimeError), e:
py.test.skip(str(e))
class genlet(greenlet):
Modified: py/dist/py/c-extension/greenlet/test_greenlet.py
==============================================================================
--- py/dist/py/c-extension/greenlet/test_greenlet.py (original)
+++ py/dist/py/c-extension/greenlet/test_greenlet.py Mon Sep 11 17:29:46 2006
@@ -1,7 +1,7 @@
import py
try:
from py.magic import greenlet
-except RuntimeError, e:
+except (ImportError, RuntimeError), e:
py.test.skip(str(e))
import sys, thread, threading
Modified: py/dist/py/c-extension/greenlet/test_remote.py
==============================================================================
--- py/dist/py/c-extension/greenlet/test_remote.py (original)
+++ py/dist/py/c-extension/greenlet/test_remote.py Mon Sep 11 17:29:46 2006
@@ -1,7 +1,7 @@
import py
try:
from py.magic import greenlet
-except RuntimeError, e:
+except (ImportError, RuntimeError), e:
py.test.skip(str(e))
Modified: py/dist/py/c-extension/greenlet/test_throw.py
==============================================================================
--- py/dist/py/c-extension/greenlet/test_throw.py (original)
+++ py/dist/py/c-extension/greenlet/test_throw.py Mon Sep 11 17:29:46 2006
@@ -1,7 +1,7 @@
import py
try:
from py.magic import greenlet
-except RuntimeError, e:
+except (ImportError, RuntimeError), e:
py.test.skip(str(e))
def switch(*args):
Modified: py/dist/py/code/traceback2.py
==============================================================================
--- py/dist/py/code/traceback2.py (original)
+++ py/dist/py/code/traceback2.py Mon Sep 11 17:29:46 2006
@@ -95,7 +95,7 @@
def __getitem__(self, key):
val = super(Traceback, self).__getitem__(key)
- if isinstance(key, slice):
+ if isinstance(key, type(slice(0))):
val = self.__class__(val)
return val
Modified: py/dist/py/path/local/common.py
==============================================================================
--- py/dist/py/path/local/common.py (original)
+++ py/dist/py/path/local/common.py Mon Sep 11 17:29:46 2006
@@ -7,7 +7,8 @@
for name in ('atime blksize blocks ctime dev gid '
'ino mode mtime nlink rdev size uid'.split()):
- exec """if 1:
+
+ code = """if 1:
def fget(self):
return getattr(self._osstatresult, "st_%(name)s", None)
%(name)s = property(fget)
@@ -16,7 +17,9 @@
"statresult.%(name)s instead.",
DeprecationWarning, stacklevel=2)
return getattr(self._osstatresult, "st_%(name)s", None)
- st_%(name)s = property(fget_deprecated)""" % locals()
+ st_%(name)s = property(fget_deprecated)
+""" % locals()
+ exec code
del fget
del fget_deprecated
From fijal at codespeak.net Mon Sep 11 17:36:20 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Mon, 11 Sep 2006 17:36:20 +0200 (CEST)
Subject: [py-svn] r32168 - py/dist/py/test/rsession
Message-ID: <20060911153620.7F7FB1007E@code0.codespeak.net>
Author: fijal
Date: Mon Sep 11 17:36:19 2006
New Revision: 32168
Modified:
py/dist/py/test/rsession/web.py
py/dist/py/test/rsession/webjs.py
Log:
Added display of items. Fixed some escaping.
Modified: py/dist/py/test/rsession/web.py
==============================================================================
--- py/dist/py/test/rsession/web.py (original)
+++ py/dist/py/test/rsession/web.py Mon Sep 11 17:36:19 2006
@@ -22,8 +22,9 @@
DATADIR = py.path.local(__file__).dirpath("webdata")
def escape(s):
- return s.replace("&", "&").replace("<", "<").replace(">", ">"). \
- replace("'", "\\'").replace(" ", " ").replace("\n", "
")
+ return s
+ #return s.replace("&", "&").replace("<", "<").replace(">", ">"). \
+ # replace("'", "\\'").replace(" ", " ").replace("\n", "
")
try:
from pypy.rpython.ootypesystem.bltregistry import MethodDesc, BasicExternal,\
@@ -242,6 +243,8 @@
def run_jssource(self):
if IMPORTED_PYPY:
from py.__.test.rsession import webjs
+
+
javascript_source = rpython2javascript(webjs,
["main", "show_skip", "show_traceback"], Options)
self.serve_data("text/javascript", javascript_source)
Modified: py/dist/py/test/rsession/webjs.py
==============================================================================
--- py/dist/py/test/rsession/webjs.py (original)
+++ py/dist/py/test/rsession/webjs.py Mon Sep 11 17:36:19 2006
@@ -27,15 +27,17 @@
if len(msglist) == 0:
return
for item in glob.pending[:]:
- process(item)
+ if not process(item):
+ return
glob.pending = []
for msg in msglist:
- process(msg)
+ if not process(msg):
+ return
exported_methods.show_all_statuses(comeback)
def process(msg):
if len(msg) == 0:
- return
+ return False
elem = dom.get_document().getElementById("testmain")
#elem.innerHTML += '%s
' % msg['event']
main_t = dom.get_document().getElementById("main_table")
@@ -56,7 +58,7 @@
module_part = get_elem(msg['fullmodulename'])
if not module_part:
glob.pending.append(msg)
- return
+ return True
td = create_elem("td")
item_name = msg['fullitemname']
# TODO: dispatch output
@@ -82,16 +84,22 @@
module_part.appendChild(td)
except:
dom.get_document().getElementById("testmain").innerHTML += "some error"
+ return True
def show_skip(item_name="a"):
- set_msgbox(skips[item_name])
+ set_msgbox(item_name, skips[item_name])
-def set_msgbox(data):
+def set_msgbox(item_name, data):
msgbox = get_elem("messagebox")
- msgbox.innerHTML = data
+ while len(msgbox.childNodes):
+ msgbox.removeChild(msgbox.childNodes[0])
+ pre = create_elem("pre")
+ txt = create_text_elem(item_name + "\n" + data)
+ pre.appendChild(txt)
+ msgbox.appendChild(pre)
def show_traceback(item_name="a"):
- set_msgbox(tracebacks[item_name])
+ set_msgbox(item_name, tracebacks[item_name])
def fail_come_back(msg):
tracebacks[msg['item_name']] = msg['traceback']
From fijal at codespeak.net Mon Sep 11 18:03:29 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Mon, 11 Sep 2006 18:03:29 +0200 (CEST)
Subject: [py-svn] r32170 - in py/dist/py/test/rsession: . webdata
Message-ID: <20060911160329.2CE341007B@code0.codespeak.net>
Author: fijal
Date: Mon Sep 11 18:03:26 2006
New Revision: 32170
Modified:
py/dist/py/test/rsession/web.py
py/dist/py/test/rsession/webdata/index.html
py/dist/py/test/rsession/webjs.py
Log:
Display some more info (need guido to do it in a cute manner).
Modified: py/dist/py/test/rsession/web.py
==============================================================================
--- py/dist/py/test/rsession/web.py (original)
+++ py/dist/py/test/rsession/web.py Mon Sep 11 18:03:26 2006
@@ -91,8 +91,11 @@
itemtype = item.__class__.__name__
itemname = item.name
fullitemname = "/".join(item.listnames())
- return {'fullitemname': fullitemname, 'itemtype':itemtype,
+ d = {'fullitemname': fullitemname, 'itemtype':itemtype,
'itemname':itemname}
+ if itemtype == 'Module':
+ d['length'] = str(len(event.item.buildname2items()))
+ return d
event = self.pending_events.get()
if event is None:
@@ -246,7 +249,7 @@
javascript_source = rpython2javascript(webjs,
- ["main", "show_skip", "show_traceback"], Options)
+ ["main", "show_skip", "show_traceback", "show_info", "hide_info"], Options)
self.serve_data("text/javascript", javascript_source)
else:
js_name = py.path.local(__file__).dirpath("webdata").join("source.js")
Modified: py/dist/py/test/rsession/webdata/index.html
==============================================================================
--- py/dist/py/test/rsession/webdata/index.html (original)
+++ py/dist/py/test/rsession/webdata/index.html Mon Sep 11 18:03:26 2006
@@ -5,6 +5,8 @@
Tests
+
+
Modified: py/dist/py/test/rsession/webjs.py
==============================================================================
--- py/dist/py/test/rsession/webjs.py (original)
+++ py/dist/py/test/rsession/webjs.py Mon Sep 11 18:03:26 2006
@@ -35,6 +35,20 @@
return
exported_methods.show_all_statuses(comeback)
+def show_info(data="aa"):
+ info = dom.get_document().getElementById("info")
+ info.style.visibility = "visible"
+ while len(info.childNodes):
+ info.removeChild(info.childNodes[0])
+ txt = create_text_elem(data)
+ info.appendChild(txt)
+ info.style.backgroundColor = "beige"
+ # XXX: Need guido
+
+def hide_info():
+ info = dom.get_document().getElementById("info")
+ info.style.visibility = "hidden"
+
def process(msg):
if len(msg) == 0:
return False
@@ -47,8 +61,10 @@
tr = create_elem("tr")
td = create_elem("td")
tr.appendChild(td)
- td.appendChild(create_text_elem(msg['itemname']))
+ td.appendChild(create_text_elem("%s[%d]" % (msg['itemname'], int(msg['length']))))
tr.id = msg['fullitemname']
+ td.setAttribute("onmouseover", "show_info('%s')" % msg['fullitemname'])
+ td.setAttribute("onmouseout", "hide_info()")
main_t.appendChild(tr)
elif msg['type'] == 'HostReady':
dom.get_document().getElementById(msg['hostkey']).style.background = \
@@ -60,6 +76,8 @@
glob.pending.append(msg)
return True
td = create_elem("td")
+ td.setAttribute("onmouseover", "show_info('%s')" % msg['fullitemname'])
+ td.setAttribute("onmouseout", "hide_info()")
item_name = msg['fullitemname']
# TODO: dispatch output
if msg["passed"] == 'True':
From briandorsey at codespeak.net Mon Sep 11 18:23:48 2006
From: briandorsey at codespeak.net (briandorsey at codespeak.net)
Date: Mon, 11 Sep 2006 18:23:48 +0200 (CEST)
Subject: [py-svn] r32173 - in py/dist/py/path/svn: . testing
Message-ID: <20060911162348.86D1110079@code0.codespeak.net>
Author: briandorsey
Date: Mon Sep 11 18:23:47 2006
New Revision: 32173
Modified:
py/dist/py/path/svn/testing/test_wccommand.py
py/dist/py/path/svn/wccommand.py
Log:
Time parsing code AND tests had a subtle dependency on the GMT+2 timezone.
Basically, the inverse of time.gmtime() is not time.mktime(), but
calendar.timegm(). (time.mktime converts from local time)
Modified: py/dist/py/path/svn/testing/test_wccommand.py
==============================================================================
--- py/dist/py/path/svn/testing/test_wccommand.py (original)
+++ py/dist/py/path/svn/testing/test_wccommand.py Mon Sep 11 18:23:47 2006
@@ -1,6 +1,7 @@
import py
from py.__.path.svn.testing.svntestbase import CommonSvnTests, getrepowc
from py.__.path.svn.wccommand import InfoSvnWCCommand
+from py.__.path.svn.wccommand import parse_wcinfotime
try:
svnversion = py.path.local.sysfind('svn')
except py.error.ENOENT:
@@ -210,6 +211,11 @@
# finally:
# wcpath.localpath.remove(rec=1)
+def test_parse_wcinfotime():
+ assert (parse_wcinfotime('2006-05-30 20:45:26 +0200 (Tue, 30 May 2006)') ==
+ 1149021926)
+ assert (parse_wcinfotime('2003-10-27 20:43:14 +0100 (Mon, 27 Oct 2003)') ==
+ 1067287394)
class TestInfoSvnWCCommand:
@@ -234,9 +240,9 @@
path.chdir()
assert info.last_author == 'jan'
assert info.kind == 'file'
- assert info.mtime == 1149014726.0
+ assert info.mtime == 1149021926.0
assert info.url == 'http://codespeak.net/svn/py/dist/py/path/svn/wccommand.py'
- assert info.time == 1149014726000000.0
+ assert info.time == 1149021926000000.0
assert info.rev == 28137
@@ -262,7 +268,7 @@
path.chdir()
assert info.last_author == 'jan'
assert info.kind == 'file'
- assert info.mtime == 1149014726.0
+ assert info.mtime == 1149021926.0
assert info.url == 'http://codespeak.net/svn/py/dist/py/path/svn/wccommand.py'
assert info.rev == 28124
- assert info.time == 1149014726000000.0
+ assert info.time == 1149021926000000.0
Modified: py/dist/py/path/svn/wccommand.py
==============================================================================
--- py/dist/py/path/svn/wccommand.py (original)
+++ py/dist/py/path/svn/wccommand.py Mon Sep 11 18:23:47 2006
@@ -8,7 +8,7 @@
"""
-import os, sys, time, re
+import os, sys, time, re, calendar
import py
from py.__.path import common
from py.__.path.svn import cache
@@ -519,15 +519,15 @@
return self.__dict__ == other.__dict__
def parse_wcinfotime(timestr):
+ """ Returns seconds since epoch, UTC. """
# example: 2003-10-27 20:43:14 +0100 (Mon, 27 Oct 2003)
- # XXX honour timezone information
m = re.match(r'(\d+-\d+-\d+ \d+:\d+:\d+) ([+-]\d+) .*', timestr)
if not m:
raise ValueError, "timestring %r does not match" % timestr
timestr, timezone = m.groups()
- # XXX handle timezone
+ # do not handle timezone specially, return value should be UTC
parsedtime = time.strptime(timestr, "%Y-%m-%d %H:%M:%S")
- return time.mktime(parsedtime)
+ return calendar.timegm(parsedtime)
def make_recursive_propdict(wcroot,
output,
From cfbolz at codespeak.net Mon Sep 11 18:33:08 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Mon, 11 Sep 2006 18:33:08 +0200 (CEST)
Subject: [py-svn] r32174 - in py/dist/py/test/rsession: . testing
Message-ID: <20060911163308.21E2D10079@code0.codespeak.net>
Author: cfbolz
Date: Mon Sep 11 18:33:06 2006
New Revision: 32174
Modified:
py/dist/py/test/rsession/hostmanage.py
py/dist/py/test/rsession/rsession.py
py/dist/py/test/rsession/testing/test_rsession.py
Log:
* don't rsync to the same host several times
* fix imports to be 2.3 and 2.2 compatible
Modified: py/dist/py/test/rsession/hostmanage.py
==============================================================================
--- py/dist/py/test/rsession/hostmanage.py (original)
+++ py/dist/py/test/rsession/hostmanage.py Mon Sep 11 18:33:06 2006
@@ -2,8 +2,8 @@
import py
import time
import thread, threading
-from py.__.test.rsession.master import (
- setup_slave, MasterNode, dispatch_loop)
+from py.__.test.rsession.master import \
+ setup_slave, MasterNode, dispatch_loop
from py.__.test.rsession import report
from py.__.test.rsession.rsync import RSync
@@ -51,11 +51,17 @@
gw = py.execnet.SshGateway(host)
else:
gw = py.execnet.SshGateway(host, remotepython=remote_python)
+
hosts.append((host, gw, remoterootpath))
# rsyncing
+ rsynced = {}
+
rsync = HostRSync(rsync_roots)
for host, gw, remoterootpath in hosts:
+ if host in rsynced:
+ continue
+ rsynced[host] = True
def done(host=host):
reporter(report.HostReady(host))
reporter(report.HostRSyncing(host, remoterootpath))
Modified: py/dist/py/test/rsession/rsession.py
==============================================================================
--- py/dist/py/test/rsession/rsession.py (original)
+++ py/dist/py/test/rsession/rsession.py Mon Sep 11 18:33:06 2006
@@ -11,8 +11,8 @@
import time
from py.__.test.rsession import report
-from py.__.test.rsession.master import (
- setup_slave, MasterNode, dispatch_loop)
+from py.__.test.rsession.master import \
+ setup_slave, MasterNode, dispatch_loop
from py.__.test.rsession.hostmanage import init_hosts, teardown_hosts
from py.__.test.terminal.out import getout
Modified: py/dist/py/test/rsession/testing/test_rsession.py
==============================================================================
--- py/dist/py/test/rsession/testing/test_rsession.py (original)
+++ py/dist/py/test/rsession/testing/test_rsession.py Mon Sep 11 18:33:06 2006
@@ -6,8 +6,8 @@
from py.__.test.rsession import report
from py.__.test.rsession.rsession import RSession
from py.__.test.rsession.hostmanage import init_hosts, teardown_hosts
-from py.__.test.rsession.testing.test_slave import (funcfail_spec,
- funcpass_spec, funcskip_spec, funcprint_spec, funcprintfail_spec)
+from py.__.test.rsession.testing.test_slave import funcfail_spec,\
+ funcpass_spec, funcskip_spec, funcprint_spec, funcprintfail_spec
def setup_module(mod):
mod.pkgdir = py.path.local(py.__file__).dirpath()
From cfbolz at codespeak.net Mon Sep 11 18:45:13 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Mon, 11 Sep 2006 18:45:13 +0200 (CEST)
Subject: [py-svn] r32176 - py/dist/py/rest/testing
Message-ID: <20060911164513.D749510071@code0.codespeak.net>
Author: cfbolz
Date: Mon Sep 11 18:45:10 2006
New Revision: 32176
Modified:
py/dist/py/rest/testing/test_directive.py
py/dist/py/rest/testing/test_htmlrest.py
py/dist/py/rest/testing/test_rst.py
py/dist/py/rest/testing/test_rst2pdf.py
Log:
skip all these tests if docutils are not importable
Modified: py/dist/py/rest/testing/test_directive.py
==============================================================================
--- py/dist/py/rest/testing/test_directive.py (original)
+++ py/dist/py/rest/testing/test_directive.py Mon Sep 11 18:45:10 2006
@@ -1,8 +1,11 @@
import py
-from py.__.rest import directive
+try:
+ from py.__.rest import directive
+except ImportError:
+ py.test.skip("docutils not present")
from py.__.misc import rest
from py.__.rest.latex import process_rest_file
-from shared_helpers import is_on_path
+from py.__.rest.testing.shared_helpers import is_on_path
datadir = py.magic.autopath().dirpath().join("data")
Modified: py/dist/py/rest/testing/test_htmlrest.py
==============================================================================
--- py/dist/py/rest/testing/test_htmlrest.py (original)
+++ py/dist/py/rest/testing/test_htmlrest.py Mon Sep 11 18:45:10 2006
@@ -1,10 +1,14 @@
import py
from py.__.misc import rest
-from shared_helpers import is_on_path
+from py.__.rest.testing.shared_helpers import is_on_path
def setup_module(mod):
if not is_on_path("gs") or not is_on_path("dot") or not is_on_path("latex"):
py.test.skip("ghostscript, graphviz and latex needed")
+ try:
+ import docutils
+ except ImportError:
+ py.test.skip("docutils not present")
data = py.magic.autopath().dirpath().join("data")
Modified: py/dist/py/rest/testing/test_rst.py
==============================================================================
--- py/dist/py/rest/testing/test_rst.py (original)
+++ py/dist/py/rest/testing/test_rst.py Mon Sep 11 18:45:10 2006
@@ -2,6 +2,11 @@
from py.__.rest.rst import rest, Out, itertext, RestTag
from py.__.misc import rest as pyrest
+try:
+ import docutils
+except ImportError:
+ py.test.skip("docutils not present")
+
temp = py.test.ensuretemp('check_rest')
#temp = py.path.local.mkdtemp()
Modified: py/dist/py/rest/testing/test_rst2pdf.py
==============================================================================
--- py/dist/py/rest/testing/test_rst2pdf.py (original)
+++ py/dist/py/rest/testing/test_rst2pdf.py Mon Sep 11 18:45:10 2006
@@ -1,6 +1,10 @@
import py
-from py.__.rest.latex import process_configfile, process_rest_file
-from shared_helpers import is_on_path
+try:
+ from py.__.rest.latex import process_configfile, process_rest_file
+except ImportError:
+ py.test.skip("docutils not present")
+
+from py.__.rest.testing.shared_helpers import is_on_path
def setup_module(mod):
if not is_on_path("gs") or not is_on_path("dot") or not is_on_path("latex"):
From briandorsey at codespeak.net Mon Sep 11 18:51:11 2006
From: briandorsey at codespeak.net (briandorsey at codespeak.net)
Date: Mon, 11 Sep 2006 18:51:11 +0200 (CEST)
Subject: [py-svn] r32179 - in py/dist/py/path/svn: . testing
Message-ID: <20060911165111.D9F5010071@code0.codespeak.net>
Author: briandorsey
Date: Mon Sep 11 18:51:11 2006
New Revision: 32179
Modified:
py/dist/py/path/svn/testing/test_urlcommand.py
py/dist/py/path/svn/urlcommand.py
Log:
Made the time.mktime() --> calendar.timegm() fix to urlcommand.py.
Modified: py/dist/py/path/svn/testing/test_urlcommand.py
==============================================================================
--- py/dist/py/path/svn/testing/test_urlcommand.py (original)
+++ py/dist/py/path/svn/testing/test_urlcommand.py Mon Sep 11 18:51:11 2006
@@ -35,9 +35,9 @@
assert info.last_author == 'hpk'
assert info.created_rev == 2256
assert info.kind == 'file'
- assert info.mtime == 1132851300.0
+ assert info.mtime == 1132854900.0
assert info.size == 165
- assert info.time == 1132851300000000.0
+ assert info.time == 1132854900000000.0
def test_svn_1_3(self):
line =" 4784 hpk 2 Jun 01 2004 __init__.py"
Modified: py/dist/py/path/svn/urlcommand.py
==============================================================================
--- py/dist/py/path/svn/urlcommand.py (original)
+++ py/dist/py/path/svn/urlcommand.py Mon Sep 11 18:51:11 2006
@@ -5,7 +5,7 @@
"""
-import os, sys, time, re
+import os, sys, time, re, calendar
import py
from py import path, process
from py.__.path import common
@@ -275,7 +275,7 @@
if t_result > t_now:
year -= 1
t_result = (year, month, day, hour, minute, 0,0,0,0)
- return time.mktime(t_result)
+ return calendar.timegm(t_result)
class PathEntry:
def __init__(self, ppart):
From cfbolz at codespeak.net Mon Sep 11 18:54:55 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Mon, 11 Sep 2006 18:54:55 +0200 (CEST)
Subject: [py-svn] r32183 - py/dist/py/test/rsession
Message-ID: <20060911165455.7FC1F1007D@code0.codespeak.net>
Author: cfbolz
Date: Mon Sep 11 18:54:54 2006
New Revision: 32183
Modified:
py/dist/py/test/rsession/web.py
Log:
don't use decorators in the py-lib (which is supposed to be 2.2 compatible)
Modified: py/dist/py/test/rsession/web.py
==============================================================================
--- py/dist/py/test/rsession/web.py (original)
+++ py/dist/py/test/rsession/web.py Mon Sep 11 18:54:54 2006
@@ -64,26 +64,26 @@
current = current.parent
return None
- @described(retval={"aa":"aa"})
def show_hosts(self):
self.start_event.wait()
return json.write(self.hosts)
+ show_hosts = described(retval={"aa":"aa"})(show_hosts)
- @described(retval={'aa':"aa"})
def show_skip(self, item_name="a"):
return json.write({'item_name':item_name, 'reason':escape(self.skip_reasons[item_name])})
+ show_skip = described(retval={"aa":"aa"})(show_skip)
- @described(retval={'aa':"aa"})
def show_fail(self, item_name="a"):
return json.write({'item_name':item_name, 'traceback':escape(str(self.fail_reasons[item_name]))})
+ show_fail = described(retval={"aa":"aa"})(show_fail)
- @described(retval=[{"aa":"aa"}])
def show_all_statuses(self):
retlist = [self.show_status_change()]
while not self.pending_events.empty():
retlist.append(self.show_status_change())
retval = json.write(retlist)
return retval
+ show_all_statuses = described(retval={"aa":"aa"})(show_all_statuses)
def show_status_change(self):
def add_item(event):
From cfbolz at codespeak.net Mon Sep 11 18:55:14 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Mon, 11 Sep 2006 18:55:14 +0200 (CEST)
Subject: [py-svn] r32184 - py/dist/py/execnet/testing
Message-ID: <20060911165514.3002C10079@code0.codespeak.net>
Author: cfbolz
Date: Mon Sep 11 18:55:12 2006
New Revision: 32184
Modified:
py/dist/py/execnet/testing/test_gateway.py
Log:
__future__ import
Modified: py/dist/py/execnet/testing/test_gateway.py
==============================================================================
--- py/dist/py/execnet/testing/test_gateway.py (original)
+++ py/dist/py/execnet/testing/test_gateway.py Mon Sep 11 18:55:12 2006
@@ -1,3 +1,4 @@
+from __future__ import generators
import os, sys, time, signal
import py
from py.__.execnet import gateway
From fijal at codespeak.net Mon Sep 11 19:17:35 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Mon, 11 Sep 2006 19:17:35 +0200 (CEST)
Subject: [py-svn] r32186 - in py/dist/py/test/rsession: . webdata
Message-ID: <20060911171735.EF30E10077@code0.codespeak.net>
Author: fijal
Date: Mon Sep 11 19:17:32 2006
New Revision: 32186
Modified:
py/dist/py/test/rsession/web.py
py/dist/py/test/rsession/webdata/source.js
py/dist/py/test/rsession/webjs.py
Log:
Added display of stdout/stderr. This makes web interface feature-complete I guess.
Modified: py/dist/py/test/rsession/web.py
==============================================================================
--- py/dist/py/test/rsession/web.py (original)
+++ py/dist/py/test/rsession/web.py Mon Sep 11 19:17:32 2006
@@ -54,6 +54,8 @@
self.end_event = threading.Event()
self.skip_reasons = {}
self.fail_reasons = {}
+ self.stdout = {}
+ self.stderr = {}
def findmodule(self, item):
# find the most outwards parent which is module
@@ -74,7 +76,8 @@
show_skip = described(retval={"aa":"aa"})(show_skip)
def show_fail(self, item_name="a"):
- return json.write({'item_name':item_name, 'traceback':escape(str(self.fail_reasons[item_name]))})
+ return json.write({'item_name':item_name, 'traceback':escape(str(self.fail_reasons[item_name])),\
+ 'stdout':self.stdout[item_name], 'stderr':self.stderr[item_name]})
show_fail = described(retval={"aa":"aa"})(show_fail)
def show_all_statuses(self):
@@ -118,6 +121,8 @@
elif outcome.excinfo:
self.fail_reasons[fullitemname] = self.repr_failure_tblong(\
event.item, outcome.excinfo, outcome.excinfo.traceback)
+ self.stdout[fullitemname] = outcome.stdout
+ self.stderr[fullitemname] = outcome.stderr
elif isinstance(event, report.ItemStart):
args = add_item(event)
elif isinstance(event, report.HostReady):
@@ -244,15 +249,15 @@
self.serve_data("text/html", data)
def run_jssource(self):
+ js_name = py.path.local(__file__).dirpath("webdata").join("source.js")
if IMPORTED_PYPY:
from py.__.test.rsession import webjs
-
-
+
javascript_source = rpython2javascript(webjs,
["main", "show_skip", "show_traceback", "show_info", "hide_info"], Options)
+ open(str(js_name), "w").write(javascript_source)
self.serve_data("text/javascript", javascript_source)
else:
- js_name = py.path.local(__file__).dirpath("webdata").join("source.js")
js_source = open(str(js_name), "r").read()
self.serve_data("text/javascript", js_source)
Modified: py/dist/py/test/rsession/webdata/source.js
==============================================================================
--- py/dist/py/test/rsession/webdata/source.js (original)
+++ py/dist/py/test/rsession/webdata/source.js Mon Sep 11 19:17:32 2006
@@ -175,7 +175,7 @@
}
}
-ExportedMethods.prototype.show_status_change = function ( callback ) {
+ExportedMethods.prototype.show_all_statuses = function ( callback ) {
var data,str;
var x = new XMLHttpRequest();
data = {};
@@ -190,8 +190,8 @@
str += i + "=" + data[i].toString();
}
}
- //logDebug('show_status_change'+str);
- x.open("GET", 'show_status_change' + str, true);
+ //logDebug('show_all_statuses'+str);
+ x.open("GET", 'show_all_statuses' + str, true);
//x.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
x.onreadystatechange = function () { callback_0(x, callback) };
//x.setRequestHeader("Connection", "close");
@@ -307,66 +307,81 @@
x.send(null);
}
function some_strange_function_which_will_never_be_called () {
- var v7,v8,v9,v10,v11,v12,v13,v14,v0,v15,v16,v17,v18,v19,v20,v21,v1,v22,v23,v24,v25,v26,v27,v28;
+ var v12,v13,v14,v15,v16,v17,v18,v19,v0,v20,v21,v22,v23,v24,v25,v26,v1,v27,v28,v29,v30,v31,v32,v33,v2,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47;
var block = 0;
for(;;){
switch(block){
case 0:
- v8 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v8.oenter_variant0(__consts_0.const_str,__consts_0.const_str__2,__consts_0.const_str__3,46);
+ v13 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v13.oenter_variant0(__consts_0.const_str,__consts_0.const_str__2,__consts_0.const_str__3,70);
undefined;
main ( );
- v12 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v12.oleave_variant0(__consts_0.const_str);
+ v17 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v17.oleave_variant0(__consts_0.const_str);
undefined;
v0 = 'a';
- v15 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v15.oenter_variant0(__consts_0.const_str__4,__consts_0.const_str__5,__consts_0.const_str__3,47);
+ v20 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v20.oenter_variant0(__consts_0.const_str__4,__consts_0.const_str__5,__consts_0.const_str__3,71);
undefined;
show_skip ( v0 );
- v19 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v19.oleave_variant0(__consts_0.const_str__4);
+ v24 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v24.oleave_variant0(__consts_0.const_str__4);
undefined;
v1 = 'a';
- v22 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v22.oenter_variant0(__consts_0.const_str__6,__consts_0.const_str__7,__consts_0.const_str__3,48);
+ v27 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v27.oenter_variant0(__consts_0.const_str__6,__consts_0.const_str__7,__consts_0.const_str__3,72);
undefined;
show_traceback ( v1 );
- v26 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v26.oleave_variant0(__consts_0.const_str__6);
+ v31 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v31.oleave_variant0(__consts_0.const_str__6);
+ undefined;
+ v2 = __consts_0.const_str__8;
+ v34 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v34.oenter_variant0(__consts_0.const_str__9,__consts_0.const_str__10,__consts_0.const_str__3,73);
+ undefined;
+ show_info ( v2 );
+ v38 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v38.oleave_variant0(__consts_0.const_str__9);
+ undefined;
+ v41 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v41.oenter_variant0(__consts_0.const_str__11,__consts_0.const_str__2,__consts_0.const_str__3,74);
+ undefined;
+ hide_info ( );
+ v45 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v45.oleave_variant0(__consts_0.const_str__11);
undefined;
block = 1;
break;
case 1:
- return ( v7 );
+ return ( v12 );
}
}
}
-function show_skip (item_name_0) {
- var v71,v72,item_name_1,v73,v74,last_exception_8,last_exc_value_16,item_name_2,v75,v76,v77,last_exception_9,last_exc_value_17,item_name_3,v78,v79,v80,v81,last_exception_10,last_exc_value_18,item_name_4,v82,v83,v84,v85,v86,last_exception_11,last_exc_value_19,item_name_5,v87,v88,v89,v90,v91,v92,last_exception_12,last_exc_value_20,v93,v94,last_exception_13,last_exc_value_21,v95,v96,v97,last_exception_14,last_exc_value_22,v98,v99,v100,last_exception_15,last_exc_value_23,last_exc_value_24,v101,e_1,v102,v103,v104,v105,v106,last_exc_value_25,v107,last_exc_value_26,v108,last_exc_value_27,v109,last_exc_value_28,v110,last_exc_value_29,v111,last_exc_value_30,v112,last_exc_value_31,v113;
+function show_info (data_0) {
+ var v176,v177,data_1,v178,v179,last_exception_24,last_exc_value_48,data_2,v180,v181,v182,last_exception_25,last_exc_value_49,data_3,v183,v184,v185,v186,last_exception_26,last_exc_value_50,data_4,v187,v188,v189,v190,v191,last_exception_27,last_exc_value_51,data_5,v192,v193,v194,v195,v196,v197,last_exception_28,last_exc_value_52,v198,v199,last_exception_29,last_exc_value_53,v200,v201,v202,last_exception_30,last_exc_value_54,v203,v204,v205,last_exception_31,last_exc_value_55,last_exc_value_56,v206,e_3,v207,v208,v209,v210,v211,last_exc_value_57,v212,last_exc_value_58,v213,last_exc_value_59,v214,last_exc_value_60,v215,last_exc_value_61,v216,last_exc_value_62,v217,last_exc_value_63,v218;
var block = 0;
for(;;){
switch(block){
case 0:
- v72 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- item_name_1 = item_name_0;
- v73 = v72;
+ v177 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ data_1 = data_0;
+ v178 = v177;
block = 1;
break;
case 1:
try {
- v74 = __consts_0.const_str__8;
- item_name_2 = item_name_1;
- v75 = v73;
- v76 = v74;
+ v179 = __consts_0.const_str__12;
+ data_2 = data_1;
+ v180 = v178;
+ v181 = v179;
block = 2;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_31 = exc;
+ last_exc_value_63 = exc;
block = 19;
break;
}
@@ -374,18 +389,18 @@
}
case 2:
try {
- v77 = __consts_0.const_str__2;
- item_name_3 = item_name_2;
- v78 = v75;
- v79 = v76;
- v80 = v77;
+ v182 = __consts_0.const_str__2;
+ data_3 = data_2;
+ v183 = v180;
+ v184 = v181;
+ v185 = v182;
block = 3;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_30 = exc;
+ last_exc_value_62 = exc;
block = 18;
break;
}
@@ -393,19 +408,19 @@
}
case 3:
try {
- v81 = __consts_0.const_str__9;
- item_name_4 = item_name_3;
- v82 = v78;
- v83 = v79;
- v84 = v80;
- v85 = v81;
+ v186 = __consts_0.const_str__13;
+ data_4 = data_3;
+ v187 = v183;
+ v188 = v184;
+ v189 = v185;
+ v190 = v186;
block = 4;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_29 = exc;
+ last_exc_value_61 = exc;
block = 17;
break;
}
@@ -413,20 +428,20 @@
}
case 4:
try {
- v86 = 0;
- item_name_5 = item_name_4;
- v87 = v82;
- v88 = v83;
- v89 = v84;
- v90 = v85;
- v91 = v86;
+ v191 = 0;
+ data_5 = data_4;
+ v192 = v187;
+ v193 = v188;
+ v194 = v189;
+ v195 = v190;
+ v196 = v191;
block = 5;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_28 = exc;
+ last_exc_value_60 = exc;
block = 16;
break;
}
@@ -434,15 +449,15 @@
}
case 5:
try {
- v87.oenter_variant0(v88,v89,v90,v91);
- v93 = item_name_5;
+ v192.oenter_variant0(v193,v194,v195,v196);
+ v198 = data_5;
block = 6;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_27 = exc;
+ last_exc_value_59 = exc;
block = 15;
break;
}
@@ -450,36 +465,36 @@
}
case 6:
try {
- show_skip_ ( v93 );
+ show_info_ ( v198 );
block = 7;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_26 = exc;
+ last_exc_value_58 = exc;
block = 14;
break;
}
throw(exc);
}
case 7:
- v95 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v96 = v95;
+ v200 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v201 = v200;
block = 8;
break;
case 8:
try {
- v97 = __consts_0.const_str__8;
- v98 = v96;
- v99 = v97;
+ v202 = __consts_0.const_str__12;
+ v203 = v201;
+ v204 = v202;
block = 9;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_25 = exc;
+ last_exc_value_57 = exc;
block = 13;
break;
}
@@ -487,67 +502,67 @@
}
case 9:
try {
- v98.oleave_variant0(v99);
+ v203.oleave_variant0(v204);
block = 10;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_24 = exc;
+ last_exc_value_56 = exc;
block = 11;
break;
}
throw(exc);
}
case 10:
- return ( v71 );
+ return ( v176 );
case 11:
- v101 = last_exc_value_24;
- e_1 = v101;
+ v206 = last_exc_value_56;
+ e_3 = v206;
block = 12;
break;
case 12:
- v102 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
- v103 = 0;
- v104 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v102,v103 );
- v105 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_1 );
- __show_traceback ( v104,v105 );
+ v207 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
+ v208 = 0;
+ v209 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v207,v208 );
+ v210 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_3 );
+ __show_traceback ( v209,v210 );
block = 10;
break;
case 13:
- v107 = last_exc_value_25;
- e_1 = v107;
+ v212 = last_exc_value_57;
+ e_3 = v212;
block = 12;
break;
case 14:
- v108 = last_exc_value_26;
- e_1 = v108;
+ v213 = last_exc_value_58;
+ e_3 = v213;
block = 12;
break;
case 15:
- v109 = last_exc_value_27;
- e_1 = v109;
+ v214 = last_exc_value_59;
+ e_3 = v214;
block = 12;
break;
case 16:
- v110 = last_exc_value_28;
- e_1 = v110;
+ v215 = last_exc_value_60;
+ e_3 = v215;
block = 12;
break;
case 17:
- v111 = last_exc_value_29;
- e_1 = v111;
+ v216 = last_exc_value_61;
+ e_3 = v216;
block = 12;
break;
case 18:
- v112 = last_exc_value_30;
- e_1 = v112;
+ v217 = last_exc_value_62;
+ e_3 = v217;
block = 12;
break;
case 19:
- v113 = last_exc_value_31;
- e_1 = v113;
+ v218 = last_exc_value_63;
+ e_3 = v218;
block = 12;
break;
}
@@ -562,46 +577,46 @@
}
inherits(pypy_translator_transformer_debug_TracebackHandler,Object);
-pypy_translator_transformer_debug_TracebackHandler.prototype.oenter_variant0 = function (tb_str_0,data_0,filename_0,lineno_0){
- var v251,v252,v253,v254,v255,v256,v257,v258,v259;
+pypy_translator_transformer_debug_TracebackHandler.prototype.oenter_variant0 = function (tb_str_0,data_9,filename_0,lineno_0){
+ var v376,v377,v378,v379,v380,v381,v382,v383,v384;
var block = 0;
for(;;){
switch(block){
case 0:
- v252 = this.otb;
- v253 = v252;
- v254 = new Object();
- v254.item0 = tb_str_0;
- v254.item1 = data_0;
- v254.item2 = filename_0;
- v254.item3 = lineno_0;
- ll_append__List_Record_item2__String__ite_Record_i ( v253,v254 );
+ v377 = this.otb;
+ v378 = v377;
+ v379 = new Object();
+ v379.item0 = tb_str_0;
+ v379.item1 = data_9;
+ v379.item2 = filename_0;
+ v379.item3 = lineno_0;
+ ll_append__List_Record_item2__String__ite_Record_i ( v378,v379 );
block = 1;
break;
case 1:
- return ( v251 );
+ return ( v376 );
}
}
}
pypy_translator_transformer_debug_TracebackHandler.prototype.oleave_variant0 = function (tb_str_1){
- var v268,v269,v270,v271,self_3,tb_str_2,num_0,v272,v273,self_4,tb_str_3,num_1,v274,v275,v276,v277,v278,self_5,tb_str_4,v279,v280,self_6,tb_str_5,num_2,v281,v282,v283,v284;
+ var v393,v394,v395,v396,self_3,tb_str_2,num_0,v397,v398,self_4,tb_str_3,num_1,v399,v400,v401,v402,v403,self_5,tb_str_4,v404,v405,self_6,tb_str_5,num_2,v406,v407,v408,v409;
var block = 0;
for(;;){
switch(block){
case 0:
- v269 = this.otb;
- v270 = ll_len__List_Record_item2__String__ite ( v269 );
- v271 = (v270-1);
+ v394 = this.otb;
+ v395 = ll_len__List_Record_item2__String__ite ( v394 );
+ v396 = (v395-1);
self_3 = this;
tb_str_2 = tb_str_1;
- num_0 = v271;
+ num_0 = v396;
block = 1;
break;
case 1:
- v272 = (num_0>=0);
- v273 = v272;
- if (v273 == true)
+ v397 = (num_0>=0);
+ v398 = v397;
+ if (v398 == true)
{
self_4 = self_3;
tb_str_3 = tb_str_2;
@@ -614,14 +629,14 @@
break;
}
case 2:
- return ( v268 );
+ return ( v393 );
case 3:
- v274 = self_4.otb;
- v275 = ll_getitem_nonneg__dum_nocheckConst_List_Record_it ( undefined,v274,num_1 );
- v276 = v275.item0;
- v277 = ll_streq__String_String ( v276,tb_str_3 );
- v278 = v277;
- if (v278 == true)
+ v399 = self_4.otb;
+ v400 = ll_getitem_nonneg__dum_nocheckConst_List_Record_it ( undefined,v399,num_1 );
+ v401 = v400.item0;
+ v402 = ll_streq__String_String ( v401,tb_str_3 );
+ v403 = v402;
+ if (v403 == true)
{
self_6 = self_4;
tb_str_5 = tb_str_3;
@@ -632,25 +647,25 @@
else{
self_5 = self_4;
tb_str_4 = tb_str_3;
- v279 = num_1;
+ v404 = num_1;
block = 4;
break;
}
case 4:
- v280 = (v279-1);
+ v405 = (v404-1);
self_3 = self_5;
tb_str_2 = tb_str_4;
- num_0 = v280;
+ num_0 = v405;
block = 1;
break;
case 5:
- v281 = self_6.otb;
- v282 = ll_newslice__Signed_Signed ( 0,num_2 );
- v283 = ll_listslice__List_Record_item2__String__ite_List_ ( undefined,v281,v282 );
- self_6.otb = v283;
+ v406 = self_6.otb;
+ v407 = ll_newslice__Signed_Signed ( 0,num_2 );
+ v408 = ll_listslice__List_Record_item2__String__ite_List_ ( undefined,v406,v407 );
+ self_6.otb = v408;
self_5 = self_6;
tb_str_4 = tb_str_5;
- v279 = num_2;
+ v404 = num_2;
block = 4;
break;
}
@@ -658,224 +673,349 @@
}
pypy_translator_transformer_debug_TracebackHandler.prototype.otraceback_variant0 = function (){
- var v324,v325;
+ var v449,v450;
var block = 0;
for(;;){
switch(block){
case 0:
- v325 = this.otb;
- v324 = v325;
+ v450 = this.otb;
+ v449 = v450;
block = 1;
break;
case 1:
- return ( v324 );
+ return ( v449 );
}
}
}
function ll_len__List_Record_item2__String__ite (l_3) {
- var v285,v286,v287;
+ var v410,v411,v412;
var block = 0;
for(;;){
switch(block){
case 0:
- v286 = l_3;
- v287 = v286.length;
- v285 = v287;
+ v411 = l_3;
+ v412 = v411.length;
+ v410 = v412;
block = 1;
break;
case 1:
- return ( v285 );
+ return ( v410 );
}
}
}
-function __show_traceback (tb_0,exc_0) {
- var v184,v185,v186,v187,v188,tb_1,exc_1,v189,tb_2,exc_2,debug_div_0,v190,v191,v192,v193,v194,v195,v196,v197,v198,v199,v200,v201,v202,v203,v204,exc_3,txt_0,v205,v206,last_exc_value_48,exc_4,txt_1,v207,v208,v209,v210,v211,v212,v213,v214,v215,v216,v217,v218,v219,v220,v221,v222,v223,v224,v225,v226,v227,v228,v229,v230,v231,v232,v233,v234,v235,v236,v237,v238,v239,v240,v241,v242,v243,v244,v245,exc_5,v246,v247,v248,v249,v250;
+function ll_newslice__Signed_Signed (start_1,stop_0) {
+ var v427,v428,v429,v430;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v428 = new Slice();
+ v428.start = start_1;
+ v428.stop = stop_0;
+ v427 = v428;
+ block = 1;
+ break;
+ case 1:
+ return ( v427 );
+ }
+ }
+}
+
+function ll_streq__String_String (s1_0,s2_0) {
+ var v417,v418,v419,v420,s2_1,v421,v422,v423,v424,v425,v426;
var block = 0;
for(;;){
switch(block){
case 0:
- v185 = document;
- v186 = v185;
- v187 = v186.getElementById(__consts_0.const_str__10);
- v188 = !!v187;
- if (v188 == true)
+ v418 = !!s1_0;
+ v419 = !v418;
+ v420 = v419;
+ if (v420 == true)
{
- tb_2 = tb_0;
- exc_2 = exc_0;
- debug_div_0 = v187;
- block = 2;
+ v424 = s2_0;
+ block = 3;
break;
}
else{
- tb_1 = tb_0;
- exc_1 = exc_0;
+ s2_1 = s2_0;
+ v421 = s1_0;
block = 1;
break;
}
case 1:
- v189 = create_debug_div ( );
- tb_2 = tb_1;
- exc_2 = exc_1;
- debug_div_0 = v189;
+ v422 = v421;
+ v423 = (v422==s2_1);
+ v417 = v423;
block = 2;
break;
case 2:
- v190 = document;
- v191 = v190;
- v192 = v191.createElement(__consts_0.const_str__11);
- v193 = v192.style;
- v193.color = __consts_0.const_str__12;
- v195 = debug_div_0;
- v195.appendChild(v192);
- v197 = document;
- v198 = v197;
- v199 = v198.createTextNode(__consts_0.const_str__9);
- v200 = v192;
- v200.appendChild(v199);
- v202 = 1;
- v203 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,tb_2,v202 );
- v204 = ll_listiter__Record_index__Signed__iterable_List_R ( undefined,v203 );
- exc_3 = exc_2;
- txt_0 = v199;
- v205 = v204;
- block = 3;
+ return ( v417 );
+ case 3:
+ v425 = !!v424;
+ v426 = !v425;
+ v417 = v426;
+ block = 2;
+ break;
+ }
+ }
+}
+
+function show_traceback (item_name_8) {
+ var v133,v134,item_name_9,v135,v136,last_exception_16,last_exc_value_32,item_name_10,v137,v138,v139,last_exception_17,last_exc_value_33,item_name_11,v140,v141,v142,v143,last_exception_18,last_exc_value_34,item_name_12,v144,v145,v146,v147,v148,last_exception_19,last_exc_value_35,item_name_13,v149,v150,v151,v152,v153,v154,last_exception_20,last_exc_value_36,v155,v156,last_exception_21,last_exc_value_37,v157,v158,v159,last_exception_22,last_exc_value_38,v160,v161,v162,last_exception_23,last_exc_value_39,last_exc_value_40,v163,e_2,v164,v165,v166,v167,v168,last_exc_value_41,v169,last_exc_value_42,v170,last_exc_value_43,v171,last_exc_value_44,v172,last_exc_value_45,v173,last_exc_value_46,v174,last_exc_value_47,v175;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v134 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ item_name_9 = item_name_8;
+ v135 = v134;
+ block = 1;
break;
+ case 1:
+ try {
+ v136 = __consts_0.const_str__12;
+ item_name_10 = item_name_9;
+ v137 = v135;
+ v138 = v136;
+ block = 2;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_47 = exc;
+ block = 19;
+ break;
+ }
+ throw(exc);
+ }
+ case 2:
+ try {
+ v139 = __consts_0.const_str__2;
+ item_name_11 = item_name_10;
+ v140 = v137;
+ v141 = v138;
+ v142 = v139;
+ block = 3;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_46 = exc;
+ block = 18;
+ break;
+ }
+ throw(exc);
+ }
case 3:
try {
- v206 = ll_listnext__Record_index__Signed__iterable_ ( v205 );
- exc_4 = exc_3;
- txt_1 = txt_0;
- v207 = v205;
- v208 = v206;
+ v143 = __consts_0.const_str__13;
+ item_name_12 = item_name_11;
+ v144 = v140;
+ v145 = v141;
+ v146 = v142;
+ v147 = v143;
block = 4;
break;
}
catch (exc){
- if (isinstanceof(exc, exceptions_StopIteration))
+ if (isinstanceof(exc, exceptions_Exception))
{
- exc_5 = exc_3;
- v246 = txt_0;
- block = 5;
+ last_exc_value_45 = exc;
+ block = 17;
break;
}
throw(exc);
}
case 4:
- v209 = v208.item0;
- v210 = v208.item1;
- v211 = v208.item2;
- v212 = v208.item3;
- v213 = new Object();
- v213.item0 = v209;
- v213.item1 = v210;
- v216 = v213.item0;
- v217 = v213.item1;
- v218 = new StringBuilder();
- v219 = v216.toString();
- v218.ll_append(v219);
- v218.ll_append(__consts_0.const_str__13);
- v222 = v217.toString();
- v218.ll_append(v222);
- v224 = v218.ll_build();
- v225 = escape ( v224 );
- v226 = new Object();
- v226.item0 = v211;
- v226.item1 = v212;
- v229 = v226.item0;
- v230 = v226.item1;
- v231 = new StringBuilder();
- v231.ll_append(__consts_0.const_str__14);
- v233 = v229.toString();
- v231.ll_append(v233);
- v231.ll_append(__consts_0.const_str__15);
- v236 = v230.toString();
- v231.ll_append(v236);
- v231.ll_append(__consts_0.const_str__16);
- v239 = v231.ll_build();
- v240 = escape ( v239 );
- v241 = txt_1.nodeValue;
- v242 = ll_strconcat__String_String ( v225,__consts_0.const_str__16 );
- v243 = ll_strconcat__String_String ( v242,v240 );
- v244 = ll_strconcat__String_String ( v241,v243 );
- txt_1.nodeValue = v244;
- exc_3 = exc_4;
- txt_0 = txt_1;
- v205 = v207;
- block = 3;
- break;
+ try {
+ v148 = 0;
+ item_name_13 = item_name_12;
+ v149 = v144;
+ v150 = v145;
+ v151 = v146;
+ v152 = v147;
+ v153 = v148;
+ block = 5;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_44 = exc;
+ block = 16;
+ break;
+ }
+ throw(exc);
+ }
case 5:
- v247 = v246.nodeValue;
- v248 = ll_str__StringR_StringConst_String ( undefined,exc_5 );
- v249 = ll_strconcat__String_String ( v247,v248 );
- v246.nodeValue = v249;
- block = 6;
- break;
+ try {
+ v149.oenter_variant0(v150,v151,v152,v153);
+ v155 = item_name_13;
+ block = 6;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_43 = exc;
+ block = 15;
+ break;
+ }
+ throw(exc);
+ }
case 6:
- return ( v184 );
- }
- }
-}
-
-function ll_listiter__Record_index__Signed__iterable_List_R (ITER_0,lst_0) {
- var v349,v350,v351,v352;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v350 = new Object();
- v350.iterable = lst_0;
- v350.index = 0;
- v349 = v350;
- block = 1;
+ try {
+ show_traceback_ ( v155 );
+ block = 7;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_42 = exc;
+ block = 14;
+ break;
+ }
+ throw(exc);
+ }
+ case 7:
+ v157 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v158 = v157;
+ block = 8;
+ break;
+ case 8:
+ try {
+ v159 = __consts_0.const_str__12;
+ v160 = v158;
+ v161 = v159;
+ block = 9;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_41 = exc;
+ block = 13;
+ break;
+ }
+ throw(exc);
+ }
+ case 9:
+ try {
+ v160.oleave_variant0(v161);
+ block = 10;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_40 = exc;
+ block = 11;
+ break;
+ }
+ throw(exc);
+ }
+ case 10:
+ return ( v133 );
+ case 11:
+ v163 = last_exc_value_40;
+ e_2 = v163;
+ block = 12;
+ break;
+ case 12:
+ v164 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
+ v165 = 0;
+ v166 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v164,v165 );
+ v167 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_2 );
+ __show_traceback ( v166,v167 );
+ block = 10;
+ break;
+ case 13:
+ v169 = last_exc_value_41;
+ e_2 = v169;
+ block = 12;
+ break;
+ case 14:
+ v170 = last_exc_value_42;
+ e_2 = v170;
+ block = 12;
+ break;
+ case 15:
+ v171 = last_exc_value_43;
+ e_2 = v171;
+ block = 12;
+ break;
+ case 16:
+ v172 = last_exc_value_44;
+ e_2 = v172;
+ block = 12;
+ break;
+ case 17:
+ v173 = last_exc_value_45;
+ e_2 = v173;
+ block = 12;
+ break;
+ case 18:
+ v174 = last_exc_value_46;
+ e_2 = v174;
+ block = 12;
+ break;
+ case 19:
+ v175 = last_exc_value_47;
+ e_2 = v175;
+ block = 12;
break;
- case 1:
- return ( v349 );
}
}
}
-function ll_str__InstanceR_exceptions_Exception_Instance_ex (self_0,instance_0) {
- var v180,v181,v182,v183;
+function ll_append__List_Record_item2__String__ite_Record_i (l_2,newitem_0) {
+ var v385,v386,v387,v388,v389,v390,v391,v392;
var block = 0;
for(;;){
switch(block){
case 0:
- undefined;
- v182 = ll_const__Signed_ ( -1 );
- v183 = instance_0.toString();
- v180 = v183;
+ v386 = l_2;
+ v387 = v386.length;
+ v388 = l_2;
+ v389 = (v387+1);
+ v388.length = v389;
+ v391 = l_2;
+ v391[v387]=newitem_0;
block = 1;
break;
case 1:
- return ( v180 );
+ return ( v385 );
}
}
}
function ll_listslice_startonly__List_Record_item2__String_ (RESLIST_0,l1_0,start_0) {
- var v166,v167,v168,v169,v170,v171,l1_1,i_0,j_0,l_0,len1_0,v172,v173,l1_2,i_1,j_1,l_1,len1_1,v174,v175,v176,v177,v178,v179;
+ var v291,v292,v293,v294,v295,v296,l1_1,i_0,j_0,l_0,len1_0,v297,v298,l1_2,i_1,j_1,l_1,len1_1,v299,v300,v301,v302,v303,v304;
var block = 0;
for(;;){
switch(block){
case 0:
- v167 = l1_0;
- v168 = v167.length;
- v169 = (v168-start_0);
+ v292 = l1_0;
+ v293 = v292.length;
+ v294 = (v293-start_0);
undefined;
- v171 = ll_newlist__List_Record_item2__String__ite_Signed ( undefined,v169 );
+ v296 = ll_newlist__List_Record_item2__String__ite_Signed ( undefined,v294 );
l1_1 = l1_0;
i_0 = start_0;
j_0 = 0;
- l_0 = v171;
- len1_0 = v168;
+ l_0 = v296;
+ len1_0 = v293;
block = 1;
break;
case 1:
- v172 = (i_0=v357);
- v359 = v358;
- if (v359 == true)
- {
- block = 3;
- break;
- }
- else{
- iter_1 = iter_0;
- index_2 = v355;
- l_7 = v354;
- block = 1;
- break;
- }
- case 1:
- v360 = (index_2+1);
- iter_1.index = v360;
- v362 = l_7;
- v363 = v362[index_2];
- v353 = v363;
- block = 2;
- break;
- case 2:
- return ( v353 );
- case 3:
- v364 = __consts_0.exceptions_StopIteration;
- v365 = v364.meta;
- v366 = v364;
- etype_0 = v365;
- evalue_0 = v366;
- block = 4;
- break;
- case 4:
- throw(evalue_0);
- }
- }
-}
-
-function ll_const__Signed_ (c_0) {
- var v372;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v372 = c_0;
- block = 1;
- break;
- case 1:
- return ( v372 );
- }
- }
-}
-
-function ll_newslice__Signed_Signed (start_1,stop_0) {
- var v302,v303,v304,v305;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v303 = new Slice();
- v303.start = start_1;
- v303.stop = stop_0;
- v302 = v303;
- block = 1;
- break;
- case 1:
- return ( v302 );
- }
- }
-}
-
-function escape (s_0) {
- var v367;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v367 = s_0;
- block = 1;
- break;
- case 1:
- return ( v367 );
- }
- }
-}
-
-function ll_getitem_nonneg__dum_nocheckConst_List_ExternalT (func_1,l_8,index_3) {
- var v375,index_4,v376,v377,v378;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- index_4 = index_3;
- v376 = l_8;
- block = 1;
- break;
- case 1:
- v377 = v376;
- v378 = v377[index_4];
- v375 = v378;
- block = 2;
- break;
- case 2:
- return ( v375 );
- }
- }
-}
-
-function ll_listslice__List_Record_item2__String__ite_List_ (RESLIST_1,l1_3,slice_0) {
- var v306,v307,v308,v309,v310,v311,v312,RESLIST_2,l1_4,stop_1,start_2,v313,v314,v315,l1_5,i_2,j_2,stop_2,l_5,v316,v317,l1_6,i_3,j_3,stop_3,l_6,v318,v319,v320,v321,v322,v323;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v307 = slice_0.start;
- v308 = slice_0.stop;
- v309 = l1_3;
- v310 = v309.length;
- v311 = (v308>v310);
- v312 = v311;
- if (v312 == true)
- {
- l1_4 = l1_3;
- stop_1 = v310;
- start_2 = v307;
- block = 1;
- break;
- }
- else{
- l1_4 = l1_3;
- stop_1 = v308;
- start_2 = v307;
- block = 1;
- break;
- }
- case 1:
- v313 = (stop_1-start_2);
- undefined;
- v315 = ll_newlist__List_Record_item2__String__ite_Signed ( undefined,v313 );
- l1_5 = l1_4;
- i_2 = start_2;
- j_2 = 0;
- stop_2 = stop_1;
- l_5 = v315;
- block = 2;
- break;
- case 2:
- v316 = (i_2' );
-}
-
-inherits(exceptions_Exception,Object);
-function show_skip_ (item_name_12) {
- var v157,v158,v5,v159,v160,v161,v162,v163,v164,v165;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v158 = ll_chr2str__Char ( item_name_12 );
- v5 = ll_dict_getitem__Dict_String__String__String ( __consts_0.const_tuple,v158 );
- v159 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v159.oenter_variant0(__consts_0.const_str__22,__consts_0.const_str__23,__consts_0.const_str__24,69);
- undefined;
- set_msgbox ( v5 );
- v163 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v163.oleave_variant0(__consts_0.const_str__22);
- undefined;
- block = 1;
- break;
- case 1:
- return ( v157 );
- }
- }
-}
-
-function ll_append__List_Record_item2__String__ite_Record_i (l_2,newitem_0) {
- var v260,v261,v262,v263,v264,v265,v266,v267;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v261 = l_2;
- v262 = v261.length;
- v263 = l_2;
- v264 = (v262+1);
- v263.length = v264;
- v266 = l_2;
- v266[v262]=newitem_0;
- block = 1;
- break;
- case 1:
- return ( v260 );
- }
- }
-}
-
-function ll_newlist__List_Record_item2__String__ite_Signed (self_9,length_0) {
- var v373,v374;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v374 = ll_newlist__List_Record_item2__String__ite_Signed_ ( undefined,length_0 );
- v373 = v374;
- block = 1;
- break;
- case 1:
- return ( v373 );
- }
- }
-}
-
-function exceptions_StopIteration () {
-}
-
-exceptions_StopIteration.prototype.toString = function (){
- return ( '' );
-}
-
-inherits(exceptions_StopIteration,exceptions_Exception);
-function show_traceback (item_name_6) {
- var v114,v115,item_name_7,v116,v117,last_exception_16,last_exc_value_32,item_name_8,v118,v119,v120,last_exception_17,last_exc_value_33,item_name_9,v121,v122,v123,v124,last_exception_18,last_exc_value_34,item_name_10,v125,v126,v127,v128,v129,last_exception_19,last_exc_value_35,item_name_11,v130,v131,v132,v133,v134,v135,last_exception_20,last_exc_value_36,v136,v137,last_exception_21,last_exc_value_37,v138,v139,v140,last_exception_22,last_exc_value_38,v141,v142,v143,last_exception_23,last_exc_value_39,last_exc_value_40,v144,e_2,v145,v146,v147,v148,v149,last_exc_value_41,v150,last_exc_value_42,v151,last_exc_value_43,v152,last_exc_value_44,v153,last_exc_value_45,v154,last_exc_value_46,v155,last_exc_value_47,v156;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v115 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- item_name_7 = item_name_6;
- v116 = v115;
- block = 1;
- break;
- case 1:
- try {
- v117 = __consts_0.const_str__8;
- item_name_8 = item_name_7;
- v118 = v116;
- v119 = v117;
- block = 2;
+ try {
+ v93 = __consts_0.const_str__12;
+ item_name_4 = item_name_3;
+ v94 = v92;
+ v95 = v93;
+ block = 2;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_47 = exc;
+ last_exc_value_31 = exc;
block = 19;
break;
}
@@ -1341,18 +1081,18 @@
}
case 2:
try {
- v120 = __consts_0.const_str__2;
- item_name_9 = item_name_8;
- v121 = v118;
- v122 = v119;
- v123 = v120;
+ v96 = __consts_0.const_str__2;
+ item_name_5 = item_name_4;
+ v97 = v94;
+ v98 = v95;
+ v99 = v96;
block = 3;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_46 = exc;
+ last_exc_value_30 = exc;
block = 18;
break;
}
@@ -1360,19 +1100,19 @@
}
case 3:
try {
- v124 = __consts_0.const_str__9;
- item_name_10 = item_name_9;
- v125 = v121;
- v126 = v122;
- v127 = v123;
- v128 = v124;
+ v100 = __consts_0.const_str__13;
+ item_name_6 = item_name_5;
+ v101 = v97;
+ v102 = v98;
+ v103 = v99;
+ v104 = v100;
block = 4;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_45 = exc;
+ last_exc_value_29 = exc;
block = 17;
break;
}
@@ -1380,20 +1120,20 @@
}
case 4:
try {
- v129 = 0;
- item_name_11 = item_name_10;
- v130 = v125;
- v131 = v126;
- v132 = v127;
- v133 = v128;
- v134 = v129;
+ v105 = 0;
+ item_name_7 = item_name_6;
+ v106 = v101;
+ v107 = v102;
+ v108 = v103;
+ v109 = v104;
+ v110 = v105;
block = 5;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_44 = exc;
+ last_exc_value_28 = exc;
block = 16;
break;
}
@@ -1401,15 +1141,15 @@
}
case 5:
try {
- v130.oenter_variant0(v131,v132,v133,v134);
- v136 = item_name_11;
+ v106.oenter_variant0(v107,v108,v109,v110);
+ v112 = item_name_7;
block = 6;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_43 = exc;
+ last_exc_value_27 = exc;
block = 15;
break;
}
@@ -1417,36 +1157,36 @@
}
case 6:
try {
- show_traceback_ ( v136 );
+ show_skip_ ( v112 );
block = 7;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_42 = exc;
+ last_exc_value_26 = exc;
block = 14;
break;
}
throw(exc);
}
case 7:
- v138 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v139 = v138;
+ v114 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v115 = v114;
block = 8;
break;
case 8:
try {
- v140 = __consts_0.const_str__8;
- v141 = v139;
- v142 = v140;
+ v116 = __consts_0.const_str__12;
+ v117 = v115;
+ v118 = v116;
block = 9;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_41 = exc;
+ last_exc_value_25 = exc;
block = 13;
break;
}
@@ -1454,109 +1194,478 @@
}
case 9:
try {
- v141.oleave_variant0(v142);
+ v117.oleave_variant0(v118);
block = 10;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_40 = exc;
+ last_exc_value_24 = exc;
block = 11;
break;
}
throw(exc);
}
case 10:
- return ( v114 );
+ return ( v90 );
case 11:
- v144 = last_exc_value_40;
- e_2 = v144;
+ v120 = last_exc_value_24;
+ e_1 = v120;
block = 12;
break;
case 12:
- v145 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
- v146 = 0;
- v147 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v145,v146 );
- v148 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_2 );
- __show_traceback ( v147,v148 );
+ v121 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
+ v122 = 0;
+ v123 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v121,v122 );
+ v124 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_1 );
+ __show_traceback ( v123,v124 );
block = 10;
break;
case 13:
- v150 = last_exc_value_41;
- e_2 = v150;
+ v126 = last_exc_value_25;
+ e_1 = v126;
block = 12;
break;
case 14:
- v151 = last_exc_value_42;
- e_2 = v151;
+ v127 = last_exc_value_26;
+ e_1 = v127;
block = 12;
break;
case 15:
- v152 = last_exc_value_43;
- e_2 = v152;
+ v128 = last_exc_value_27;
+ e_1 = v128;
block = 12;
break;
case 16:
- v153 = last_exc_value_44;
- e_2 = v153;
+ v129 = last_exc_value_28;
+ e_1 = v129;
block = 12;
break;
case 17:
- v154 = last_exc_value_45;
- e_2 = v154;
+ v130 = last_exc_value_29;
+ e_1 = v130;
block = 12;
break;
case 18:
- v155 = last_exc_value_46;
- e_2 = v155;
+ v131 = last_exc_value_30;
+ e_1 = v131;
block = 12;
break;
case 19:
- v156 = last_exc_value_47;
- e_2 = v156;
+ v132 = last_exc_value_31;
+ e_1 = v132;
block = 12;
break;
}
}
}
-function main () {
- var v29,v30,v31,v32,last_exception_0,last_exc_value_0,v33,v34,v35,last_exception_1,last_exc_value_1,v36,v37,v38,v39,last_exception_2,last_exc_value_2,v40,v41,v42,v43,v44,last_exception_3,last_exc_value_3,v45,v46,v47,v48,v49,v50,last_exception_4,last_exc_value_4,v51,last_exception_5,last_exc_value_5,v52,v53,v54,last_exception_6,last_exc_value_6,v55,v56,v57,last_exception_7,last_exc_value_7,last_exc_value_8,v58,e_0,v59,v60,v61,v62,v63,last_exc_value_9,v64,last_exc_value_10,v65,last_exc_value_11,v66,last_exc_value_12,v67,last_exc_value_13,v68,last_exc_value_14,v69,last_exc_value_15,v70;
+function ll_str__InstanceR_exceptions_Exception_Instance_ex (self_0,instance_0) {
+ var v305,v306,v307,v308;
var block = 0;
for(;;){
switch(block){
case 0:
- v30 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v31 = v30;
+ undefined;
+ v307 = ll_const__Signed ( -1 );
+ v308 = instance_0.toString();
+ v305 = v308;
block = 1;
break;
case 1:
- try {
- v32 = __consts_0.const_str__8;
- v33 = v31;
- v34 = v32;
- block = 2;
- break;
- }
- catch (exc){
- if (isinstanceof(exc, exceptions_Exception))
- {
- last_exc_value_15 = exc;
- block = 19;
- break;
- }
- throw(exc);
- }
- case 2:
- try {
- v35 = __consts_0.const_str__2;
- v36 = v33;
- v37 = v34;
- v38 = v35;
- block = 3;
- break;
- }
+ return ( v305 );
+ }
+ }
+}
+
+function ll_const__Signed (c_0) {
+ var v486;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v486 = c_0;
+ block = 1;
+ break;
+ case 1:
+ return ( v486 );
+ }
+ }
+}
+
+function ll_listslice__List_Record_item2__String__ite_List_ (RESLIST_1,l1_3,slice_0) {
+ var v431,v432,v433,v434,v435,v436,v437,RESLIST_2,l1_4,stop_1,start_2,v438,v439,v440,l1_5,i_2,j_2,stop_2,l_5,v441,v442,l1_6,i_3,j_3,stop_3,l_6,v443,v444,v445,v446,v447,v448;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v432 = slice_0.start;
+ v433 = slice_0.stop;
+ v434 = l1_3;
+ v435 = v434.length;
+ v436 = (v433>v435);
+ v437 = v436;
+ if (v437 == true)
+ {
+ l1_4 = l1_3;
+ stop_1 = v435;
+ start_2 = v432;
+ block = 1;
+ break;
+ }
+ else{
+ l1_4 = l1_3;
+ stop_1 = v433;
+ start_2 = v432;
+ block = 1;
+ break;
+ }
+ case 1:
+ v438 = (stop_1-start_2);
+ undefined;
+ v440 = ll_newlist__List_Record_item2__String__ite_Signed ( undefined,v438 );
+ l1_5 = l1_4;
+ i_2 = start_2;
+ j_2 = 0;
+ stop_2 = stop_1;
+ l_5 = v440;
+ block = 2;
+ break;
+ case 2:
+ v441 = (i_2' );
+}
+
+function main () {
+ var v48,v49,v50,v51,last_exception_0,last_exc_value_0,v52,v53,v54,last_exception_1,last_exc_value_1,v55,v56,v57,v58,last_exception_2,last_exc_value_2,v59,v60,v61,v62,v63,last_exception_3,last_exc_value_3,v64,v65,v66,v67,v68,v69,last_exception_4,last_exc_value_4,v70,last_exception_5,last_exc_value_5,v71,v72,v73,last_exception_6,last_exc_value_6,v74,v75,v76,last_exception_7,last_exc_value_7,last_exc_value_8,v77,e_0,v78,v79,v80,v81,v82,last_exc_value_9,v83,last_exc_value_10,v84,last_exc_value_11,v85,last_exc_value_12,v86,last_exc_value_13,v87,last_exc_value_14,v88,last_exc_value_15,v89;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v49 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v50 = v49;
+ block = 1;
+ break;
+ case 1:
+ try {
+ v51 = __consts_0.const_str__12;
+ v52 = v50;
+ v53 = v51;
+ block = 2;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_15 = exc;
+ block = 19;
+ break;
+ }
+ throw(exc);
+ }
+ case 2:
+ try {
+ v54 = __consts_0.const_str__2;
+ v55 = v52;
+ v56 = v53;
+ v57 = v54;
+ block = 3;
+ break;
+ }
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
@@ -1568,11 +1677,11 @@
}
case 3:
try {
- v39 = __consts_0.const_str__9;
- v40 = v36;
- v41 = v37;
- v42 = v38;
- v43 = v39;
+ v58 = __consts_0.const_str__13;
+ v59 = v55;
+ v60 = v56;
+ v61 = v57;
+ v62 = v58;
block = 4;
break;
}
@@ -1587,12 +1696,12 @@
}
case 4:
try {
- v44 = 0;
- v45 = v40;
- v46 = v41;
- v47 = v42;
- v48 = v43;
- v49 = v44;
+ v63 = 0;
+ v64 = v59;
+ v65 = v60;
+ v66 = v61;
+ v67 = v62;
+ v68 = v63;
block = 5;
break;
}
@@ -1607,7 +1716,7 @@
}
case 5:
try {
- v45.oenter_variant0(v46,v47,v48,v49);
+ v64.oenter_variant0(v65,v66,v67,v68);
block = 6;
break;
}
@@ -1636,15 +1745,15 @@
throw(exc);
}
case 7:
- v52 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v53 = v52;
+ v71 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v72 = v71;
block = 8;
break;
case 8:
try {
- v54 = __consts_0.const_str__8;
- v55 = v53;
- v56 = v54;
+ v73 = __consts_0.const_str__12;
+ v74 = v72;
+ v75 = v73;
block = 9;
break;
}
@@ -1659,7 +1768,7 @@
}
case 9:
try {
- v55.oleave_variant0(v56);
+ v74.oleave_variant0(v75);
block = 10;
break;
}
@@ -1673,341 +1782,1220 @@
throw(exc);
}
case 10:
- return ( v29 );
+ return ( v48 );
case 11:
- v58 = last_exc_value_8;
- e_0 = v58;
+ v77 = last_exc_value_8;
+ e_0 = v77;
block = 12;
break;
case 12:
- v59 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
- v60 = 0;
- v61 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v59,v60 );
- v62 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_0 );
- __show_traceback ( v61,v62 );
+ v78 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
+ v79 = 0;
+ v80 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v78,v79 );
+ v81 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_0 );
+ __show_traceback ( v80,v81 );
block = 10;
break;
case 13:
- v64 = last_exc_value_9;
- e_0 = v64;
+ v83 = last_exc_value_9;
+ e_0 = v83;
block = 12;
break;
case 14:
- v65 = last_exc_value_10;
- e_0 = v65;
+ v84 = last_exc_value_10;
+ e_0 = v84;
block = 12;
break;
case 15:
- v66 = last_exc_value_11;
- e_0 = v66;
+ v85 = last_exc_value_11;
+ e_0 = v85;
block = 12;
break;
case 16:
- v67 = last_exc_value_12;
- e_0 = v67;
+ v86 = last_exc_value_12;
+ e_0 = v86;
block = 12;
break;
case 17:
- v68 = last_exc_value_13;
- e_0 = v68;
+ v87 = last_exc_value_13;
+ e_0 = v87;
block = 12;
break;
case 18:
- v69 = last_exc_value_14;
- e_0 = v69;
+ v88 = last_exc_value_14;
+ e_0 = v88;
block = 12;
break;
case 19:
- v70 = last_exc_value_15;
- e_0 = v70;
+ v89 = last_exc_value_15;
+ e_0 = v89;
block = 12;
break;
}
}
}
-function show_traceback_ (item_name_13) {
- var v405,v406,v6,v407,v408,v409,v410,v411,v412,v413;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v406 = ll_chr2str__Char ( item_name_13 );
- v6 = ll_dict_getitem__Dict_String__String__String ( __consts_0.const_tuple__25,v406 );
- v407 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v407.oenter_variant0(__consts_0.const_str__22,__consts_0.const_str__26,__consts_0.const_str__24,76);
- undefined;
- set_msgbox ( v6 );
- v411 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v411.oleave_variant0(__consts_0.const_str__22);
- undefined;
- block = 1;
- break;
- case 1:
- return ( v405 );
- }
- }
-}
-
-function Slice () {
-}
-
-Slice.prototype.toString = function (){
- return ( '' );
-}
-
-function set_msgbox (data_1) {
- var v392,v393,v394,v395,v396,v397,v398,v399,v400;
+function hide_info () {
+ var v219,v220,v221,v222,last_exception_32,last_exc_value_64,v223,v224,v225,last_exception_33,last_exc_value_65,v226,v227,v228,v229,last_exception_34,last_exc_value_66,v230,v231,v232,v233,v234,last_exception_35,last_exc_value_67,v235,v236,v237,v238,v239,v240,last_exception_36,last_exc_value_68,v241,last_exception_37,last_exc_value_69,v242,v243,v244,last_exception_38,last_exc_value_70,v245,v246,v247,last_exception_39,last_exc_value_71,last_exc_value_72,v248,e_4,v249,v250,v251,v252,v253,last_exc_value_73,v254,last_exc_value_74,v255,last_exc_value_75,v256,last_exc_value_76,v257,last_exc_value_77,v258,last_exc_value_78,v259,last_exc_value_79,v260;
var block = 0;
for(;;){
switch(block){
case 0:
- v393 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v393.oenter_variant0(__consts_0.const_str__27,__consts_0.const_str__28,__consts_0.const_str__24,72);
- undefined;
- v396 = get_elem ( __consts_0.const_str__29 );
- v397 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v397.oleave_variant0(__consts_0.const_str__27);
- undefined;
- v396.innerHTML = data_1;
+ v220 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v221 = v220;
block = 1;
break;
case 1:
- return ( v392 );
- }
- }
-}
-
-function ll_dict_getitem__Dict_String__String__String (d_0,key_0) {
- var v382,v383,v384,v385,v386,v387,v388,etype_1,evalue_1,key_1,v389,v390,v391;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v383 = d_0;
- v384 = (v383[key_0]!=undefined);
- v385 = v384;
- if (v385 == true)
- {
- key_1 = key_0;
- v389 = d_0;
- block = 3;
- break;
- }
- else{
- block = 1;
+ try {
+ v222 = __consts_0.const_str__12;
+ v223 = v221;
+ v224 = v222;
+ block = 2;
break;
}
- case 1:
- v386 = __consts_0.exceptions_KeyError;
- v387 = v386.meta;
- v388 = v386;
- etype_1 = v387;
- evalue_1 = v388;
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_79 = exc;
+ block = 19;
+ break;
+ }
+ throw(exc);
+ }
+ case 2:
+ try {
+ v225 = __consts_0.const_str__2;
+ v226 = v223;
+ v227 = v224;
+ v228 = v225;
+ block = 3;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_78 = exc;
+ block = 18;
+ break;
+ }
+ throw(exc);
+ }
+ case 3:
+ try {
+ v229 = __consts_0.const_str__13;
+ v230 = v226;
+ v231 = v227;
+ v232 = v228;
+ v233 = v229;
+ block = 4;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_77 = exc;
+ block = 17;
+ break;
+ }
+ throw(exc);
+ }
+ case 4:
+ try {
+ v234 = 0;
+ v235 = v230;
+ v236 = v231;
+ v237 = v232;
+ v238 = v233;
+ v239 = v234;
+ block = 5;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_76 = exc;
+ block = 16;
+ break;
+ }
+ throw(exc);
+ }
+ case 5:
+ try {
+ v235.oenter_variant0(v236,v237,v238,v239);
+ block = 6;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_75 = exc;
+ block = 15;
+ break;
+ }
+ throw(exc);
+ }
+ case 6:
+ try {
+ hide_info_ ( );
+ block = 7;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_74 = exc;
+ block = 14;
+ break;
+ }
+ throw(exc);
+ }
+ case 7:
+ v242 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v243 = v242;
+ block = 8;
+ break;
+ case 8:
+ try {
+ v244 = __consts_0.const_str__12;
+ v245 = v243;
+ v246 = v244;
+ block = 9;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_73 = exc;
+ block = 13;
+ break;
+ }
+ throw(exc);
+ }
+ case 9:
+ try {
+ v245.oleave_variant0(v246);
+ block = 10;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_72 = exc;
+ block = 11;
+ break;
+ }
+ throw(exc);
+ }
+ case 10:
+ return ( v219 );
+ case 11:
+ v248 = last_exc_value_72;
+ e_4 = v248;
+ block = 12;
+ break;
+ case 12:
+ v249 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
+ v250 = 0;
+ v251 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v249,v250 );
+ v252 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_4 );
+ __show_traceback ( v251,v252 );
+ block = 10;
+ break;
+ case 13:
+ v254 = last_exc_value_73;
+ e_4 = v254;
+ block = 12;
+ break;
+ case 14:
+ v255 = last_exc_value_74;
+ e_4 = v255;
+ block = 12;
+ break;
+ case 15:
+ v256 = last_exc_value_75;
+ e_4 = v256;
+ block = 12;
+ break;
+ case 16:
+ v257 = last_exc_value_76;
+ e_4 = v257;
+ block = 12;
+ break;
+ case 17:
+ v258 = last_exc_value_77;
+ e_4 = v258;
+ block = 12;
+ break;
+ case 18:
+ v259 = last_exc_value_78;
+ e_4 = v259;
+ block = 12;
+ break;
+ case 19:
+ v260 = last_exc_value_79;
+ e_4 = v260;
+ block = 12;
+ break;
+ }
+ }
+}
+
+function hide_info_ () {
+ var v591,v592,v593,v594,v595,v596,v597,v598,v599,v600,v601,v602;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v592 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v592.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,49);
+ undefined;
+ v595 = document;
+ v596 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v596.oleave_variant0(__consts_0.const_str__28);
+ undefined;
+ v599 = v595;
+ v600 = v599.getElementById(__consts_0.const_str__31);
+ v601 = v600.style;
+ v601.visibility = __consts_0.const_str__32;
+ block = 1;
+ break;
+ case 1:
+ return ( v591 );
+ }
+ }
+}
+
+function ll_dict_getitem__Dict_String__Record_item2__Str_St (d_0,key_0) {
+ var v536,v537,v538,v539,v540,v541,v542,etype_1,evalue_1,key_1,v543,v544,v545;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v537 = d_0;
+ v538 = (v537[key_0]!=undefined);
+ v539 = v538;
+ if (v539 == true)
+ {
+ key_1 = key_0;
+ v543 = d_0;
+ block = 3;
+ break;
+ }
+ else{
+ block = 1;
+ break;
+ }
+ case 1:
+ v540 = __consts_0.exceptions_KeyError;
+ v541 = v540.meta;
+ v542 = v540;
+ etype_1 = v541;
+ evalue_1 = v542;
block = 2;
break;
case 2:
throw(evalue_1);
case 3:
- v390 = v389;
- v391 = v390[key_1];
- v382 = v391;
+ v544 = v543;
+ v545 = v544[key_1];
+ v536 = v545;
block = 4;
break;
case 4:
- return ( v382 );
+ return ( v536 );
}
}
}
-function exceptions_StandardError () {
-}
-
-exceptions_StandardError.prototype.toString = function (){
- return ( '' );
-}
-
-inherits(exceptions_StandardError,exceptions_Exception);
-function exceptions_LookupError () {
+function ll_getitem_nonneg__dum_nocheckConst_List_ExternalT (func_1,l_8,index_3) {
+ var v581,index_4,v582,v583,v584;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ index_4 = index_3;
+ v582 = l_8;
+ block = 1;
+ break;
+ case 1:
+ v583 = v582;
+ v584 = v583[index_4];
+ v581 = v584;
+ block = 2;
+ break;
+ case 2:
+ return ( v581 );
+ }
+ }
}
-exceptions_LookupError.prototype.toString = function (){
- return ( '' );
+function main_ () {
+ var v586,v587,v588,v589,v590;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v587 = __consts_0.ExportedMethods;
+ v588 = v587.show_hosts(host_init);
+ v589 = __consts_0.ExportedMethods;
+ v590 = v589.show_all_statuses(comeback);
+ block = 1;
+ break;
+ case 1:
+ return ( v586 );
+ }
+ }
}
-inherits(exceptions_LookupError,exceptions_StandardError);
-function exceptions_KeyError () {
+function exceptions_Exception () {
}
-exceptions_KeyError.prototype.toString = function (){
- return ( '' );
+exceptions_Exception.prototype.toString = function (){
+ return ( '' );
}
-inherits(exceptions_KeyError,exceptions_LookupError);
-function ll_chr2str__Char (ch_0) {
- var v379,v380,v381;
+inherits(exceptions_Exception,Object);
+function show_skip_ (item_name_0) {
+ var v477,v478,v8,v479,v480,v481,v482,v483,v484,v485;
var block = 0;
for(;;){
switch(block){
case 0:
- v380 = ll_const__Signed ( -1 );
- v381 = ch_0.toString();
- v379 = v381;
+ v478 = ll_chr2str__Char ( item_name_0 );
+ v8 = ll_dict_getitem__Dict_String__String__String ( __consts_0.const_tuple__35,v478 );
+ v479 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v479.oenter_variant0(__consts_0.const_str__25,__consts_0.const_str__36,__consts_0.const_str__27,108);
+ undefined;
+ set_msgbox ( item_name_0,v8 );
+ v483 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v483.oleave_variant0(__consts_0.const_str__25);
+ undefined;
block = 1;
break;
case 1:
- return ( v379 );
+ return ( v477 );
}
}
}
-function get_elem (el_0) {
- var v419,v420,v421,v422,v423,v424,v425,v426,v427,v428;
+function set_msgbox (item_name_14,data_10) {
+ var v546,v547,v548,v549,v550,v551,v552,v553,item_name_15,data_11,msgbox_0,v554,v555,v556,item_name_16,data_12,msgbox_1,v557,v558,v559,v560,v561,v562,v563,v564,v565,v11,v566,v567,v568,v569,v570,v571,v572,v573,v574,v575,v576,item_name_17,data_13,msgbox_2,v577,v578,v579,v580;
var block = 0;
for(;;){
switch(block){
case 0:
- v420 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v420.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,12);
+ v547 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v547.oenter_variant0(__consts_0.const_str__37,__consts_0.const_str__38,__consts_0.const_str__27,111);
undefined;
- v423 = document;
- v424 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v424.oleave_variant0(__consts_0.const_str__17);
+ v550 = get_elem ( __consts_0.const_str__39 );
+ v551 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v551.oleave_variant0(__consts_0.const_str__37);
undefined;
- v427 = v423;
- v428 = v427.getElementById(el_0);
- v419 = v428;
+ item_name_15 = item_name_14;
+ data_11 = data_10;
+ msgbox_0 = v550;
block = 1;
break;
case 1:
- return ( v419 );
+ v554 = msgbox_0.childNodes;
+ v555 = ll_len__List_ExternalType_ ( v554 );
+ v556 = !!v555;
+ if (v556 == true)
+ {
+ item_name_17 = item_name_15;
+ data_13 = data_11;
+ msgbox_2 = msgbox_0;
+ block = 4;
+ break;
+ }
+ else{
+ item_name_16 = item_name_15;
+ data_12 = data_11;
+ msgbox_1 = msgbox_0;
+ block = 2;
+ break;
+ }
+ case 2:
+ v557 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v557.oenter_variant0(__consts_0.const_str__40,__consts_0.const_str__41,__consts_0.const_str__27,114);
+ undefined;
+ v560 = create_elem ( __consts_0.const_str__15 );
+ v561 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v561.oleave_variant0(__consts_0.const_str__40);
+ undefined;
+ v564 = ll_chr2str__Char ( item_name_16 );
+ v565 = ll_strconcat__String_String ( v564,__consts_0.const_str__20 );
+ v11 = ll_strconcat__String_String ( v565,data_12 );
+ v566 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v566.oenter_variant0(__consts_0.const_str__42,__consts_0.const_str__43,__consts_0.const_str__27,115);
+ undefined;
+ v569 = create_text_elem ( v11 );
+ v570 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v570.oleave_variant0(__consts_0.const_str__42);
+ undefined;
+ v573 = v560;
+ v573.appendChild(v569);
+ v575 = msgbox_1;
+ v575.appendChild(v560);
+ block = 3;
+ break;
+ case 3:
+ return ( v546 );
+ case 4:
+ v577 = msgbox_2;
+ v578 = msgbox_2.childNodes;
+ v579 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v578,0 );
+ v580 = v577.removeChild(v579);
+ item_name_15 = item_name_17;
+ data_11 = data_13;
+ msgbox_0 = msgbox_2;
+ block = 1;
+ break;
}
}
}
-function ll_newlist__List_Record_item2__String__ite_Signed_ (LIST_0,length_1) {
- var v401,v402,v403,v404;
+function ll_strconcat__String_String (obj_0,arg0_0) {
+ var v529,v530,v531;
var block = 0;
for(;;){
switch(block){
case 0:
- v402 = new Array();
- v403 = v402;
- v403.length = length_1;
- v401 = v402;
+ v530 = obj_0;
+ v531 = (v530+arg0_0);
+ v529 = v531;
block = 1;
break;
case 1:
- return ( v401 );
+ return ( v529 );
}
}
}
-function main_ () {
- var v414,v415,v416,v417,v418;
+function ll_const__Signed_ (c_1) {
+ var v585;
var block = 0;
for(;;){
switch(block){
case 0:
- v415 = __consts_0.ExportedMethods;
- v416 = v415.show_hosts(host_init);
- v417 = __consts_0.ExportedMethods;
- v418 = v417.show_status_change(comeback);
+ v585 = c_1;
block = 1;
break;
case 1:
- return ( v414 );
+ return ( v585 );
}
}
}
-function host_init (host_dict_0) {
- var v430,v431,v432,v433,v434,v435,v436,v437,v438,v439,v440,v441,v442,host_dict_1,elem_0,v443,v444,last_exc_value_49,host_dict_2,elem_1,host_0,v445,v446,v447,v448,v449,v450,v451,v452,v453,v454,v2,v455,v456,v457,v458,v459,v460,v461,v462,v463,v464,v465,v466;
+function show_info_ (data_6) {
+ var v261,v262,v263,v264,v265,v266,v267,v268,v269,v270,v271,v272,data_7,info_0,v273,v274,v275,info_1,v10,v276,v277,v278,v279,v280,v281,v282,v283,v284,v285,v286,data_8,info_2,v287,v288,v289,v290;
var block = 0;
for(;;){
switch(block){
case 0:
- v431 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v431.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,85);
+ v262 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v262.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,39);
undefined;
- v434 = document;
- v435 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v435.oleave_variant0(__consts_0.const_str__17);
+ v265 = document;
+ v266 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v266.oleave_variant0(__consts_0.const_str__28);
undefined;
- v438 = v434;
- v439 = v438.getElementById(__consts_0.const_str__32);
- v440 = host_dict_0;
- v441 = ll_dict_kvi__Dict_String__String__List_String_LlT_ ( v440,undefined,undefined );
- v442 = ll_listiter__Record_index__Signed__iterable_List_S ( undefined,v441 );
- host_dict_1 = host_dict_0;
- elem_0 = v439;
- v443 = v442;
+ v269 = v265;
+ v270 = v269.getElementById(__consts_0.const_str__31);
+ v271 = v270.style;
+ v271.visibility = __consts_0.const_str__44;
+ data_7 = data_6;
+ info_0 = v270;
block = 1;
break;
case 1:
- try {
- v444 = ll_listnext__Record_index__Signed__iterable ( v443 );
- host_dict_2 = host_dict_1;
- elem_1 = elem_0;
- host_0 = v444;
- v445 = v443;
- block = 2;
+ v273 = info_0.childNodes;
+ v274 = ll_len__List_ExternalType_ ( v273 );
+ v275 = !!v274;
+ if (v275 == true)
+ {
+ data_8 = data_7;
+ info_2 = info_0;
+ block = 4;
break;
}
- catch (exc){
- if (isinstanceof(exc, exceptions_StopIteration))
- {
- block = 3;
- break;
- }
- throw(exc);
+ else{
+ info_1 = info_0;
+ v10 = data_7;
+ block = 2;
+ break;
}
case 2:
- v446 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v446.oenter_variant0(__consts_0.const_str__33,__consts_0.const_str__34,__consts_0.const_str__24,87);
+ v276 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v276.oenter_variant0(__consts_0.const_str__42,__consts_0.const_str__45,__consts_0.const_str__27,43);
undefined;
- v449 = create_elem ( __consts_0.const_str__35 );
- v450 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v450.oleave_variant0(__consts_0.const_str__33);
- undefined;
- v453 = v449.style;
- v453.background = __consts_0.const_str__36;
- v2 = ll_dict_getitem__Dict_String__String__String ( host_dict_2,host_0 );
- v455 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v455.oenter_variant0(__consts_0.const_str__37,__consts_0.const_str__38,__consts_0.const_str__24,89);
- undefined;
- v458 = create_text_elem ( v2 );
- v459 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v459.oleave_variant0(__consts_0.const_str__37);
- undefined;
- v462 = v449;
- v462.appendChild(v458);
- v449.id = host_0;
- v465 = elem_1;
- v465.appendChild(v449);
- host_dict_1 = host_dict_2;
- elem_0 = elem_1;
- v443 = v445;
- block = 1;
+ v279 = create_text_elem ( v10 );
+ v280 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v280.oleave_variant0(__consts_0.const_str__42);
+ undefined;
+ v283 = info_1;
+ v283.appendChild(v279);
+ v285 = info_1.style;
+ v285.backgroundColor = __consts_0.const_str__46;
+ block = 3;
break;
case 3:
- return ( v430 );
+ return ( v261 );
+ case 4:
+ v287 = info_2;
+ v288 = info_2.childNodes;
+ v289 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v288,0 );
+ v290 = v287.removeChild(v289);
+ data_7 = data_8;
+ info_0 = info_2;
+ block = 1;
+ break;
}
}
}
-function comeback (msg_0) {
- var v467,v468,v469,v470,msg_1,v471,v472,v473,v474,v475,v476,v477,v478,v479,v480,v481,v482,v483,v484,v485,v486,v487,v488,v489,v490,v491,msg_2,v492,v493,v494,msg_3,v495,v496,v497,v498,v499,msg_4,v500,last_exception_24,last_exc_value_50,msg_5,v3,v501,v502,v503,v504,v505,v506,last_exception_25,last_exc_value_51,v507,msg_6,v508,msg_7,module_part_0,v509,v510,v511,v512,v513,v514,last_exception_26,last_exc_value_52,module_part_1,msg_8,v515,v516,msg_9,module_part_2,td_0,v517,last_exception_27,last_exc_value_53,msg_10,item_name_14,module_part_3,td_1,v518,last_exception_28,last_exc_value_54,msg_11,item_name_15,module_part_4,td_2,v519,v520,v521,msg_12,item_name_16,module_part_5,td_3,v522,last_exception_29,last_exc_value_55,msg_13,item_name_17,module_part_6,td_4,v523,v524,v525,v526,msg_14,item_name_18,module_part_7,td_5,v527,v528,v529,v530,v531,v532,last_exception_30,last_exc_value_56,msg_15,v533,item_name_19,module_part_8,td_6,v534,msg_16,item_name_20,module_part_9,td_7,link_0,v535,item_name_21,module_part_10,td_8,link_1,v536,v537,v538,last_exception_31,last_exc_value_57,item_name_22,module_part_11,td_9,link_2,v539,v540,v541,v542,v543,v544,v545,v546,item_name_23,module_part_12,td_10,link_3,v547,v548,v549,last_exception_32,last_exc_value_58,item_name_24,module_part_13,td_11,link_4,v550,v551,v552,v553,v554,v555,last_exception_33,last_exc_value_59,v556,module_part_14,link_5,item_name_25,td_12,v557,item_name_26,module_part_15,td_13,txt_2,link_6,v558,item_name_27,module_part_16,td_14,link_7,v559,v560,v561,last_exception_34,last_exc_value_60,item_name_28,module_part_17,td_15,link_8,v562,item_name_29,module_part_18,td_16,v563,v564,v565,last_exception_35,last_exc_value_61,item_name_30,module_part_19,td_17,v566,module_part_20,td_18,v567,v568,v569,last_exception_36,last_exc_value_62,td_19,v570,v571,v572,v573,v574,last_exception_37,last_exc_value_63,v575,v576,v577,v578,v579,v580,v581,v582,v583,v584,v585,v586,msg_17,item_name_31,module_part_21,td_20,v587,msg_18,module_part_22,td_21,v588,v589,v590,last_exception_38,last_exc_value_64,msg_19,module_part_23,td_22,v591,v592,v593,v594,v595,v596,last_exception_39,last_exc_value_65,td_23,module_part_24,msg_20,v597,v598,msg_21,module_part_25,td_24,link_9,v599,module_part_26,td_25,link_10,v600,v601,v602,last_exception_40,last_exc_value_66,module_part_27,td_26,link_11,v603,v604,v605,v606,v607,v608,v609,v610,module_part_28,td_27,link_12,v611,v612,v613,last_exception_41,last_exc_value_67,module_part_29,td_28,link_13,v614,v615,v616,v617,v618,v619,last_exception_42,last_exc_value_68,td_29,link_14,module_part_30,v620,v621,module_part_31,td_30,txt_3,link_15,v622,module_part_32,td_31,link_16,v623,v624,v625,last_exception_43,last_exc_value_69,module_part_33,td_32,link_17,v626,module_part_34,td_33,v627,v628,v629,last_exception_44,last_exc_value_70,module_part_35,td_34,v630,v631,v632,v633,v634,v635,last_exception_45,last_exc_value_71,td_35,module_part_36,v636,v637,module_part_37,td_36,txt_4,v638,module_part_38,td_37,v639,v640,v641,last_exception_46,last_exc_value_72,msg_22,v642,v643,v644,v645,v646,v647,v648,v649,v650,v651,v652,v653,msg_23,main_t_0,v654,v655,v656,msg_24,main_t_1,v657,v658,v659,v660,v661,v662,v663,v664,v665,v666,v667,v668,v669,v670,v671,v672,v673,v4,v674,v675,v676,v677,v678,v679,v680,v681,v682,v683,v684,v685;
+function exceptions_StandardError () {
+}
+
+exceptions_StandardError.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_StandardError,exceptions_Exception);
+function ll_newlist__List_Record_item2__String__ite_Signed (self_8,length_0) {
+ var v475,v476;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v476 = ll_newlist__List_Record_item2__String__ite_Signed_ ( undefined,length_0 );
+ v475 = v476;
+ block = 1;
+ break;
+ case 1:
+ return ( v475 );
+ }
+ }
+}
+
+function escape (s_0) {
+ var v528;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v528 = s_0;
+ block = 1;
+ break;
+ case 1:
+ return ( v528 );
+ }
+ }
+}
+
+function exceptions_LookupError () {
+}
+
+exceptions_LookupError.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_LookupError,exceptions_StandardError);
+function exceptions_KeyError () {
+}
+
+exceptions_KeyError.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_KeyError,exceptions_LookupError);
+function ll_listnext__Record_index__Signed__iterable (iter_0) {
+ var v514,v515,v516,v517,v518,v519,v520,iter_1,index_2,l_7,v521,v522,v523,v524,v525,v526,v527,etype_0,evalue_0;
var block = 0;
for(;;){
switch(block){
case 0:
- v468 = get_dict_len ( msg_0 );
- v469 = (v468==0);
- v470 = v469;
- if (v470 == true)
+ v515 = iter_0.iterable;
+ v516 = iter_0.index;
+ v517 = v515;
+ v518 = v517.length;
+ v519 = (v516>=v518);
+ v520 = v519;
+ if (v520 == true)
{
- block = 5;
+ block = 3;
+ break;
+ }
+ else{
+ iter_1 = iter_0;
+ index_2 = v516;
+ l_7 = v515;
+ block = 1;
+ break;
+ }
+ case 1:
+ v521 = (index_2+1);
+ iter_1.index = v521;
+ v523 = l_7;
+ v524 = v523[index_2];
+ v514 = v524;
+ block = 2;
+ break;
+ case 2:
+ return ( v514 );
+ case 3:
+ v525 = __consts_0.exceptions_StopIteration;
+ v526 = v525.meta;
+ v527 = v525;
+ etype_0 = v526;
+ evalue_0 = v527;
+ block = 4;
+ break;
+ case 4:
+ throw(evalue_0);
+ }
+ }
+}
+
+function ll_getitem_nonneg__dum_nocheckConst_List_Record_it (func_0,l_4,index_0) {
+ var v413,index_1,v414,v415,v416;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ index_1 = index_0;
+ v414 = l_4;
+ block = 1;
+ break;
+ case 1:
+ v415 = v414;
+ v416 = v415[index_1];
+ v413 = v416;
+ block = 2;
+ break;
+ case 2:
+ return ( v413 );
+ }
+ }
+}
+
+function get_elem (el_0) {
+ var v686,v687,v688,v689,v690,v691,v692,v693,v694,v695;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v687 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v687.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,12);
+ undefined;
+ v690 = document;
+ v691 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v691.oleave_variant0(__consts_0.const_str__28);
+ undefined;
+ v694 = v690;
+ v695 = v694.getElementById(el_0);
+ v686 = v695;
+ block = 1;
+ break;
+ case 1:
+ return ( v686 );
+ }
+ }
+}
+
+function host_init (host_dict_0) {
+ var v603,v604,v605,v606,v607,v608,v609,v610,v611,v612,v613,v614,v615,host_dict_1,elem_0,v616,v617,last_exc_value_81,host_dict_2,elem_1,host_0,v618,v619,v620,v621,v622,v623,v624,v625,v626,v627,v3,v628,v629,v630,v631,v632,v633,v634,v635,v636,v637,v638,v639;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v604 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v604.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,131);
+ undefined;
+ v607 = document;
+ v608 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v608.oleave_variant0(__consts_0.const_str__28);
+ undefined;
+ v611 = v607;
+ v612 = v611.getElementById(__consts_0.const_str__48);
+ v613 = host_dict_0;
+ v614 = ll_dict_kvi__Dict_String__String__List_String_LlT_ ( v613,undefined,undefined );
+ v615 = ll_listiter__Record_index__Signed__iterable_List_S ( undefined,v614 );
+ host_dict_1 = host_dict_0;
+ elem_0 = v612;
+ v616 = v615;
+ block = 1;
+ break;
+ case 1:
+ try {
+ v617 = ll_listnext__Record_index__Signed__iterable_ ( v616 );
+ host_dict_2 = host_dict_1;
+ elem_1 = elem_0;
+ host_0 = v617;
+ v618 = v616;
+ block = 2;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_StopIteration))
+ {
+ block = 3;
+ break;
+ }
+ throw(exc);
+ }
+ case 2:
+ v619 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v619.oenter_variant0(__consts_0.const_str__40,__consts_0.const_str__49,__consts_0.const_str__27,133);
+ undefined;
+ v622 = create_elem ( __consts_0.const_str__50 );
+ v623 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v623.oleave_variant0(__consts_0.const_str__40);
+ undefined;
+ v626 = v622.style;
+ v626.background = __consts_0.const_str__51;
+ v3 = ll_dict_getitem__Dict_String__String__String ( host_dict_2,host_0 );
+ v628 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v628.oenter_variant0(__consts_0.const_str__42,__consts_0.const_str__52,__consts_0.const_str__27,135);
+ undefined;
+ v631 = create_text_elem ( v3 );
+ v632 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v632.oleave_variant0(__consts_0.const_str__42);
+ undefined;
+ v635 = v622;
+ v635.appendChild(v631);
+ v622.id = host_0;
+ v638 = elem_1;
+ v638.appendChild(v622);
+ host_dict_1 = host_dict_2;
+ elem_0 = elem_1;
+ v616 = v618;
+ block = 1;
+ break;
+ case 3:
+ return ( v603 );
+ }
+ }
+}
+
+function comeback (msglist_0) {
+ var v640,v641,v642,v643,msglist_1,v644,v645,v646,v647,msglist_2,v648,v649,last_exc_value_82,msglist_3,v650,v4,v651,v652,v653,v654,v655,v656,v657,v658,msglist_4,v659,v660,v661,v662,v663,v664,last_exc_value_83,v665,v5,v666,v667,v668,v669,v670,v671,v672,v673,v674,v675;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v641 = ll_len__List_Dict_String__String__ ( msglist_0 );
+ v642 = (v641==0);
+ v643 = v642;
+ if (v643 == true)
+ {
+ block = 4;
+ break;
+ }
+ else{
+ msglist_1 = msglist_0;
+ block = 1;
+ break;
+ }
+ case 1:
+ v644 = __consts_0.py____test_rsession_webjs_Pending.opending;
+ v645 = 0;
+ v646 = ll_listslice_startonly__List_Dict_String__String__ ( undefined,v644,v645 );
+ v647 = ll_listiter__Record_index__Signed__iterable_List_D ( undefined,v646 );
+ msglist_2 = msglist_1;
+ v648 = v647;
+ block = 2;
+ break;
+ case 2:
+ try {
+ v649 = ll_listnext__Record_index__Signed__iterable__ ( v648 );
+ msglist_3 = msglist_2;
+ v650 = v648;
+ v4 = v649;
+ block = 3;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_StopIteration))
+ {
+ msglist_4 = msglist_2;
+ block = 5;
+ break;
+ }
+ throw(exc);
+ }
+ case 3:
+ v651 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v651.oenter_variant0(__consts_0.const_str__54,__consts_0.const_str__55,__consts_0.const_str__27,30);
+ undefined;
+ v654 = process ( v4 );
+ v655 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v655.oleave_variant0(__consts_0.const_str__54);
+ undefined;
+ v658 = v654;
+ if (v658 == true)
+ {
+ msglist_2 = msglist_3;
+ v648 = v650;
+ block = 2;
+ break;
+ }
+ else{
+ block = 4;
+ break;
+ }
+ case 4:
+ return ( v640 );
+ case 5:
+ v659 = new Array();
+ v659.length = 0;
+ __consts_0.py____test_rsession_webjs_Pending.opending = v659;
+ v662 = ll_listiter__Record_index__Signed__iterable_List_D ( undefined,msglist_4 );
+ v663 = v662;
+ block = 6;
+ break;
+ case 6:
+ try {
+ v664 = ll_listnext__Record_index__Signed__iterable__ ( v663 );
+ v665 = v663;
+ v5 = v664;
+ block = 7;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_StopIteration))
+ {
+ block = 8;
+ break;
+ }
+ throw(exc);
+ }
+ case 7:
+ v666 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v666.oenter_variant0(__consts_0.const_str__54,__consts_0.const_str__56,__consts_0.const_str__27,34);
+ undefined;
+ v669 = process ( v5 );
+ v670 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v670.oleave_variant0(__consts_0.const_str__54);
+ undefined;
+ v673 = v669;
+ if (v673 == true)
+ {
+ v663 = v665;
+ block = 6;
+ break;
+ }
+ else{
+ block = 4;
+ break;
+ }
+ case 8:
+ v674 = __consts_0.ExportedMethods;
+ v675 = v674.show_all_statuses(comeback);
+ block = 4;
+ break;
+ }
+ }
+}
+
+function ll_listnext__Record_index__Signed__iterable__ (iter_4) {
+ var v777,v778,v779,v780,v781,v782,v783,iter_5,index_6,l_14,v784,v785,v786,v787,v788,v789,v790,etype_4,evalue_4;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v778 = iter_4.iterable;
+ v779 = iter_4.index;
+ v780 = v778;
+ v781 = v780.length;
+ v782 = (v779>=v781);
+ v783 = v782;
+ if (v783 == true)
+ {
+ block = 3;
+ break;
+ }
+ else{
+ iter_5 = iter_4;
+ index_6 = v779;
+ l_14 = v778;
+ block = 1;
+ break;
+ }
+ case 1:
+ v784 = (index_6+1);
+ iter_5.index = v784;
+ v786 = l_14;
+ v787 = v786[index_6];
+ v777 = v787;
+ block = 2;
+ break;
+ case 2:
+ return ( v777 );
+ case 3:
+ v788 = __consts_0.exceptions_StopIteration;
+ v789 = v788.meta;
+ v790 = v788;
+ etype_4 = v789;
+ evalue_4 = v790;
+ block = 4;
+ break;
+ case 4:
+ throw(evalue_4);
+ }
+ }
+}
+
+function create_elem (s_2) {
+ var v699,v700,v701,v702,v703,v704,v705,v706,v707,v708;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v700 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v700.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,9);
+ undefined;
+ v703 = document;
+ v704 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v704.oleave_variant0(__consts_0.const_str__28);
+ undefined;
+ v707 = v703;
+ v708 = v707.createElement(s_2);
+ v699 = v708;
+ block = 1;
+ break;
+ case 1:
+ return ( v699 );
+ }
+ }
+}
+
+function ll_dict_kvi__Dict_String__String__List_String_LlT_ (d_2,LIST_1,func_2) {
+ var v723,v724,v725,v726,v727,v728,i_4,it_0,result_0,v729,v730,v731,i_5,it_1,result_1,v732,v733,v734,v735,it_2,result_2,v736,v737;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v724 = d_2;
+ v725 = get_dict_len ( v724 );
+ v726 = ll_newlist__List_String_LlT_Signed ( undefined,v725 );
+ v727 = d_2;
+ v728 = dict_items_iterator ( v727 );
+ i_4 = 0;
+ it_0 = v728;
+ result_0 = v726;
+ block = 1;
+ break;
+ case 1:
+ v729 = it_0;
+ v730 = v729.ll_go_next();
+ v731 = v730;
+ if (v731 == true)
+ {
+ i_5 = i_4;
+ it_1 = it_0;
+ result_1 = result_0;
+ block = 3;
+ break;
+ }
+ else{
+ v723 = result_0;
+ block = 2;
+ break;
+ }
+ case 2:
+ return ( v723 );
+ case 3:
+ v732 = result_1;
+ v733 = it_1;
+ v734 = v733.ll_current_key();
+ v732[i_5]=v734;
+ it_2 = it_1;
+ result_2 = result_1;
+ v736 = i_5;
+ block = 4;
+ break;
+ case 4:
+ v737 = (v736+1);
+ i_4 = v737;
+ it_0 = it_2;
+ result_0 = result_2;
+ block = 1;
+ break;
+ }
+ }
+}
+
+function create_text_elem (txt_2) {
+ var v709,v710,v711,v712,v713,v714,v715,v716,v717,v718;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v710 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v710.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,15);
+ undefined;
+ v713 = document;
+ v714 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v714.oleave_variant0(__consts_0.const_str__28);
+ undefined;
+ v717 = v713;
+ v718 = v717.createTextNode(txt_2);
+ v709 = v718;
+ block = 1;
+ break;
+ case 1:
+ return ( v709 );
+ }
+ }
+}
+
+function ll_listnext__Record_index__Signed__iterable_ (iter_2) {
+ var v742,v743,v744,v745,v746,v747,v748,iter_3,index_5,l_10,v749,v750,v751,v752,v753,v754,v755,etype_3,evalue_3;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v743 = iter_2.iterable;
+ v744 = iter_2.index;
+ v745 = v743;
+ v746 = v745.length;
+ v747 = (v744>=v746);
+ v748 = v747;
+ if (v748 == true)
+ {
+ block = 3;
+ break;
+ }
+ else{
+ iter_3 = iter_2;
+ index_5 = v744;
+ l_10 = v743;
+ block = 1;
+ break;
+ }
+ case 1:
+ v749 = (index_5+1);
+ iter_3.index = v749;
+ v751 = l_10;
+ v752 = v751[index_5];
+ v742 = v752;
+ block = 2;
+ break;
+ case 2:
+ return ( v742 );
+ case 3:
+ v753 = __consts_0.exceptions_StopIteration;
+ v754 = v753.meta;
+ v755 = v753;
+ etype_3 = v754;
+ evalue_3 = v755;
+ block = 4;
+ break;
+ case 4:
+ throw(evalue_3);
+ }
+ }
+}
+
+function ll_len__List_ExternalType_ (l_9) {
+ var v696,v697,v698;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v697 = l_9;
+ v698 = v697.length;
+ v696 = v698;
+ block = 1;
+ break;
+ case 1:
+ return ( v696 );
+ }
+ }
+}
+
+function ll_dict_getitem__Dict_String__String__String (d_1,key_2) {
+ var v676,v677,v678,v679,v680,v681,v682,etype_2,evalue_2,key_3,v683,v684,v685;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v677 = d_1;
+ v678 = (v677[key_2]!=undefined);
+ v679 = v678;
+ if (v679 == true)
+ {
+ key_3 = key_2;
+ v683 = d_1;
+ block = 3;
+ break;
+ }
+ else{
+ block = 1;
+ break;
+ }
+ case 1:
+ v680 = __consts_0.exceptions_KeyError;
+ v681 = v680.meta;
+ v682 = v680;
+ etype_2 = v681;
+ evalue_2 = v682;
+ block = 2;
+ break;
+ case 2:
+ throw(evalue_2);
+ case 3:
+ v684 = v683;
+ v685 = v684[key_3];
+ v676 = v685;
+ block = 4;
+ break;
+ case 4:
+ return ( v676 );
+ }
+ }
+}
+
+function ll_newlist__List_Record_item2__String__ite_Signed_ (LIST_0,length_1) {
+ var v719,v720,v721,v722;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v720 = new Array();
+ v721 = v720;
+ v721.length = length_1;
+ v719 = v720;
+ block = 1;
+ break;
+ case 1:
+ return ( v719 );
+ }
+ }
+}
+
+function exceptions_StopIteration () {
+}
+
+exceptions_StopIteration.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_StopIteration,exceptions_Exception);
+function process (msg_0) {
+ var v791,v792,v793,v794,msg_1,v795,v796,v797,v798,v799,v800,v801,v802,v803,v804,v805,v806,v807,v808,v809,v810,v811,v812,v813,v814,v815,msg_2,v816,v817,v818,msg_3,v819,v820,v821,msg_4,v822,last_exception_40,last_exc_value_84,msg_5,v6,v823,v824,v825,v826,v827,v828,last_exception_41,last_exc_value_85,v829,msg_6,v830,msg_7,module_part_0,v831,msg_8,v832,msg_9,v833,v834,v835,v836,v837,msg_10,module_part_1,v838,v839,v840,v841,v842,v843,last_exception_42,last_exc_value_86,module_part_2,msg_11,v844,v845,msg_12,module_part_3,td_0,v846,msg_13,module_part_4,td_1,v847,v848,last_exception_43,last_exc_value_87,msg_14,module_part_5,td_2,v849,v850,v851,v852,v853,v854,v855,v856,msg_15,module_part_6,td_3,v857,v858,v859,last_exception_44,last_exc_value_88,msg_16,module_part_7,td_4,v860,msg_17,module_part_8,td_5,v861,v862,last_exception_45,last_exc_value_89,msg_18,module_part_9,td_6,v863,last_exception_46,last_exc_value_90,msg_19,item_name_18,module_part_10,td_7,v864,last_exception_47,last_exc_value_91,msg_20,item_name_19,module_part_11,td_8,v865,v866,v867,msg_21,item_name_20,module_part_12,td_9,v868,last_exception_48,last_exc_value_92,msg_22,item_name_21,module_part_13,td_10,v869,v870,v871,v872,msg_23,item_name_22,module_part_14,td_11,v873,v874,v875,v876,v877,v878,last_exception_49,last_exc_value_93,msg_24,td_12,module_part_15,item_name_23,v879,v880,msg_25,item_name_24,module_part_16,td_13,link_0,v881,item_name_25,module_part_17,td_14,link_1,v882,v883,v884,last_exception_50,last_exc_value_94,item_name_26,module_part_18,td_15,link_2,v885,v886,v887,v888,v889,v890,v891,v892,item_name_27,module_part_19,td_16,link_3,v893,v894,v895,last_exception_51,last_exc_value_95,item_name_28,module_part_20,td_17,link_4,v896,v897,v898,v899,v900,v901,last_exception_52,last_exc_value_96,item_name_29,td_18,module_part_21,v902,link_5,v903,item_name_30,module_part_22,td_19,txt_3,link_6,v904,item_name_31,module_part_23,td_20,link_7,v905,v906,v907,last_exception_53,last_exc_value_97,item_name_32,module_part_24,td_21,link_8,v908,item_name_33,module_part_25,td_22,v909,v910,v911,last_exception_54,last_exc_value_98,item_name_34,module_part_26,td_23,v912,module_part_27,td_24,v913,v914,v915,last_exception_55,last_exc_value_99,td_25,v916,v917,v918,v919,v920,last_exception_56,last_exc_value_100,v921,v922,v923,v924,v925,v926,v927,v928,v929,v930,v931,v932,msg_26,item_name_35,module_part_28,td_26,v933,msg_27,module_part_29,td_27,v934,v935,v936,last_exception_57,last_exc_value_101,msg_28,module_part_30,td_28,v937,v938,v939,v940,v941,v942,last_exception_58,last_exc_value_102,module_part_31,td_29,msg_29,v943,v944,msg_30,module_part_32,td_30,link_9,v945,module_part_33,td_31,link_10,v946,v947,v948,last_exception_59,last_exc_value_103,module_part_34,td_32,link_11,v949,v950,v951,v952,v953,v954,v955,v956,module_part_35,td_33,link_12,v957,v958,v959,last_exception_60,last_exc_value_104,module_part_36,td_34,link_13,v960,v961,v962,v963,v964,v965,last_exception_61,last_exc_value_105,td_35,module_part_37,link_14,v966,v967,module_part_38,td_36,txt_4,link_15,v968,module_part_39,td_37,link_16,v969,v970,v971,last_exception_62,last_exc_value_106,module_part_40,td_38,link_17,v972,module_part_41,td_39,v973,v974,v975,last_exception_63,last_exc_value_107,module_part_42,td_40,v976,v977,v978,v979,v980,v981,last_exception_64,last_exc_value_108,td_41,v982,module_part_43,v983,module_part_44,td_42,txt_5,v984,module_part_45,td_43,v985,v986,v987,last_exception_65,last_exc_value_109,msg_31,v988,v989,v990,v991,v992,v993,v994,v995,v996,v997,v998,v999,msg_32,main_t_0,v1000,v1001,v1002,msg_33,main_t_1,v1003,v1004,v1005,v1006,v1007,v1008,v1009,v1010,v1011,v1012,v1013,v1014,v1015,v1016,v1017,v1018,v1019,v1020,v1021,v1022,v1023,v1024,v1025,v1026,v1027,v1028,v1029,v1030,v1031,v1032,v1033,v1034,v7,v1035,v1036,v1037,v1038,v1039,v1040,v1041,v1042,v1043,v1044,v1045,v1046,v1047,v1048,v1049,v1050,v1051,v1052,v1053,v1054,v1055,v1056,v1057;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v792 = get_dict_len ( msg_0 );
+ v793 = (v792==0);
+ v794 = v793;
+ if (v794 == true)
+ {
+ v791 = false;
+ block = 4;
break;
}
else{
@@ -2016,32 +3004,32 @@
break;
}
case 1:
- v471 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v471.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,23);
+ v795 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v795.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,55);
undefined;
- v474 = document;
- v475 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v475.oleave_variant0(__consts_0.const_str__17);
- undefined;
- v478 = v474;
- v479 = v478.getElementById(__consts_0.const_str__39);
- v480 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v480.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,25);
- undefined;
- v483 = document;
- v484 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v484.oleave_variant0(__consts_0.const_str__17);
- undefined;
- v487 = v483;
- v488 = v487.getElementById(__consts_0.const_str__40);
- v489 = ll_dict_getitem__Dict_String__String__String ( msg_1,__consts_0.const_str__41 );
- v490 = ll_streq__String_String ( v489,__consts_0.const_str__42 );
- v491 = v490;
- if (v491 == true)
- {
- msg_23 = msg_1;
- main_t_0 = v488;
- block = 52;
+ v798 = document;
+ v799 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v799.oleave_variant0(__consts_0.const_str__28);
+ undefined;
+ v802 = v798;
+ v803 = v802.getElementById(__consts_0.const_str__57);
+ v804 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v804.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,57);
+ undefined;
+ v807 = document;
+ v808 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v808.oleave_variant0(__consts_0.const_str__28);
+ undefined;
+ v811 = v807;
+ v812 = v811.getElementById(__consts_0.const_str__58);
+ v813 = ll_dict_getitem__Dict_String__String__String ( msg_1,__consts_0.const_str__59 );
+ v814 = ll_streq__String_String ( v813,__consts_0.const_str__60 );
+ v815 = v814;
+ if (v815 == true)
+ {
+ msg_32 = msg_1;
+ main_t_0 = v812;
+ block = 61;
break;
}
else{
@@ -2050,13 +3038,13 @@
break;
}
case 2:
- v492 = ll_dict_getitem__Dict_String__String__String ( msg_2,__consts_0.const_str__41 );
- v493 = ll_streq__String_String ( v492,__consts_0.const_str__43 );
- v494 = v493;
- if (v494 == true)
+ v816 = ll_dict_getitem__Dict_String__String__String ( msg_2,__consts_0.const_str__59 );
+ v817 = ll_streq__String_String ( v816,__consts_0.const_str__61 );
+ v818 = v817;
+ if (v818 == true)
{
- msg_22 = msg_2;
- block = 51;
+ msg_31 = msg_2;
+ block = 60;
break;
}
else{
@@ -2065,1065 +3053,1803 @@
break;
}
case 3:
- v495 = ll_dict_getitem__Dict_String__String__String ( msg_3,__consts_0.const_str__41 );
- v496 = ll_streq__String_String ( v495,__consts_0.const_str__44 );
- v497 = v496;
- if (v497 == true)
+ v819 = ll_dict_getitem__Dict_String__String__String ( msg_3,__consts_0.const_str__59 );
+ v820 = ll_streq__String_String ( v819,__consts_0.const_str__62 );
+ v821 = v820;
+ if (v821 == true)
{
msg_4 = msg_3;
+ block = 5;
+ break;
+ }
+ else{
+ v791 = true;
+ block = 4;
+ break;
+ }
+ case 4:
+ return ( v791 );
+ case 5:
+ try {
+ v822 = ll_dict_getitem__Dict_String__String__String ( msg_4,__consts_0.const_str__63 );
+ msg_5 = msg_4;
+ v6 = v822;
block = 6;
break;
}
- else{
- block = 4;
- break;
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 41;
+ break;
+ }
+ throw(exc);
+ }
+ case 6:
+ try {
+ v823 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v823.oenter_variant0(__consts_0.const_str__37,__consts_0.const_str__64,__consts_0.const_str__27,74);
+ undefined;
+ v826 = get_elem ( v6 );
+ v827 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v827.oleave_variant0(__consts_0.const_str__37);
+ v829 = v826;
+ msg_6 = msg_5;
+ block = 7;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 41;
+ break;
+ }
+ throw(exc);
+ }
+ case 7:
+ undefined;
+ msg_7 = msg_6;
+ module_part_0 = v829;
+ block = 8;
+ break;
+ case 8:
+ v831 = !!module_part_0;
+ if (v831 == true)
+ {
+ msg_10 = msg_7;
+ module_part_1 = module_part_0;
+ block = 12;
+ break;
+ }
+ else{
+ msg_8 = msg_7;
+ block = 9;
+ break;
+ }
+ case 9:
+ v832 = __consts_0.py____test_rsession_webjs_Pending.opending;
+ msg_9 = msg_8;
+ v833 = v832;
+ block = 10;
+ break;
+ case 10:
+ v834 = v833;
+ v835 = v834;
+ v836 = msg_9;
+ block = 11;
+ break;
+ case 11:
+ ll_append__List_Dict_String__String___Dict_String_ ( v835,v836 );
+ v791 = true;
+ block = 4;
+ break;
+ case 12:
+ try {
+ v838 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v838.oenter_variant0(__consts_0.const_str__40,__consts_0.const_str__49,__consts_0.const_str__27,78);
+ undefined;
+ v841 = create_elem ( __consts_0.const_str__50 );
+ v842 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v842.oleave_variant0(__consts_0.const_str__40);
+ module_part_2 = module_part_1;
+ msg_11 = msg_10;
+ v844 = v841;
+ block = 13;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 41;
+ break;
+ }
+ throw(exc);
}
- case 4:
- v498 = __consts_0.ExportedMethods;
- v499 = v498.show_status_change(comeback);
- block = 5;
+ case 13:
+ undefined;
+ msg_12 = msg_11;
+ module_part_3 = module_part_2;
+ td_0 = v844;
+ block = 14;
break;
- case 5:
- return ( v467 );
- case 6:
+ case 14:
+ v846 = td_0;
+ msg_13 = msg_12;
+ module_part_4 = module_part_3;
+ td_1 = td_0;
+ v847 = v846;
+ block = 15;
+ break;
+ case 15:
try {
- v500 = ll_dict_getitem__Dict_String__String__String ( msg_4,__consts_0.const_str__45 );
- msg_5 = msg_4;
- v3 = v500;
- block = 7;
+ v848 = ll_dict_getitem__Dict_String__String__String ( msg_13,__consts_0.const_str__65 );
+ msg_14 = msg_13;
+ module_part_5 = module_part_4;
+ td_2 = td_1;
+ v849 = v847;
+ v850 = v848;
+ block = 16;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 7:
+ case 16:
+ v851 = new StringBuilder();
+ v851.ll_append(__consts_0.const_str__66);
+ v853 = v850.toString();
+ v851.ll_append(v853);
+ v851.ll_append(__consts_0.const_str__67);
+ v856 = v851.ll_build();
+ msg_15 = msg_14;
+ module_part_6 = module_part_5;
+ td_3 = td_2;
+ v857 = v849;
+ v858 = v856;
+ block = 17;
+ break;
+ case 17:
try {
- v501 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v501.oenter_variant0(__consts_0.const_str__27,__consts_0.const_str__46,__consts_0.const_str__24,40);
- undefined;
- v504 = get_elem ( v3 );
- v505 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v505.oleave_variant0(__consts_0.const_str__27);
- v507 = v504;
- msg_6 = msg_5;
- block = 8;
+ v857.setAttribute(__consts_0.const_str__68,v858);
+ msg_16 = msg_15;
+ module_part_7 = module_part_6;
+ td_4 = td_3;
+ block = 18;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 8:
- undefined;
- msg_7 = msg_6;
- module_part_0 = v507;
- block = 9;
+ case 18:
+ v860 = td_4;
+ msg_17 = msg_16;
+ module_part_8 = module_part_7;
+ td_5 = td_4;
+ v861 = v860;
+ block = 19;
break;
- case 9:
+ case 19:
try {
- v509 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v509.oenter_variant0(__consts_0.const_str__33,__consts_0.const_str__34,__consts_0.const_str__24,41);
- undefined;
- v512 = create_elem ( __consts_0.const_str__35 );
- v513 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v513.oleave_variant0(__consts_0.const_str__33);
- module_part_1 = module_part_0;
- msg_8 = msg_7;
- v515 = v512;
- block = 10;
+ v861.setAttribute(__consts_0.const_str__69,__consts_0.const_str__70);
+ msg_18 = msg_17;
+ module_part_9 = module_part_8;
+ td_6 = td_5;
+ block = 20;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 10:
- undefined;
- msg_9 = msg_8;
- module_part_2 = module_part_1;
- td_0 = v515;
- block = 11;
- break;
- case 11:
+ case 20:
try {
- v517 = ll_dict_getitem__Dict_String__String__String ( msg_9,__consts_0.const_str__47 );
- msg_10 = msg_9;
- item_name_14 = v517;
- module_part_3 = module_part_2;
- td_1 = td_0;
- block = 12;
+ v863 = ll_dict_getitem__Dict_String__String__String ( msg_18,__consts_0.const_str__65 );
+ msg_19 = msg_18;
+ item_name_18 = v863;
+ module_part_10 = module_part_9;
+ td_7 = td_6;
+ block = 21;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 12:
+ case 21:
try {
- v518 = ll_dict_getitem__Dict_String__String__String ( msg_10,__consts_0.const_str__48 );
- msg_11 = msg_10;
- item_name_15 = item_name_14;
- module_part_4 = module_part_3;
- td_2 = td_1;
- v519 = v518;
- block = 13;
+ v864 = ll_dict_getitem__Dict_String__String__String ( msg_19,__consts_0.const_str__71 );
+ msg_20 = msg_19;
+ item_name_19 = item_name_18;
+ module_part_11 = module_part_10;
+ td_8 = td_7;
+ v865 = v864;
+ block = 22;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 13:
- v520 = ll_streq__String_String ( v519,__consts_0.const_str__49 );
- v521 = v520;
- if (v521 == true)
+ case 22:
+ v866 = ll_streq__String_String ( v865,__consts_0.const_str__72 );
+ v867 = v866;
+ if (v867 == true)
{
- module_part_35 = module_part_4;
- td_34 = td_2;
- block = 47;
+ module_part_42 = module_part_11;
+ td_40 = td_8;
+ block = 56;
break;
}
else{
- msg_12 = msg_11;
- item_name_16 = item_name_15;
- module_part_5 = module_part_4;
- td_3 = td_2;
- block = 14;
+ msg_21 = msg_20;
+ item_name_20 = item_name_19;
+ module_part_12 = module_part_11;
+ td_9 = td_8;
+ block = 23;
break;
}
- case 14:
+ case 23:
try {
- v522 = ll_dict_getitem__Dict_String__String__String ( msg_12,__consts_0.const_str__50 );
- msg_13 = msg_12;
- item_name_17 = item_name_16;
- module_part_6 = module_part_5;
- td_4 = td_3;
- v523 = v522;
- block = 15;
+ v868 = ll_dict_getitem__Dict_String__String__String ( msg_21,__consts_0.const_str__73 );
+ msg_22 = msg_21;
+ item_name_21 = item_name_20;
+ module_part_13 = module_part_12;
+ td_10 = td_9;
+ v869 = v868;
+ block = 24;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 15:
- v524 = ll_streq__String_String ( v523,__consts_0.const_str__51 );
- v525 = !v524;
- v526 = v525;
- if (v526 == true)
- {
- msg_17 = msg_13;
- item_name_31 = item_name_17;
- module_part_21 = module_part_6;
- td_20 = td_4;
- block = 33;
+ case 24:
+ v870 = ll_streq__String_String ( v869,__consts_0.const_str__74 );
+ v871 = !v870;
+ v872 = v871;
+ if (v872 == true)
+ {
+ msg_26 = msg_22;
+ item_name_35 = item_name_21;
+ module_part_28 = module_part_13;
+ td_26 = td_10;
+ block = 42;
break;
}
else{
- msg_14 = msg_13;
- item_name_18 = item_name_17;
- module_part_7 = module_part_6;
- td_5 = td_4;
- block = 16;
+ msg_23 = msg_22;
+ item_name_22 = item_name_21;
+ module_part_14 = module_part_13;
+ td_11 = td_10;
+ block = 25;
break;
}
- case 16:
+ case 25:
try {
- v527 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v527.oenter_variant0(__consts_0.const_str__33,__consts_0.const_str__52,__consts_0.const_str__24,56);
+ v873 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v873.oenter_variant0(__consts_0.const_str__40,__consts_0.const_str__75,__consts_0.const_str__27,95);
undefined;
- v530 = create_elem ( __consts_0.const_str__53 );
- v531 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v531.oleave_variant0(__consts_0.const_str__33);
- msg_15 = msg_14;
- v533 = v530;
- item_name_19 = item_name_18;
- module_part_8 = module_part_7;
- td_6 = td_5;
- block = 17;
+ v876 = create_elem ( __consts_0.const_str__76 );
+ v877 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v877.oleave_variant0(__consts_0.const_str__40);
+ msg_24 = msg_23;
+ td_12 = td_11;
+ module_part_15 = module_part_14;
+ item_name_23 = item_name_22;
+ v879 = v876;
+ block = 26;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 17:
+ case 26:
undefined;
- msg_16 = msg_15;
- item_name_20 = item_name_19;
- module_part_9 = module_part_8;
- td_7 = td_6;
- link_0 = v533;
- block = 18;
+ msg_25 = msg_24;
+ item_name_24 = item_name_23;
+ module_part_16 = module_part_15;
+ td_13 = td_12;
+ link_0 = v879;
+ block = 27;
break;
- case 18:
- v535 = link_0;
- item_name_21 = item_name_20;
- module_part_10 = module_part_9;
- td_8 = td_7;
+ case 27:
+ v881 = link_0;
+ item_name_25 = item_name_24;
+ module_part_17 = module_part_16;
+ td_14 = td_13;
link_1 = link_0;
- v536 = v535;
- v537 = msg_16;
- block = 19;
+ v882 = v881;
+ v883 = msg_25;
+ block = 28;
break;
- case 19:
+ case 28:
try {
- v538 = ll_dict_getitem__Dict_String__String__String ( v537,__consts_0.const_str__47 );
- item_name_22 = item_name_21;
- module_part_11 = module_part_10;
- td_9 = td_8;
+ v884 = ll_dict_getitem__Dict_String__String__String ( v883,__consts_0.const_str__65 );
+ item_name_26 = item_name_25;
+ module_part_18 = module_part_17;
+ td_15 = td_14;
link_2 = link_1;
- v539 = v536;
- v540 = v538;
- block = 20;
+ v885 = v882;
+ v886 = v884;
+ block = 29;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 20:
- v541 = new StringBuilder();
- v541.ll_append(__consts_0.const_str__54);
- v543 = v540.toString();
- v541.ll_append(v543);
- v541.ll_append(__consts_0.const_str__55);
- v546 = v541.ll_build();
- item_name_23 = item_name_22;
- module_part_12 = module_part_11;
- td_10 = td_9;
+ case 29:
+ v887 = new StringBuilder();
+ v887.ll_append(__consts_0.const_str__77);
+ v889 = v886.toString();
+ v887.ll_append(v889);
+ v887.ll_append(__consts_0.const_str__67);
+ v892 = v887.ll_build();
+ item_name_27 = item_name_26;
+ module_part_19 = module_part_18;
+ td_16 = td_15;
link_3 = link_2;
- v547 = v539;
- v548 = v546;
- block = 21;
+ v893 = v885;
+ v894 = v892;
+ block = 30;
break;
- case 21:
+ case 30:
try {
- v547.setAttribute(__consts_0.const_str__56,v548);
- item_name_24 = item_name_23;
- module_part_13 = module_part_12;
- td_11 = td_10;
+ v893.setAttribute(__consts_0.const_str__78,v894);
+ item_name_28 = item_name_27;
+ module_part_20 = module_part_19;
+ td_17 = td_16;
link_4 = link_3;
- block = 22;
+ block = 31;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 22:
+ case 31:
try {
- v550 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v550.oenter_variant0(__consts_0.const_str__37,__consts_0.const_str__57,__consts_0.const_str__24,59);
+ v896 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v896.oenter_variant0(__consts_0.const_str__42,__consts_0.const_str__79,__consts_0.const_str__27,98);
undefined;
- v553 = create_text_elem ( __consts_0.const_str__58 );
- v554 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v554.oleave_variant0(__consts_0.const_str__37);
- v556 = v553;
- module_part_14 = module_part_13;
+ v899 = create_text_elem ( __consts_0.const_str__80 );
+ v900 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v900.oleave_variant0(__consts_0.const_str__42);
+ item_name_29 = item_name_28;
+ td_18 = td_17;
+ module_part_21 = module_part_20;
+ v902 = v899;
link_5 = link_4;
- item_name_25 = item_name_24;
- td_12 = td_11;
- block = 23;
+ block = 32;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 23:
+ case 32:
undefined;
- item_name_26 = item_name_25;
- module_part_15 = module_part_14;
- td_13 = td_12;
- txt_2 = v556;
+ item_name_30 = item_name_29;
+ module_part_22 = module_part_21;
+ td_19 = td_18;
+ txt_3 = v902;
link_6 = link_5;
- block = 24;
+ block = 33;
break;
- case 24:
- v558 = link_6;
- item_name_27 = item_name_26;
- module_part_16 = module_part_15;
- td_14 = td_13;
+ case 33:
+ v904 = link_6;
+ item_name_31 = item_name_30;
+ module_part_23 = module_part_22;
+ td_20 = td_19;
link_7 = link_6;
- v559 = v558;
- v560 = txt_2;
- block = 25;
+ v905 = v904;
+ v906 = txt_3;
+ block = 34;
break;
- case 25:
+ case 34:
try {
- v559.appendChild(v560);
- item_name_28 = item_name_27;
- module_part_17 = module_part_16;
- td_15 = td_14;
+ v905.appendChild(v906);
+ item_name_32 = item_name_31;
+ module_part_24 = module_part_23;
+ td_21 = td_20;
link_8 = link_7;
- block = 26;
+ block = 35;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 26:
- v562 = td_15;
- item_name_29 = item_name_28;
- module_part_18 = module_part_17;
- td_16 = td_15;
- v563 = v562;
- v564 = link_8;
- block = 27;
+ case 35:
+ v908 = td_21;
+ item_name_33 = item_name_32;
+ module_part_25 = module_part_24;
+ td_22 = td_21;
+ v909 = v908;
+ v910 = link_8;
+ block = 36;
+ break;
+ case 36:
+ try {
+ v909.appendChild(v910);
+ item_name_34 = item_name_33;
+ module_part_26 = module_part_25;
+ td_23 = td_22;
+ block = 37;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 41;
+ break;
+ }
+ throw(exc);
+ }
+ case 37:
+ v912 = __consts_0.ExportedMethods;
+ module_part_27 = module_part_26;
+ td_24 = td_23;
+ v913 = v912;
+ v914 = item_name_34;
+ block = 38;
+ break;
+ case 38:
+ try {
+ v915 = v913.show_fail(v914,fail_come_back);
+ td_25 = td_24;
+ v916 = module_part_27;
+ block = 39;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 41;
+ break;
+ }
+ throw(exc);
+ }
+ case 39:
+ v917 = v916;
+ v918 = v917;
+ v919 = td_25;
+ block = 40;
+ break;
+ case 40:
+ try {
+ v918.appendChild(v919);
+ v791 = true;
+ block = 4;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 41;
+ break;
+ }
+ throw(exc);
+ }
+ case 41:
+ v921 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v921.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,104);
+ undefined;
+ v924 = document;
+ v925 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v925.oleave_variant0(__consts_0.const_str__28);
+ undefined;
+ v928 = v924;
+ v929 = v928.getElementById(__consts_0.const_str__57);
+ v930 = v929.innerHTML;
+ v931 = ll_strconcat__String_String ( v930,__consts_0.const_str__81 );
+ v929.innerHTML = v931;
+ v791 = true;
+ block = 4;
+ break;
+ case 42:
+ v933 = __consts_0.ExportedMethods;
+ msg_27 = msg_26;
+ module_part_29 = module_part_28;
+ td_27 = td_26;
+ v934 = v933;
+ v935 = item_name_35;
+ block = 43;
+ break;
+ case 43:
+ try {
+ v936 = v934.show_skip(v935,skip_come_back);
+ msg_28 = msg_27;
+ module_part_30 = module_part_29;
+ td_28 = td_27;
+ block = 44;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 41;
+ break;
+ }
+ throw(exc);
+ }
+ case 44:
+ try {
+ v937 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v937.oenter_variant0(__consts_0.const_str__40,__consts_0.const_str__75,__consts_0.const_str__27,88);
+ undefined;
+ v940 = create_elem ( __consts_0.const_str__76 );
+ v941 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v941.oleave_variant0(__consts_0.const_str__40);
+ module_part_31 = module_part_30;
+ td_29 = td_28;
+ msg_29 = msg_28;
+ v943 = v940;
+ block = 45;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 41;
+ break;
+ }
+ throw(exc);
+ }
+ case 45:
+ undefined;
+ msg_30 = msg_29;
+ module_part_32 = module_part_31;
+ td_30 = td_29;
+ link_9 = v943;
+ block = 46;
+ break;
+ case 46:
+ v945 = link_9;
+ module_part_33 = module_part_32;
+ td_31 = td_30;
+ link_10 = link_9;
+ v946 = v945;
+ v947 = msg_30;
+ block = 47;
+ break;
+ case 47:
+ try {
+ v948 = ll_dict_getitem__Dict_String__String__String ( v947,__consts_0.const_str__65 );
+ module_part_34 = module_part_33;
+ td_32 = td_31;
+ link_11 = link_10;
+ v949 = v946;
+ v950 = v948;
+ block = 48;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ block = 41;
+ break;
+ }
+ throw(exc);
+ }
+ case 48:
+ v951 = new StringBuilder();
+ v951.ll_append(__consts_0.const_str__82);
+ v953 = v950.toString();
+ v951.ll_append(v953);
+ v951.ll_append(__consts_0.const_str__67);
+ v956 = v951.ll_build();
+ module_part_35 = module_part_34;
+ td_33 = td_32;
+ link_12 = link_11;
+ v957 = v949;
+ v958 = v956;
+ block = 49;
break;
- case 27:
+ case 49:
try {
- v563.appendChild(v564);
- item_name_30 = item_name_29;
- module_part_19 = module_part_18;
- td_17 = td_16;
- block = 28;
+ v957.setAttribute(__consts_0.const_str__78,v958);
+ module_part_36 = module_part_35;
+ td_34 = td_33;
+ link_13 = link_12;
+ block = 50;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 28:
- v566 = __consts_0.ExportedMethods;
- module_part_20 = module_part_19;
- td_18 = td_17;
- v567 = v566;
- v568 = item_name_30;
- block = 29;
- break;
- case 29:
+ case 50:
try {
- v569 = v567.show_fail(v568,fail_come_back);
- td_19 = td_18;
- v570 = module_part_20;
- block = 30;
+ v960 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v960.oenter_variant0(__consts_0.const_str__42,__consts_0.const_str__83,__consts_0.const_str__27,91);
+ undefined;
+ v963 = create_text_elem ( __consts_0.const_str__84 );
+ v964 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v964.oleave_variant0(__consts_0.const_str__42);
+ td_35 = td_34;
+ module_part_37 = module_part_36;
+ link_14 = link_13;
+ v966 = v963;
+ block = 51;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 30:
- v571 = v570;
- v572 = v571;
- v573 = td_19;
- block = 31;
+ case 51:
+ undefined;
+ module_part_38 = module_part_37;
+ td_36 = td_35;
+ txt_4 = v966;
+ link_15 = link_14;
+ block = 52;
break;
- case 31:
+ case 52:
+ v968 = link_15;
+ module_part_39 = module_part_38;
+ td_37 = td_36;
+ link_16 = link_15;
+ v969 = v968;
+ v970 = txt_4;
+ block = 53;
+ break;
+ case 53:
try {
- v572.appendChild(v573);
- block = 4;
+ v969.appendChild(v970);
+ module_part_40 = module_part_39;
+ td_38 = td_37;
+ link_17 = link_16;
+ block = 54;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 32:
- v575 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v575.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,65);
- undefined;
- v578 = document;
- v579 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v579.oleave_variant0(__consts_0.const_str__17);
- undefined;
- v582 = v578;
- v583 = v582.getElementById(__consts_0.const_str__39);
- v584 = v583.innerHTML;
- v585 = ll_strconcat__String_String ( v584,__consts_0.const_str__59 );
- v583.innerHTML = v585;
- block = 4;
- break;
- case 33:
- v587 = __consts_0.ExportedMethods;
- msg_18 = msg_17;
- module_part_22 = module_part_21;
- td_21 = td_20;
- v588 = v587;
- v589 = item_name_31;
- block = 34;
+ case 54:
+ v972 = td_38;
+ module_part_41 = module_part_40;
+ td_39 = td_38;
+ v973 = v972;
+ v974 = link_17;
+ block = 55;
break;
- case 34:
+ case 55:
try {
- v590 = v588.show_skip(v589,skip_come_back);
- msg_19 = msg_18;
- module_part_23 = module_part_22;
- td_22 = td_21;
- block = 35;
+ v973.appendChild(v974);
+ td_25 = td_39;
+ v916 = module_part_41;
+ block = 39;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 35:
+ case 56:
try {
- v591 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v591.oenter_variant0(__consts_0.const_str__33,__consts_0.const_str__52,__consts_0.const_str__24,49);
+ v976 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v976.oenter_variant0(__consts_0.const_str__42,__consts_0.const_str__85,__consts_0.const_str__27,84);
undefined;
- v594 = create_elem ( __consts_0.const_str__53 );
- v595 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v595.oleave_variant0(__consts_0.const_str__33);
- td_23 = td_22;
- module_part_24 = module_part_23;
- msg_20 = msg_19;
- v597 = v594;
- block = 36;
+ v979 = create_text_elem ( __consts_0.const_str__86 );
+ v980 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v980.oleave_variant0(__consts_0.const_str__42);
+ td_41 = td_40;
+ v982 = v979;
+ module_part_43 = module_part_42;
+ block = 57;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 36:
+ case 57:
undefined;
- msg_21 = msg_20;
- module_part_25 = module_part_24;
- td_24 = td_23;
- link_9 = v597;
- block = 37;
+ module_part_44 = module_part_43;
+ td_42 = td_41;
+ txt_5 = v982;
+ block = 58;
break;
- case 37:
- v599 = link_9;
- module_part_26 = module_part_25;
- td_25 = td_24;
- link_10 = link_9;
- v600 = v599;
- v601 = msg_21;
- block = 38;
+ case 58:
+ v984 = td_42;
+ module_part_45 = module_part_44;
+ td_43 = td_42;
+ v985 = v984;
+ v986 = txt_5;
+ block = 59;
break;
- case 38:
+ case 59:
try {
- v602 = ll_dict_getitem__Dict_String__String__String ( v601,__consts_0.const_str__47 );
- module_part_27 = module_part_26;
- td_26 = td_25;
- link_11 = link_10;
- v603 = v600;
- v604 = v602;
+ v985.appendChild(v986);
+ td_25 = td_43;
+ v916 = module_part_45;
block = 39;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- block = 32;
+ block = 41;
break;
}
throw(exc);
}
- case 39:
- v605 = new StringBuilder();
- v605.ll_append(__consts_0.const_str__60);
- v607 = v604.toString();
- v605.ll_append(v607);
- v605.ll_append(__consts_0.const_str__55);
- v610 = v605.ll_build();
- module_part_28 = module_part_27;
- td_27 = td_26;
- link_12 = link_11;
- v611 = v603;
- v612 = v610;
- block = 40;
+ case 60:
+ v988 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v988.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,70);
+ undefined;
+ v991 = document;
+ v992 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v992.oleave_variant0(__consts_0.const_str__28);
+ undefined;
+ v995 = v991;
+ v996 = ll_dict_getitem__Dict_String__String__String ( msg_31,__consts_0.const_str__87 );
+ v997 = v995.getElementById(v996);
+ v998 = v997.style;
+ v998.background = __consts_0.const_str__88;
+ v791 = true;
+ block = 4;
+ break;
+ case 61:
+ v1000 = ll_dict_getitem__Dict_String__String__String ( msg_32,__consts_0.const_str__89 );
+ v1001 = ll_streq__String_String ( v1000,__consts_0.const_str__90 );
+ v1002 = v1001;
+ if (v1002 == true)
+ {
+ msg_33 = msg_32;
+ main_t_1 = main_t_0;
+ block = 62;
+ break;
+ }
+ else{
+ v791 = true;
+ block = 4;
+ break;
+ }
+ case 62:
+ v1003 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v1003.oenter_variant0(__consts_0.const_str__40,__consts_0.const_str__91,__consts_0.const_str__27,61);
+ undefined;
+ v1006 = create_elem ( __consts_0.const_str__92 );
+ v1007 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v1007.oleave_variant0(__consts_0.const_str__40);
+ undefined;
+ v1010 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v1010.oenter_variant0(__consts_0.const_str__40,__consts_0.const_str__49,__consts_0.const_str__27,62);
+ undefined;
+ v1013 = create_elem ( __consts_0.const_str__50 );
+ v1014 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v1014.oleave_variant0(__consts_0.const_str__40);
+ undefined;
+ v1017 = v1006;
+ v1017.appendChild(v1013);
+ v1019 = v1013;
+ v1020 = ll_dict_getitem__Dict_String__String__String ( msg_33,__consts_0.const_str__93 );
+ v1021 = ll_dict_getitem__Dict_String__String__String ( msg_33,__consts_0.const_str__94 );
+ v1022 = ll_int__String_Signed ( v1021,10 );
+ v1023 = new Object();
+ v1023.item0 = v1020;
+ v1023.item1 = v1022;
+ v1026 = v1023.item0;
+ v1027 = v1023.item1;
+ v1028 = new StringBuilder();
+ v1029 = v1026.toString();
+ v1028.ll_append(v1029);
+ v1028.ll_append(__consts_0.const_str__95);
+ v1032 = v1027.toString();
+ v1028.ll_append(v1032);
+ v1028.ll_append(__consts_0.const_str__96);
+ v7 = v1028.ll_build();
+ v1035 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v1035.oenter_variant0(__consts_0.const_str__42,__consts_0.const_str__97,__consts_0.const_str__27,64);
+ undefined;
+ v1038 = create_text_elem ( v7 );
+ v1039 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v1039.oleave_variant0(__consts_0.const_str__42);
+ undefined;
+ v1019.appendChild(v1038);
+ v1043 = ll_dict_getitem__Dict_String__String__String ( msg_33,__consts_0.const_str__65 );
+ v1006.id = v1043;
+ v1045 = v1013;
+ v1046 = ll_dict_getitem__Dict_String__String__String ( msg_33,__consts_0.const_str__65 );
+ v1047 = new StringBuilder();
+ v1047.ll_append(__consts_0.const_str__66);
+ v1049 = v1046.toString();
+ v1047.ll_append(v1049);
+ v1047.ll_append(__consts_0.const_str__67);
+ v1052 = v1047.ll_build();
+ v1045.setAttribute(__consts_0.const_str__68,v1052);
+ v1054 = v1013;
+ v1054.setAttribute(__consts_0.const_str__69,__consts_0.const_str__70);
+ v1056 = main_t_1;
+ v1056.appendChild(v1006);
+ v791 = true;
+ block = 4;
+ break;
+ }
+ }
+}
+
+function ll_listiter__Record_index__Signed__iterable_List_D (ITER_2,lst_2) {
+ var v773,v774,v775,v776;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v774 = new Object();
+ v774.iterable = lst_2;
+ v774.index = 0;
+ v773 = v774;
+ block = 1;
+ break;
+ case 1:
+ return ( v773 );
+ }
+ }
+}
+
+function ll_listiter__Record_index__Signed__iterable_List_S (ITER_1,lst_1) {
+ var v738,v739,v740,v741;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v739 = new Object();
+ v739.iterable = lst_1;
+ v739.index = 0;
+ v738 = v739;
+ block = 1;
+ break;
+ case 1:
+ return ( v738 );
+ }
+ }
+}
+
+function fail_come_back (msg_34) {
+ var v1070,v1071,v1072,v1073,v1074,v1075,v1076,v1077,v1078,v1079;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v1071 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__98 );
+ v1072 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__99 );
+ v1073 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__100 );
+ v1074 = new Object();
+ v1074.item0 = v1071;
+ v1074.item1 = v1072;
+ v1074.item2 = v1073;
+ v1078 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__101 );
+ __consts_0.const_tuple[v1078]=v1074;
+ block = 1;
+ break;
+ case 1:
+ return ( v1070 );
+ }
+ }
+}
+
+function py____test_rsession_webjs_Pending () {
+}
+
+py____test_rsession_webjs_Pending.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(py____test_rsession_webjs_Pending,Object);
+function ll_listslice_startonly__List_Dict_String__String__ (RESLIST_3,l1_7,start_3) {
+ var v759,v760,v761,v762,v763,v764,l1_8,i_6,j_4,l_12,len1_2,v765,v766,l1_9,i_7,j_5,l_13,len1_3,v767,v768,v769,v770,v771,v772;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v760 = l1_7;
+ v761 = v760.length;
+ v762 = (v761-start_3);
+ undefined;
+ v764 = ll_newlist__List_Dict_String__String__LlT_Signed ( undefined,v762 );
+ l1_8 = l1_7;
+ i_6 = start_3;
+ j_4 = 0;
+ l_12 = v764;
+ len1_2 = v761;
+ block = 1;
+ break;
+ case 1:
+ v765 = (i_6=base_15);
+ v1145 = v1144;
+ if (v1145 == true)
+ {
+ s_12 = s_21;
+ val_1 = val_11;
+ i_13 = i_21;
+ sign_1 = sign_11;
+ strlen_5 = strlen_14;
+ block = 12;
break;
}
- catch (exc){
- if (isinstanceof(exc, exceptions_Exception))
- {
- block = 32;
- break;
- }
- throw(exc);
+ else{
+ s_22 = s_21;
+ base_16 = base_15;
+ i_22 = i_21;
+ digit_1 = digit_0;
+ sign_12 = sign_11;
+ strlen_15 = strlen_14;
+ v1146 = val_11;
+ block = 26;
+ break;
}
- case 48:
- undefined;
- module_part_37 = module_part_36;
- td_36 = td_35;
- txt_4 = v636;
- block = 49;
+ case 26:
+ v1147 = (v1146*base_16);
+ v1148 = (v1147+digit_1);
+ v1149 = (i_22+1);
+ s_11 = s_22;
+ base_8 = base_16;
+ val_0 = v1148;
+ i_12 = v1149;
+ sign_0 = sign_12;
+ strlen_4 = strlen_15;
+ block = 11;
break;
- case 49:
- v638 = td_36;
- module_part_38 = module_part_37;
- td_37 = td_36;
- v639 = v638;
- v640 = txt_4;
- block = 50;
+ case 27:
+ v1150 = (c_6<=90);
+ s_24 = s_23;
+ base_18 = base_17;
+ c_7 = c_6;
+ val_13 = val_12;
+ i_24 = i_23;
+ sign_14 = sign_13;
+ strlen_17 = strlen_16;
+ v1151 = v1150;
+ block = 28;
break;
- case 50:
- try {
- v639.appendChild(v640);
- td_19 = td_37;
- v570 = module_part_38;
- block = 30;
+ case 28:
+ v1152 = v1151;
+ if (v1152 == true)
+ {
+ s_25 = s_24;
+ base_19 = base_18;
+ val_14 = val_13;
+ i_25 = i_24;
+ sign_15 = sign_14;
+ strlen_18 = strlen_17;
+ v1153 = c_7;
+ block = 29;
break;
}
- catch (exc){
- if (isinstanceof(exc, exceptions_Exception))
- {
- block = 32;
- break;
- }
- throw(exc);
+ else{
+ s_17 = s_24;
+ base_11 = base_18;
+ c_3 = c_7;
+ val_7 = val_13;
+ i_17 = i_24;
+ sign_7 = sign_14;
+ strlen_10 = strlen_17;
+ block = 21;
+ break;
}
- case 51:
- v642 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v642.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,36);
- undefined;
- v645 = document;
- v646 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v646.oleave_variant0(__consts_0.const_str__17);
- undefined;
- v649 = v645;
- v650 = ll_dict_getitem__Dict_String__String__String ( msg_22,__consts_0.const_str__65 );
- v651 = v649.getElementById(v650);
- v652 = v651.style;
- v652.background = __consts_0.const_str__66;
- block = 4;
+ case 29:
+ v1154 = (v1153-65);
+ v1155 = (v1154+10);
+ s_21 = s_25;
+ base_15 = base_19;
+ val_11 = val_14;
+ i_21 = i_25;
+ digit_0 = v1155;
+ sign_11 = sign_15;
+ strlen_14 = strlen_18;
+ block = 25;
break;
- case 52:
- v654 = ll_dict_getitem__Dict_String__String__String ( msg_23,__consts_0.const_str__67 );
- v655 = ll_streq__String_String ( v654,__consts_0.const_str__68 );
- v656 = v655;
- if (v656 == true)
+ case 30:
+ v1156 = (c_8<=122);
+ s_27 = s_26;
+ base_21 = base_20;
+ c_9 = c_8;
+ val_16 = val_15;
+ i_27 = i_26;
+ sign_17 = sign_16;
+ strlen_20 = strlen_19;
+ v1157 = v1156;
+ block = 31;
+ break;
+ case 31:
+ v1158 = v1157;
+ if (v1158 == true)
{
- msg_24 = msg_23;
- main_t_1 = main_t_0;
- block = 53;
+ s_28 = s_27;
+ base_22 = base_21;
+ val_17 = val_16;
+ i_28 = i_27;
+ sign_18 = sign_17;
+ strlen_21 = strlen_20;
+ v1159 = c_9;
+ block = 32;
break;
}
else{
- block = 4;
+ s_16 = s_27;
+ base_10 = base_21;
+ c_2 = c_9;
+ val_6 = val_16;
+ i_16 = i_27;
+ sign_6 = sign_17;
+ strlen_9 = strlen_20;
+ block = 20;
break;
}
- case 53:
- v657 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v657.oenter_variant0(__consts_0.const_str__33,__consts_0.const_str__69,__consts_0.const_str__24,29);
- undefined;
- v660 = create_elem ( __consts_0.const_str__70 );
- v661 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v661.oleave_variant0(__consts_0.const_str__33);
- undefined;
- v664 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v664.oenter_variant0(__consts_0.const_str__33,__consts_0.const_str__34,__consts_0.const_str__24,30);
- undefined;
- v667 = create_elem ( __consts_0.const_str__35 );
- v668 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v668.oleave_variant0(__consts_0.const_str__33);
- undefined;
- v671 = v660;
- v671.appendChild(v667);
- v673 = v667;
- v4 = ll_dict_getitem__Dict_String__String__String ( msg_24,__consts_0.const_str__71 );
- v674 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v674.oenter_variant0(__consts_0.const_str__37,__consts_0.const_str__72,__consts_0.const_str__24,32);
- undefined;
- v677 = create_text_elem ( v4 );
- v678 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v678.oleave_variant0(__consts_0.const_str__37);
- undefined;
- v673.appendChild(v677);
- v682 = ll_dict_getitem__Dict_String__String__String ( msg_24,__consts_0.const_str__47 );
- v660.id = v682;
- v684 = main_t_1;
- v684.appendChild(v660);
- block = 4;
+ case 32:
+ v1160 = (v1159-97);
+ v1161 = (v1160+10);
+ s_21 = s_28;
+ base_15 = base_22;
+ val_11 = val_17;
+ i_21 = i_28;
+ digit_0 = v1161;
+ sign_11 = sign_18;
+ strlen_14 = strlen_21;
+ block = 25;
break;
- }
- }
-}
-
-function skip_come_back (msg_26) {
- var v743,v744,v745,v746;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v744 = ll_dict_getitem__Dict_String__String__String ( msg_26,__consts_0.const_str__73 );
- v745 = ll_dict_getitem__Dict_String__String__String ( msg_26,__consts_0.const_str__74 );
- __consts_0.const_tuple[v745]=v744;
- block = 1;
+ case 33:
+ v1163 = (v1162+1);
+ s_11 = s_29;
+ base_8 = base_23;
+ val_0 = 0;
+ i_12 = v1163;
+ sign_0 = 1;
+ strlen_4 = strlen_22;
+ block = 11;
break;
- case 1:
- return ( v743 );
- }
- }
-}
-
-function ll_const__Signed (c_1) {
- var v429;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v429 = c_1;
- block = 1;
+ case 34:
+ v1165 = (v1164+1);
+ s_11 = s_30;
+ base_8 = base_24;
+ val_0 = 0;
+ i_12 = v1165;
+ sign_0 = -1;
+ strlen_4 = strlen_23;
+ block = 11;
break;
- case 1:
- return ( v429 );
- }
- }
-}
-
-function ll_listnext__Record_index__Signed__iterable (iter_2) {
- var v705,v706,v707,v708,v709,v710,v711,iter_3,index_5,l_9,v712,v713,v714,v715,v716,v717,v718,etype_2,evalue_2;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v706 = iter_2.iterable;
- v707 = iter_2.index;
- v708 = v706;
- v709 = v708.length;
- v710 = (v707>=v709);
- v711 = v710;
- if (v711 == true)
+ case 35:
+ v1166 = s_31;
+ v1167 = v1166[i_29];
+ v1168 = (v1167==' ');
+ v1169 = v1168;
+ if (v1169 == true)
{
- block = 3;
+ s_32 = s_31;
+ base_26 = base_25;
+ strlen_25 = strlen_24;
+ v1170 = i_29;
+ block = 36;
break;
}
else{
- iter_3 = iter_2;
- index_5 = v707;
- l_9 = v706;
- block = 1;
+ s_8 = s_31;
+ base_5 = base_25;
+ i_9 = i_29;
+ strlen_1 = strlen_24;
+ block = 7;
break;
}
- case 1:
- v712 = (index_5+1);
- iter_3.index = v712;
- v714 = l_9;
- v715 = v714[index_5];
- v705 = v715;
- block = 2;
- break;
- case 2:
- return ( v705 );
- case 3:
- v716 = __consts_0.exceptions_StopIteration;
- v717 = v716.meta;
- v718 = v716;
- etype_2 = v717;
- evalue_2 = v718;
- block = 4;
+ case 36:
+ v1171 = (v1170+1);
+ s_7 = s_32;
+ base_4 = base_26;
+ i_8 = v1171;
+ strlen_0 = strlen_25;
+ block = 6;
break;
- case 4:
- throw(evalue_2);
}
}
}
-function ll_listiter__Record_index__Signed__iterable_List_S (ITER_1,lst_1) {
- var v701,v702,v703,v704;
+function ll_append__List_Dict_String__String___Dict_String_ (l_15,newitem_1) {
+ var v1062,v1063,v1064,v1065,v1066,v1067,v1068,v1069;
var block = 0;
for(;;){
switch(block){
case 0:
- v702 = new Object();
- v702.iterable = lst_1;
- v702.index = 0;
- v701 = v702;
+ v1063 = l_15;
+ v1064 = v1063.length;
+ v1065 = l_15;
+ v1066 = (v1064+1);
+ v1065.length = v1066;
+ v1068 = l_15;
+ v1068[v1064]=newitem_1;
block = 1;
break;
case 1:
- return ( v701 );
+ return ( v1062 );
}
}
}
-function create_elem (s_2) {
- var v719,v720,v721,v722,v723,v724,v725,v726,v727,v728;
+function ll_newlist__List_String_LlT_Signed (LIST_2,length_2) {
+ var v1058,v1059,v1060,v1061;
var block = 0;
for(;;){
switch(block){
case 0:
- v720 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v720.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,9);
- undefined;
- v723 = document;
- v724 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v724.oleave_variant0(__consts_0.const_str__17);
- undefined;
- v727 = v723;
- v728 = v727.createElement(s_2);
- v719 = v728;
+ v1059 = new Array();
+ v1060 = v1059;
+ v1060.length = length_2;
+ v1058 = v1059;
block = 1;
break;
case 1:
- return ( v719 );
+ return ( v1058 );
}
}
}
-function fail_come_back (msg_25) {
- var v739,v740,v741,v742;
+function skip_come_back (msg_35) {
+ var v1080,v1081,v1082,v1083;
var block = 0;
for(;;){
switch(block){
case 0:
- v740 = ll_dict_getitem__Dict_String__String__String ( msg_25,__consts_0.const_str__75 );
- v741 = ll_dict_getitem__Dict_String__String__String ( msg_25,__consts_0.const_str__74 );
- __consts_0.const_tuple__25[v741]=v740;
+ v1081 = ll_dict_getitem__Dict_String__String__String ( msg_35,__consts_0.const_str__103 );
+ v1082 = ll_dict_getitem__Dict_String__String__String ( msg_35,__consts_0.const_str__101 );
+ __consts_0.const_tuple__35[v1082]=v1081;
block = 1;
break;
case 1:
- return ( v739 );
+ return ( v1080 );
}
}
}
-function create_text_elem (txt_5) {
- var v729,v730,v731,v732,v733,v734,v735,v736,v737,v738;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v730 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v730.oenter_variant0(__consts_0.const_str__17,__consts_0.const_str__2,__consts_0.const_str__24,15);
- undefined;
- v733 = document;
- v734 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v734.oleave_variant0(__consts_0.const_str__17);
- undefined;
- v737 = v733;
- v738 = v737.createTextNode(txt_5);
- v729 = v738;
- block = 1;
- break;
- case 1:
- return ( v729 );
- }
- }
+function exceptions_ValueError () {
+}
+
+exceptions_ValueError.prototype.toString = function (){
+ return ( '' );
}
-function ll_dict_kvi__Dict_String__String__List_String_LlT_ (d_1,LIST_1,func_2) {
- var v686,v687,v688,v689,v690,v691,i_4,it_0,result_0,v692,v693,v694,i_5,it_1,result_1,v695,v696,v697,v698,it_2,result_2,v699,v700;
+inherits(exceptions_ValueError,exceptions_StandardError);
+function ll_newlist__List_Dict_String__String__LlT_Signed (self_10,length_3) {
+ var v1172,v1173;
var block = 0;
for(;;){
switch(block){
case 0:
- v687 = d_1;
- v688 = get_dict_len ( v687 );
- v689 = ll_newlist__List_String_LlT_Signed ( undefined,v688 );
- v690 = d_1;
- v691 = dict_items_iterator ( v690 );
- i_4 = 0;
- it_0 = v691;
- result_0 = v689;
+ v1173 = ll_newlist__List_Dict_String__String__LlT_Signed_ ( undefined,length_3 );
+ v1172 = v1173;
block = 1;
break;
case 1:
- v692 = it_0;
- v693 = v692.ll_go_next();
- v694 = v693;
- if (v694 == true)
- {
- i_5 = i_4;
- it_1 = it_0;
- result_1 = result_0;
- block = 3;
- break;
- }
- else{
- v686 = result_0;
- block = 2;
- break;
- }
- case 2:
- return ( v686 );
- case 3:
- v695 = result_1;
- v696 = it_1;
- v697 = v696.ll_current_key();
- v695[i_5]=v697;
- it_2 = it_1;
- result_2 = result_1;
- v699 = i_5;
- block = 4;
- break;
- case 4:
- v700 = (v699+1);
- i_4 = v700;
- it_0 = it_2;
- result_0 = result_2;
- block = 1;
- break;
+ return ( v1172 );
}
}
}
-function ll_newlist__List_String_LlT_Signed (LIST_2,length_2) {
- var v747,v748,v749,v750;
+function ll_newlist__List_Dict_String__String__LlT_Signed_ (LIST_3,length_4) {
+ var v1174,v1175,v1176,v1177;
var block = 0;
for(;;){
switch(block){
case 0:
- v748 = new Array();
- v749 = v748;
- v749.length = length_2;
- v747 = v748;
+ v1175 = new Array();
+ v1176 = v1175;
+ v1176.length = length_4;
+ v1174 = v1175;
block = 1;
break;
case 1:
- return ( v747 );
+ return ( v1174 );
}
}
}
__consts_0 = {};
-__consts_0.const_str__66 = '#00ff00';
-__consts_0.const_str__60 = "javascript:show_skip('";
-__consts_0.const_str__4 = 'show_skip';
-__consts_0.const_str__24 = '/home/fijal/lang/python/pypy-dist/py/test/rsession/webjs.py';
+__consts_0.const_str__82 = "javascript:show_skip('";
+__consts_0.const_str__64 = '(v6)';
+__consts_0.const_str__41 = "('pre')";
+__consts_0.const_str__90 = 'Module';
__consts_0.const_list = [];
-__consts_0.const_str__39 = 'testmain';
-__consts_0.const_str__2 = '()';
-__consts_0.const_str__62 = 's';
-__consts_0.const_str__37 = 'create_text_elem';
-__consts_0.const_str__68 = 'Module';
-__consts_0.const_tuple = {};
-__consts_0.const_str__61 = "('s')";
-__consts_0.const_str__43 = 'HostReady';
+__consts_0.const_str__76 = 'a';
+__consts_0.const_str__51 = '#ff0000';
+__consts_0.const_str__11 = 'hide_info';
+__consts_0.const_str__75 = "('a')";
+__consts_0.const_str__62 = 'ReceivedItemOutcome';
+__consts_0.const_str__66 = "show_info('";
+__consts_0.exceptions_StopIteration = new exceptions_StopIteration();
+__consts_0.const_str__37 = 'get_elem';
+__consts_0.const_str__70 = 'hide_info()';
__consts_0.const_str__7 = '(v1)';
-__consts_0.const_str__72 = '(v4)';
+__consts_0.const_str__12 = 'entrypoint';
+__consts_0.ExportedMethods = new ExportedMethods();
+__consts_0.const_str__94 = 'length';
+__consts_0.exceptions_ValueError = new exceptions_ValueError();
+__consts_0.const_str__58 = 'main_table';
+__consts_0.const_str__81 = 'some error';
+__consts_0.const_str__67 = "')";
+__consts_0.const_str__79 = "('F')";
+__consts_0.const_str__54 = 'process';
+__consts_0.const_str__99 = 'stdout';
+__consts_0.const_str__8 = 'aa';
+__consts_0.const_tuple__35 = {};
+__consts_0.const_str__61 = 'HostReady';
+__consts_0.const_str__5 = '(v0)';
+__consts_0.const_str__31 = 'info';
+__consts_0.const_str__50 = 'td';
+__consts_0.const_str__26 = '(item_name_1, v9)';
+__consts_0.const_list__105 = [];
+__consts_0.const_str__14 = 'debug_div';
+__consts_0.const_str__80 = 'F';
+__consts_0.const_str__69 = 'onmouseout';
+__consts_0.const_str__49 = "('td')";
+__consts_0.const_str__59 = 'type';
+__consts_0.const_str__40 = 'create_elem';
+__consts_0.const_str__71 = 'passed';
+__consts_0.const_str__86 = '.';
+__consts_0.const_str__96 = ']';
+__consts_0.const_str__9 = 'show_info';
+__consts_0.const_str__52 = '(v3)';
+__consts_0.const_str__27 = '/home/fijal/lang/python/pypy-dist/py/test/rsession/webjs.py';
+__consts_0.const_str__39 = 'messagebox';
+__consts_0.const_str__65 = 'fullitemname';
+__consts_0.const_str__25 = 'set_msgbox';
+__consts_0.const_str__78 = 'href';
+__consts_0.const_str__44 = 'visible';
+__consts_0.const_str__45 = '(v10)';
+__consts_0.const_str__48 = 'hostrow';
+__consts_0.const_str__20 = '\n';
+__consts_0.const_str__92 = 'tr';
+__consts_0.const_str__15 = 'pre';
+__consts_0.const_str__23 = '\n======== Stdout: ========\n';
+__consts_0.const_str__88 = '#00ff00';
+__consts_0.const_str__46 = 'beige';
+__consts_0.const_str__84 = 's';
+__consts_0.const_str__98 = 'traceback';
__consts_0.const_str__6 = 'show_traceback';
-__consts_0.const_str__38 = '(v2)';
+__consts_0.const_str__10 = '(v2)';
+__consts_0.const_str__57 = 'testmain';
+__consts_0.const_str__38 = "('messagebox')";
+__consts_0.const_str__4 = 'show_skip';
+__consts_0.const_str__95 = '[';
+__consts_0.const_str__29 = '/home/fijal/lang/python/pypy-dist/pypy/translator/js/helper.py';
+__consts_0.const_str__103 = 'reason';
+__consts_0.const_str__77 = "javascript:show_traceback('";
+__consts_0.const_str__43 = '(v11)';
+__consts_0.const_str__97 = '(v7)';
+__consts_0.const_str__74 = 'None';
+__consts_0.const_str__72 = 'True';
+__consts_0.const_str__56 = '(v5)';
+__consts_0.const_str__89 = 'itemtype';
+__consts_0.const_str__87 = 'hostkey';
+__consts_0.const_str__60 = 'ItemStart';
+__consts_0.const_str__93 = 'itemname';
+__consts_0.const_str__91 = "('tr')";
+__consts_0.const_str__85 = "('.')";
+__consts_0.const_str__24 = '\n========== Stderr: ==========\n';
+__consts_0.pypy_translator_transformer_debug_TracebackHandler = new pypy_translator_transformer_debug_TracebackHandler();
+__consts_0.pypy_translator_transformer_debug_TracebackHandler.otb = __consts_0.const_list__105;
+__consts_0.const_str__30 = 'div';
+__consts_0.const_str__55 = '(v4)';
+__consts_0.const_str__100 = 'stderr';
+__consts_0.const_str__36 = '(item_name_0, v8)';
+__consts_0.const_str__42 = 'create_text_elem';
+__consts_0.const_str__83 = "('s')";
+__consts_0.const_str__28 = 'get_document';
__consts_0.const_str__3 = '';
-__consts_0.const_str__28 = "('messagebox')";
-__consts_0.const_str__53 = 'a';
-__consts_0.const_str__19 = 'div';
-__consts_0.const_str__12 = '#FF0000';
-__consts_0.const_str__65 = 'hostkey';
-__consts_0.const_str__51 = 'None';
-__consts_0.const_str__26 = '(v6)';
-__consts_0.const_str__52 = "('a')";
-__consts_0.const_str__69 = "('tr')";
-__consts_0.const_str__5 = '(v0)';
-__consts_0.const_str__73 = 'reason';
-__consts_0.const_str__49 = 'True';
-__consts_0.const_str__32 = 'hostrow';
-__consts_0.const_str__54 = "javascript:show_traceback('";
-__consts_0.exceptions_StopIteration = new exceptions_StopIteration();
-__consts_0.const_str__44 = 'ReceivedItemOutcome';
-__consts_0.exceptions_KeyError = new exceptions_KeyError();
-__consts_0.const_str__10 = 'debug_div';
-__consts_0.const_str__58 = 'F';
-__consts_0.const_str__45 = 'fullmodulename';
-__consts_0.const_str__50 = 'skipped';
-__consts_0.const_str__14 = ' ';
-__consts_0.const_str__34 = "('td')";
-__consts_0.const_str__17 = 'get_document';
+__consts_0.const_str__16 = '#FF0000';
+__consts_0.const_str__68 = 'onmouseover';
+__consts_0.const_str__2 = '()';
+__consts_0.py____test_rsession_webjs_Pending = new py____test_rsession_webjs_Pending();
+__consts_0.py____test_rsession_webjs_Pending.opending = __consts_0.const_list;
+__consts_0.const_str__63 = 'fullmodulename';
+__consts_0.const_str__73 = 'skipped';
+__consts_0.const_str__18 = ' ';
+__consts_0.const_tuple = {};
__consts_0.const_str = 'main';
-__consts_0.const_str__35 = 'td';
-__consts_0.const_str__33 = 'create_elem';
-__consts_0.const_str__48 = 'passed';
-__consts_0.const_str__55 = "')";
-__consts_0.const_str__8 = 'entrypoint';
-__consts_0.ExportedMethods = new ExportedMethods();
-__consts_0.const_str__23 = '(v5)';
-__consts_0.const_str__64 = '.';
-__consts_0.pypy_translator_transformer_debug_TracebackHandler = new pypy_translator_transformer_debug_TracebackHandler();
-__consts_0.pypy_translator_transformer_debug_TracebackHandler.otb = __consts_0.const_list;
-__consts_0.const_str__36 = '#ff0000';
-__consts_0.const_str__74 = 'item_name';
-__consts_0.const_str__70 = 'tr';
-__consts_0.const_str__46 = '(v3)';
-__consts_0.const_str__67 = 'itemtype';
-__consts_0.const_str__40 = 'main_table';
-__consts_0.const_str__18 = '/home/fijal/lang/python/pypy-dist/pypy/translator/js/helper.py';
-__consts_0.const_str__29 = 'messagebox';
-__consts_0.const_str__13 = ' ';
-__consts_0.const_str__59 = 'some error';
-__consts_0.const_str__42 = 'ItemStart';
-__consts_0.const_str__71 = 'itemname';
-__consts_0.const_str__47 = 'fullitemname';
-__consts_0.const_str__22 = 'set_msgbox';
-__consts_0.const_str__41 = 'type';
-__consts_0.const_str__56 = 'href';
-__consts_0.const_str__57 = "('F')";
-__consts_0.const_str__27 = 'get_elem';
-__consts_0.const_str__15 = ': ';
-__consts_0.const_str__16 = '\n';
-__consts_0.const_tuple__25 = {};
-__consts_0.const_str__63 = "('.')";
-__consts_0.const_str__75 = 'traceback';
-__consts_0.const_str__11 = 'pre';
-__consts_0.const_str__9 = '';
+__consts_0.const_str__32 = 'hidden';
+__consts_0.const_str__22 = '====== Traceback: =========\n';
+__consts_0.exceptions_KeyError = new exceptions_KeyError();
+__consts_0.const_str__101 = 'item_name';
+__consts_0.const_str__17 = ' ';
+__consts_0.const_str__19 = ': ';
+__consts_0.const_str__13 = '';
Modified: py/dist/py/test/rsession/webjs.py
==============================================================================
--- py/dist/py/test/rsession/webjs.py (original)
+++ py/dist/py/test/rsession/webjs.py Mon Sep 11 19:17:32 2006
@@ -117,10 +117,12 @@
msgbox.appendChild(pre)
def show_traceback(item_name="a"):
- set_msgbox(item_name, tracebacks[item_name])
+ data = "====== Traceback: =========\n%s\n======== Stdout: ========\n%s\n"\
+ "========== Stderr: ==========\n%s\n" % tracebacks[item_name]
+ set_msgbox(item_name, data)
def fail_come_back(msg):
- tracebacks[msg['item_name']] = msg['traceback']
+ tracebacks[msg['item_name']] = (msg['traceback'], msg['stdout'], msg['stderr'])
def skip_come_back(msg):
skips[msg['item_name']] = msg['reason']
From briandorsey at codespeak.net Mon Sep 11 19:18:36 2006
From: briandorsey at codespeak.net (briandorsey at codespeak.net)
Date: Mon, 11 Sep 2006 19:18:36 +0200 (CEST)
Subject: [py-svn] r32187 - py/dist/py/test/rsession/testing
Message-ID: <20060911171836.38B9610077@code0.codespeak.net>
Author: briandorsey
Date: Mon Sep 11 19:18:35 2006
New Revision: 32187
Modified:
py/dist/py/test/rsession/testing/test_boxing.py
py/dist/py/test/rsession/testing/test_master.py
py/dist/py/test/rsession/testing/test_slave.py
Log:
Disabling rsession tests on Windows because rsession isn't currently supported or funtional there. (no os.fork on Windows)
Modified: py/dist/py/test/rsession/testing/test_boxing.py
==============================================================================
--- py/dist/py/test/rsession/testing/test_boxing.py (original)
+++ py/dist/py/test/rsession/testing/test_boxing.py Mon Sep 11 19:18:35 2006
@@ -4,6 +4,9 @@
import py, sys
+if sys.platform == 'win32':
+ py.test.skip("rsession is unsupported on Windows.")
+
from py.__.test.rsession.box import Box, RealBox
from py.__.test.rsession.testing import example2
from py.__.test.rsession.conftest import option
Modified: py/dist/py/test/rsession/testing/test_master.py
==============================================================================
--- py/dist/py/test/rsession/testing/test_master.py (original)
+++ py/dist/py/test/rsession/testing/test_master.py Mon Sep 11 19:18:35 2006
@@ -4,7 +4,11 @@
"""
import time, threading
-import py
+import py, sys
+
+if sys.platform == 'win32':
+ py.test.skip("rsession is unsupported on Windows.")
+
from py.__.test.rsession.master import dispatch_loop, setup_slave, MasterNode
from py.__.test.rsession.outcome import ReprOutcome, Outcome
from py.__.test.rsession.testing.test_slave import funcpass_spec, funcfail_spec
Modified: py/dist/py/test/rsession/testing/test_slave.py
==============================================================================
--- py/dist/py/test/rsession/testing/test_slave.py (original)
+++ py/dist/py/test/rsession/testing/test_slave.py Mon Sep 11 19:18:35 2006
@@ -2,7 +2,11 @@
""" Testing the slave side node code (in a local way). """
from py.__.test.rsession.slave import SlaveNode, slave_main
from py.__.test.rsession.outcome import ReprOutcome
-import py
+import py, sys
+
+if sys.platform == 'win32':
+ py.test.skip("rsession is unsupported on Windows.")
+
def setup_module(mod):
mod.rootdir = py.path.local(py.__file__).dirpath().dirpath()
From fijal at codespeak.net Tue Sep 12 11:25:39 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Tue, 12 Sep 2006 11:25:39 +0200 (CEST)
Subject: [py-svn] r32200 - in py/dist/py/test/rsession: . webdata
Message-ID: <20060912092539.4D66810080@code0.codespeak.net>
Author: fijal
Date: Tue Sep 12 11:25:36 2006
New Revision: 32200
Modified:
py/dist/py/test/rsession/web.py
py/dist/py/test/rsession/webdata/source.js
py/dist/py/test/rsession/webjs.py
Log:
Fix carl fixes.
Modified: py/dist/py/test/rsession/web.py
==============================================================================
--- py/dist/py/test/rsession/web.py (original)
+++ py/dist/py/test/rsession/web.py Tue Sep 12 11:25:36 2006
@@ -71,11 +71,11 @@
return json.write(self.hosts)
show_hosts = described(retval={"aa":"aa"})(show_hosts)
- def show_skip(self, item_name="a"):
+ def show_skip(self, item_name="aa"):
return json.write({'item_name':item_name, 'reason':escape(self.skip_reasons[item_name])})
show_skip = described(retval={"aa":"aa"})(show_skip)
- def show_fail(self, item_name="a"):
+ def show_fail(self, item_name="aa"):
return json.write({'item_name':item_name, 'traceback':escape(str(self.fail_reasons[item_name])),\
'stdout':self.stdout[item_name], 'stderr':self.stderr[item_name]})
show_fail = described(retval={"aa":"aa"})(show_fail)
@@ -86,7 +86,7 @@
retlist.append(self.show_status_change())
retval = json.write(retlist)
return retval
- show_all_statuses = described(retval={"aa":"aa"})(show_all_statuses)
+ show_all_statuses = described(retval=[{"aa":"aa"}])(show_all_statuses)
def show_status_change(self):
def add_item(event):
Modified: py/dist/py/test/rsession/webdata/source.js
==============================================================================
--- py/dist/py/test/rsession/webdata/source.js (original)
+++ py/dist/py/test/rsession/webdata/source.js Tue Sep 12 11:25:36 2006
@@ -319,23 +319,23 @@
v17 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
v17.oleave_variant0(__consts_0.const_str);
undefined;
- v0 = 'a';
+ v0 = __consts_0.const_str__4;
v20 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v20.oenter_variant0(__consts_0.const_str__4,__consts_0.const_str__5,__consts_0.const_str__3,71);
+ v20.oenter_variant0(__consts_0.const_str__5,__consts_0.const_str__6,__consts_0.const_str__3,71);
undefined;
show_skip ( v0 );
v24 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v24.oleave_variant0(__consts_0.const_str__4);
+ v24.oleave_variant0(__consts_0.const_str__5);
undefined;
- v1 = 'a';
+ v1 = __consts_0.const_str__4;
v27 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v27.oenter_variant0(__consts_0.const_str__6,__consts_0.const_str__7,__consts_0.const_str__3,72);
+ v27.oenter_variant0(__consts_0.const_str__7,__consts_0.const_str__8,__consts_0.const_str__3,72);
undefined;
show_traceback ( v1 );
v31 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v31.oleave_variant0(__consts_0.const_str__6);
+ v31.oleave_variant0(__consts_0.const_str__7);
undefined;
- v2 = __consts_0.const_str__8;
+ v2 = __consts_0.const_str__4;
v34 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
v34.oenter_variant0(__consts_0.const_str__9,__consts_0.const_str__10,__consts_0.const_str__3,73);
undefined;
@@ -569,223 +569,30 @@
}
}
-function pypy_translator_transformer_debug_TracebackHandler () {
-}
-
-pypy_translator_transformer_debug_TracebackHandler.prototype.toString = function (){
- return ( '' );
-}
-
-inherits(pypy_translator_transformer_debug_TracebackHandler,Object);
-pypy_translator_transformer_debug_TracebackHandler.prototype.oenter_variant0 = function (tb_str_0,data_9,filename_0,lineno_0){
- var v376,v377,v378,v379,v380,v381,v382,v383,v384;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v377 = this.otb;
- v378 = v377;
- v379 = new Object();
- v379.item0 = tb_str_0;
- v379.item1 = data_9;
- v379.item2 = filename_0;
- v379.item3 = lineno_0;
- ll_append__List_Record_item2__String__ite_Record_i ( v378,v379 );
- block = 1;
- break;
- case 1:
- return ( v376 );
- }
- }
-}
-
-pypy_translator_transformer_debug_TracebackHandler.prototype.oleave_variant0 = function (tb_str_1){
- var v393,v394,v395,v396,self_3,tb_str_2,num_0,v397,v398,self_4,tb_str_3,num_1,v399,v400,v401,v402,v403,self_5,tb_str_4,v404,v405,self_6,tb_str_5,num_2,v406,v407,v408,v409;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v394 = this.otb;
- v395 = ll_len__List_Record_item2__String__ite ( v394 );
- v396 = (v395-1);
- self_3 = this;
- tb_str_2 = tb_str_1;
- num_0 = v396;
- block = 1;
- break;
- case 1:
- v397 = (num_0>=0);
- v398 = v397;
- if (v398 == true)
- {
- self_4 = self_3;
- tb_str_3 = tb_str_2;
- num_1 = num_0;
- block = 3;
- break;
- }
- else{
- block = 2;
- break;
- }
- case 2:
- return ( v393 );
- case 3:
- v399 = self_4.otb;
- v400 = ll_getitem_nonneg__dum_nocheckConst_List_Record_it ( undefined,v399,num_1 );
- v401 = v400.item0;
- v402 = ll_streq__String_String ( v401,tb_str_3 );
- v403 = v402;
- if (v403 == true)
- {
- self_6 = self_4;
- tb_str_5 = tb_str_3;
- num_2 = num_1;
- block = 5;
- break;
- }
- else{
- self_5 = self_4;
- tb_str_4 = tb_str_3;
- v404 = num_1;
- block = 4;
- break;
- }
- case 4:
- v405 = (v404-1);
- self_3 = self_5;
- tb_str_2 = tb_str_4;
- num_0 = v405;
- block = 1;
- break;
- case 5:
- v406 = self_6.otb;
- v407 = ll_newslice__Signed_Signed ( 0,num_2 );
- v408 = ll_listslice__List_Record_item2__String__ite_List_ ( undefined,v406,v407 );
- self_6.otb = v408;
- self_5 = self_6;
- tb_str_4 = tb_str_5;
- v404 = num_2;
- block = 4;
- break;
- }
- }
-}
-
-pypy_translator_transformer_debug_TracebackHandler.prototype.otraceback_variant0 = function (){
- var v449,v450;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v450 = this.otb;
- v449 = v450;
- block = 1;
- break;
- case 1:
- return ( v449 );
- }
- }
-}
-
-function ll_len__List_Record_item2__String__ite (l_3) {
- var v410,v411,v412;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v411 = l_3;
- v412 = v411.length;
- v410 = v412;
- block = 1;
- break;
- case 1:
- return ( v410 );
- }
- }
-}
-
-function ll_newslice__Signed_Signed (start_1,stop_0) {
- var v427,v428,v429,v430;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v428 = new Slice();
- v428.start = start_1;
- v428.stop = stop_0;
- v427 = v428;
- block = 1;
- break;
- case 1:
- return ( v427 );
- }
- }
-}
-
-function ll_streq__String_String (s1_0,s2_0) {
- var v417,v418,v419,v420,s2_1,v421,v422,v423,v424,v425,v426;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v418 = !!s1_0;
- v419 = !v418;
- v420 = v419;
- if (v420 == true)
- {
- v424 = s2_0;
- block = 3;
- break;
- }
- else{
- s2_1 = s2_0;
- v421 = s1_0;
- block = 1;
- break;
- }
- case 1:
- v422 = v421;
- v423 = (v422==s2_1);
- v417 = v423;
- block = 2;
- break;
- case 2:
- return ( v417 );
- case 3:
- v425 = !!v424;
- v426 = !v425;
- v417 = v426;
- block = 2;
- break;
- }
- }
-}
-
-function show_traceback (item_name_8) {
- var v133,v134,item_name_9,v135,v136,last_exception_16,last_exc_value_32,item_name_10,v137,v138,v139,last_exception_17,last_exc_value_33,item_name_11,v140,v141,v142,v143,last_exception_18,last_exc_value_34,item_name_12,v144,v145,v146,v147,v148,last_exception_19,last_exc_value_35,item_name_13,v149,v150,v151,v152,v153,v154,last_exception_20,last_exc_value_36,v155,v156,last_exception_21,last_exc_value_37,v157,v158,v159,last_exception_22,last_exc_value_38,v160,v161,v162,last_exception_23,last_exc_value_39,last_exc_value_40,v163,e_2,v164,v165,v166,v167,v168,last_exc_value_41,v169,last_exc_value_42,v170,last_exc_value_43,v171,last_exc_value_44,v172,last_exc_value_45,v173,last_exc_value_46,v174,last_exc_value_47,v175;
+function show_skip (item_name_2) {
+ var v90,v91,item_name_3,v92,v93,last_exception_8,last_exc_value_16,item_name_4,v94,v95,v96,last_exception_9,last_exc_value_17,item_name_5,v97,v98,v99,v100,last_exception_10,last_exc_value_18,item_name_6,v101,v102,v103,v104,v105,last_exception_11,last_exc_value_19,item_name_7,v106,v107,v108,v109,v110,v111,last_exception_12,last_exc_value_20,v112,v113,last_exception_13,last_exc_value_21,v114,v115,v116,last_exception_14,last_exc_value_22,v117,v118,v119,last_exception_15,last_exc_value_23,last_exc_value_24,v120,e_1,v121,v122,v123,v124,v125,last_exc_value_25,v126,last_exc_value_26,v127,last_exc_value_27,v128,last_exc_value_28,v129,last_exc_value_29,v130,last_exc_value_30,v131,last_exc_value_31,v132;
var block = 0;
for(;;){
switch(block){
case 0:
- v134 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- item_name_9 = item_name_8;
- v135 = v134;
+ v91 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ item_name_3 = item_name_2;
+ v92 = v91;
block = 1;
break;
case 1:
try {
- v136 = __consts_0.const_str__12;
- item_name_10 = item_name_9;
- v137 = v135;
- v138 = v136;
+ v93 = __consts_0.const_str__12;
+ item_name_4 = item_name_3;
+ v94 = v92;
+ v95 = v93;
block = 2;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_47 = exc;
+ last_exc_value_31 = exc;
block = 19;
break;
}
@@ -793,18 +600,18 @@
}
case 2:
try {
- v139 = __consts_0.const_str__2;
- item_name_11 = item_name_10;
- v140 = v137;
- v141 = v138;
- v142 = v139;
+ v96 = __consts_0.const_str__2;
+ item_name_5 = item_name_4;
+ v97 = v94;
+ v98 = v95;
+ v99 = v96;
block = 3;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_46 = exc;
+ last_exc_value_30 = exc;
block = 18;
break;
}
@@ -812,19 +619,19 @@
}
case 3:
try {
- v143 = __consts_0.const_str__13;
- item_name_12 = item_name_11;
- v144 = v140;
- v145 = v141;
- v146 = v142;
- v147 = v143;
+ v100 = __consts_0.const_str__13;
+ item_name_6 = item_name_5;
+ v101 = v97;
+ v102 = v98;
+ v103 = v99;
+ v104 = v100;
block = 4;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_45 = exc;
+ last_exc_value_29 = exc;
block = 17;
break;
}
@@ -832,20 +639,20 @@
}
case 4:
try {
- v148 = 0;
- item_name_13 = item_name_12;
- v149 = v144;
- v150 = v145;
- v151 = v146;
- v152 = v147;
- v153 = v148;
+ v105 = 0;
+ item_name_7 = item_name_6;
+ v106 = v101;
+ v107 = v102;
+ v108 = v103;
+ v109 = v104;
+ v110 = v105;
block = 5;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_44 = exc;
+ last_exc_value_28 = exc;
block = 16;
break;
}
@@ -853,15 +660,15 @@
}
case 5:
try {
- v149.oenter_variant0(v150,v151,v152,v153);
- v155 = item_name_13;
+ v106.oenter_variant0(v107,v108,v109,v110);
+ v112 = item_name_7;
block = 6;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_43 = exc;
+ last_exc_value_27 = exc;
block = 15;
break;
}
@@ -869,36 +676,36 @@
}
case 6:
try {
- show_traceback_ ( v155 );
+ show_skip_ ( v112 );
block = 7;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_42 = exc;
+ last_exc_value_26 = exc;
block = 14;
break;
}
throw(exc);
}
case 7:
- v157 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v158 = v157;
+ v114 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v115 = v114;
block = 8;
break;
case 8:
try {
- v159 = __consts_0.const_str__12;
- v160 = v158;
- v161 = v159;
+ v116 = __consts_0.const_str__12;
+ v117 = v115;
+ v118 = v116;
block = 9;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_41 = exc;
+ last_exc_value_25 = exc;
block = 13;
break;
}
@@ -906,90 +713,470 @@
}
case 9:
try {
- v160.oleave_variant0(v161);
+ v117.oleave_variant0(v118);
block = 10;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_40 = exc;
+ last_exc_value_24 = exc;
block = 11;
break;
}
throw(exc);
}
case 10:
- return ( v133 );
+ return ( v90 );
case 11:
- v163 = last_exc_value_40;
- e_2 = v163;
+ v120 = last_exc_value_24;
+ e_1 = v120;
block = 12;
break;
case 12:
- v164 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
- v165 = 0;
- v166 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v164,v165 );
- v167 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_2 );
- __show_traceback ( v166,v167 );
+ v121 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
+ v122 = 0;
+ v123 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v121,v122 );
+ v124 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_1 );
+ __show_traceback ( v123,v124 );
block = 10;
break;
case 13:
- v169 = last_exc_value_41;
- e_2 = v169;
+ v126 = last_exc_value_25;
+ e_1 = v126;
block = 12;
break;
case 14:
- v170 = last_exc_value_42;
- e_2 = v170;
+ v127 = last_exc_value_26;
+ e_1 = v127;
block = 12;
break;
- case 15:
- v171 = last_exc_value_43;
- e_2 = v171;
- block = 12;
+ case 15:
+ v128 = last_exc_value_27;
+ e_1 = v128;
+ block = 12;
+ break;
+ case 16:
+ v129 = last_exc_value_28;
+ e_1 = v129;
+ block = 12;
+ break;
+ case 17:
+ v130 = last_exc_value_29;
+ e_1 = v130;
+ block = 12;
+ break;
+ case 18:
+ v131 = last_exc_value_30;
+ e_1 = v131;
+ block = 12;
+ break;
+ case 19:
+ v132 = last_exc_value_31;
+ e_1 = v132;
+ block = 12;
+ break;
+ }
+ }
+}
+
+function show_info_ (data_6) {
+ var v261,v262,v263,v264,v265,v266,v267,v268,v269,v270,v271,v272,data_7,info_0,v273,v274,v275,info_1,v10,v276,v277,v278,v279,v280,v281,v282,v283,v284,v285,v286,data_8,info_2,v287,v288,v289,v290;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v262 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v262.oenter_variant0(__consts_0.const_str__14,__consts_0.const_str__2,__consts_0.const_str__15,39);
+ undefined;
+ v265 = document;
+ v266 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v266.oleave_variant0(__consts_0.const_str__14);
+ undefined;
+ v269 = v265;
+ v270 = v269.getElementById(__consts_0.const_str__16);
+ v271 = v270.style;
+ v271.visibility = __consts_0.const_str__17;
+ data_7 = data_6;
+ info_0 = v270;
+ block = 1;
+ break;
+ case 1:
+ v273 = info_0.childNodes;
+ v274 = ll_len__List_ExternalType_ ( v273 );
+ v275 = !!v274;
+ if (v275 == true)
+ {
+ data_8 = data_7;
+ info_2 = info_0;
+ block = 4;
+ break;
+ }
+ else{
+ info_1 = info_0;
+ v10 = data_7;
+ block = 2;
+ break;
+ }
+ case 2:
+ v276 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v276.oenter_variant0(__consts_0.const_str__18,__consts_0.const_str__19,__consts_0.const_str__15,43);
+ undefined;
+ v279 = create_text_elem ( v10 );
+ v280 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v280.oleave_variant0(__consts_0.const_str__18);
+ undefined;
+ v283 = info_1;
+ v283.appendChild(v279);
+ v285 = info_1.style;
+ v285.backgroundColor = __consts_0.const_str__20;
+ block = 3;
+ break;
+ case 3:
+ return ( v261 );
+ case 4:
+ v287 = info_2;
+ v288 = info_2.childNodes;
+ v289 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v288,0 );
+ v290 = v287.removeChild(v289);
+ data_7 = data_8;
+ info_0 = info_2;
+ block = 1;
+ break;
+ }
+ }
+}
+
+function pypy_translator_transformer_debug_TracebackHandler () {
+}
+
+pypy_translator_transformer_debug_TracebackHandler.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(pypy_translator_transformer_debug_TracebackHandler,Object);
+pypy_translator_transformer_debug_TracebackHandler.prototype.oenter_variant0 = function (tb_str_0,data_9,filename_0,lineno_0){
+ var v401,v402,v403,v404,v405,v406,v407,v408,v409;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v402 = this.otb;
+ v403 = v402;
+ v404 = new Object();
+ v404.item0 = tb_str_0;
+ v404.item1 = data_9;
+ v404.item2 = filename_0;
+ v404.item3 = lineno_0;
+ ll_append__List_Record_item2__String__ite_Record_i ( v403,v404 );
+ block = 1;
+ break;
+ case 1:
+ return ( v401 );
+ }
+ }
+}
+
+pypy_translator_transformer_debug_TracebackHandler.prototype.oleave_variant0 = function (tb_str_1){
+ var v418,v419,v420,v421,self_3,tb_str_2,num_0,v422,v423,self_4,tb_str_3,num_1,v424,v425,v426,v427,v428,self_5,tb_str_4,v429,v430,self_6,tb_str_5,num_2,v431,v432,v433,v434;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v419 = this.otb;
+ v420 = ll_len__List_Record_item2__String__ite ( v419 );
+ v421 = (v420-1);
+ self_3 = this;
+ tb_str_2 = tb_str_1;
+ num_0 = v421;
+ block = 1;
+ break;
+ case 1:
+ v422 = (num_0>=0);
+ v423 = v422;
+ if (v423 == true)
+ {
+ self_4 = self_3;
+ tb_str_3 = tb_str_2;
+ num_1 = num_0;
+ block = 3;
+ break;
+ }
+ else{
+ block = 2;
+ break;
+ }
+ case 2:
+ return ( v418 );
+ case 3:
+ v424 = self_4.otb;
+ v425 = ll_getitem_nonneg__dum_nocheckConst_List_Record_it ( undefined,v424,num_1 );
+ v426 = v425.item0;
+ v427 = ll_streq__String_String ( v426,tb_str_3 );
+ v428 = v427;
+ if (v428 == true)
+ {
+ self_6 = self_4;
+ tb_str_5 = tb_str_3;
+ num_2 = num_1;
+ block = 5;
+ break;
+ }
+ else{
+ self_5 = self_4;
+ tb_str_4 = tb_str_3;
+ v429 = num_1;
+ block = 4;
+ break;
+ }
+ case 4:
+ v430 = (v429-1);
+ self_3 = self_5;
+ tb_str_2 = tb_str_4;
+ num_0 = v430;
+ block = 1;
+ break;
+ case 5:
+ v431 = self_6.otb;
+ v432 = ll_newslice__Signed_Signed ( 0,num_2 );
+ v433 = ll_listslice__List_Record_item2__String__ite_List_ ( undefined,v431,v432 );
+ self_6.otb = v433;
+ self_5 = self_6;
+ tb_str_4 = tb_str_5;
+ v429 = num_2;
+ block = 4;
+ break;
+ }
+ }
+}
+
+pypy_translator_transformer_debug_TracebackHandler.prototype.otraceback_variant0 = function (){
+ var v474,v475;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v475 = this.otb;
+ v474 = v475;
+ block = 1;
+ break;
+ case 1:
+ return ( v474 );
+ }
+ }
+}
+
+function ll_len__List_ExternalType_ (l_2) {
+ var v384,v385,v386;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v385 = l_2;
+ v386 = v385.length;
+ v384 = v386;
+ block = 1;
+ break;
+ case 1:
+ return ( v384 );
+ }
+ }
+}
+
+function ll_newslice__Signed_Signed (start_1,stop_0) {
+ var v452,v453,v454,v455;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v453 = new Slice();
+ v453.start = start_1;
+ v453.stop = stop_0;
+ v452 = v453;
+ block = 1;
+ break;
+ case 1:
+ return ( v452 );
+ }
+ }
+}
+
+function ll_append__List_Record_item2__String__ite_Record_i (l_4,newitem_0) {
+ var v410,v411,v412,v413,v414,v415,v416,v417;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v411 = l_4;
+ v412 = v411.length;
+ v413 = l_4;
+ v414 = (v412+1);
+ v413.length = v414;
+ v416 = l_4;
+ v416[v412]=newitem_0;
+ block = 1;
+ break;
+ case 1:
+ return ( v410 );
+ }
+ }
+}
+
+function show_skip_ (item_name_0) {
+ var v376,v6,v377,v378,v379,v380,v381,v382,v383;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v6 = ll_dict_getitem__Dict_String__String__String ( __consts_0.const_tuple,item_name_0 );
+ v377 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v377.oenter_variant0(__consts_0.const_str__22,__consts_0.const_str__23,__consts_0.const_str__15,108);
+ undefined;
+ set_msgbox ( item_name_0,v6 );
+ v381 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v381.oleave_variant0(__consts_0.const_str__22);
+ undefined;
+ block = 1;
break;
- case 16:
- v172 = last_exc_value_44;
- e_2 = v172;
- block = 12;
+ case 1:
+ return ( v376 );
+ }
+ }
+}
+
+function ll_getitem_nonneg__dum_nocheckConst_List_ExternalT (func_0,l_3,index_0) {
+ var v397,index_1,v398,v399,v400;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ index_1 = index_0;
+ v398 = l_3;
+ block = 1;
break;
- case 17:
- v173 = last_exc_value_45;
- e_2 = v173;
- block = 12;
+ case 1:
+ v399 = v398;
+ v400 = v399[index_1];
+ v397 = v400;
+ block = 2;
break;
- case 18:
- v174 = last_exc_value_46;
- e_2 = v174;
- block = 12;
+ case 2:
+ return ( v397 );
+ }
+ }
+}
+
+function ll_streq__String_String (s1_0,s2_0) {
+ var v442,v443,v444,v445,s2_1,v446,v447,v448,v449,v450,v451;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v443 = !!s1_0;
+ v444 = !v443;
+ v445 = v444;
+ if (v445 == true)
+ {
+ v449 = s2_0;
+ block = 3;
+ break;
+ }
+ else{
+ s2_1 = s2_0;
+ v446 = s1_0;
+ block = 1;
+ break;
+ }
+ case 1:
+ v447 = v446;
+ v448 = (v447==s2_1);
+ v442 = v448;
+ block = 2;
break;
- case 19:
- v175 = last_exc_value_47;
- e_2 = v175;
- block = 12;
+ case 2:
+ return ( v442 );
+ case 3:
+ v450 = !!v449;
+ v451 = !v450;
+ v442 = v451;
+ block = 2;
break;
}
}
}
-function ll_append__List_Record_item2__String__ite_Record_i (l_2,newitem_0) {
- var v385,v386,v387,v388,v389,v390,v391,v392;
+function set_msgbox (item_name_14,data_10) {
+ var v486,v487,v488,v489,v490,v491,v492,v493,item_name_15,data_11,msgbox_0,v494,v495,v496,item_name_16,data_12,msgbox_1,v497,v498,v499,v500,v501,v502,v503,v504,v11,v505,v506,v507,v508,v509,v510,v511,v512,v513,v514,v515,item_name_17,data_13,msgbox_2,v516,v517,v518,v519;
var block = 0;
for(;;){
switch(block){
case 0:
- v386 = l_2;
- v387 = v386.length;
- v388 = l_2;
- v389 = (v387+1);
- v388.length = v389;
- v391 = l_2;
- v391[v387]=newitem_0;
+ v487 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v487.oenter_variant0(__consts_0.const_str__24,__consts_0.const_str__25,__consts_0.const_str__15,111);
+ undefined;
+ v490 = get_elem ( __consts_0.const_str__26 );
+ v491 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v491.oleave_variant0(__consts_0.const_str__24);
+ undefined;
+ item_name_15 = item_name_14;
+ data_11 = data_10;
+ msgbox_0 = v490;
block = 1;
break;
case 1:
- return ( v385 );
+ v494 = msgbox_0.childNodes;
+ v495 = ll_len__List_ExternalType_ ( v494 );
+ v496 = !!v495;
+ if (v496 == true)
+ {
+ item_name_17 = item_name_15;
+ data_13 = data_11;
+ msgbox_2 = msgbox_0;
+ block = 4;
+ break;
+ }
+ else{
+ item_name_16 = item_name_15;
+ data_12 = data_11;
+ msgbox_1 = msgbox_0;
+ block = 2;
+ break;
+ }
+ case 2:
+ v497 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v497.oenter_variant0(__consts_0.const_str__27,__consts_0.const_str__28,__consts_0.const_str__15,114);
+ undefined;
+ v500 = create_elem ( __consts_0.const_str__29 );
+ v501 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v501.oleave_variant0(__consts_0.const_str__27);
+ undefined;
+ v504 = ll_strconcat__String_String ( item_name_16,__consts_0.const_str__30 );
+ v11 = ll_strconcat__String_String ( v504,data_12 );
+ v505 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v505.oenter_variant0(__consts_0.const_str__18,__consts_0.const_str__31,__consts_0.const_str__15,115);
+ undefined;
+ v508 = create_text_elem ( v11 );
+ v509 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v509.oleave_variant0(__consts_0.const_str__18);
+ undefined;
+ v512 = v500;
+ v512.appendChild(v508);
+ v514 = msgbox_1;
+ v514.appendChild(v500);
+ block = 3;
+ break;
+ case 3:
+ return ( v486 );
+ case 4:
+ v516 = msgbox_2;
+ v517 = msgbox_2.childNodes;
+ v518 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v517,0 );
+ v519 = v516.removeChild(v518);
+ item_name_15 = item_name_17;
+ data_11 = data_13;
+ msgbox_0 = msgbox_2;
+ block = 1;
+ break;
}
}
}
@@ -1050,30 +1237,28 @@
}
}
-function show_skip (item_name_2) {
- var v90,v91,item_name_3,v92,v93,last_exception_8,last_exc_value_16,item_name_4,v94,v95,v96,last_exception_9,last_exc_value_17,item_name_5,v97,v98,v99,v100,last_exception_10,last_exc_value_18,item_name_6,v101,v102,v103,v104,v105,last_exception_11,last_exc_value_19,item_name_7,v106,v107,v108,v109,v110,v111,last_exception_12,last_exc_value_20,v112,v113,last_exception_13,last_exc_value_21,v114,v115,v116,last_exception_14,last_exc_value_22,v117,v118,v119,last_exception_15,last_exc_value_23,last_exc_value_24,v120,e_1,v121,v122,v123,v124,v125,last_exc_value_25,v126,last_exc_value_26,v127,last_exc_value_27,v128,last_exc_value_28,v129,last_exc_value_29,v130,last_exc_value_30,v131,last_exc_value_31,v132;
+function hide_info () {
+ var v219,v220,v221,v222,last_exception_32,last_exc_value_64,v223,v224,v225,last_exception_33,last_exc_value_65,v226,v227,v228,v229,last_exception_34,last_exc_value_66,v230,v231,v232,v233,v234,last_exception_35,last_exc_value_67,v235,v236,v237,v238,v239,v240,last_exception_36,last_exc_value_68,v241,last_exception_37,last_exc_value_69,v242,v243,v244,last_exception_38,last_exc_value_70,v245,v246,v247,last_exception_39,last_exc_value_71,last_exc_value_72,v248,e_4,v249,v250,v251,v252,v253,last_exc_value_73,v254,last_exc_value_74,v255,last_exc_value_75,v256,last_exc_value_76,v257,last_exc_value_77,v258,last_exc_value_78,v259,last_exc_value_79,v260;
var block = 0;
for(;;){
switch(block){
case 0:
- v91 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- item_name_3 = item_name_2;
- v92 = v91;
+ v220 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v221 = v220;
block = 1;
break;
case 1:
try {
- v93 = __consts_0.const_str__12;
- item_name_4 = item_name_3;
- v94 = v92;
- v95 = v93;
+ v222 = __consts_0.const_str__12;
+ v223 = v221;
+ v224 = v222;
block = 2;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_31 = exc;
+ last_exc_value_79 = exc;
block = 19;
break;
}
@@ -1081,18 +1266,17 @@
}
case 2:
try {
- v96 = __consts_0.const_str__2;
- item_name_5 = item_name_4;
- v97 = v94;
- v98 = v95;
- v99 = v96;
+ v225 = __consts_0.const_str__2;
+ v226 = v223;
+ v227 = v224;
+ v228 = v225;
block = 3;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_30 = exc;
+ last_exc_value_78 = exc;
block = 18;
break;
}
@@ -1100,19 +1284,18 @@
}
case 3:
try {
- v100 = __consts_0.const_str__13;
- item_name_6 = item_name_5;
- v101 = v97;
- v102 = v98;
- v103 = v99;
- v104 = v100;
+ v229 = __consts_0.const_str__13;
+ v230 = v226;
+ v231 = v227;
+ v232 = v228;
+ v233 = v229;
block = 4;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_29 = exc;
+ last_exc_value_77 = exc;
block = 17;
break;
}
@@ -1120,20 +1303,19 @@
}
case 4:
try {
- v105 = 0;
- item_name_7 = item_name_6;
- v106 = v101;
- v107 = v102;
- v108 = v103;
- v109 = v104;
- v110 = v105;
+ v234 = 0;
+ v235 = v230;
+ v236 = v231;
+ v237 = v232;
+ v238 = v233;
+ v239 = v234;
block = 5;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_28 = exc;
+ last_exc_value_76 = exc;
block = 16;
break;
}
@@ -1141,15 +1323,14 @@
}
case 5:
try {
- v106.oenter_variant0(v107,v108,v109,v110);
- v112 = item_name_7;
+ v235.oenter_variant0(v236,v237,v238,v239);
block = 6;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_27 = exc;
+ last_exc_value_75 = exc;
block = 15;
break;
}
@@ -1157,36 +1338,36 @@
}
case 6:
try {
- show_skip_ ( v112 );
+ hide_info_ ( );
block = 7;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_26 = exc;
+ last_exc_value_74 = exc;
block = 14;
break;
}
throw(exc);
}
case 7:
- v114 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v115 = v114;
+ v242 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v243 = v242;
block = 8;
break;
case 8:
try {
- v116 = __consts_0.const_str__12;
- v117 = v115;
- v118 = v116;
+ v244 = __consts_0.const_str__12;
+ v245 = v243;
+ v246 = v244;
block = 9;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_25 = exc;
+ last_exc_value_73 = exc;
block = 13;
break;
}
@@ -1194,178 +1375,118 @@
}
case 9:
try {
- v117.oleave_variant0(v118);
+ v245.oleave_variant0(v246);
block = 10;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_24 = exc;
+ last_exc_value_72 = exc;
block = 11;
break;
}
throw(exc);
}
case 10:
- return ( v90 );
+ return ( v219 );
case 11:
- v120 = last_exc_value_24;
- e_1 = v120;
+ v248 = last_exc_value_72;
+ e_4 = v248;
block = 12;
break;
case 12:
- v121 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
- v122 = 0;
- v123 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v121,v122 );
- v124 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_1 );
- __show_traceback ( v123,v124 );
+ v249 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
+ v250 = 0;
+ v251 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v249,v250 );
+ v252 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_4 );
+ __show_traceback ( v251,v252 );
block = 10;
break;
case 13:
- v126 = last_exc_value_25;
- e_1 = v126;
+ v254 = last_exc_value_73;
+ e_4 = v254;
block = 12;
break;
case 14:
- v127 = last_exc_value_26;
- e_1 = v127;
+ v255 = last_exc_value_74;
+ e_4 = v255;
block = 12;
break;
case 15:
- v128 = last_exc_value_27;
- e_1 = v128;
+ v256 = last_exc_value_75;
+ e_4 = v256;
block = 12;
break;
case 16:
- v129 = last_exc_value_28;
- e_1 = v129;
+ v257 = last_exc_value_76;
+ e_4 = v257;
block = 12;
break;
case 17:
- v130 = last_exc_value_29;
- e_1 = v130;
+ v258 = last_exc_value_77;
+ e_4 = v258;
block = 12;
break;
case 18:
- v131 = last_exc_value_30;
- e_1 = v131;
- block = 12;
- break;
- case 19:
- v132 = last_exc_value_31;
- e_1 = v132;
+ v259 = last_exc_value_78;
+ e_4 = v259;
block = 12;
break;
- }
- }
-}
-
-function ll_str__InstanceR_exceptions_Exception_Instance_ex (self_0,instance_0) {
- var v305,v306,v307,v308;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- undefined;
- v307 = ll_const__Signed ( -1 );
- v308 = instance_0.toString();
- v305 = v308;
- block = 1;
+ case 19:
+ v260 = last_exc_value_79;
+ e_4 = v260;
+ block = 12;
break;
- case 1:
- return ( v305 );
}
}
}
-function ll_const__Signed (c_0) {
- var v486;
+function get_elem (el_0) {
+ var v520,v521,v522,v523,v524,v525,v526,v527,v528,v529;
var block = 0;
for(;;){
switch(block){
case 0:
- v486 = c_0;
+ v521 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v521.oenter_variant0(__consts_0.const_str__14,__consts_0.const_str__2,__consts_0.const_str__15,12);
+ undefined;
+ v524 = document;
+ v525 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v525.oleave_variant0(__consts_0.const_str__14);
+ undefined;
+ v528 = v524;
+ v529 = v528.getElementById(el_0);
+ v520 = v529;
block = 1;
break;
case 1:
- return ( v486 );
+ return ( v520 );
}
}
}
-function ll_listslice__List_Record_item2__String__ite_List_ (RESLIST_1,l1_3,slice_0) {
- var v431,v432,v433,v434,v435,v436,v437,RESLIST_2,l1_4,stop_1,start_2,v438,v439,v440,l1_5,i_2,j_2,stop_2,l_5,v441,v442,l1_6,i_3,j_3,stop_3,l_6,v443,v444,v445,v446,v447,v448;
+function hide_info_ () {
+ var v545,v546,v547,v548,v549,v550,v551,v552,v553,v554,v555,v556;
var block = 0;
for(;;){
switch(block){
case 0:
- v432 = slice_0.start;
- v433 = slice_0.stop;
- v434 = l1_3;
- v435 = v434.length;
- v436 = (v433>v435);
- v437 = v436;
- if (v437 == true)
- {
- l1_4 = l1_3;
- stop_1 = v435;
- start_2 = v432;
- block = 1;
- break;
- }
- else{
- l1_4 = l1_3;
- stop_1 = v433;
- start_2 = v432;
- block = 1;
- break;
- }
- case 1:
- v438 = (stop_1-start_2);
+ v546 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v546.oenter_variant0(__consts_0.const_str__14,__consts_0.const_str__2,__consts_0.const_str__15,49);
undefined;
- v440 = ll_newlist__List_Record_item2__String__ite_Signed ( undefined,v438 );
- l1_5 = l1_4;
- i_2 = start_2;
- j_2 = 0;
- stop_2 = stop_1;
- l_5 = v440;
- block = 2;
- break;
- case 2:
- v441 = (i_2' );
-}
-
function main () {
var v48,v49,v50,v51,last_exception_0,last_exc_value_0,v52,v53,v54,last_exception_1,last_exc_value_1,v55,v56,v57,v58,last_exception_2,last_exc_value_2,v59,v60,v61,v62,v63,last_exception_3,last_exc_value_3,v64,v65,v66,v67,v68,v69,last_exception_4,last_exc_value_4,v70,last_exception_5,last_exc_value_5,v71,v72,v73,last_exception_6,last_exc_value_6,v74,v75,v76,last_exception_7,last_exc_value_7,last_exc_value_8,v77,e_0,v78,v79,v80,v81,v82,last_exc_value_9,v83,last_exc_value_10,v84,last_exc_value_11,v85,last_exc_value_12,v86,last_exc_value_13,v87,last_exc_value_14,v88,last_exc_value_15,v89;
var block = 0;
@@ -1835,28 +1824,229 @@
}
}
-function hide_info () {
- var v219,v220,v221,v222,last_exception_32,last_exc_value_64,v223,v224,v225,last_exception_33,last_exc_value_65,v226,v227,v228,v229,last_exception_34,last_exc_value_66,v230,v231,v232,v233,v234,last_exception_35,last_exc_value_67,v235,v236,v237,v238,v239,v240,last_exception_36,last_exc_value_68,v241,last_exception_37,last_exc_value_69,v242,v243,v244,last_exception_38,last_exc_value_70,v245,v246,v247,last_exception_39,last_exc_value_71,last_exc_value_72,v248,e_4,v249,v250,v251,v252,v253,last_exc_value_73,v254,last_exc_value_74,v255,last_exc_value_75,v256,last_exc_value_76,v257,last_exc_value_77,v258,last_exc_value_78,v259,last_exc_value_79,v260;
+function ll_strconcat__String_String (obj_0,arg0_0) {
+ var v540,v541,v542;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v541 = obj_0;
+ v542 = (v541+arg0_0);
+ v540 = v542;
+ block = 1;
+ break;
+ case 1:
+ return ( v540 );
+ }
+ }
+}
+
+function ll_listslice__List_Record_item2__String__ite_List_ (RESLIST_1,l1_3,slice_0) {
+ var v456,v457,v458,v459,v460,v461,v462,RESLIST_2,l1_4,stop_1,start_2,v463,v464,v465,l1_5,i_2,j_2,stop_2,l_7,v466,v467,l1_6,i_3,j_3,stop_3,l_8,v468,v469,v470,v471,v472,v473;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v457 = slice_0.start;
+ v458 = slice_0.stop;
+ v459 = l1_3;
+ v460 = v459.length;
+ v461 = (v458>v460);
+ v462 = v461;
+ if (v462 == true)
+ {
+ l1_4 = l1_3;
+ stop_1 = v460;
+ start_2 = v457;
+ block = 1;
+ break;
+ }
+ else{
+ l1_4 = l1_3;
+ stop_1 = v458;
+ start_2 = v457;
+ block = 1;
+ break;
+ }
+ case 1:
+ v463 = (stop_1-start_2);
+ undefined;
+ v465 = ll_newlist__List_Record_item2__String__ite_Signed ( undefined,v463 );
+ l1_5 = l1_4;
+ i_2 = start_2;
+ j_2 = 0;
+ stop_2 = stop_1;
+ l_7 = v465;
+ block = 2;
+ break;
+ case 2:
+ v466 = (i_2' );
-}
-
-inherits(exceptions_Exception,Object);
-function show_skip_ (item_name_0) {
- var v477,v478,v8,v479,v480,v481,v482,v483,v484,v485;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v478 = ll_chr2str__Char ( item_name_0 );
- v8 = ll_dict_getitem__Dict_String__String__String ( __consts_0.const_tuple__35,v478 );
- v479 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v479.oenter_variant0(__consts_0.const_str__25,__consts_0.const_str__36,__consts_0.const_str__27,108);
- undefined;
- set_msgbox ( item_name_0,v8 );
- v483 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v483.oleave_variant0(__consts_0.const_str__25);
- undefined;
- block = 1;
- break;
- case 1:
- return ( v477 );
- }
- }
-}
-
-function set_msgbox (item_name_14,data_10) {
- var v546,v547,v548,v549,v550,v551,v552,v553,item_name_15,data_11,msgbox_0,v554,v555,v556,item_name_16,data_12,msgbox_1,v557,v558,v559,v560,v561,v562,v563,v564,v565,v11,v566,v567,v568,v569,v570,v571,v572,v573,v574,v575,v576,item_name_17,data_13,msgbox_2,v577,v578,v579,v580;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v547 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v547.oenter_variant0(__consts_0.const_str__37,__consts_0.const_str__38,__consts_0.const_str__27,111);
- undefined;
- v550 = get_elem ( __consts_0.const_str__39 );
- v551 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v551.oleave_variant0(__consts_0.const_str__37);
- undefined;
- item_name_15 = item_name_14;
- data_11 = data_10;
- msgbox_0 = v550;
- block = 1;
- break;
- case 1:
- v554 = msgbox_0.childNodes;
- v555 = ll_len__List_ExternalType_ ( v554 );
- v556 = !!v555;
- if (v556 == true)
- {
- item_name_17 = item_name_15;
- data_13 = data_11;
- msgbox_2 = msgbox_0;
- block = 4;
- break;
- }
- else{
- item_name_16 = item_name_15;
- data_12 = data_11;
- msgbox_1 = msgbox_0;
- block = 2;
- break;
- }
- case 2:
- v557 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v557.oenter_variant0(__consts_0.const_str__40,__consts_0.const_str__41,__consts_0.const_str__27,114);
- undefined;
- v560 = create_elem ( __consts_0.const_str__15 );
- v561 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v561.oleave_variant0(__consts_0.const_str__40);
- undefined;
- v564 = ll_chr2str__Char ( item_name_16 );
- v565 = ll_strconcat__String_String ( v564,__consts_0.const_str__20 );
- v11 = ll_strconcat__String_String ( v565,data_12 );
- v566 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v566.oenter_variant0(__consts_0.const_str__42,__consts_0.const_str__43,__consts_0.const_str__27,115);
- undefined;
- v569 = create_text_elem ( v11 );
- v570 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v570.oleave_variant0(__consts_0.const_str__42);
- undefined;
- v573 = v560;
- v573.appendChild(v569);
- v575 = msgbox_1;
- v575.appendChild(v560);
- block = 3;
- break;
- case 3:
- return ( v546 );
- case 4:
- v577 = msgbox_2;
- v578 = msgbox_2.childNodes;
- v579 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v578,0 );
- v580 = v577.removeChild(v579);
- item_name_15 = item_name_17;
- data_11 = data_13;
- msgbox_0 = msgbox_2;
- block = 1;
+ v174 = last_exc_value_46;
+ e_2 = v174;
+ block = 12;
+ break;
+ case 19:
+ v175 = last_exc_value_47;
+ e_2 = v175;
+ block = 12;
break;
}
}
}
-function ll_strconcat__String_String (obj_0,arg0_0) {
- var v529,v530,v531;
+function Slice () {
+}
+
+Slice.prototype.toString = function (){
+ return ( '' );
+}
+
+function ll_newlist__List_Record_item2__String__ite_Signed (self_8,length_0) {
+ var v543,v544;
var block = 0;
for(;;){
switch(block){
case 0:
- v530 = obj_0;
- v531 = (v530+arg0_0);
- v529 = v531;
+ v544 = ll_newlist__List_Record_item2__String__ite_Signed_ ( undefined,length_0 );
+ v543 = v544;
block = 1;
break;
case 1:
- return ( v529 );
+ return ( v543 );
}
}
}
-function ll_const__Signed_ (c_1) {
- var v585;
+function ll_len__List_Record_item2__String__ite (l_5) {
+ var v435,v436,v437;
var block = 0;
for(;;){
switch(block){
case 0:
- v585 = c_1;
+ v436 = l_5;
+ v437 = v436.length;
+ v435 = v437;
block = 1;
break;
case 1:
- return ( v585 );
+ return ( v435 );
}
}
}
-function show_info_ (data_6) {
- var v261,v262,v263,v264,v265,v266,v267,v268,v269,v270,v271,v272,data_7,info_0,v273,v274,v275,info_1,v10,v276,v277,v278,v279,v280,v281,v282,v283,v284,v285,v286,data_8,info_2,v287,v288,v289,v290;
+function exceptions_Exception () {
+}
+
+exceptions_Exception.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_Exception,Object);
+function create_elem (s_0) {
+ var v530,v531,v532,v533,v534,v535,v536,v537,v538,v539;
var block = 0;
for(;;){
switch(block){
case 0:
- v262 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v262.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,39);
+ v531 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v531.oenter_variant0(__consts_0.const_str__14,__consts_0.const_str__2,__consts_0.const_str__15,9);
undefined;
- v265 = document;
- v266 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v266.oleave_variant0(__consts_0.const_str__28);
+ v534 = document;
+ v535 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v535.oleave_variant0(__consts_0.const_str__14);
undefined;
- v269 = v265;
- v270 = v269.getElementById(__consts_0.const_str__31);
- v271 = v270.style;
- v271.visibility = __consts_0.const_str__44;
- data_7 = data_6;
- info_0 = v270;
+ v538 = v534;
+ v539 = v538.createElement(s_0);
+ v530 = v539;
block = 1;
break;
case 1:
- v273 = info_0.childNodes;
- v274 = ll_len__List_ExternalType_ ( v273 );
- v275 = !!v274;
- if (v275 == true)
- {
- data_8 = data_7;
- info_2 = info_0;
- block = 4;
- break;
- }
- else{
- info_1 = info_0;
- v10 = data_7;
- block = 2;
- break;
- }
- case 2:
- v276 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v276.oenter_variant0(__consts_0.const_str__42,__consts_0.const_str__45,__consts_0.const_str__27,43);
- undefined;
- v279 = create_text_elem ( v10 );
- v280 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v280.oleave_variant0(__consts_0.const_str__42);
- undefined;
- v283 = info_1;
- v283.appendChild(v279);
- v285 = info_1.style;
- v285.backgroundColor = __consts_0.const_str__46;
- block = 3;
- break;
- case 3:
- return ( v261 );
- case 4:
- v287 = info_2;
- v288 = info_2.childNodes;
- v289 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v288,0 );
- v290 = v287.removeChild(v289);
- data_7 = data_8;
- info_0 = info_2;
- block = 1;
- break;
+ return ( v530 );
}
}
}
-function exceptions_StandardError () {
-}
-
-exceptions_StandardError.prototype.toString = function (){
- return ( '' );
+function ll_const__Signed (c_0) {
+ var v605;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v605 = c_0;
+ block = 1;
+ break;
+ case 1:
+ return ( v605 );
+ }
+ }
}
-inherits(exceptions_StandardError,exceptions_Exception);
-function ll_newlist__List_Record_item2__String__ite_Signed (self_8,length_0) {
- var v475,v476;
+function create_debug_div () {
+ var v557,v558,v559,v560,v561,v562,v563,v564,v565,v566,v567,v568,v569,v570,v571,v572,v573,v574,v575,v576,v577,v578,v579;
var block = 0;
for(;;){
switch(block){
case 0:
- v476 = ll_newlist__List_Record_item2__String__ite_Signed_ ( undefined,length_0 );
- v475 = v476;
+ v558 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v558.oenter_variant0(__consts_0.const_str__14,__consts_0.const_str__2,__consts_0.const_str__39,13);
+ undefined;
+ v561 = document;
+ v562 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v562.oleave_variant0(__consts_0.const_str__14);
+ undefined;
+ v565 = v561;
+ v566 = v565.createElement(__consts_0.const_str__40);
+ v567 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v567.oenter_variant0(__consts_0.const_str__14,__consts_0.const_str__2,__consts_0.const_str__39,16);
+ undefined;
+ v570 = document;
+ v571 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v571.oleave_variant0(__consts_0.const_str__14);
+ undefined;
+ v574 = v570.childNodes;
+ v575 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v574,0 );
+ v576 = v575.childNodes;
+ v577 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v576,1 );
+ v578 = v577;
+ v578.appendChild(v566);
+ v557 = v566;
block = 1;
break;
case 1:
- return ( v475 );
+ return ( v557 );
}
}
}
-function escape (s_0) {
- var v528;
+function main_ () {
+ var v600,v601,v602,v603,v604;
var block = 0;
for(;;){
switch(block){
case 0:
- v528 = s_0;
+ v601 = __consts_0.ExportedMethods;
+ v602 = v601.show_hosts(host_init);
+ v603 = __consts_0.ExportedMethods;
+ v604 = v603.show_all_statuses(comeback);
block = 1;
break;
case 1:
- return ( v528 );
+ return ( v600 );
}
}
}
-function exceptions_LookupError () {
+function exceptions_StandardError () {
}
-exceptions_LookupError.prototype.toString = function (){
- return ( '' );
+exceptions_StandardError.prototype.toString = function (){
+ return ( '' );
}
-inherits(exceptions_LookupError,exceptions_StandardError);
-function exceptions_KeyError () {
+inherits(exceptions_StandardError,exceptions_Exception);
+function exceptions_LookupError () {
}
-exceptions_KeyError.prototype.toString = function (){
- return ( '' );
+exceptions_LookupError.prototype.toString = function (){
+ return ( '' );
}
-inherits(exceptions_KeyError,exceptions_LookupError);
-function ll_listnext__Record_index__Signed__iterable (iter_0) {
- var v514,v515,v516,v517,v518,v519,v520,iter_1,index_2,l_7,v521,v522,v523,v524,v525,v526,v527,etype_0,evalue_0;
+inherits(exceptions_LookupError,exceptions_StandardError);
+function ll_listnext__Record_index__Signed__iterable__ (iter_0) {
+ var v584,v585,v586,v587,v588,v589,v590,iter_1,index_4,l_9,v591,v592,v593,v594,v595,v596,v597,etype_1,evalue_1;
var block = 0;
for(;;){
switch(block){
case 0:
- v515 = iter_0.iterable;
- v516 = iter_0.index;
- v517 = v515;
- v518 = v517.length;
- v519 = (v516>=v518);
- v520 = v519;
- if (v520 == true)
+ v585 = iter_0.iterable;
+ v586 = iter_0.index;
+ v587 = v585;
+ v588 = v587.length;
+ v589 = (v586>=v588);
+ v590 = v589;
+ if (v590 == true)
{
block = 3;
break;
}
else{
iter_1 = iter_0;
- index_2 = v516;
- l_7 = v515;
+ index_4 = v586;
+ l_9 = v585;
block = 1;
break;
}
case 1:
- v521 = (index_2+1);
- iter_1.index = v521;
- v523 = l_7;
- v524 = v523[index_2];
- v514 = v524;
+ v591 = (index_4+1);
+ iter_1.index = v591;
+ v593 = l_9;
+ v594 = v593[index_4];
+ v584 = v594;
block = 2;
break;
case 2:
- return ( v514 );
+ return ( v584 );
case 3:
- v525 = __consts_0.exceptions_StopIteration;
- v526 = v525.meta;
- v527 = v525;
- etype_0 = v526;
- evalue_0 = v527;
+ v595 = __consts_0.exceptions_StopIteration;
+ v596 = v595.meta;
+ v597 = v595;
+ etype_1 = v596;
+ evalue_1 = v597;
block = 4;
break;
case 4:
- throw(evalue_0);
+ throw(evalue_1);
}
}
}
-function ll_getitem_nonneg__dum_nocheckConst_List_Record_it (func_0,l_4,index_0) {
- var v413,index_1,v414,v415,v416;
+function show_traceback_ (item_name_1) {
+ var v606,v607,v608,v609,v610,v611,v612,v613,v614,v615,v616,v617,v618,v619,v620,v621,v9,v622,v623,v624,v625,v626,v627,v628;
var block = 0;
for(;;){
switch(block){
case 0:
- index_1 = index_0;
- v414 = l_4;
+ v607 = ll_dict_getitem__Dict_String__Record_item2__Str_St ( __consts_0.const_tuple__43,item_name_1 );
+ v608 = v607.item0;
+ v609 = v607.item1;
+ v610 = v607.item2;
+ v611 = new StringBuilder();
+ v611.ll_append(__consts_0.const_str__44);
+ v613 = v608.toString();
+ v611.ll_append(v613);
+ v611.ll_append(__consts_0.const_str__45);
+ v616 = v609.toString();
+ v611.ll_append(v616);
+ v611.ll_append(__consts_0.const_str__46);
+ v619 = v610.toString();
+ v611.ll_append(v619);
+ v611.ll_append(__consts_0.const_str__30);
+ v9 = v611.ll_build();
+ v622 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v622.oenter_variant0(__consts_0.const_str__22,__consts_0.const_str__47,__consts_0.const_str__15,122);
+ undefined;
+ set_msgbox ( item_name_1,v9 );
+ v626 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v626.oleave_variant0(__consts_0.const_str__22);
+ undefined;
block = 1;
break;
case 1:
- v415 = v414;
- v416 = v415[index_1];
- v413 = v416;
- block = 2;
+ return ( v606 );
+ }
+ }
+}
+
+function ll_newlist__List_Record_item2__String__ite_Signed_ (LIST_0,length_1) {
+ var v629,v630,v631,v632;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v630 = new Array();
+ v631 = v630;
+ v631.length = length_1;
+ v629 = v630;
+ block = 1;
break;
- case 2:
- return ( v413 );
+ case 1:
+ return ( v629 );
}
}
}
-function get_elem (el_0) {
- var v686,v687,v688,v689,v690,v691,v692,v693,v694,v695;
+function ll_listiter__Record_index__Signed__iterable_List_R (ITER_0,lst_0) {
+ var v580,v581,v582,v583;
var block = 0;
for(;;){
switch(block){
case 0:
- v687 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v687.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,12);
- undefined;
- v690 = document;
- v691 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v691.oleave_variant0(__consts_0.const_str__28);
- undefined;
- v694 = v690;
- v695 = v694.getElementById(el_0);
- v686 = v695;
+ v581 = new Object();
+ v581.iterable = lst_0;
+ v581.index = 0;
+ v580 = v581;
+ block = 1;
+ break;
+ case 1:
+ return ( v580 );
+ }
+ }
+}
+
+function ll_str__StringR_StringConst_String (self_9,s_2) {
+ var v599;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v599 = s_2;
block = 1;
break;
case 1:
- return ( v686 );
+ return ( v599 );
}
}
}
+function escape (s_1) {
+ var v598;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v598 = s_1;
+ block = 1;
+ break;
+ case 1:
+ return ( v598 );
+ }
+ }
+}
+
+function exceptions_KeyError () {
+}
+
+exceptions_KeyError.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_KeyError,exceptions_LookupError);
function host_init (host_dict_0) {
- var v603,v604,v605,v606,v607,v608,v609,v610,v611,v612,v613,v614,v615,host_dict_1,elem_0,v616,v617,last_exc_value_81,host_dict_2,elem_1,host_0,v618,v619,v620,v621,v622,v623,v624,v625,v626,v627,v3,v628,v629,v630,v631,v632,v633,v634,v635,v636,v637,v638,v639;
+ var v633,v634,v635,v636,v637,v638,v639,v640,v641,v642,v643,v644,v645,host_dict_1,elem_0,v646,v647,last_exc_value_81,host_dict_2,elem_1,host_0,v648,v649,v650,v651,v652,v653,v654,v655,v656,v657,v3,v658,v659,v660,v661,v662,v663,v664,v665,v666,v667,v668,v669;
var block = 0;
for(;;){
switch(block){
case 0:
- v604 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v604.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,131);
+ v634 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v634.oenter_variant0(__consts_0.const_str__14,__consts_0.const_str__2,__consts_0.const_str__15,131);
undefined;
- v607 = document;
- v608 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v608.oleave_variant0(__consts_0.const_str__28);
+ v637 = document;
+ v638 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v638.oleave_variant0(__consts_0.const_str__14);
undefined;
- v611 = v607;
- v612 = v611.getElementById(__consts_0.const_str__48);
- v613 = host_dict_0;
- v614 = ll_dict_kvi__Dict_String__String__List_String_LlT_ ( v613,undefined,undefined );
- v615 = ll_listiter__Record_index__Signed__iterable_List_S ( undefined,v614 );
+ v641 = v637;
+ v642 = v641.getElementById(__consts_0.const_str__48);
+ v643 = host_dict_0;
+ v644 = ll_dict_kvi__Dict_String__String__List_String_LlT_ ( v643,undefined,undefined );
+ v645 = ll_listiter__Record_index__Signed__iterable_List_S ( undefined,v644 );
host_dict_1 = host_dict_0;
- elem_0 = v612;
- v616 = v615;
+ elem_0 = v642;
+ v646 = v645;
block = 1;
break;
case 1:
try {
- v617 = ll_listnext__Record_index__Signed__iterable_ ( v616 );
+ v647 = ll_listnext__Record_index__Signed__iterable_ ( v646 );
host_dict_2 = host_dict_1;
elem_1 = elem_0;
- host_0 = v617;
- v618 = v616;
+ host_0 = v647;
+ v648 = v646;
block = 2;
break;
}
@@ -2545,49 +2593,113 @@
throw(exc);
}
case 2:
- v619 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v619.oenter_variant0(__consts_0.const_str__40,__consts_0.const_str__49,__consts_0.const_str__27,133);
+ v649 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v649.oenter_variant0(__consts_0.const_str__27,__consts_0.const_str__49,__consts_0.const_str__15,133);
undefined;
- v622 = create_elem ( __consts_0.const_str__50 );
- v623 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v623.oleave_variant0(__consts_0.const_str__40);
+ v652 = create_elem ( __consts_0.const_str__50 );
+ v653 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v653.oleave_variant0(__consts_0.const_str__27);
undefined;
- v626 = v622.style;
- v626.background = __consts_0.const_str__51;
+ v656 = v652.style;
+ v656.background = __consts_0.const_str__51;
v3 = ll_dict_getitem__Dict_String__String__String ( host_dict_2,host_0 );
- v628 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v628.oenter_variant0(__consts_0.const_str__42,__consts_0.const_str__52,__consts_0.const_str__27,135);
+ v658 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v658.oenter_variant0(__consts_0.const_str__18,__consts_0.const_str__52,__consts_0.const_str__15,135);
undefined;
- v631 = create_text_elem ( v3 );
- v632 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v632.oleave_variant0(__consts_0.const_str__42);
- undefined;
- v635 = v622;
- v635.appendChild(v631);
- v622.id = host_0;
- v638 = elem_1;
- v638.appendChild(v622);
+ v661 = create_text_elem ( v3 );
+ v662 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v662.oleave_variant0(__consts_0.const_str__18);
+ undefined;
+ v665 = v652;
+ v665.appendChild(v661);
+ v652.id = host_0;
+ v668 = elem_1;
+ v668.appendChild(v652);
host_dict_1 = host_dict_2;
elem_0 = elem_1;
- v616 = v618;
+ v646 = v648;
+ block = 1;
+ break;
+ case 3:
+ return ( v633 );
+ }
+ }
+}
+
+function ll_dict_kvi__Dict_String__String__List_String_LlT_ (d_2,LIST_1,func_2) {
+ var v716,v717,v718,v719,v720,v721,i_4,it_0,result_0,v722,v723,v724,i_5,it_1,result_1,v725,v726,v727,v728,it_2,result_2,v729,v730;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v717 = d_2;
+ v718 = get_dict_len ( v717 );
+ v719 = ll_newlist__List_String_LlT_Signed ( undefined,v718 );
+ v720 = d_2;
+ v721 = dict_items_iterator ( v720 );
+ i_4 = 0;
+ it_0 = v721;
+ result_0 = v719;
block = 1;
break;
+ case 1:
+ v722 = it_0;
+ v723 = v722.ll_go_next();
+ v724 = v723;
+ if (v724 == true)
+ {
+ i_5 = i_4;
+ it_1 = it_0;
+ result_1 = result_0;
+ block = 3;
+ break;
+ }
+ else{
+ v716 = result_0;
+ block = 2;
+ break;
+ }
+ case 2:
+ return ( v716 );
case 3:
- return ( v603 );
+ v725 = result_1;
+ v726 = it_1;
+ v727 = v726.ll_current_key();
+ v725[i_5]=v727;
+ it_2 = it_1;
+ result_2 = result_1;
+ v729 = i_5;
+ block = 4;
+ break;
+ case 4:
+ v730 = (v729+1);
+ i_4 = v730;
+ it_0 = it_2;
+ result_0 = result_2;
+ block = 1;
+ break;
}
}
}
+function exceptions_StopIteration () {
+}
+
+exceptions_StopIteration.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_StopIteration,exceptions_Exception);
function comeback (msglist_0) {
- var v640,v641,v642,v643,msglist_1,v644,v645,v646,v647,msglist_2,v648,v649,last_exc_value_82,msglist_3,v650,v4,v651,v652,v653,v654,v655,v656,v657,v658,msglist_4,v659,v660,v661,v662,v663,v664,last_exc_value_83,v665,v5,v666,v667,v668,v669,v670,v671,v672,v673,v674,v675;
+ var v670,v671,v672,v673,msglist_1,v674,v675,v676,v677,msglist_2,v678,v679,last_exc_value_82,msglist_3,v680,v4,v681,v682,v683,v684,v685,v686,v687,v688,msglist_4,v689,v690,v691,v692,v693,v694,last_exc_value_83,v695,v5,v696,v697,v698,v699,v700,v701,v702,v703,v704,v705;
var block = 0;
for(;;){
switch(block){
case 0:
- v641 = ll_len__List_Dict_String__String__ ( msglist_0 );
- v642 = (v641==0);
- v643 = v642;
- if (v643 == true)
+ v671 = ll_len__List_Dict_String__String__ ( msglist_0 );
+ v672 = (v671==0);
+ v673 = v672;
+ if (v673 == true)
{
block = 4;
break;
@@ -2598,20 +2710,20 @@
break;
}
case 1:
- v644 = __consts_0.py____test_rsession_webjs_Pending.opending;
- v645 = 0;
- v646 = ll_listslice_startonly__List_Dict_String__String__ ( undefined,v644,v645 );
- v647 = ll_listiter__Record_index__Signed__iterable_List_D ( undefined,v646 );
+ v674 = __consts_0.py____test_rsession_webjs_Pending.opending;
+ v675 = 0;
+ v676 = ll_listslice_startonly__List_Dict_String__String__ ( undefined,v674,v675 );
+ v677 = ll_listiter__Record_index__Signed__iterable_List_D ( undefined,v676 );
msglist_2 = msglist_1;
- v648 = v647;
+ v678 = v677;
block = 2;
break;
case 2:
try {
- v649 = ll_listnext__Record_index__Signed__iterable__ ( v648 );
+ v679 = ll_listnext__Record_index__Signed__iterable ( v678 );
msglist_3 = msglist_2;
- v650 = v648;
- v4 = v649;
+ v680 = v678;
+ v4 = v679;
block = 3;
break;
}
@@ -2625,18 +2737,18 @@
throw(exc);
}
case 3:
- v651 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v651.oenter_variant0(__consts_0.const_str__54,__consts_0.const_str__55,__consts_0.const_str__27,30);
+ v681 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v681.oenter_variant0(__consts_0.const_str__54,__consts_0.const_str__55,__consts_0.const_str__15,30);
undefined;
- v654 = process ( v4 );
- v655 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v655.oleave_variant0(__consts_0.const_str__54);
+ v684 = process ( v4 );
+ v685 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v685.oleave_variant0(__consts_0.const_str__54);
undefined;
- v658 = v654;
- if (v658 == true)
+ v688 = v684;
+ if (v688 == true)
{
msglist_2 = msglist_3;
- v648 = v650;
+ v678 = v680;
block = 2;
break;
}
@@ -2645,20 +2757,20 @@
break;
}
case 4:
- return ( v640 );
+ return ( v670 );
case 5:
- v659 = new Array();
- v659.length = 0;
- __consts_0.py____test_rsession_webjs_Pending.opending = v659;
- v662 = ll_listiter__Record_index__Signed__iterable_List_D ( undefined,msglist_4 );
- v663 = v662;
+ v689 = new Array();
+ v689.length = 0;
+ __consts_0.py____test_rsession_webjs_Pending.opending = v689;
+ v692 = ll_listiter__Record_index__Signed__iterable_List_D ( undefined,msglist_4 );
+ v693 = v692;
block = 6;
break;
case 6:
try {
- v664 = ll_listnext__Record_index__Signed__iterable__ ( v663 );
- v665 = v663;
- v5 = v664;
+ v694 = ll_listnext__Record_index__Signed__iterable ( v693 );
+ v695 = v693;
+ v5 = v694;
block = 7;
break;
}
@@ -2671,17 +2783,17 @@
throw(exc);
}
case 7:
- v666 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v666.oenter_variant0(__consts_0.const_str__54,__consts_0.const_str__56,__consts_0.const_str__27,34);
+ v696 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v696.oenter_variant0(__consts_0.const_str__54,__consts_0.const_str__56,__consts_0.const_str__15,34);
undefined;
- v669 = process ( v5 );
- v670 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v670.oleave_variant0(__consts_0.const_str__54);
+ v699 = process ( v5 );
+ v700 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v700.oleave_variant0(__consts_0.const_str__54);
undefined;
- v673 = v669;
- if (v673 == true)
+ v703 = v699;
+ if (v703 == true)
{
- v663 = v665;
+ v693 = v695;
block = 6;
break;
}
@@ -2690,311 +2802,273 @@
break;
}
case 8:
- v674 = __consts_0.ExportedMethods;
- v675 = v674.show_all_statuses(comeback);
- block = 4;
- break;
- }
- }
-}
-
-function ll_listnext__Record_index__Signed__iterable__ (iter_4) {
- var v777,v778,v779,v780,v781,v782,v783,iter_5,index_6,l_14,v784,v785,v786,v787,v788,v789,v790,etype_4,evalue_4;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v778 = iter_4.iterable;
- v779 = iter_4.index;
- v780 = v778;
- v781 = v780.length;
- v782 = (v779>=v781);
- v783 = v782;
- if (v783 == true)
- {
- block = 3;
- break;
- }
- else{
- iter_5 = iter_4;
- index_6 = v779;
- l_14 = v778;
- block = 1;
- break;
- }
- case 1:
- v784 = (index_6+1);
- iter_5.index = v784;
- v786 = l_14;
- v787 = v786[index_6];
- v777 = v787;
- block = 2;
- break;
- case 2:
- return ( v777 );
- case 3:
- v788 = __consts_0.exceptions_StopIteration;
- v789 = v788.meta;
- v790 = v788;
- etype_4 = v789;
- evalue_4 = v790;
+ v704 = __consts_0.ExportedMethods;
+ v705 = v704.show_all_statuses(comeback);
block = 4;
break;
- case 4:
- throw(evalue_4);
- }
- }
-}
-
-function create_elem (s_2) {
- var v699,v700,v701,v702,v703,v704,v705,v706,v707,v708;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v700 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v700.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,9);
- undefined;
- v703 = document;
- v704 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v704.oleave_variant0(__consts_0.const_str__28);
- undefined;
- v707 = v703;
- v708 = v707.createElement(s_2);
- v699 = v708;
- block = 1;
- break;
- case 1:
- return ( v699 );
}
}
}
-function ll_dict_kvi__Dict_String__String__List_String_LlT_ (d_2,LIST_1,func_2) {
- var v723,v724,v725,v726,v727,v728,i_4,it_0,result_0,v729,v730,v731,i_5,it_1,result_1,v732,v733,v734,v735,it_2,result_2,v736,v737;
+function ll_dict_getitem__Dict_String__Record_item2__Str_St (d_1,key_2) {
+ var v706,v707,v708,v709,v710,v711,v712,etype_2,evalue_2,key_3,v713,v714,v715;
var block = 0;
for(;;){
- switch(block){
- case 0:
- v724 = d_2;
- v725 = get_dict_len ( v724 );
- v726 = ll_newlist__List_String_LlT_Signed ( undefined,v725 );
- v727 = d_2;
- v728 = dict_items_iterator ( v727 );
- i_4 = 0;
- it_0 = v728;
- result_0 = v726;
- block = 1;
- break;
- case 1:
- v729 = it_0;
- v730 = v729.ll_go_next();
- v731 = v730;
- if (v731 == true)
+ switch(block){
+ case 0:
+ v707 = d_1;
+ v708 = (v707[key_2]!=undefined);
+ v709 = v708;
+ if (v709 == true)
{
- i_5 = i_4;
- it_1 = it_0;
- result_1 = result_0;
+ key_3 = key_2;
+ v713 = d_1;
block = 3;
break;
}
else{
- v723 = result_0;
- block = 2;
+ block = 1;
break;
}
+ case 1:
+ v710 = __consts_0.exceptions_KeyError;
+ v711 = v710.meta;
+ v712 = v710;
+ etype_2 = v711;
+ evalue_2 = v712;
+ block = 2;
+ break;
case 2:
- return ( v723 );
+ throw(evalue_2);
case 3:
- v732 = result_1;
- v733 = it_1;
- v734 = v733.ll_current_key();
- v732[i_5]=v734;
- it_2 = it_1;
- result_2 = result_1;
- v736 = i_5;
+ v714 = v713;
+ v715 = v714[key_3];
+ v706 = v715;
block = 4;
break;
case 4:
- v737 = (v736+1);
- i_4 = v737;
- it_0 = it_2;
- result_0 = result_2;
- block = 1;
- break;
+ return ( v706 );
}
}
}
-function create_text_elem (txt_2) {
- var v709,v710,v711,v712,v713,v714,v715,v716,v717,v718;
+function ll_newlist__List_String_LlT_Signed (LIST_2,length_2) {
+ var v749,v750,v751,v752;
var block = 0;
for(;;){
switch(block){
case 0:
- v710 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v710.oenter_variant0(__consts_0.const_str__28,__consts_0.const_str__2,__consts_0.const_str__27,15);
- undefined;
- v713 = document;
- v714 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v714.oleave_variant0(__consts_0.const_str__28);
- undefined;
- v717 = v713;
- v718 = v717.createTextNode(txt_2);
- v709 = v718;
+ v750 = new Array();
+ v751 = v750;
+ v751.length = length_2;
+ v749 = v750;
block = 1;
break;
case 1:
- return ( v709 );
+ return ( v749 );
}
}
}
-function ll_listnext__Record_index__Signed__iterable_ (iter_2) {
- var v742,v743,v744,v745,v746,v747,v748,iter_3,index_5,l_10,v749,v750,v751,v752,v753,v754,v755,etype_3,evalue_3;
+function ll_listnext__Record_index__Signed__iterable (iter_4) {
+ var v774,v775,v776,v777,v778,v779,v780,iter_5,index_6,l_14,v781,v782,v783,v784,v785,v786,v787,etype_4,evalue_4;
var block = 0;
for(;;){
switch(block){
case 0:
- v743 = iter_2.iterable;
- v744 = iter_2.index;
- v745 = v743;
- v746 = v745.length;
- v747 = (v744>=v746);
- v748 = v747;
- if (v748 == true)
+ v775 = iter_4.iterable;
+ v776 = iter_4.index;
+ v777 = v775;
+ v778 = v777.length;
+ v779 = (v776>=v778);
+ v780 = v779;
+ if (v780 == true)
{
block = 3;
break;
}
else{
- iter_3 = iter_2;
- index_5 = v744;
- l_10 = v743;
+ iter_5 = iter_4;
+ index_6 = v776;
+ l_14 = v775;
block = 1;
break;
}
case 1:
- v749 = (index_5+1);
- iter_3.index = v749;
- v751 = l_10;
- v752 = v751[index_5];
- v742 = v752;
+ v781 = (index_6+1);
+ iter_5.index = v781;
+ v783 = l_14;
+ v784 = v783[index_6];
+ v774 = v784;
block = 2;
break;
case 2:
- return ( v742 );
+ return ( v774 );
case 3:
- v753 = __consts_0.exceptions_StopIteration;
- v754 = v753.meta;
- v755 = v753;
- etype_3 = v754;
- evalue_3 = v755;
+ v785 = __consts_0.exceptions_StopIteration;
+ v786 = v785.meta;
+ v787 = v785;
+ etype_4 = v786;
+ evalue_4 = v787;
block = 4;
break;
case 4:
- throw(evalue_3);
- }
- }
-}
-
-function ll_len__List_ExternalType_ (l_9) {
- var v696,v697,v698;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v697 = l_9;
- v698 = v697.length;
- v696 = v698;
- block = 1;
- break;
- case 1:
- return ( v696 );
+ throw(evalue_4);
}
}
}
-function ll_dict_getitem__Dict_String__String__String (d_1,key_2) {
- var v676,v677,v678,v679,v680,v681,v682,etype_2,evalue_2,key_3,v683,v684,v685;
+function ll_listnext__Record_index__Signed__iterable_ (iter_2) {
+ var v735,v736,v737,v738,v739,v740,v741,iter_3,index_5,l_10,v742,v743,v744,v745,v746,v747,v748,etype_3,evalue_3;
var block = 0;
for(;;){
switch(block){
case 0:
- v677 = d_1;
- v678 = (v677[key_2]!=undefined);
- v679 = v678;
- if (v679 == true)
+ v736 = iter_2.iterable;
+ v737 = iter_2.index;
+ v738 = v736;
+ v739 = v738.length;
+ v740 = (v737>=v739);
+ v741 = v740;
+ if (v741 == true)
{
- key_3 = key_2;
- v683 = d_1;
block = 3;
break;
}
else{
+ iter_3 = iter_2;
+ index_5 = v737;
+ l_10 = v736;
block = 1;
break;
}
case 1:
- v680 = __consts_0.exceptions_KeyError;
- v681 = v680.meta;
- v682 = v680;
- etype_2 = v681;
- evalue_2 = v682;
+ v742 = (index_5+1);
+ iter_3.index = v742;
+ v744 = l_10;
+ v745 = v744[index_5];
+ v735 = v745;
block = 2;
break;
case 2:
- throw(evalue_2);
+ return ( v735 );
case 3:
- v684 = v683;
- v685 = v684[key_3];
- v676 = v685;
+ v746 = __consts_0.exceptions_StopIteration;
+ v747 = v746.meta;
+ v748 = v746;
+ etype_3 = v747;
+ evalue_3 = v748;
block = 4;
break;
case 4:
- return ( v676 );
+ throw(evalue_3);
}
}
}
-function ll_newlist__List_Record_item2__String__ite_Signed_ (LIST_0,length_1) {
- var v719,v720,v721,v722;
+function ll_listiter__Record_index__Signed__iterable_List_S (ITER_1,lst_1) {
+ var v731,v732,v733,v734;
var block = 0;
for(;;){
switch(block){
case 0:
- v720 = new Array();
- v721 = v720;
- v721.length = length_1;
- v719 = v720;
+ v732 = new Object();
+ v732.iterable = lst_1;
+ v732.index = 0;
+ v731 = v732;
block = 1;
break;
case 1:
- return ( v719 );
+ return ( v731 );
}
}
}
-function exceptions_StopIteration () {
+function ll_len__List_Dict_String__String__ (l_11) {
+ var v753,v754,v755;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v754 = l_11;
+ v755 = v754.length;
+ v753 = v755;
+ block = 1;
+ break;
+ case 1:
+ return ( v753 );
+ }
+ }
}
-exceptions_StopIteration.prototype.toString = function (){
- return ( '' );
+function ll_listslice_startonly__List_Dict_String__String__ (RESLIST_3,l1_7,start_3) {
+ var v756,v757,v758,v759,v760,v761,l1_8,i_6,j_4,l_12,len1_2,v762,v763,l1_9,i_7,j_5,l_13,len1_3,v764,v765,v766,v767,v768,v769;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v757 = l1_7;
+ v758 = v757.length;
+ v759 = (v758-start_3);
+ undefined;
+ v761 = ll_newlist__List_Dict_String__String__LlT_Signed ( undefined,v759 );
+ l1_8 = l1_7;
+ i_6 = start_3;
+ j_4 = 0;
+ l_12 = v761;
+ len1_2 = v758;
+ block = 1;
+ break;
+ case 1:
+ v762 = (i_6' );
+}
+
+inherits(py____test_rsession_webjs_Pending,Object);
function ll_listiter__Record_index__Signed__iterable_List_D (ITER_2,lst_2) {
- var v773,v774,v775,v776;
+ var v770,v771,v772,v773;
var block = 0;
for(;;){
switch(block){
case 0:
- v774 = new Object();
- v774.iterable = lst_2;
- v774.index = 0;
- v773 = v774;
+ v771 = new Object();
+ v771.iterable = lst_2;
+ v771.index = 0;
+ v770 = v771;
block = 1;
break;
case 1:
- return ( v773 );
+ return ( v770 );
}
}
}
-function ll_listiter__Record_index__Signed__iterable_List_S (ITER_1,lst_1) {
- var v738,v739,v740,v741;
+function ll_append__List_Dict_String__String___Dict_String_ (l_15,newitem_1) {
+ var v1057,v1058,v1059,v1060,v1061,v1062,v1063,v1064;
var block = 0;
for(;;){
switch(block){
case 0:
- v739 = new Object();
- v739.iterable = lst_1;
- v739.index = 0;
- v738 = v739;
+ v1058 = l_15;
+ v1059 = v1058.length;
+ v1060 = l_15;
+ v1061 = (v1059+1);
+ v1060.length = v1061;
+ v1063 = l_15;
+ v1063[v1059]=newitem_1;
block = 1;
break;
case 1:
- return ( v738 );
+ return ( v1057 );
}
}
}
-function fail_come_back (msg_34) {
- var v1070,v1071,v1072,v1073,v1074,v1075,v1076,v1077,v1078,v1079;
+function skip_come_back (msg_35) {
+ var v1075,v1076,v1077,v1078;
var block = 0;
for(;;){
switch(block){
case 0:
- v1071 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__98 );
- v1072 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__99 );
- v1073 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__100 );
- v1074 = new Object();
- v1074.item0 = v1071;
- v1074.item1 = v1072;
- v1074.item2 = v1073;
- v1078 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__101 );
- __consts_0.const_tuple[v1078]=v1074;
+ v1076 = ll_dict_getitem__Dict_String__String__String ( msg_35,__consts_0.const_str__98 );
+ v1077 = ll_dict_getitem__Dict_String__String__String ( msg_35,__consts_0.const_str__99 );
+ __consts_0.const_tuple[v1077]=v1076;
block = 1;
break;
case 1:
- return ( v1070 );
+ return ( v1075 );
}
}
}
-function py____test_rsession_webjs_Pending () {
-}
-
-py____test_rsession_webjs_Pending.prototype.toString = function (){
- return ( '' );
-}
-
-inherits(py____test_rsession_webjs_Pending,Object);
-function ll_listslice_startonly__List_Dict_String__String__ (RESLIST_3,l1_7,start_3) {
- var v759,v760,v761,v762,v763,v764,l1_8,i_6,j_4,l_12,len1_2,v765,v766,l1_9,i_7,j_5,l_13,len1_3,v767,v768,v769,v770,v771,v772;
+function fail_come_back (msg_34) {
+ var v1065,v1066,v1067,v1068,v1069,v1070,v1071,v1072,v1073,v1074;
var block = 0;
for(;;){
switch(block){
case 0:
- v760 = l1_7;
- v761 = v760.length;
- v762 = (v761-start_3);
- undefined;
- v764 = ll_newlist__List_Dict_String__String__LlT_Signed ( undefined,v762 );
- l1_8 = l1_7;
- i_6 = start_3;
- j_4 = 0;
- l_12 = v764;
- len1_2 = v761;
+ v1066 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__100 );
+ v1067 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__101 );
+ v1068 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__102 );
+ v1069 = new Object();
+ v1069.item0 = v1066;
+ v1069.item1 = v1067;
+ v1069.item2 = v1068;
+ v1073 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__99 );
+ __consts_0.const_tuple__43[v1073]=v1069;
block = 1;
break;
case 1:
- v765 = (i_6=base_15);
- v1145 = v1144;
- if (v1145 == true)
+ v1139 = (digit_0>=base_15);
+ v1140 = v1139;
+ if (v1140 == true)
{
s_12 = s_21;
val_1 = val_11;
@@ -4478,37 +4515,37 @@
digit_1 = digit_0;
sign_12 = sign_11;
strlen_15 = strlen_14;
- v1146 = val_11;
+ v1141 = val_11;
block = 26;
break;
}
case 26:
- v1147 = (v1146*base_16);
- v1148 = (v1147+digit_1);
- v1149 = (i_22+1);
+ v1142 = (v1141*base_16);
+ v1143 = (v1142+digit_1);
+ v1144 = (i_22+1);
s_11 = s_22;
base_8 = base_16;
- val_0 = v1148;
- i_12 = v1149;
+ val_0 = v1143;
+ i_12 = v1144;
sign_0 = sign_12;
strlen_4 = strlen_15;
block = 11;
break;
case 27:
- v1150 = (c_6<=90);
+ v1145 = (c_5<=90);
s_24 = s_23;
base_18 = base_17;
- c_7 = c_6;
+ c_6 = c_5;
val_13 = val_12;
i_24 = i_23;
sign_14 = sign_13;
strlen_17 = strlen_16;
- v1151 = v1150;
+ v1146 = v1145;
block = 28;
break;
case 28:
- v1152 = v1151;
- if (v1152 == true)
+ v1147 = v1146;
+ if (v1147 == true)
{
s_25 = s_24;
base_19 = base_18;
@@ -4516,14 +4553,14 @@
i_25 = i_24;
sign_15 = sign_14;
strlen_18 = strlen_17;
- v1153 = c_7;
+ v1148 = c_6;
block = 29;
break;
}
else{
s_17 = s_24;
base_11 = base_18;
- c_3 = c_7;
+ c_2 = c_6;
val_7 = val_13;
i_17 = i_24;
sign_7 = sign_14;
@@ -4532,32 +4569,32 @@
break;
}
case 29:
- v1154 = (v1153-65);
- v1155 = (v1154+10);
+ v1149 = (v1148-65);
+ v1150 = (v1149+10);
s_21 = s_25;
base_15 = base_19;
val_11 = val_14;
i_21 = i_25;
- digit_0 = v1155;
+ digit_0 = v1150;
sign_11 = sign_15;
strlen_14 = strlen_18;
block = 25;
break;
case 30:
- v1156 = (c_8<=122);
+ v1151 = (c_7<=122);
s_27 = s_26;
base_21 = base_20;
- c_9 = c_8;
+ c_8 = c_7;
val_16 = val_15;
i_27 = i_26;
sign_17 = sign_16;
strlen_20 = strlen_19;
- v1157 = v1156;
+ v1152 = v1151;
block = 31;
break;
case 31:
- v1158 = v1157;
- if (v1158 == true)
+ v1153 = v1152;
+ if (v1153 == true)
{
s_28 = s_27;
base_22 = base_21;
@@ -4565,14 +4602,14 @@
i_28 = i_27;
sign_18 = sign_17;
strlen_21 = strlen_20;
- v1159 = c_9;
+ v1154 = c_8;
block = 32;
break;
}
else{
s_16 = s_27;
base_10 = base_21;
- c_2 = c_9;
+ c_1 = c_8;
val_6 = val_16;
i_16 = i_27;
sign_6 = sign_17;
@@ -4581,48 +4618,48 @@
break;
}
case 32:
- v1160 = (v1159-97);
- v1161 = (v1160+10);
+ v1155 = (v1154-97);
+ v1156 = (v1155+10);
s_21 = s_28;
base_15 = base_22;
val_11 = val_17;
i_21 = i_28;
- digit_0 = v1161;
+ digit_0 = v1156;
sign_11 = sign_18;
strlen_14 = strlen_21;
block = 25;
break;
case 33:
- v1163 = (v1162+1);
+ v1158 = (v1157+1);
s_11 = s_29;
base_8 = base_23;
val_0 = 0;
- i_12 = v1163;
+ i_12 = v1158;
sign_0 = 1;
strlen_4 = strlen_22;
block = 11;
break;
case 34:
- v1165 = (v1164+1);
+ v1160 = (v1159+1);
s_11 = s_30;
base_8 = base_24;
val_0 = 0;
- i_12 = v1165;
+ i_12 = v1160;
sign_0 = -1;
strlen_4 = strlen_23;
block = 11;
break;
case 35:
- v1166 = s_31;
- v1167 = v1166[i_29];
- v1168 = (v1167==' ');
- v1169 = v1168;
- if (v1169 == true)
+ v1161 = s_31;
+ v1162 = v1161[i_29];
+ v1163 = (v1162==' ');
+ v1164 = v1163;
+ if (v1164 == true)
{
s_32 = s_31;
base_26 = base_25;
strlen_25 = strlen_24;
- v1170 = i_29;
+ v1165 = i_29;
block = 36;
break;
}
@@ -4635,10 +4672,10 @@
break;
}
case 36:
- v1171 = (v1170+1);
+ v1166 = (v1165+1);
s_7 = s_32;
base_4 = base_26;
- i_8 = v1171;
+ i_8 = v1166;
strlen_0 = strlen_25;
block = 6;
break;
@@ -4646,62 +4683,6 @@
}
}
-function ll_append__List_Dict_String__String___Dict_String_ (l_15,newitem_1) {
- var v1062,v1063,v1064,v1065,v1066,v1067,v1068,v1069;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v1063 = l_15;
- v1064 = v1063.length;
- v1065 = l_15;
- v1066 = (v1064+1);
- v1065.length = v1066;
- v1068 = l_15;
- v1068[v1064]=newitem_1;
- block = 1;
- break;
- case 1:
- return ( v1062 );
- }
- }
-}
-
-function ll_newlist__List_String_LlT_Signed (LIST_2,length_2) {
- var v1058,v1059,v1060,v1061;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v1059 = new Array();
- v1060 = v1059;
- v1060.length = length_2;
- v1058 = v1059;
- block = 1;
- break;
- case 1:
- return ( v1058 );
- }
- }
-}
-
-function skip_come_back (msg_35) {
- var v1080,v1081,v1082,v1083;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v1081 = ll_dict_getitem__Dict_String__String__String ( msg_35,__consts_0.const_str__103 );
- v1082 = ll_dict_getitem__Dict_String__String__String ( msg_35,__consts_0.const_str__101 );
- __consts_0.const_tuple__35[v1082]=v1081;
- block = 1;
- break;
- case 1:
- return ( v1080 );
- }
- }
-}
-
function exceptions_ValueError () {
}
@@ -4710,146 +4691,130 @@
}
inherits(exceptions_ValueError,exceptions_StandardError);
-function ll_newlist__List_Dict_String__String__LlT_Signed (self_10,length_3) {
- var v1172,v1173;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v1173 = ll_newlist__List_Dict_String__String__LlT_Signed_ ( undefined,length_3 );
- v1172 = v1173;
- block = 1;
- break;
- case 1:
- return ( v1172 );
- }
- }
-}
-
function ll_newlist__List_Dict_String__String__LlT_Signed_ (LIST_3,length_4) {
- var v1174,v1175,v1176,v1177;
+ var v1167,v1168,v1169,v1170;
var block = 0;
for(;;){
switch(block){
case 0:
- v1175 = new Array();
- v1176 = v1175;
- v1176.length = length_4;
- v1174 = v1175;
+ v1168 = new Array();
+ v1169 = v1168;
+ v1169.length = length_4;
+ v1167 = v1168;
block = 1;
break;
case 1:
- return ( v1174 );
+ return ( v1167 );
}
}
}
__consts_0 = {};
__consts_0.const_str__82 = "javascript:show_skip('";
-__consts_0.const_str__64 = '(v6)';
-__consts_0.const_str__41 = "('pre')";
+__consts_0.const_str__28 = "('pre')";
__consts_0.const_str__90 = 'Module';
-__consts_0.const_list = [];
__consts_0.const_str__76 = 'a';
__consts_0.const_str__51 = '#ff0000';
__consts_0.const_str__11 = 'hide_info';
__consts_0.const_str__75 = "('a')";
__consts_0.const_str__62 = 'ReceivedItemOutcome';
__consts_0.const_str__66 = "show_info('";
-__consts_0.exceptions_StopIteration = new exceptions_StopIteration();
-__consts_0.const_str__37 = 'get_elem';
+__consts_0.const_str__24 = 'get_elem';
__consts_0.const_str__70 = 'hide_info()';
-__consts_0.const_str__7 = '(v1)';
+__consts_0.const_str__14 = 'get_document';
__consts_0.const_str__12 = 'entrypoint';
__consts_0.ExportedMethods = new ExportedMethods();
__consts_0.const_str__94 = 'length';
-__consts_0.exceptions_ValueError = new exceptions_ValueError();
__consts_0.const_str__58 = 'main_table';
__consts_0.const_str__81 = 'some error';
__consts_0.const_str__67 = "')";
__consts_0.const_str__79 = "('F')";
__consts_0.const_str__54 = 'process';
-__consts_0.const_str__99 = 'stdout';
-__consts_0.const_str__8 = 'aa';
-__consts_0.const_tuple__35 = {};
+__consts_0.const_str__101 = 'stdout';
+__consts_0.const_str__4 = 'aa';
+__consts_0.const_tuple__43 = {};
__consts_0.const_str__61 = 'HostReady';
-__consts_0.const_str__5 = '(v0)';
-__consts_0.const_str__31 = 'info';
+__consts_0.const_str__6 = '(v0)';
+__consts_0.const_str__16 = 'info';
+__consts_0.const_str__64 = '(v7)';
+__consts_0.const_str__47 = '(item_name_1, v9)';
__consts_0.const_str__50 = 'td';
-__consts_0.const_str__26 = '(item_name_1, v9)';
-__consts_0.const_list__105 = [];
-__consts_0.const_str__14 = 'debug_div';
+__consts_0.exceptions_StopIteration = new exceptions_StopIteration();
+__consts_0.const_str__33 = 'debug_div';
__consts_0.const_str__80 = 'F';
__consts_0.const_str__69 = 'onmouseout';
__consts_0.const_str__49 = "('td')";
__consts_0.const_str__59 = 'type';
-__consts_0.const_str__40 = 'create_elem';
+__consts_0.const_str__27 = 'create_elem';
__consts_0.const_str__71 = 'passed';
__consts_0.const_str__86 = '.';
+__consts_0.const_list__105 = [];
+__consts_0.pypy_translator_transformer_debug_TracebackHandler = new pypy_translator_transformer_debug_TracebackHandler();
+__consts_0.pypy_translator_transformer_debug_TracebackHandler.otb = __consts_0.const_list__105;
__consts_0.const_str__96 = ']';
__consts_0.const_str__9 = 'show_info';
__consts_0.const_str__52 = '(v3)';
-__consts_0.const_str__27 = '/home/fijal/lang/python/pypy-dist/py/test/rsession/webjs.py';
-__consts_0.const_str__39 = 'messagebox';
+__consts_0.const_str__15 = '/home/fijal/lang/python/pypy-dist/py/test/rsession/webjs.py';
+__consts_0.const_str__26 = 'messagebox';
__consts_0.const_str__65 = 'fullitemname';
-__consts_0.const_str__25 = 'set_msgbox';
+__consts_0.const_str__22 = 'set_msgbox';
__consts_0.const_str__78 = 'href';
-__consts_0.const_str__44 = 'visible';
-__consts_0.const_str__45 = '(v10)';
+__consts_0.const_str__17 = 'visible';
+__consts_0.const_str__19 = '(v10)';
__consts_0.const_str__48 = 'hostrow';
-__consts_0.const_str__20 = '\n';
-__consts_0.const_str__92 = 'tr';
-__consts_0.const_str__15 = 'pre';
-__consts_0.const_str__23 = '\n======== Stdout: ========\n';
+__consts_0.const_list = [];
+__consts_0.py____test_rsession_webjs_Pending = new py____test_rsession_webjs_Pending();
+__consts_0.py____test_rsession_webjs_Pending.opending = __consts_0.const_list;
+__consts_0.const_str__30 = '\n';
+__consts_0.const_str__29 = 'pre';
+__consts_0.const_str__45 = '\n======== Stdout: ========\n';
__consts_0.const_str__88 = '#00ff00';
-__consts_0.const_str__46 = 'beige';
+__consts_0.const_str__20 = 'beige';
__consts_0.const_str__84 = 's';
-__consts_0.const_str__98 = 'traceback';
-__consts_0.const_str__6 = 'show_traceback';
+__consts_0.const_str__100 = 'traceback';
+__consts_0.const_str__7 = 'show_traceback';
__consts_0.const_str__10 = '(v2)';
__consts_0.const_str__57 = 'testmain';
-__consts_0.const_str__38 = "('messagebox')";
-__consts_0.const_str__4 = 'show_skip';
+__consts_0.const_str__25 = "('messagebox')";
+__consts_0.const_str__5 = 'show_skip';
__consts_0.const_str__95 = '[';
-__consts_0.const_str__29 = '/home/fijal/lang/python/pypy-dist/pypy/translator/js/helper.py';
-__consts_0.const_str__103 = 'reason';
+__consts_0.const_str__39 = '/home/fijal/lang/python/pypy-dist/pypy/translator/js/helper.py';
+__consts_0.const_str__98 = 'reason';
__consts_0.const_str__77 = "javascript:show_traceback('";
-__consts_0.const_str__43 = '(v11)';
-__consts_0.const_str__97 = '(v7)';
+__consts_0.const_str__31 = '(v11)';
+__consts_0.const_str__23 = '(item_name_0, v6)';
__consts_0.const_str__74 = 'None';
__consts_0.const_str__72 = 'True';
__consts_0.const_str__56 = '(v5)';
+__consts_0.const_tuple = {};
__consts_0.const_str__89 = 'itemtype';
__consts_0.const_str__87 = 'hostkey';
+__consts_0.const_str__97 = '(v8)';
__consts_0.const_str__60 = 'ItemStart';
__consts_0.const_str__93 = 'itemname';
__consts_0.const_str__91 = "('tr')";
__consts_0.const_str__85 = "('.')";
-__consts_0.const_str__24 = '\n========== Stderr: ==========\n';
-__consts_0.pypy_translator_transformer_debug_TracebackHandler = new pypy_translator_transformer_debug_TracebackHandler();
-__consts_0.pypy_translator_transformer_debug_TracebackHandler.otb = __consts_0.const_list__105;
-__consts_0.const_str__30 = 'div';
+__consts_0.const_str__46 = '\n========== Stderr: ==========\n';
+__consts_0.exceptions_ValueError = new exceptions_ValueError();
+__consts_0.const_str__40 = 'div';
__consts_0.const_str__55 = '(v4)';
-__consts_0.const_str__100 = 'stderr';
-__consts_0.const_str__36 = '(item_name_0, v8)';
-__consts_0.const_str__42 = 'create_text_elem';
+__consts_0.const_str__102 = 'stderr';
+__consts_0.const_str__18 = 'create_text_elem';
__consts_0.const_str__83 = "('s')";
-__consts_0.const_str__28 = 'get_document';
+__consts_0.const_str__8 = '(v1)';
__consts_0.const_str__3 = '';
-__consts_0.const_str__16 = '#FF0000';
+__consts_0.const_str__34 = '#FF0000';
__consts_0.const_str__68 = 'onmouseover';
__consts_0.const_str__2 = '()';
-__consts_0.py____test_rsession_webjs_Pending = new py____test_rsession_webjs_Pending();
-__consts_0.py____test_rsession_webjs_Pending.opending = __consts_0.const_list;
+__consts_0.exceptions_KeyError = new exceptions_KeyError();
__consts_0.const_str__63 = 'fullmodulename';
__consts_0.const_str__73 = 'skipped';
-__consts_0.const_str__18 = ' ';
-__consts_0.const_tuple = {};
+__consts_0.const_str__36 = ' ';
__consts_0.const_str = 'main';
__consts_0.const_str__32 = 'hidden';
-__consts_0.const_str__22 = '====== Traceback: =========\n';
-__consts_0.exceptions_KeyError = new exceptions_KeyError();
-__consts_0.const_str__101 = 'item_name';
-__consts_0.const_str__17 = ' ';
-__consts_0.const_str__19 = ': ';
+__consts_0.const_str__44 = '====== Traceback: =========\n';
+__consts_0.const_str__92 = 'tr';
+__consts_0.const_str__99 = 'item_name';
+__consts_0.const_str__35 = ' ';
+__consts_0.const_str__37 = ': ';
__consts_0.const_str__13 = '';
Modified: py/dist/py/test/rsession/webjs.py
==============================================================================
--- py/dist/py/test/rsession/webjs.py (original)
+++ py/dist/py/test/rsession/webjs.py Tue Sep 12 11:25:36 2006
@@ -104,7 +104,7 @@
dom.get_document().getElementById("testmain").innerHTML += "some error"
return True
-def show_skip(item_name="a"):
+def show_skip(item_name="aa"):
set_msgbox(item_name, skips[item_name])
def set_msgbox(item_name, data):
@@ -116,7 +116,7 @@
pre.appendChild(txt)
msgbox.appendChild(pre)
-def show_traceback(item_name="a"):
+def show_traceback(item_name="aa"):
data = "====== Traceback: =========\n%s\n======== Stdout: ========\n%s\n"\
"========== Stderr: ==========\n%s\n" % tracebacks[item_name]
set_msgbox(item_name, data)
From fijal at codespeak.net Tue Sep 12 11:43:01 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Tue, 12 Sep 2006 11:43:01 +0200 (CEST)
Subject: [py-svn] r32201 - in py/dist/py/test/rsession: . testing
Message-ID: <20060912094301.0907610079@code0.codespeak.net>
Author: fijal
Date: Tue Sep 12 11:42:58 2006
New Revision: 32201
Added:
py/dist/py/test/rsession/testing/test_web.py (contents, props changed)
Modified:
py/dist/py/test/rsession/web.py
Log:
Added a test for javascript generation.
Added: py/dist/py/test/rsession/testing/test_web.py
==============================================================================
--- (empty file)
+++ py/dist/py/test/rsession/testing/test_web.py Tue Sep 12 11:42:58 2006
@@ -0,0 +1,20 @@
+
+""" webtest
+"""
+
+import py
+
+try:
+ from pypy.translator.js.main import rpython2javascript, Options
+ from pypy.translator.js import commproxy
+
+ commproxy.USE_MOCHIKIT = False
+ Options.debug_transform = True
+except ImportError:
+ py.test.skip("No PyPy detected")
+
+def test_js_generate():
+ from py.__.test.rsession import webjs
+ from py.__.test.rsession.web import FUNCTION_LIST
+
+ source = rpython2javascript(webjs, FUNCTION_LIST, Options)
Modified: py/dist/py/test/rsession/web.py
==============================================================================
--- py/dist/py/test/rsession/web.py (original)
+++ py/dist/py/test/rsession/web.py Tue Sep 12 11:42:58 2006
@@ -20,6 +20,7 @@
DATADIR = py.path.local(__file__).dirpath("webdata")
+FUNCTION_LIST = ["main", "show_skip", "show_traceback", "show_info", "hide_info"]
def escape(s):
return s
@@ -254,7 +255,7 @@
from py.__.test.rsession import webjs
javascript_source = rpython2javascript(webjs,
- ["main", "show_skip", "show_traceback", "show_info", "hide_info"], Options)
+ FUNCTION_LIST, Options)
open(str(js_name), "w").write(javascript_source)
self.serve_data("text/javascript", javascript_source)
else:
From cfbolz at codespeak.net Tue Sep 12 11:43:22 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Tue, 12 Sep 2006 11:43:22 +0200 (CEST)
Subject: [py-svn] r32202 - in py/dist/py/path/local/testing: . data
data/pkg1 data/pkg1/subdir
Message-ID: <20060912094322.69A6A10079@code0.codespeak.net>
Author: cfbolz
Date: Tue Sep 12 11:43:20 2006
New Revision: 32202
Added:
py/dist/py/path/local/testing/data/
py/dist/py/path/local/testing/data/pkg1/
py/dist/py/path/local/testing/data/pkg1/__init__.py
py/dist/py/path/local/testing/data/pkg1/subdir/
py/dist/py/path/local/testing/data/pkg1/subdir/__init__.py
Modified:
py/dist/py/path/local/testing/test_local.py
Log:
a small test for the pypkgpath method on local objects
Added: py/dist/py/path/local/testing/data/pkg1/__init__.py
==============================================================================
--- (empty file)
+++ py/dist/py/path/local/testing/data/pkg1/__init__.py Tue Sep 12 11:43:20 2006
@@ -0,0 +1 @@
+# test package
Added: py/dist/py/path/local/testing/data/pkg1/subdir/__init__.py
==============================================================================
Modified: py/dist/py/path/local/testing/test_local.py
==============================================================================
--- py/dist/py/path/local/testing/test_local.py (original)
+++ py/dist/py/path/local/testing/test_local.py Tue Sep 12 11:43:20 2006
@@ -2,6 +2,8 @@
from py.path import local, checker
from py.__.path.testing.fscommon import CommonFSTests, setuptestfs
+datadir = py.magic.autopath().dirpath().join('data')
+
class LocalSetup:
def setup_class(cls):
cls.root = py.test.ensuretemp('TestLocalPath')
@@ -310,6 +312,11 @@
from xxxpackage import module1
assert module1 is mod1
+def test_pypgkdir():
+ pkg = datadir.join('pkg1')
+ assert pkg.pypkgpath() == pkg
+ assert pkg.join('subdir', '__init__.py').pypkgpath() == pkg
+
#class XTestLocalPath(TestLocalPath):
# def __init__(self):
# TestLocalPath.__init__(self)
From briandorsey at codespeak.net Tue Sep 12 12:13:03 2006
From: briandorsey at codespeak.net (briandorsey at codespeak.net)
Date: Tue, 12 Sep 2006 12:13:03 +0200 (CEST)
Subject: [py-svn] r32204 - py/dist/py/compat
Message-ID: <20060912101303.2FFC410079@code0.codespeak.net>
Author: briandorsey
Date: Tue Sep 12 12:13:01 2006
New Revision: 32204
Modified:
py/dist/py/compat/subprocess.py
Log:
Dynamically fall back to using pywin32 when _subprocess is not available on Windows. This was disabled in CPython 2.4. Windows Python 2.2 and 2.3 users will need to install pywin32 in order for py.compat.subprocess or py.path.local.sysexec() to work.
Modified: py/dist/py/compat/subprocess.py
==============================================================================
--- py/dist/py/compat/subprocess.py (original)
+++ py/dist/py/compat/subprocess.py Tue Sep 12 12:13:01 2006
@@ -1,3 +1,6 @@
+# Copied from CPython 2.4 with one modification to dynamically
+# fall back to pywin32 code when _subprocess is not available.
+
# subprocess - Subprocesses with accessible I/O streams
#
# For more information about this module, see PEP 324.
@@ -366,7 +369,16 @@
if mswindows:
import threading
import msvcrt
- if 0: # <-- change this to use pywin32 instead of the _subprocess driver
+ try:
+ from _subprocess import *
+ class STARTUPINFO:
+ dwFlags = 0
+ hStdInput = None
+ hStdOutput = None
+ hStdError = None
+ class pywintypes:
+ error = IOError
+ except ImportError:
import pywintypes
from win32api import GetStdHandle, STD_INPUT_HANDLE, \
STD_OUTPUT_HANDLE, STD_ERROR_HANDLE
@@ -378,15 +390,6 @@
GetExitCodeProcess, STARTF_USESTDHANDLES, \
STARTF_USESHOWWINDOW, CREATE_NEW_CONSOLE
from win32event import WaitForSingleObject, INFINITE, WAIT_OBJECT_0
- else:
- from _subprocess import *
- class STARTUPINFO:
- dwFlags = 0
- hStdInput = None
- hStdOutput = None
- hStdError = None
- class pywintypes:
- error = IOError
else:
import select
import errno
From briandorsey at codespeak.net Tue Sep 12 12:15:45 2006
From: briandorsey at codespeak.net (briandorsey at codespeak.net)
Date: Tue, 12 Sep 2006 12:15:45 +0200 (CEST)
Subject: [py-svn] r32205 - in py/dist/py/path/local: . popen5
Message-ID: <20060912101545.7641E10079@code0.codespeak.net>
Author: briandorsey
Date: Tue Sep 12 12:15:44 2006
New Revision: 32205
Removed:
py/dist/py/path/local/popen5/
Modified:
py/dist/py/path/local/local.py
Log:
py.path.local.sysexec() no uses py.compat.subprocess instead of a local copy of subprocess.
Modified: py/dist/py/path/local/local.py
==============================================================================
--- py/dist/py/path/local/local.py (original)
+++ py/dist/py/path/local/local.py Tue Sep 12 12:15:44 2006
@@ -456,7 +456,7 @@
to be executed. Note that this process is directly
invoked and not through a system shell.
"""
- from py.__.path.local.popen5.subprocess import Popen, PIPE
+ from py.compat.subprocess import Popen, PIPE
argv = map(str, argv)
proc = Popen([str(self)] + list(argv), stdout=PIPE, stderr=PIPE)
stdout, stderr = proc.communicate()
From fijal at codespeak.net Tue Sep 12 12:56:43 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Tue, 12 Sep 2006 12:56:43 +0200 (CEST)
Subject: [py-svn] r32208 - in py/dist/py/test/rsession: . webdata
Message-ID: <20060912105643.1401A1007B@code0.codespeak.net>
Author: fijal
Date: Tue Sep 12 12:56:40 2006
New Revision: 32208
Modified:
py/dist/py/test/rsession/web.py
py/dist/py/test/rsession/webdata/source.js
py/dist/py/test/rsession/webjs.py
Log:
Small fix.
Modified: py/dist/py/test/rsession/web.py
==============================================================================
--- py/dist/py/test/rsession/web.py (original)
+++ py/dist/py/test/rsession/web.py Tue Sep 12 12:56:40 2006
@@ -98,7 +98,10 @@
d = {'fullitemname': fullitemname, 'itemtype':itemtype,
'itemname':itemname}
if itemtype == 'Module':
- d['length'] = str(len(event.item.buildname2items()))
+ try:
+ d['length'] = str(len(event.item.buildname2items()))
+ except:
+ d['length'] = "?"
return d
event = self.pending_events.get()
Modified: py/dist/py/test/rsession/webdata/source.js
==============================================================================
--- py/dist/py/test/rsession/webdata/source.js (original)
+++ py/dist/py/test/rsession/webdata/source.js Tue Sep 12 12:56:40 2006
@@ -358,30 +358,28 @@
}
}
-function show_info (data_0) {
- var v176,v177,data_1,v178,v179,last_exception_24,last_exc_value_48,data_2,v180,v181,v182,last_exception_25,last_exc_value_49,data_3,v183,v184,v185,v186,last_exception_26,last_exc_value_50,data_4,v187,v188,v189,v190,v191,last_exception_27,last_exc_value_51,data_5,v192,v193,v194,v195,v196,v197,last_exception_28,last_exc_value_52,v198,v199,last_exception_29,last_exc_value_53,v200,v201,v202,last_exception_30,last_exc_value_54,v203,v204,v205,last_exception_31,last_exc_value_55,last_exc_value_56,v206,e_3,v207,v208,v209,v210,v211,last_exc_value_57,v212,last_exc_value_58,v213,last_exc_value_59,v214,last_exc_value_60,v215,last_exc_value_61,v216,last_exc_value_62,v217,last_exc_value_63,v218;
+function main () {
+ var v48,v49,v50,v51,last_exception_0,last_exc_value_0,v52,v53,v54,last_exception_1,last_exc_value_1,v55,v56,v57,v58,last_exception_2,last_exc_value_2,v59,v60,v61,v62,v63,last_exception_3,last_exc_value_3,v64,v65,v66,v67,v68,v69,last_exception_4,last_exc_value_4,v70,last_exception_5,last_exc_value_5,v71,v72,v73,last_exception_6,last_exc_value_6,v74,v75,v76,last_exception_7,last_exc_value_7,last_exc_value_8,v77,e_0,v78,v79,v80,v81,v82,last_exc_value_9,v83,last_exc_value_10,v84,last_exc_value_11,v85,last_exc_value_12,v86,last_exc_value_13,v87,last_exc_value_14,v88,last_exc_value_15,v89;
var block = 0;
for(;;){
switch(block){
case 0:
- v177 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- data_1 = data_0;
- v178 = v177;
+ v49 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v50 = v49;
block = 1;
break;
case 1:
try {
- v179 = __consts_0.const_str__12;
- data_2 = data_1;
- v180 = v178;
- v181 = v179;
+ v51 = __consts_0.const_str__12;
+ v52 = v50;
+ v53 = v51;
block = 2;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_63 = exc;
+ last_exc_value_15 = exc;
block = 19;
break;
}
@@ -389,18 +387,17 @@
}
case 2:
try {
- v182 = __consts_0.const_str__2;
- data_3 = data_2;
- v183 = v180;
- v184 = v181;
- v185 = v182;
+ v54 = __consts_0.const_str__2;
+ v55 = v52;
+ v56 = v53;
+ v57 = v54;
block = 3;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_62 = exc;
+ last_exc_value_14 = exc;
block = 18;
break;
}
@@ -408,19 +405,18 @@
}
case 3:
try {
- v186 = __consts_0.const_str__13;
- data_4 = data_3;
- v187 = v183;
- v188 = v184;
- v189 = v185;
- v190 = v186;
+ v58 = __consts_0.const_str__13;
+ v59 = v55;
+ v60 = v56;
+ v61 = v57;
+ v62 = v58;
block = 4;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_61 = exc;
+ last_exc_value_13 = exc;
block = 17;
break;
}
@@ -428,20 +424,19 @@
}
case 4:
try {
- v191 = 0;
- data_5 = data_4;
- v192 = v187;
- v193 = v188;
- v194 = v189;
- v195 = v190;
- v196 = v191;
+ v63 = 0;
+ v64 = v59;
+ v65 = v60;
+ v66 = v61;
+ v67 = v62;
+ v68 = v63;
block = 5;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_60 = exc;
+ last_exc_value_12 = exc;
block = 16;
break;
}
@@ -449,15 +444,14 @@
}
case 5:
try {
- v192.oenter_variant0(v193,v194,v195,v196);
- v198 = data_5;
+ v64.oenter_variant0(v65,v66,v67,v68);
block = 6;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_59 = exc;
+ last_exc_value_11 = exc;
block = 15;
break;
}
@@ -465,36 +459,36 @@
}
case 6:
try {
- show_info_ ( v198 );
+ main_ ( );
block = 7;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_58 = exc;
+ last_exc_value_10 = exc;
block = 14;
break;
}
throw(exc);
}
case 7:
- v200 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v201 = v200;
+ v71 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v72 = v71;
block = 8;
break;
case 8:
try {
- v202 = __consts_0.const_str__12;
- v203 = v201;
- v204 = v202;
+ v73 = __consts_0.const_str__12;
+ v74 = v72;
+ v75 = v73;
block = 9;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_57 = exc;
+ last_exc_value_9 = exc;
block = 13;
break;
}
@@ -502,97 +496,243 @@
}
case 9:
try {
- v203.oleave_variant0(v204);
+ v74.oleave_variant0(v75);
block = 10;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_56 = exc;
+ last_exc_value_8 = exc;
block = 11;
break;
}
throw(exc);
}
case 10:
- return ( v176 );
+ return ( v48 );
case 11:
- v206 = last_exc_value_56;
- e_3 = v206;
+ v77 = last_exc_value_8;
+ e_0 = v77;
block = 12;
break;
case 12:
- v207 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
- v208 = 0;
- v209 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v207,v208 );
- v210 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_3 );
- __show_traceback ( v209,v210 );
+ v78 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
+ v79 = 0;
+ v80 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v78,v79 );
+ v81 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_0 );
+ __show_traceback ( v80,v81 );
block = 10;
break;
case 13:
- v212 = last_exc_value_57;
- e_3 = v212;
+ v83 = last_exc_value_9;
+ e_0 = v83;
block = 12;
break;
case 14:
- v213 = last_exc_value_58;
- e_3 = v213;
+ v84 = last_exc_value_10;
+ e_0 = v84;
block = 12;
break;
case 15:
- v214 = last_exc_value_59;
- e_3 = v214;
+ v85 = last_exc_value_11;
+ e_0 = v85;
block = 12;
break;
case 16:
- v215 = last_exc_value_60;
- e_3 = v215;
+ v86 = last_exc_value_12;
+ e_0 = v86;
block = 12;
break;
case 17:
- v216 = last_exc_value_61;
- e_3 = v216;
+ v87 = last_exc_value_13;
+ e_0 = v87;
block = 12;
break;
case 18:
- v217 = last_exc_value_62;
- e_3 = v217;
+ v88 = last_exc_value_14;
+ e_0 = v88;
block = 12;
break;
case 19:
- v218 = last_exc_value_63;
- e_3 = v218;
+ v89 = last_exc_value_15;
+ e_0 = v89;
block = 12;
break;
}
}
}
-function show_skip (item_name_2) {
- var v90,v91,item_name_3,v92,v93,last_exception_8,last_exc_value_16,item_name_4,v94,v95,v96,last_exception_9,last_exc_value_17,item_name_5,v97,v98,v99,v100,last_exception_10,last_exc_value_18,item_name_6,v101,v102,v103,v104,v105,last_exception_11,last_exc_value_19,item_name_7,v106,v107,v108,v109,v110,v111,last_exception_12,last_exc_value_20,v112,v113,last_exception_13,last_exc_value_21,v114,v115,v116,last_exception_14,last_exc_value_22,v117,v118,v119,last_exception_15,last_exc_value_23,last_exc_value_24,v120,e_1,v121,v122,v123,v124,v125,last_exc_value_25,v126,last_exc_value_26,v127,last_exc_value_27,v128,last_exc_value_28,v129,last_exc_value_29,v130,last_exc_value_30,v131,last_exc_value_31,v132;
+function __show_traceback (tb_0,exc_0) {
+ var v284,v285,v286,v287,v288,tb_1,exc_1,v289,tb_2,exc_2,debug_div_0,v290,v291,v292,v293,v294,v295,v296,v297,v298,v299,v300,v301,v302,v303,v304,exc_3,txt_0,v305,v306,last_exc_value_80,exc_4,txt_1,v307,v308,v309,v310,v311,v312,v313,v314,v315,v316,v317,v318,v319,v320,v321,v322,v323,v324,v325,v326,v327,v328,v329,v330,v331,v332,v333,v334,v335,v336,v337,v338,v339,v340,v341,v342,v343,v344,v345,exc_5,v346,v347,v348,v349,v350;
var block = 0;
for(;;){
switch(block){
case 0:
- v91 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- item_name_3 = item_name_2;
- v92 = v91;
+ v285 = document;
+ v286 = v285;
+ v287 = v286.getElementById(__consts_0.const_str__14);
+ v288 = !!v287;
+ if (v288 == true)
+ {
+ tb_2 = tb_0;
+ exc_2 = exc_0;
+ debug_div_0 = v287;
+ block = 2;
+ break;
+ }
+ else{
+ tb_1 = tb_0;
+ exc_1 = exc_0;
+ block = 1;
+ break;
+ }
+ case 1:
+ v289 = create_debug_div ( );
+ tb_2 = tb_1;
+ exc_2 = exc_1;
+ debug_div_0 = v289;
+ block = 2;
+ break;
+ case 2:
+ v290 = document;
+ v291 = v290;
+ v292 = v291.createElement(__consts_0.const_str__15);
+ v293 = v292.style;
+ v293.color = __consts_0.const_str__16;
+ v295 = debug_div_0;
+ v295.appendChild(v292);
+ v297 = document;
+ v298 = v297;
+ v299 = v298.createTextNode(__consts_0.const_str__13);
+ v300 = v292;
+ v300.appendChild(v299);
+ v302 = 1;
+ v303 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,tb_2,v302 );
+ v304 = ll_listiter__Record_index__Signed__iterable_List_R ( undefined,v303 );
+ exc_3 = exc_2;
+ txt_0 = v299;
+ v305 = v304;
+ block = 3;
+ break;
+ case 3:
+ try {
+ v306 = ll_listnext__Record_index__Signed__iterable_ ( v305 );
+ exc_4 = exc_3;
+ txt_1 = txt_0;
+ v307 = v305;
+ v308 = v306;
+ block = 4;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_StopIteration))
+ {
+ exc_5 = exc_3;
+ v346 = txt_0;
+ block = 5;
+ break;
+ }
+ throw(exc);
+ }
+ case 4:
+ v309 = v308.item0;
+ v310 = v308.item1;
+ v311 = v308.item2;
+ v312 = v308.item3;
+ v313 = new Object();
+ v313.item0 = v309;
+ v313.item1 = v310;
+ v316 = v313.item0;
+ v317 = v313.item1;
+ v318 = new StringBuilder();
+ v319 = v316.toString();
+ v318.ll_append(v319);
+ v318.ll_append(__consts_0.const_str__17);
+ v322 = v317.toString();
+ v318.ll_append(v322);
+ v324 = v318.ll_build();
+ v325 = escape ( v324 );
+ v326 = new Object();
+ v326.item0 = v311;
+ v326.item1 = v312;
+ v329 = v326.item0;
+ v330 = v326.item1;
+ v331 = new StringBuilder();
+ v331.ll_append(__consts_0.const_str__18);
+ v333 = v329.toString();
+ v331.ll_append(v333);
+ v331.ll_append(__consts_0.const_str__19);
+ v336 = v330.toString();
+ v331.ll_append(v336);
+ v331.ll_append(__consts_0.const_str__20);
+ v339 = v331.ll_build();
+ v340 = escape ( v339 );
+ v341 = txt_1.nodeValue;
+ v342 = ll_strconcat__String_String ( v325,__consts_0.const_str__20 );
+ v343 = ll_strconcat__String_String ( v342,v340 );
+ v344 = ll_strconcat__String_String ( v341,v343 );
+ txt_1.nodeValue = v344;
+ exc_3 = exc_4;
+ txt_0 = txt_1;
+ v305 = v307;
+ block = 3;
+ break;
+ case 5:
+ v347 = v346.nodeValue;
+ v348 = ll_str__StringR_StringConst_String ( undefined,exc_5 );
+ v349 = ll_strconcat__String_String ( v347,v348 );
+ v346.nodeValue = v349;
+ block = 6;
+ break;
+ case 6:
+ return ( v284 );
+ }
+ }
+}
+
+function main_ () {
+ var v261,v262,v263,v264,v265;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v262 = __consts_0.ExportedMethods;
+ v263 = v262.show_hosts(host_init);
+ v264 = __consts_0.ExportedMethods;
+ v265 = v264.show_all_statuses(comeback);
+ block = 1;
+ break;
+ case 1:
+ return ( v261 );
+ }
+ }
+}
+
+function show_traceback (item_name_8) {
+ var v133,v134,item_name_9,v135,v136,last_exception_16,last_exc_value_32,item_name_10,v137,v138,v139,last_exception_17,last_exc_value_33,item_name_11,v140,v141,v142,v143,last_exception_18,last_exc_value_34,item_name_12,v144,v145,v146,v147,v148,last_exception_19,last_exc_value_35,item_name_13,v149,v150,v151,v152,v153,v154,last_exception_20,last_exc_value_36,v155,v156,last_exception_21,last_exc_value_37,v157,v158,v159,last_exception_22,last_exc_value_38,v160,v161,v162,last_exception_23,last_exc_value_39,last_exc_value_40,v163,e_2,v164,v165,v166,v167,v168,last_exc_value_41,v169,last_exc_value_42,v170,last_exc_value_43,v171,last_exc_value_44,v172,last_exc_value_45,v173,last_exc_value_46,v174,last_exc_value_47,v175;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v134 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ item_name_9 = item_name_8;
+ v135 = v134;
block = 1;
break;
case 1:
try {
- v93 = __consts_0.const_str__12;
- item_name_4 = item_name_3;
- v94 = v92;
- v95 = v93;
+ v136 = __consts_0.const_str__12;
+ item_name_10 = item_name_9;
+ v137 = v135;
+ v138 = v136;
block = 2;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_31 = exc;
+ last_exc_value_47 = exc;
block = 19;
break;
}
@@ -600,18 +740,18 @@
}
case 2:
try {
- v96 = __consts_0.const_str__2;
- item_name_5 = item_name_4;
- v97 = v94;
- v98 = v95;
- v99 = v96;
+ v139 = __consts_0.const_str__2;
+ item_name_11 = item_name_10;
+ v140 = v137;
+ v141 = v138;
+ v142 = v139;
block = 3;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_30 = exc;
+ last_exc_value_46 = exc;
block = 18;
break;
}
@@ -619,19 +759,19 @@
}
case 3:
try {
- v100 = __consts_0.const_str__13;
- item_name_6 = item_name_5;
- v101 = v97;
- v102 = v98;
- v103 = v99;
- v104 = v100;
+ v143 = __consts_0.const_str__13;
+ item_name_12 = item_name_11;
+ v144 = v140;
+ v145 = v141;
+ v146 = v142;
+ v147 = v143;
block = 4;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_29 = exc;
+ last_exc_value_45 = exc;
block = 17;
break;
}
@@ -639,20 +779,20 @@
}
case 4:
try {
- v105 = 0;
- item_name_7 = item_name_6;
- v106 = v101;
- v107 = v102;
- v108 = v103;
- v109 = v104;
- v110 = v105;
+ v148 = 0;
+ item_name_13 = item_name_12;
+ v149 = v144;
+ v150 = v145;
+ v151 = v146;
+ v152 = v147;
+ v153 = v148;
block = 5;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_28 = exc;
+ last_exc_value_44 = exc;
block = 16;
break;
}
@@ -660,15 +800,15 @@
}
case 5:
try {
- v106.oenter_variant0(v107,v108,v109,v110);
- v112 = item_name_7;
+ v149.oenter_variant0(v150,v151,v152,v153);
+ v155 = item_name_13;
block = 6;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_27 = exc;
+ last_exc_value_43 = exc;
block = 15;
break;
}
@@ -676,36 +816,36 @@
}
case 6:
try {
- show_skip_ ( v112 );
+ show_traceback_ ( v155 );
block = 7;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_26 = exc;
+ last_exc_value_42 = exc;
block = 14;
break;
}
throw(exc);
}
case 7:
- v114 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v115 = v114;
+ v157 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v158 = v157;
block = 8;
break;
case 8:
try {
- v116 = __consts_0.const_str__12;
- v117 = v115;
- v118 = v116;
+ v159 = __consts_0.const_str__12;
+ v160 = v158;
+ v161 = v159;
block = 9;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_25 = exc;
+ last_exc_value_41 = exc;
block = 13;
break;
}
@@ -713,467 +853,555 @@
}
case 9:
try {
- v117.oleave_variant0(v118);
+ v160.oleave_variant0(v161);
block = 10;
break;
}
catch (exc){
if (isinstanceof(exc, exceptions_Exception))
{
- last_exc_value_24 = exc;
+ last_exc_value_40 = exc;
block = 11;
break;
}
throw(exc);
}
case 10:
- return ( v90 );
+ return ( v133 );
case 11:
- v120 = last_exc_value_24;
- e_1 = v120;
+ v163 = last_exc_value_40;
+ e_2 = v163;
block = 12;
break;
case 12:
- v121 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
- v122 = 0;
- v123 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v121,v122 );
- v124 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_1 );
- __show_traceback ( v123,v124 );
+ v164 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
+ v165 = 0;
+ v166 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v164,v165 );
+ v167 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_2 );
+ __show_traceback ( v166,v167 );
block = 10;
break;
case 13:
- v126 = last_exc_value_25;
- e_1 = v126;
+ v169 = last_exc_value_41;
+ e_2 = v169;
block = 12;
break;
case 14:
- v127 = last_exc_value_26;
- e_1 = v127;
+ v170 = last_exc_value_42;
+ e_2 = v170;
block = 12;
break;
case 15:
- v128 = last_exc_value_27;
- e_1 = v128;
+ v171 = last_exc_value_43;
+ e_2 = v171;
block = 12;
break;
case 16:
- v129 = last_exc_value_28;
- e_1 = v129;
+ v172 = last_exc_value_44;
+ e_2 = v172;
block = 12;
break;
case 17:
- v130 = last_exc_value_29;
- e_1 = v130;
+ v173 = last_exc_value_45;
+ e_2 = v173;
block = 12;
break;
case 18:
- v131 = last_exc_value_30;
- e_1 = v131;
+ v174 = last_exc_value_46;
+ e_2 = v174;
block = 12;
break;
case 19:
- v132 = last_exc_value_31;
- e_1 = v132;
+ v175 = last_exc_value_47;
+ e_2 = v175;
block = 12;
break;
}
}
}
-function show_info_ (data_6) {
- var v261,v262,v263,v264,v265,v266,v267,v268,v269,v270,v271,v272,data_7,info_0,v273,v274,v275,info_1,v10,v276,v277,v278,v279,v280,v281,v282,v283,v284,v285,v286,data_8,info_2,v287,v288,v289,v290;
+function hide_info () {
+ var v219,v220,v221,v222,last_exception_32,last_exc_value_64,v223,v224,v225,last_exception_33,last_exc_value_65,v226,v227,v228,v229,last_exception_34,last_exc_value_66,v230,v231,v232,v233,v234,last_exception_35,last_exc_value_67,v235,v236,v237,v238,v239,v240,last_exception_36,last_exc_value_68,v241,last_exception_37,last_exc_value_69,v242,v243,v244,last_exception_38,last_exc_value_70,v245,v246,v247,last_exception_39,last_exc_value_71,last_exc_value_72,v248,e_4,v249,v250,v251,v252,v253,last_exc_value_73,v254,last_exc_value_74,v255,last_exc_value_75,v256,last_exc_value_76,v257,last_exc_value_77,v258,last_exc_value_78,v259,last_exc_value_79,v260;
var block = 0;
for(;;){
switch(block){
case 0:
- v262 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v262.oenter_variant0(__consts_0.const_str__14,__consts_0.const_str__2,__consts_0.const_str__15,39);
- undefined;
- v265 = document;
- v266 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v266.oleave_variant0(__consts_0.const_str__14);
- undefined;
- v269 = v265;
- v270 = v269.getElementById(__consts_0.const_str__16);
- v271 = v270.style;
- v271.visibility = __consts_0.const_str__17;
- data_7 = data_6;
- info_0 = v270;
+ v220 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v221 = v220;
block = 1;
break;
case 1:
- v273 = info_0.childNodes;
- v274 = ll_len__List_ExternalType_ ( v273 );
- v275 = !!v274;
- if (v275 == true)
- {
- data_8 = data_7;
- info_2 = info_0;
- block = 4;
- break;
- }
- else{
- info_1 = info_0;
- v10 = data_7;
+ try {
+ v222 = __consts_0.const_str__12;
+ v223 = v221;
+ v224 = v222;
block = 2;
break;
}
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_79 = exc;
+ block = 19;
+ break;
+ }
+ throw(exc);
+ }
case 2:
- v276 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v276.oenter_variant0(__consts_0.const_str__18,__consts_0.const_str__19,__consts_0.const_str__15,43);
- undefined;
- v279 = create_text_elem ( v10 );
- v280 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v280.oleave_variant0(__consts_0.const_str__18);
- undefined;
- v283 = info_1;
- v283.appendChild(v279);
- v285 = info_1.style;
- v285.backgroundColor = __consts_0.const_str__20;
- block = 3;
- break;
- case 3:
- return ( v261 );
- case 4:
- v287 = info_2;
- v288 = info_2.childNodes;
- v289 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v288,0 );
- v290 = v287.removeChild(v289);
- data_7 = data_8;
- info_0 = info_2;
- block = 1;
- break;
- }
- }
-}
-
-function pypy_translator_transformer_debug_TracebackHandler () {
-}
-
-pypy_translator_transformer_debug_TracebackHandler.prototype.toString = function (){
- return ( '' );
-}
-
-inherits(pypy_translator_transformer_debug_TracebackHandler,Object);
-pypy_translator_transformer_debug_TracebackHandler.prototype.oenter_variant0 = function (tb_str_0,data_9,filename_0,lineno_0){
- var v401,v402,v403,v404,v405,v406,v407,v408,v409;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v402 = this.otb;
- v403 = v402;
- v404 = new Object();
- v404.item0 = tb_str_0;
- v404.item1 = data_9;
- v404.item2 = filename_0;
- v404.item3 = lineno_0;
- ll_append__List_Record_item2__String__ite_Record_i ( v403,v404 );
- block = 1;
- break;
- case 1:
- return ( v401 );
- }
- }
-}
-
-pypy_translator_transformer_debug_TracebackHandler.prototype.oleave_variant0 = function (tb_str_1){
- var v418,v419,v420,v421,self_3,tb_str_2,num_0,v422,v423,self_4,tb_str_3,num_1,v424,v425,v426,v427,v428,self_5,tb_str_4,v429,v430,self_6,tb_str_5,num_2,v431,v432,v433,v434;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v419 = this.otb;
- v420 = ll_len__List_Record_item2__String__ite ( v419 );
- v421 = (v420-1);
- self_3 = this;
- tb_str_2 = tb_str_1;
- num_0 = v421;
- block = 1;
- break;
- case 1:
- v422 = (num_0>=0);
- v423 = v422;
- if (v423 == true)
- {
- self_4 = self_3;
- tb_str_3 = tb_str_2;
- num_1 = num_0;
+ try {
+ v225 = __consts_0.const_str__2;
+ v226 = v223;
+ v227 = v224;
+ v228 = v225;
block = 3;
break;
}
- else{
- block = 2;
- break;
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_78 = exc;
+ block = 18;
+ break;
+ }
+ throw(exc);
}
- case 2:
- return ( v418 );
case 3:
- v424 = self_4.otb;
- v425 = ll_getitem_nonneg__dum_nocheckConst_List_Record_it ( undefined,v424,num_1 );
- v426 = v425.item0;
- v427 = ll_streq__String_String ( v426,tb_str_3 );
- v428 = v427;
- if (v428 == true)
- {
- self_6 = self_4;
- tb_str_5 = tb_str_3;
- num_2 = num_1;
- block = 5;
- break;
- }
- else{
- self_5 = self_4;
- tb_str_4 = tb_str_3;
- v429 = num_1;
+ try {
+ v229 = __consts_0.const_str__13;
+ v230 = v226;
+ v231 = v227;
+ v232 = v228;
+ v233 = v229;
block = 4;
break;
}
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_77 = exc;
+ block = 17;
+ break;
+ }
+ throw(exc);
+ }
case 4:
- v430 = (v429-1);
- self_3 = self_5;
- tb_str_2 = tb_str_4;
- num_0 = v430;
- block = 1;
- break;
+ try {
+ v234 = 0;
+ v235 = v230;
+ v236 = v231;
+ v237 = v232;
+ v238 = v233;
+ v239 = v234;
+ block = 5;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_76 = exc;
+ block = 16;
+ break;
+ }
+ throw(exc);
+ }
case 5:
- v431 = self_6.otb;
- v432 = ll_newslice__Signed_Signed ( 0,num_2 );
- v433 = ll_listslice__List_Record_item2__String__ite_List_ ( undefined,v431,v432 );
- self_6.otb = v433;
- self_5 = self_6;
- tb_str_4 = tb_str_5;
- v429 = num_2;
- block = 4;
- break;
- }
- }
-}
-
-pypy_translator_transformer_debug_TracebackHandler.prototype.otraceback_variant0 = function (){
- var v474,v475;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v475 = this.otb;
- v474 = v475;
- block = 1;
+ try {
+ v235.oenter_variant0(v236,v237,v238,v239);
+ block = 6;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_75 = exc;
+ block = 15;
+ break;
+ }
+ throw(exc);
+ }
+ case 6:
+ try {
+ hide_info_ ( );
+ block = 7;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_74 = exc;
+ block = 14;
+ break;
+ }
+ throw(exc);
+ }
+ case 7:
+ v242 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v243 = v242;
+ block = 8;
break;
- case 1:
- return ( v474 );
- }
- }
-}
-
-function ll_len__List_ExternalType_ (l_2) {
- var v384,v385,v386;
- var block = 0;
+ case 8:
+ try {
+ v244 = __consts_0.const_str__12;
+ v245 = v243;
+ v246 = v244;
+ block = 9;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_73 = exc;
+ block = 13;
+ break;
+ }
+ throw(exc);
+ }
+ case 9:
+ try {
+ v245.oleave_variant0(v246);
+ block = 10;
+ break;
+ }
+ catch (exc){
+ if (isinstanceof(exc, exceptions_Exception))
+ {
+ last_exc_value_72 = exc;
+ block = 11;
+ break;
+ }
+ throw(exc);
+ }
+ case 10:
+ return ( v219 );
+ case 11:
+ v248 = last_exc_value_72;
+ e_4 = v248;
+ block = 12;
+ break;
+ case 12:
+ v249 = __consts_0.pypy_translator_transformer_debug_TracebackHandler.otb;
+ v250 = 0;
+ v251 = ll_listslice_startonly__List_Record_item2__String_ ( undefined,v249,v250 );
+ v252 = ll_str__InstanceR_exceptions_Exception_Instance_ex ( undefined,e_4 );
+ __show_traceback ( v251,v252 );
+ block = 10;
+ break;
+ case 13:
+ v254 = last_exc_value_73;
+ e_4 = v254;
+ block = 12;
+ break;
+ case 14:
+ v255 = last_exc_value_74;
+ e_4 = v255;
+ block = 12;
+ break;
+ case 15:
+ v256 = last_exc_value_75;
+ e_4 = v256;
+ block = 12;
+ break;
+ case 16:
+ v257 = last_exc_value_76;
+ e_4 = v257;
+ block = 12;
+ break;
+ case 17:
+ v258 = last_exc_value_77;
+ e_4 = v258;
+ block = 12;
+ break;
+ case 18:
+ v259 = last_exc_value_78;
+ e_4 = v259;
+ block = 12;
+ break;
+ case 19:
+ v260 = last_exc_value_79;
+ e_4 = v260;
+ block = 12;
+ break;
+ }
+ }
+}
+
+function ll_str__StringR_StringConst_String (self_1,s_1) {
+ var v396;
+ var block = 0;
for(;;){
switch(block){
case 0:
- v385 = l_2;
- v386 = v385.length;
- v384 = v386;
+ v396 = s_1;
block = 1;
break;
case 1:
- return ( v384 );
+ return ( v396 );
}
}
}
-function ll_newslice__Signed_Signed (start_1,stop_0) {
- var v452,v453,v454,v455;
+function pypy_translator_transformer_debug_TracebackHandler () {
+}
+
+pypy_translator_transformer_debug_TracebackHandler.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(pypy_translator_transformer_debug_TracebackHandler,Object);
+pypy_translator_transformer_debug_TracebackHandler.prototype.oenter_variant0 = function (tb_str_0,data_6,filename_0,lineno_0){
+ var v505,v506,v507,v508,v509,v510,v511,v512,v513;
var block = 0;
for(;;){
switch(block){
case 0:
- v453 = new Slice();
- v453.start = start_1;
- v453.stop = stop_0;
- v452 = v453;
+ v506 = this.otb;
+ v507 = v506;
+ v508 = new Object();
+ v508.item0 = tb_str_0;
+ v508.item1 = data_6;
+ v508.item2 = filename_0;
+ v508.item3 = lineno_0;
+ ll_append__List_Record_item2__String__ite_Record_i ( v507,v508 );
block = 1;
break;
case 1:
- return ( v452 );
+ return ( v505 );
}
}
}
-function ll_append__List_Record_item2__String__ite_Record_i (l_4,newitem_0) {
- var v410,v411,v412,v413,v414,v415,v416,v417;
+pypy_translator_transformer_debug_TracebackHandler.prototype.oleave_variant0 = function (tb_str_1){
+ var v522,v523,v524,v525,self_4,tb_str_2,num_0,v526,v527,self_5,tb_str_3,num_1,v528,v529,v530,v531,v532,self_6,tb_str_4,v533,v534,self_7,tb_str_5,num_2,v535,v536,v537,v538;
var block = 0;
for(;;){
switch(block){
case 0:
- v411 = l_4;
- v412 = v411.length;
- v413 = l_4;
- v414 = (v412+1);
- v413.length = v414;
- v416 = l_4;
- v416[v412]=newitem_0;
+ v523 = this.otb;
+ v524 = ll_len__List_Record_item2__String__ite ( v523 );
+ v525 = (v524-1);
+ self_4 = this;
+ tb_str_2 = tb_str_1;
+ num_0 = v525;
block = 1;
break;
case 1:
- return ( v410 );
+ v526 = (num_0>=0);
+ v527 = v526;
+ if (v527 == true)
+ {
+ self_5 = self_4;
+ tb_str_3 = tb_str_2;
+ num_1 = num_0;
+ block = 3;
+ break;
+ }
+ else{
+ block = 2;
+ break;
+ }
+ case 2:
+ return ( v522 );
+ case 3:
+ v528 = self_5.otb;
+ v529 = ll_getitem_nonneg__dum_nocheckConst_List_Record_it ( undefined,v528,num_1 );
+ v530 = v529.item0;
+ v531 = ll_streq__String_String ( v530,tb_str_3 );
+ v532 = v531;
+ if (v532 == true)
+ {
+ self_7 = self_5;
+ tb_str_5 = tb_str_3;
+ num_2 = num_1;
+ block = 5;
+ break;
+ }
+ else{
+ self_6 = self_5;
+ tb_str_4 = tb_str_3;
+ v533 = num_1;
+ block = 4;
+ break;
+ }
+ case 4:
+ v534 = (v533-1);
+ self_4 = self_6;
+ tb_str_2 = tb_str_4;
+ num_0 = v534;
+ block = 1;
+ break;
+ case 5:
+ v535 = self_7.otb;
+ v536 = ll_newslice__Signed_Signed ( 0,num_2 );
+ v537 = ll_listslice__List_Record_item2__String__ite_List_ ( undefined,v535,v536 );
+ self_7.otb = v537;
+ self_6 = self_7;
+ tb_str_4 = tb_str_5;
+ v533 = num_2;
+ block = 4;
+ break;
}
}
}
-function show_skip_ (item_name_0) {
- var v376,v6,v377,v378,v379,v380,v381,v382,v383;
+pypy_translator_transformer_debug_TracebackHandler.prototype.otraceback_variant0 = function (){
+ var v578,v579;
var block = 0;
for(;;){
switch(block){
case 0:
- v6 = ll_dict_getitem__Dict_String__String__String ( __consts_0.const_tuple,item_name_0 );
- v377 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v377.oenter_variant0(__consts_0.const_str__22,__consts_0.const_str__23,__consts_0.const_str__15,108);
- undefined;
- set_msgbox ( item_name_0,v6 );
- v381 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v381.oleave_variant0(__consts_0.const_str__22);
- undefined;
+ v579 = this.otb;
+ v578 = v579;
block = 1;
break;
case 1:
- return ( v376 );
+ return ( v578 );
}
}
}
-function ll_getitem_nonneg__dum_nocheckConst_List_ExternalT (func_0,l_3,index_0) {
- var v397,index_1,v398,v399,v400;
+function create_debug_div () {
+ var v351,v352,v353,v354,v355,v356,v357,v358,v359,v360,v361,v362,v363,v364,v365,v366,v367,v368,v369,v370,v371,v372,v373;
var block = 0;
for(;;){
switch(block){
case 0:
- index_1 = index_0;
- v398 = l_3;
+ v352 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v352.oenter_variant0(__consts_0.const_str__22,__consts_0.const_str__2,__consts_0.const_str__23,13);
+ undefined;
+ v355 = document;
+ v356 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v356.oleave_variant0(__consts_0.const_str__22);
+ undefined;
+ v359 = v355;
+ v360 = v359.createElement(__consts_0.const_str__24);
+ v361 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v361.oenter_variant0(__consts_0.const_str__22,__consts_0.const_str__2,__consts_0.const_str__23,16);
+ undefined;
+ v364 = document;
+ v365 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v365.oleave_variant0(__consts_0.const_str__22);
+ undefined;
+ v368 = v364.childNodes;
+ v369 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v368,0 );
+ v370 = v369.childNodes;
+ v371 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v370,1 );
+ v372 = v371;
+ v372.appendChild(v360);
+ v351 = v360;
block = 1;
break;
case 1:
- v399 = v398;
- v400 = v399[index_1];
- v397 = v400;
- block = 2;
- break;
- case 2:
- return ( v397 );
+ return ( v351 );
}
}
}
-function ll_streq__String_String (s1_0,s2_0) {
- var v442,v443,v444,v445,s2_1,v446,v447,v448,v449,v450,v451;
+function show_traceback_ (item_name_1) {
+ var v470,v471,v472,v473,v474,v475,v476,v477,v478,v479,v480,v481,v482,v483,v484,v485,v9,v486,v487,v488,v489,v490,v491,v492;
var block = 0;
for(;;){
switch(block){
case 0:
- v443 = !!s1_0;
- v444 = !v443;
- v445 = v444;
- if (v445 == true)
- {
- v449 = s2_0;
- block = 3;
- break;
- }
- else{
- s2_1 = s2_0;
- v446 = s1_0;
- block = 1;
- break;
- }
- case 1:
- v447 = v446;
- v448 = (v447==s2_1);
- v442 = v448;
- block = 2;
- break;
- case 2:
- return ( v442 );
- case 3:
- v450 = !!v449;
- v451 = !v450;
- v442 = v451;
- block = 2;
+ v471 = ll_dict_getitem__Dict_String__Record_item2__Str_St ( __consts_0.const_tuple,item_name_1 );
+ v472 = v471.item0;
+ v473 = v471.item1;
+ v474 = v471.item2;
+ v475 = new StringBuilder();
+ v475.ll_append(__consts_0.const_str__26);
+ v477 = v472.toString();
+ v475.ll_append(v477);
+ v475.ll_append(__consts_0.const_str__27);
+ v480 = v473.toString();
+ v475.ll_append(v480);
+ v475.ll_append(__consts_0.const_str__28);
+ v483 = v474.toString();
+ v475.ll_append(v483);
+ v475.ll_append(__consts_0.const_str__20);
+ v9 = v475.ll_build();
+ v486 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v486.oenter_variant0(__consts_0.const_str__29,__consts_0.const_str__30,__consts_0.const_str__31,122);
+ undefined;
+ set_msgbox ( item_name_1,v9 );
+ v490 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v490.oleave_variant0(__consts_0.const_str__29);
+ undefined;
+ block = 1;
break;
+ case 1:
+ return ( v470 );
}
}
}
-function set_msgbox (item_name_14,data_10) {
- var v486,v487,v488,v489,v490,v491,v492,v493,item_name_15,data_11,msgbox_0,v494,v495,v496,item_name_16,data_12,msgbox_1,v497,v498,v499,v500,v501,v502,v503,v504,v11,v505,v506,v507,v508,v509,v510,v511,v512,v513,v514,v515,item_name_17,data_13,msgbox_2,v516,v517,v518,v519;
+function set_msgbox (item_name_14,data_7) {
+ var v594,v595,v596,v597,v598,v599,v600,v601,item_name_15,data_8,msgbox_0,v602,v603,v604,item_name_16,data_9,msgbox_1,v605,v606,v607,v608,v609,v610,v611,v612,v11,v613,v614,v615,v616,v617,v618,v619,v620,v621,v622,v623,item_name_17,data_10,msgbox_2,v624,v625,v626,v627;
var block = 0;
for(;;){
switch(block){
case 0:
- v487 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v487.oenter_variant0(__consts_0.const_str__24,__consts_0.const_str__25,__consts_0.const_str__15,111);
+ v595 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v595.oenter_variant0(__consts_0.const_str__32,__consts_0.const_str__33,__consts_0.const_str__31,111);
undefined;
- v490 = get_elem ( __consts_0.const_str__26 );
- v491 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v491.oleave_variant0(__consts_0.const_str__24);
+ v598 = get_elem ( __consts_0.const_str__34 );
+ v599 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v599.oleave_variant0(__consts_0.const_str__32);
undefined;
item_name_15 = item_name_14;
- data_11 = data_10;
- msgbox_0 = v490;
+ data_8 = data_7;
+ msgbox_0 = v598;
block = 1;
break;
case 1:
- v494 = msgbox_0.childNodes;
- v495 = ll_len__List_ExternalType_ ( v494 );
- v496 = !!v495;
- if (v496 == true)
+ v602 = msgbox_0.childNodes;
+ v603 = ll_len__List_ExternalType_ ( v602 );
+ v604 = !!v603;
+ if (v604 == true)
{
item_name_17 = item_name_15;
- data_13 = data_11;
+ data_10 = data_8;
msgbox_2 = msgbox_0;
block = 4;
break;
}
else{
item_name_16 = item_name_15;
- data_12 = data_11;
+ data_9 = data_8;
msgbox_1 = msgbox_0;
block = 2;
break;
}
case 2:
- v497 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v497.oenter_variant0(__consts_0.const_str__27,__consts_0.const_str__28,__consts_0.const_str__15,114);
+ v605 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v605.oenter_variant0(__consts_0.const_str__35,__consts_0.const_str__36,__consts_0.const_str__31,114);
undefined;
- v500 = create_elem ( __consts_0.const_str__29 );
- v501 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v501.oleave_variant0(__consts_0.const_str__27);
- undefined;
- v504 = ll_strconcat__String_String ( item_name_16,__consts_0.const_str__30 );
- v11 = ll_strconcat__String_String ( v504,data_12 );
- v505 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v505.oenter_variant0(__consts_0.const_str__18,__consts_0.const_str__31,__consts_0.const_str__15,115);
- undefined;
- v508 = create_text_elem ( v11 );
- v509 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v509.oleave_variant0(__consts_0.const_str__18);
- undefined;
- v512 = v500;
- v512.appendChild(v508);
- v514 = msgbox_1;
- v514.appendChild(v500);
+ v608 = create_elem ( __consts_0.const_str__15 );
+ v609 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v609.oleave_variant0(__consts_0.const_str__35);
+ undefined;
+ v612 = ll_strconcat__String_String ( item_name_16,__consts_0.const_str__20 );
+ v11 = ll_strconcat__String_String ( v612,data_9 );
+ v613 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v613.oenter_variant0(__consts_0.const_str__37,__consts_0.const_str__38,__consts_0.const_str__31,115);
+ undefined;
+ v616 = create_text_elem ( v11 );
+ v617 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v617.oleave_variant0(__consts_0.const_str__37);
+ undefined;
+ v620 = v608;
+ v620.appendChild(v616);
+ v622 = msgbox_1;
+ v622.appendChild(v608);
block = 3;
break;
case 3:
- return ( v486 );
+ return ( v594 );
case 4:
- v516 = msgbox_2;
- v517 = msgbox_2.childNodes;
- v518 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v517,0 );
- v519 = v516.removeChild(v518);
+ v624 = msgbox_2;
+ v625 = msgbox_2.childNodes;
+ v626 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v625,0 );
+ v627 = v624.removeChild(v626);
item_name_15 = item_name_17;
- data_11 = data_13;
+ data_8 = data_10;
msgbox_0 = msgbox_2;
block = 1;
break;
@@ -1181,84 +1409,48 @@
}
}
-function ll_listslice_startonly__List_Record_item2__String_ (RESLIST_0,l1_0,start_0) {
- var v291,v292,v293,v294,v295,v296,l1_1,i_0,j_0,l_0,len1_0,v297,v298,l1_2,i_1,j_1,l_1,len1_1,v299,v300,v301,v302,v303,v304;
+function ll_str__InstanceR_exceptions_Exception_Instance_ex (self_0,instance_0) {
+ var v280,v281,v282,v283;
var block = 0;
for(;;){
switch(block){
case 0:
- v292 = l1_0;
- v293 = v292.length;
- v294 = (v293-start_0);
undefined;
- v296 = ll_newlist__List_Record_item2__String__ite_Signed ( undefined,v294 );
- l1_1 = l1_0;
- i_0 = start_0;
- j_0 = 0;
- l_0 = v296;
- len1_0 = v293;
+ v282 = ll_const__Signed ( -1 );
+ v283 = instance_0.toString();
+ v280 = v283;
block = 1;
break;
case 1:
- v297 = (i_0v460);
- v462 = v461;
- if (v462 == true)
- {
- l1_4 = l1_3;
- stop_1 = v460;
- start_2 = v457;
- block = 1;
- break;
- }
- else{
- l1_4 = l1_3;
- stop_1 = v458;
- start_2 = v457;
- block = 1;
- break;
- }
- case 1:
- v463 = (stop_1-start_2);
- undefined;
- v465 = ll_newlist__List_Record_item2__String__ite_Signed ( undefined,v463 );
- l1_5 = l1_4;
- i_2 = start_2;
- j_2 = 0;
- stop_2 = stop_1;
- l_7 = v465;
- block = 2;
- break;
case 2:
- v466 = (i_2' );
-}
-
-function ll_newlist__List_Record_item2__String__ite_Signed (self_8,length_0) {
- var v543,v544;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v544 = ll_newlist__List_Record_item2__String__ite_Signed_ ( undefined,length_0 );
- v543 = v544;
- block = 1;
- break;
- case 1:
- return ( v543 );
- }
- }
-}
-
-function ll_len__List_Record_item2__String__ite (l_5) {
- var v435,v436,v437;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v436 = l_5;
- v437 = v436.length;
- v435 = v437;
- block = 1;
- break;
- case 1:
- return ( v435 );
- }
- }
-}
-
-function exceptions_Exception () {
-}
-
-exceptions_Exception.prototype.toString = function (){
- return ( '' );
-}
-
-inherits(exceptions_Exception,Object);
-function create_elem (s_0) {
- var v530,v531,v532,v533,v534,v535,v536,v537,v538,v539;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v531 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v531.oenter_variant0(__consts_0.const_str__14,__consts_0.const_str__2,__consts_0.const_str__15,9);
- undefined;
- v534 = document;
- v535 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v535.oleave_variant0(__consts_0.const_str__14);
- undefined;
- v538 = v534;
- v539 = v538.createElement(s_0);
- v530 = v539;
- block = 1;
- break;
- case 1:
- return ( v530 );
- }
- }
-}
-
-function ll_const__Signed (c_0) {
- var v605;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v605 = c_0;
- block = 1;
- break;
- case 1:
- return ( v605 );
- }
- }
-}
-
-function create_debug_div () {
- var v557,v558,v559,v560,v561,v562,v563,v564,v565,v566,v567,v568,v569,v570,v571,v572,v573,v574,v575,v576,v577,v578,v579;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v558 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v558.oenter_variant0(__consts_0.const_str__14,__consts_0.const_str__2,__consts_0.const_str__39,13);
- undefined;
- v561 = document;
- v562 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v562.oleave_variant0(__consts_0.const_str__14);
- undefined;
- v565 = v561;
- v566 = v565.createElement(__consts_0.const_str__40);
- v567 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v567.oenter_variant0(__consts_0.const_str__14,__consts_0.const_str__2,__consts_0.const_str__39,16);
- undefined;
- v570 = document;
- v571 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v571.oleave_variant0(__consts_0.const_str__14);
- undefined;
- v574 = v570.childNodes;
- v575 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v574,0 );
- v576 = v575.childNodes;
- v577 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v576,1 );
- v578 = v577;
- v578.appendChild(v566);
- v557 = v566;
- block = 1;
- break;
- case 1:
- return ( v557 );
- }
- }
-}
-
-function main_ () {
- var v600,v601,v602,v603,v604;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v601 = __consts_0.ExportedMethods;
- v602 = v601.show_hosts(host_init);
- v603 = __consts_0.ExportedMethods;
- v604 = v603.show_all_statuses(comeback);
- block = 1;
- break;
- case 1:
- return ( v600 );
- }
- }
-}
-
-function exceptions_StandardError () {
-}
-
-exceptions_StandardError.prototype.toString = function (){
- return ( '' );
-}
-
-inherits(exceptions_StandardError,exceptions_Exception);
-function exceptions_LookupError () {
-}
-
-exceptions_LookupError.prototype.toString = function (){
- return ( '' );
-}
-
-inherits(exceptions_LookupError,exceptions_StandardError);
-function ll_listnext__Record_index__Signed__iterable__ (iter_0) {
- var v584,v585,v586,v587,v588,v589,v590,iter_1,index_4,l_9,v591,v592,v593,v594,v595,v596,v597,etype_1,evalue_1;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v585 = iter_0.iterable;
- v586 = iter_0.index;
- v587 = v585;
- v588 = v587.length;
- v589 = (v586>=v588);
- v590 = v589;
- if (v590 == true)
- {
- block = 3;
- break;
- }
- else{
- iter_1 = iter_0;
- index_4 = v586;
- l_9 = v585;
- block = 1;
- break;
- }
- case 1:
- v591 = (index_4+1);
- iter_1.index = v591;
- v593 = l_9;
- v594 = v593[index_4];
- v584 = v594;
- block = 2;
- break;
- case 2:
- return ( v584 );
- case 3:
- v595 = __consts_0.exceptions_StopIteration;
- v596 = v595.meta;
- v597 = v595;
- etype_1 = v596;
- evalue_1 = v597;
- block = 4;
- break;
- case 4:
- throw(evalue_1);
- }
- }
-}
-
-function show_traceback_ (item_name_1) {
- var v606,v607,v608,v609,v610,v611,v612,v613,v614,v615,v616,v617,v618,v619,v620,v621,v9,v622,v623,v624,v625,v626,v627,v628;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v607 = ll_dict_getitem__Dict_String__Record_item2__Str_St ( __consts_0.const_tuple__43,item_name_1 );
- v608 = v607.item0;
- v609 = v607.item1;
- v610 = v607.item2;
- v611 = new StringBuilder();
- v611.ll_append(__consts_0.const_str__44);
- v613 = v608.toString();
- v611.ll_append(v613);
- v611.ll_append(__consts_0.const_str__45);
- v616 = v609.toString();
- v611.ll_append(v616);
- v611.ll_append(__consts_0.const_str__46);
- v619 = v610.toString();
- v611.ll_append(v619);
- v611.ll_append(__consts_0.const_str__30);
- v9 = v611.ll_build();
- v622 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v622.oenter_variant0(__consts_0.const_str__22,__consts_0.const_str__47,__consts_0.const_str__15,122);
- undefined;
- set_msgbox ( item_name_1,v9 );
- v626 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v626.oleave_variant0(__consts_0.const_str__22);
- undefined;
- block = 1;
- break;
- case 1:
- return ( v606 );
- }
- }
-}
-
-function ll_newlist__List_Record_item2__String__ite_Signed_ (LIST_0,length_1) {
- var v629,v630,v631,v632;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v630 = new Array();
- v631 = v630;
- v631.length = length_1;
- v629 = v630;
- block = 1;
- break;
- case 1:
- return ( v629 );
- }
- }
-}
-
-function ll_listiter__Record_index__Signed__iterable_List_R (ITER_0,lst_0) {
- var v580,v581,v582,v583;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v581 = new Object();
- v581.iterable = lst_0;
- v581.index = 0;
- v580 = v581;
- block = 1;
- break;
- case 1:
- return ( v580 );
- }
- }
-}
-
-function ll_str__StringR_StringConst_String (self_9,s_2) {
- var v599;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v599 = s_2;
- block = 1;
- break;
- case 1:
- return ( v599 );
- }
- }
-}
-
-function escape (s_1) {
- var v598;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v598 = s_1;
- block = 1;
- break;
- case 1:
- return ( v598 );
- }
- }
-}
-
-function exceptions_KeyError () {
-}
-
-exceptions_KeyError.prototype.toString = function (){
- return ( '' );
-}
-
-inherits(exceptions_KeyError,exceptions_LookupError);
-function host_init (host_dict_0) {
- var v633,v634,v635,v636,v637,v638,v639,v640,v641,v642,v643,v644,v645,host_dict_1,elem_0,v646,v647,last_exc_value_81,host_dict_2,elem_1,host_0,v648,v649,v650,v651,v652,v653,v654,v655,v656,v657,v3,v658,v659,v660,v661,v662,v663,v664,v665,v666,v667,v668,v669;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v634 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v634.oenter_variant0(__consts_0.const_str__14,__consts_0.const_str__2,__consts_0.const_str__15,131);
- undefined;
- v637 = document;
- v638 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v638.oleave_variant0(__consts_0.const_str__14);
- undefined;
- v641 = v637;
- v642 = v641.getElementById(__consts_0.const_str__48);
- v643 = host_dict_0;
- v644 = ll_dict_kvi__Dict_String__String__List_String_LlT_ ( v643,undefined,undefined );
- v645 = ll_listiter__Record_index__Signed__iterable_List_S ( undefined,v644 );
- host_dict_1 = host_dict_0;
- elem_0 = v642;
- v646 = v645;
- block = 1;
- break;
- case 1:
- try {
- v647 = ll_listnext__Record_index__Signed__iterable_ ( v646 );
- host_dict_2 = host_dict_1;
- elem_1 = elem_0;
- host_0 = v647;
- v648 = v646;
- block = 2;
- break;
- }
- catch (exc){
- if (isinstanceof(exc, exceptions_StopIteration))
- {
- block = 3;
- break;
- }
- throw(exc);
- }
- case 2:
- v649 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v649.oenter_variant0(__consts_0.const_str__27,__consts_0.const_str__49,__consts_0.const_str__15,133);
- undefined;
- v652 = create_elem ( __consts_0.const_str__50 );
- v653 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v653.oleave_variant0(__consts_0.const_str__27);
- undefined;
- v656 = v652.style;
- v656.background = __consts_0.const_str__51;
- v3 = ll_dict_getitem__Dict_String__String__String ( host_dict_2,host_0 );
- v658 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v658.oenter_variant0(__consts_0.const_str__18,__consts_0.const_str__52,__consts_0.const_str__15,135);
- undefined;
- v661 = create_text_elem ( v3 );
- v662 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v662.oleave_variant0(__consts_0.const_str__18);
- undefined;
- v665 = v652;
- v665.appendChild(v661);
- v652.id = host_0;
- v668 = elem_1;
- v668.appendChild(v652);
- host_dict_1 = host_dict_2;
- elem_0 = elem_1;
- v646 = v648;
- block = 1;
- break;
- case 3:
- return ( v633 );
- }
- }
-}
-
-function ll_dict_kvi__Dict_String__String__List_String_LlT_ (d_2,LIST_1,func_2) {
- var v716,v717,v718,v719,v720,v721,i_4,it_0,result_0,v722,v723,v724,i_5,it_1,result_1,v725,v726,v727,v728,it_2,result_2,v729,v730;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v717 = d_2;
- v718 = get_dict_len ( v717 );
- v719 = ll_newlist__List_String_LlT_Signed ( undefined,v718 );
- v720 = d_2;
- v721 = dict_items_iterator ( v720 );
- i_4 = 0;
- it_0 = v721;
- result_0 = v719;
- block = 1;
- break;
- case 1:
- v722 = it_0;
- v723 = v722.ll_go_next();
- v724 = v723;
- if (v724 == true)
- {
- i_5 = i_4;
- it_1 = it_0;
- result_1 = result_0;
- block = 3;
- break;
- }
- else{
- v716 = result_0;
- block = 2;
- break;
- }
- case 2:
- return ( v716 );
- case 3:
- v725 = result_1;
- v726 = it_1;
- v727 = v726.ll_current_key();
- v725[i_5]=v727;
- it_2 = it_1;
- result_2 = result_1;
- v729 = i_5;
- block = 4;
- break;
- case 4:
- v730 = (v729+1);
- i_4 = v730;
- it_0 = it_2;
- result_0 = result_2;
- block = 1;
- break;
- }
- }
-}
-
-function exceptions_StopIteration () {
-}
-
-exceptions_StopIteration.prototype.toString = function (){
- return ( '' );
-}
-
-inherits(exceptions_StopIteration,exceptions_Exception);
-function comeback (msglist_0) {
- var v670,v671,v672,v673,msglist_1,v674,v675,v676,v677,msglist_2,v678,v679,last_exc_value_82,msglist_3,v680,v4,v681,v682,v683,v684,v685,v686,v687,v688,msglist_4,v689,v690,v691,v692,v693,v694,last_exc_value_83,v695,v5,v696,v697,v698,v699,v700,v701,v702,v703,v704,v705;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v671 = ll_len__List_Dict_String__String__ ( msglist_0 );
- v672 = (v671==0);
- v673 = v672;
- if (v673 == true)
- {
- block = 4;
- break;
- }
- else{
- msglist_1 = msglist_0;
- block = 1;
- break;
- }
- case 1:
- v674 = __consts_0.py____test_rsession_webjs_Pending.opending;
- v675 = 0;
- v676 = ll_listslice_startonly__List_Dict_String__String__ ( undefined,v674,v675 );
- v677 = ll_listiter__Record_index__Signed__iterable_List_D ( undefined,v676 );
- msglist_2 = msglist_1;
- v678 = v677;
- block = 2;
- break;
- case 2:
+ case 21:
try {
- v679 = ll_listnext__Record_index__Signed__iterable ( v678 );
- msglist_3 = msglist_2;
- v680 = v678;
- v4 = v679;
- block = 3;
+ v778 = ll_dict_getitem__Dict_String__String__String ( msg_19,__consts_0.const_str__63 );
+ msg_20 = msg_19;
+ item_name_19 = item_name_18;
+ module_part_11 = module_part_10;
+ td_8 = td_7;
+ v779 = v778;
+ block = 22;
break;
}
catch (exc){
- if (isinstanceof(exc, exceptions_StopIteration))
+ if (isinstanceof(exc, exceptions_Exception))
{
- msglist_4 = msglist_2;
- block = 5;
+ block = 41;
break;
}
throw(exc);
}
- case 3:
- v681 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v681.oenter_variant0(__consts_0.const_str__54,__consts_0.const_str__55,__consts_0.const_str__15,30);
- undefined;
- v684 = process ( v4 );
- v685 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v685.oleave_variant0(__consts_0.const_str__54);
- undefined;
- v688 = v684;
- if (v688 == true)
+ case 22:
+ v780 = ll_streq__String_String ( v779,__consts_0.const_str__64 );
+ v781 = v780;
+ if (v781 == true)
{
- msglist_2 = msglist_3;
- v678 = v680;
- block = 2;
+ module_part_42 = module_part_11;
+ td_40 = td_8;
+ block = 56;
break;
}
else{
- block = 4;
+ msg_21 = msg_20;
+ item_name_20 = item_name_19;
+ module_part_12 = module_part_11;
+ td_9 = td_8;
+ block = 23;
break;
}
- case 4:
- return ( v670 );
- case 5:
- v689 = new Array();
- v689.length = 0;
- __consts_0.py____test_rsession_webjs_Pending.opending = v689;
- v692 = ll_listiter__Record_index__Signed__iterable_List_D ( undefined,msglist_4 );
- v693 = v692;
- block = 6;
- break;
- case 6:
+ case 23:
try {
- v694 = ll_listnext__Record_index__Signed__iterable ( v693 );
- v695 = v693;
- v5 = v694;
- block = 7;
+ v782 = ll_dict_getitem__Dict_String__String__String ( msg_21,__consts_0.const_str__65 );
+ msg_22 = msg_21;
+ item_name_21 = item_name_20;
+ module_part_13 = module_part_12;
+ td_10 = td_9;
+ v783 = v782;
+ block = 24;
break;
}
catch (exc){
- if (isinstanceof(exc, exceptions_StopIteration))
+ if (isinstanceof(exc, exceptions_Exception))
{
- block = 8;
+ block = 41;
break;
}
throw(exc);
- }
- case 7:
- v696 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v696.oenter_variant0(__consts_0.const_str__54,__consts_0.const_str__56,__consts_0.const_str__15,34);
- undefined;
- v699 = process ( v5 );
- v700 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v700.oleave_variant0(__consts_0.const_str__54);
- undefined;
- v703 = v699;
- if (v703 == true)
- {
- v693 = v695;
- block = 6;
- break;
- }
- else{
- block = 4;
- break;
- }
- case 8:
- v704 = __consts_0.ExportedMethods;
- v705 = v704.show_all_statuses(comeback);
- block = 4;
- break;
- }
- }
-}
-
-function ll_dict_getitem__Dict_String__Record_item2__Str_St (d_1,key_2) {
- var v706,v707,v708,v709,v710,v711,v712,etype_2,evalue_2,key_3,v713,v714,v715;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v707 = d_1;
- v708 = (v707[key_2]!=undefined);
- v709 = v708;
- if (v709 == true)
- {
- key_3 = key_2;
- v713 = d_1;
- block = 3;
- break;
- }
- else{
- block = 1;
- break;
- }
- case 1:
- v710 = __consts_0.exceptions_KeyError;
- v711 = v710.meta;
- v712 = v710;
- etype_2 = v711;
- evalue_2 = v712;
- block = 2;
- break;
- case 2:
- throw(evalue_2);
- case 3:
- v714 = v713;
- v715 = v714[key_3];
- v706 = v715;
- block = 4;
- break;
- case 4:
- return ( v706 );
- }
- }
-}
-
-function ll_newlist__List_String_LlT_Signed (LIST_2,length_2) {
- var v749,v750,v751,v752;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v750 = new Array();
- v751 = v750;
- v751.length = length_2;
- v749 = v750;
- block = 1;
- break;
- case 1:
- return ( v749 );
- }
- }
-}
-
-function ll_listnext__Record_index__Signed__iterable (iter_4) {
- var v774,v775,v776,v777,v778,v779,v780,iter_5,index_6,l_14,v781,v782,v783,v784,v785,v786,v787,etype_4,evalue_4;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v775 = iter_4.iterable;
- v776 = iter_4.index;
- v777 = v775;
- v778 = v777.length;
- v779 = (v776>=v778);
- v780 = v779;
- if (v780 == true)
- {
- block = 3;
- break;
- }
- else{
- iter_5 = iter_4;
- index_6 = v776;
- l_14 = v775;
- block = 1;
- break;
- }
- case 1:
- v781 = (index_6+1);
- iter_5.index = v781;
- v783 = l_14;
- v784 = v783[index_6];
- v774 = v784;
- block = 2;
- break;
- case 2:
- return ( v774 );
- case 3:
- v785 = __consts_0.exceptions_StopIteration;
- v786 = v785.meta;
- v787 = v785;
- etype_4 = v786;
- evalue_4 = v787;
- block = 4;
- break;
- case 4:
- throw(evalue_4);
- }
- }
-}
-
-function ll_listnext__Record_index__Signed__iterable_ (iter_2) {
- var v735,v736,v737,v738,v739,v740,v741,iter_3,index_5,l_10,v742,v743,v744,v745,v746,v747,v748,etype_3,evalue_3;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v736 = iter_2.iterable;
- v737 = iter_2.index;
- v738 = v736;
- v739 = v738.length;
- v740 = (v737>=v739);
- v741 = v740;
- if (v741 == true)
- {
- block = 3;
- break;
- }
- else{
- iter_3 = iter_2;
- index_5 = v737;
- l_10 = v736;
- block = 1;
- break;
- }
- case 1:
- v742 = (index_5+1);
- iter_3.index = v742;
- v744 = l_10;
- v745 = v744[index_5];
- v735 = v745;
- block = 2;
- break;
- case 2:
- return ( v735 );
- case 3:
- v746 = __consts_0.exceptions_StopIteration;
- v747 = v746.meta;
- v748 = v746;
- etype_3 = v747;
- evalue_3 = v748;
- block = 4;
- break;
- case 4:
- throw(evalue_3);
- }
- }
-}
-
-function ll_listiter__Record_index__Signed__iterable_List_S (ITER_1,lst_1) {
- var v731,v732,v733,v734;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v732 = new Object();
- v732.iterable = lst_1;
- v732.index = 0;
- v731 = v732;
- block = 1;
- break;
- case 1:
- return ( v731 );
- }
- }
-}
-
-function ll_len__List_Dict_String__String__ (l_11) {
- var v753,v754,v755;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v754 = l_11;
- v755 = v754.length;
- v753 = v755;
- block = 1;
- break;
- case 1:
- return ( v753 );
- }
- }
-}
-
-function ll_listslice_startonly__List_Dict_String__String__ (RESLIST_3,l1_7,start_3) {
- var v756,v757,v758,v759,v760,v761,l1_8,i_6,j_4,l_12,len1_2,v762,v763,l1_9,i_7,j_5,l_13,len1_3,v764,v765,v766,v767,v768,v769;
- var block = 0;
- for(;;){
- switch(block){
- case 0:
- v757 = l1_7;
- v758 = v757.length;
- v759 = (v758-start_3);
- undefined;
- v761 = ll_newlist__List_Dict_String__String__LlT_Signed ( undefined,v759 );
- l1_8 = l1_7;
- i_6 = start_3;
- j_4 = 0;
- l_12 = v761;
- len1_2 = v758;
- block = 1;
- break;
- case 1:
- v762 = (i_6' );
+}
+
+inherits(exceptions_Exception,Object);
+function exceptions_StandardError () {
+}
+
+exceptions_StandardError.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_StandardError,exceptions_Exception);
+function exceptions_LookupError () {
+}
+
+exceptions_LookupError.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_LookupError,exceptions_StandardError);
+function fail_come_back (msg_34) {
+ var v1025,v1026,v1027,v1028,v1029,v1030,v1031,v1032,v1033,v1034;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v1026 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__90 );
+ v1027 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__91 );
+ v1028 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__92 );
+ v1029 = new Object();
+ v1029.item0 = v1026;
+ v1029.item1 = v1027;
+ v1029.item2 = v1028;
+ v1033 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__93 );
+ __consts_0.const_tuple[v1033]=v1029;
+ block = 1;
+ break;
+ case 1:
+ return ( v1025 );
+ }
+ }
+}
+
+function ll_listnext__Record_index__Signed__iterable (iter_2) {
+ var v691,v692,v693,v694,v695,v696,v697,iter_3,index_5,l_13,v698,v699,v700,v701,v702,v703,v704,etype_2,evalue_2;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v692 = iter_2.iterable;
+ v693 = iter_2.index;
+ v694 = v692;
+ v695 = v694.length;
+ v696 = (v693>=v695);
+ v697 = v696;
+ if (v697 == true)
+ {
+ block = 3;
+ break;
+ }
+ else{
+ iter_3 = iter_2;
+ index_5 = v693;
+ l_13 = v692;
+ block = 1;
break;
}
- catch (exc){
- if (isinstanceof(exc, exceptions_Exception))
- {
- block = 41;
- break;
- }
- throw(exc);
- }
- case 32:
- undefined;
- item_name_30 = item_name_29;
- module_part_22 = module_part_21;
- td_19 = td_18;
- txt_3 = v899;
- link_6 = link_5;
- block = 33;
+ case 1:
+ v698 = (index_5+1);
+ iter_3.index = v698;
+ v700 = l_13;
+ v701 = v700[index_5];
+ v691 = v701;
+ block = 2;
break;
- case 33:
- v901 = link_6;
- item_name_31 = item_name_30;
- module_part_23 = module_part_22;
- td_20 = td_19;
- link_7 = link_6;
- v902 = v901;
- v903 = txt_3;
- block = 34;
+ case 2:
+ return ( v691 );
+ case 3:
+ v702 = __consts_0.exceptions_StopIteration;
+ v703 = v702.meta;
+ v704 = v702;
+ etype_2 = v703;
+ evalue_2 = v704;
+ block = 4;
break;
- case 34:
- try {
- v902.appendChild(v903);
- item_name_32 = item_name_31;
- module_part_24 = module_part_23;
- td_21 = td_20;
- link_8 = link_7;
- block = 35;
+ case 4:
+ throw(evalue_2);
+ }
+ }
+}
+
+function ll_dict_kvi__Dict_String__String__List_String_LlT_ (d_1,LIST_0,func_2) {
+ var v974,v975,v976,v977,v978,v979,i_6,it_0,result_0,v980,v981,v982,i_7,it_1,result_1,v983,v984,v985,v986,it_2,result_2,v987,v988;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v975 = d_1;
+ v976 = get_dict_len ( v975 );
+ v977 = ll_newlist__List_String_LlT_Signed ( undefined,v976 );
+ v978 = d_1;
+ v979 = dict_items_iterator ( v978 );
+ i_6 = 0;
+ it_0 = v979;
+ result_0 = v977;
+ block = 1;
+ break;
+ case 1:
+ v980 = it_0;
+ v981 = v980.ll_go_next();
+ v982 = v981;
+ if (v982 == true)
+ {
+ i_7 = i_6;
+ it_1 = it_0;
+ result_1 = result_0;
+ block = 3;
break;
}
- catch (exc){
- if (isinstanceof(exc, exceptions_Exception))
- {
- block = 41;
- break;
- }
- throw(exc);
+ else{
+ v974 = result_0;
+ block = 2;
+ break;
}
- case 35:
- v905 = td_21;
- item_name_33 = item_name_32;
- module_part_25 = module_part_24;
- td_22 = td_21;
- v906 = v905;
- v907 = link_8;
- block = 36;
+ case 2:
+ return ( v974 );
+ case 3:
+ v983 = result_1;
+ v984 = it_1;
+ v985 = v984.ll_current_key();
+ v983[i_7]=v985;
+ it_2 = it_1;
+ result_2 = result_1;
+ v987 = i_7;
+ block = 4;
break;
- case 36:
- try {
- v906.appendChild(v907);
- item_name_34 = item_name_33;
- module_part_26 = module_part_25;
- td_23 = td_22;
- block = 37;
+ case 4:
+ v988 = (v987+1);
+ i_6 = v988;
+ it_0 = it_2;
+ result_0 = result_2;
+ block = 1;
+ break;
+ }
+ }
+}
+
+function ll_listnext__Record_index__Signed__iterable__ (iter_4) {
+ var v993,v994,v995,v996,v997,v998,v999,iter_5,index_6,l_14,v1000,v1001,v1002,v1003,v1004,v1005,v1006,etype_3,evalue_3;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v994 = iter_4.iterable;
+ v995 = iter_4.index;
+ v996 = v994;
+ v997 = v996.length;
+ v998 = (v995>=v997);
+ v999 = v998;
+ if (v999 == true)
+ {
+ block = 3;
break;
}
- catch (exc){
- if (isinstanceof(exc, exceptions_Exception))
- {
- block = 41;
- break;
- }
- throw(exc);
+ else{
+ iter_5 = iter_4;
+ index_6 = v995;
+ l_14 = v994;
+ block = 1;
+ break;
}
- case 37:
- v909 = __consts_0.ExportedMethods;
- module_part_27 = module_part_26;
- td_24 = td_23;
- v910 = v909;
- v911 = item_name_34;
- block = 38;
+ case 1:
+ v1000 = (index_6+1);
+ iter_5.index = v1000;
+ v1002 = l_14;
+ v1003 = v1002[index_6];
+ v993 = v1003;
+ block = 2;
break;
- case 38:
- try {
- v912 = v910.show_fail(v911,fail_come_back);
- td_25 = td_24;
- v913 = module_part_27;
- block = 39;
+ case 2:
+ return ( v993 );
+ case 3:
+ v1004 = __consts_0.exceptions_StopIteration;
+ v1005 = v1004.meta;
+ v1006 = v1004;
+ etype_3 = v1005;
+ evalue_3 = v1006;
+ block = 4;
+ break;
+ case 4:
+ throw(evalue_3);
+ }
+ }
+}
+
+function exceptions_StopIteration () {
+}
+
+exceptions_StopIteration.prototype.toString = function (){
+ return ( '' );
+}
+
+inherits(exceptions_StopIteration,exceptions_Exception);
+function ll_listslice__List_Record_item2__String__ite_List_ (RESLIST_1,l1_3,slice_0) {
+ var v560,v561,v562,v563,v564,v565,v566,RESLIST_2,l1_4,stop_1,start_2,v567,v568,v569,l1_5,i_2,j_2,stop_2,l_6,v570,v571,l1_6,i_3,j_3,stop_3,l_7,v572,v573,v574,v575,v576,v577;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v561 = slice_0.start;
+ v562 = slice_0.stop;
+ v563 = l1_3;
+ v564 = v563.length;
+ v565 = (v562>v564);
+ v566 = v565;
+ if (v566 == true)
+ {
+ l1_4 = l1_3;
+ stop_1 = v564;
+ start_2 = v561;
+ block = 1;
break;
}
- catch (exc){
- if (isinstanceof(exc, exceptions_Exception))
- {
- block = 41;
- break;
- }
- throw(exc);
+ else{
+ l1_4 = l1_3;
+ stop_1 = v562;
+ start_2 = v561;
+ block = 1;
+ break;
}
- case 39:
- v914 = v913;
- v915 = v914;
- v916 = td_25;
- block = 40;
+ case 1:
+ v567 = (stop_1-start_2);
+ undefined;
+ v569 = ll_newlist__List_Record_item2__String__ite_Signed ( undefined,v567 );
+ l1_5 = l1_4;
+ i_2 = start_2;
+ j_2 = 0;
+ stop_2 = stop_1;
+ l_6 = v569;
+ block = 2;
break;
- case 40:
- try {
- v915.appendChild(v916);
- v788 = true;
+ case 2:
+ v570 = (i_2' );
+}
+
+inherits(exceptions_KeyError,exceptions_LookupError);
+function ll_listnext__Record_index__Signed__iterable_ (iter_0) {
+ var v378,v379,v380,v381,v382,v383,v384,iter_1,index_0,l_2,v385,v386,v387,v388,v389,v390,v391,etype_0,evalue_0;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v379 = iter_0.iterable;
+ v380 = iter_0.index;
+ v381 = v379;
+ v382 = v381.length;
+ v383 = (v380>=v382);
+ v384 = v383;
+ if (v384 == true)
{
- msg_33 = msg_32;
- main_t_1 = main_t_0;
- block = 62;
+ block = 3;
break;
}
else{
- v788 = true;
- block = 4;
+ iter_1 = iter_0;
+ index_0 = v380;
+ l_2 = v379;
+ block = 1;
break;
}
- case 62:
- v1000 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v1000.oenter_variant0(__consts_0.const_str__27,__consts_0.const_str__91,__consts_0.const_str__15,61);
- undefined;
- v1003 = create_elem ( __consts_0.const_str__92 );
- v1004 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v1004.oleave_variant0(__consts_0.const_str__27);
- undefined;
- v1007 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v1007.oenter_variant0(__consts_0.const_str__27,__consts_0.const_str__49,__consts_0.const_str__15,62);
- undefined;
- v1010 = create_elem ( __consts_0.const_str__50 );
- v1011 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v1011.oleave_variant0(__consts_0.const_str__27);
- undefined;
- v1014 = v1003;
- v1014.appendChild(v1010);
- v1016 = v1010;
- v1017 = ll_dict_getitem__Dict_String__String__String ( msg_33,__consts_0.const_str__93 );
- v1018 = ll_dict_getitem__Dict_String__String__String ( msg_33,__consts_0.const_str__94 );
- v1019 = ll_int__String_Signed ( v1018,10 );
- v1020 = new Object();
- v1020.item0 = v1017;
- v1020.item1 = v1019;
- v1023 = v1020.item0;
- v1024 = v1020.item1;
- v1025 = new StringBuilder();
- v1026 = v1023.toString();
- v1025.ll_append(v1026);
- v1025.ll_append(__consts_0.const_str__95);
- v1029 = v1024.toString();
- v1025.ll_append(v1029);
- v1025.ll_append(__consts_0.const_str__96);
- v8 = v1025.ll_build();
- v1032 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v1032.oenter_variant0(__consts_0.const_str__18,__consts_0.const_str__97,__consts_0.const_str__15,64);
- undefined;
- v1035 = create_text_elem ( v8 );
- v1036 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
- v1036.oleave_variant0(__consts_0.const_str__18);
- undefined;
- v1016.appendChild(v1035);
- v1040 = ll_dict_getitem__Dict_String__String__String ( msg_33,__consts_0.const_str__65 );
- v1003.id = v1040;
- v1042 = v1010;
- v1043 = ll_dict_getitem__Dict_String__String__String ( msg_33,__consts_0.const_str__65 );
- v1044 = new StringBuilder();
- v1044.ll_append(__consts_0.const_str__66);
- v1046 = v1043.toString();
- v1044.ll_append(v1046);
- v1044.ll_append(__consts_0.const_str__67);
- v1049 = v1044.ll_build();
- v1042.setAttribute(__consts_0.const_str__68,v1049);
- v1051 = v1010;
- v1051.setAttribute(__consts_0.const_str__69,__consts_0.const_str__70);
- v1053 = main_t_1;
- v1053.appendChild(v1003);
- v788 = true;
+ case 1:
+ v385 = (index_0+1);
+ iter_1.index = v385;
+ v387 = l_2;
+ v388 = v387[index_0];
+ v378 = v388;
+ block = 2;
+ break;
+ case 2:
+ return ( v378 );
+ case 3:
+ v389 = __consts_0.exceptions_StopIteration;
+ v390 = v389.meta;
+ v391 = v389;
+ etype_0 = v390;
+ evalue_0 = v391;
block = 4;
break;
+ case 4:
+ throw(evalue_0);
}
}
}
-function py____test_rsession_webjs_Pending () {
+function create_elem (s_2) {
+ var v641,v642,v643,v644,v645,v646,v647,v648,v649,v650;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v642 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v642.oenter_variant0(__consts_0.const_str__22,__consts_0.const_str__2,__consts_0.const_str__31,9);
+ undefined;
+ v645 = document;
+ v646 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v646.oleave_variant0(__consts_0.const_str__22);
+ undefined;
+ v649 = v645;
+ v650 = v649.createElement(s_2);
+ v641 = v650;
+ block = 1;
+ break;
+ case 1:
+ return ( v641 );
+ }
+ }
}
-py____test_rsession_webjs_Pending.prototype.toString = function (){
- return ( '' );
+function ll_listslice_startonly__List_Record_item2__String_ (RESLIST_0,l1_0,start_0) {
+ var v266,v267,v268,v269,v270,v271,l1_1,i_0,j_0,l_0,len1_0,v272,v273,l1_2,i_1,j_1,l_1,len1_1,v274,v275,v276,v277,v278,v279;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v267 = l1_0;
+ v268 = v267.length;
+ v269 = (v268-start_0);
+ undefined;
+ v271 = ll_newlist__List_Record_item2__String__ite_Signed ( undefined,v269 );
+ l1_1 = l1_0;
+ i_0 = start_0;
+ j_0 = 0;
+ l_0 = v271;
+ len1_0 = v268;
+ block = 1;
+ break;
+ case 1:
+ v272 = (i_0' );
+}
+
+inherits(py____test_rsession_webjs_Pending,Object);
+function ll_len__List_Record_item2__String__ite (l_4) {
+ var v539,v540,v541;
var block = 0;
for(;;){
switch(block){
case 0:
- v1058 = l_15;
- v1059 = v1058.length;
- v1060 = l_15;
- v1061 = (v1059+1);
- v1060.length = v1061;
- v1063 = l_15;
- v1063[v1059]=newitem_1;
+ v540 = l_4;
+ v541 = v540.length;
+ v539 = v541;
block = 1;
break;
case 1:
- return ( v1057 );
+ return ( v539 );
}
}
}
-function skip_come_back (msg_35) {
- var v1075,v1076,v1077,v1078;
+function hide_info_ () {
+ var v493,v494,v495,v496,v497,v498,v499,v500,v501,v502,v503,v504;
var block = 0;
for(;;){
switch(block){
case 0:
- v1076 = ll_dict_getitem__Dict_String__String__String ( msg_35,__consts_0.const_str__98 );
- v1077 = ll_dict_getitem__Dict_String__String__String ( msg_35,__consts_0.const_str__99 );
- __consts_0.const_tuple[v1077]=v1076;
+ v494 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v494.oenter_variant0(__consts_0.const_str__22,__consts_0.const_str__2,__consts_0.const_str__31,49);
+ undefined;
+ v497 = document;
+ v498 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v498.oleave_variant0(__consts_0.const_str__22);
+ undefined;
+ v501 = v497;
+ v502 = v501.getElementById(__consts_0.const_str__97);
+ v503 = v502.style;
+ v503.visibility = __consts_0.const_str__98;
block = 1;
break;
case 1:
- return ( v1075 );
+ return ( v493 );
}
}
}
-function fail_come_back (msg_34) {
- var v1065,v1066,v1067,v1068,v1069,v1070,v1071,v1072,v1073,v1074;
+function ll_len__List_Dict_String__String__ (l_10) {
+ var v670,v671,v672;
var block = 0;
for(;;){
switch(block){
case 0:
- v1066 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__100 );
- v1067 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__101 );
- v1068 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__102 );
- v1069 = new Object();
- v1069.item0 = v1066;
- v1069.item1 = v1067;
- v1069.item2 = v1068;
- v1073 = ll_dict_getitem__Dict_String__String__String ( msg_34,__consts_0.const_str__99 );
- __consts_0.const_tuple__43[v1073]=v1069;
+ v671 = l_10;
+ v672 = v671.length;
+ v670 = v672;
block = 1;
break;
case 1:
- return ( v1065 );
+ return ( v670 );
}
}
}
-function ll_newlist__List_Dict_String__String__LlT_Signed (self_10,length_3) {
- var v1055,v1056;
+function ll_append__List_Record_item2__String__ite_Record_i (l_3,newitem_0) {
+ var v514,v515,v516,v517,v518,v519,v520,v521;
var block = 0;
for(;;){
switch(block){
case 0:
- v1056 = ll_newlist__List_Dict_String__String__LlT_Signed_ ( undefined,length_3 );
- v1055 = v1056;
+ v515 = l_3;
+ v516 = v515.length;
+ v517 = l_3;
+ v518 = (v516+1);
+ v517.length = v518;
+ v520 = l_3;
+ v520[v516]=newitem_0;
block = 1;
break;
case 1:
- return ( v1055 );
+ return ( v514 );
}
}
}
function ll_int__String_Signed (s_3,base_0) {
- var v1079,v1080,v1081,v1082,v1083,v1084,etype_5,evalue_5,s_4,base_1,v1085,s_5,base_2,v1086,v1087,s_6,base_3,v1088,v1089,s_7,base_4,i_8,strlen_0,v1090,v1091,s_8,base_5,i_9,strlen_1,v1092,v1093,v1094,v1095,v1096,s_9,base_6,i_10,strlen_2,v1097,v1098,v1099,v1100,s_10,base_7,i_11,strlen_3,v1101,v1102,v1103,v1104,s_11,base_8,val_0,i_12,sign_0,strlen_4,v1105,v1106,s_12,val_1,i_13,sign_1,strlen_5,v1107,v1108,val_2,sign_2,v1109,v1110,v1111,v1112,v1113,v1114,v1115,v1116,v1117,v1118,s_13,val_3,i_14,sign_3,strlen_6,v1119,v1120,v1121,v1122,s_14,val_4,sign_4,strlen_7,v1123,v1124,s_15,base_9,val_5,i_15,sign_5,strlen_8,v1125,v1126,v1127,v1128,v1129,s_16,base_10,c_1,val_6,i_16,sign_6,strlen_9,v1130,v1131,s_17,base_11,c_2,val_7,i_17,sign_7,strlen_10,v1132,v1133,s_18,base_12,c_3,val_8,i_18,sign_8,strlen_11,v1134,s_19,base_13,c_4,val_9,i_19,sign_9,strlen_12,v1135,v1136,s_20,base_14,val_10,i_20,sign_10,strlen_13,v1137,v1138,s_21,base_15,val_11,i_21,digit_0,sign_11,strlen_14,v1139,v1140,s_22,base_16,i_22,digit_1,sign_12,strlen_15,v1141,v1142,v1143,v1144,s_23,base_17,c_5,val_12,i_23,sign_13,strlen_16,v1145,s_24,base_18,c_6,val_13,i_24,sign_14,strlen_17,v1146,v1147,s_25,base_19,val_14,i_25,sign_15,strlen_18,v1148,v1149,v1150,s_26,base_20,c_7,val_15,i_26,sign_16,strlen_19,v1151,s_27,base_21,c_8,val_16,i_27,sign_17,strlen_20,v1152,v1153,s_28,base_22,val_17,i_28,sign_18,strlen_21,v1154,v1155,v1156,s_29,base_23,strlen_22,v1157,v1158,s_30,base_24,strlen_23,v1159,v1160,s_31,base_25,i_29,strlen_24,v1161,v1162,v1163,v1164,s_32,base_26,strlen_25,v1165,v1166;
+ var v1039,v1040,v1041,v1042,v1043,v1044,etype_5,evalue_5,s_4,base_1,v1045,s_5,base_2,v1046,v1047,s_6,base_3,v1048,v1049,s_7,base_4,i_8,strlen_0,v1050,v1051,s_8,base_5,i_9,strlen_1,v1052,v1053,v1054,v1055,v1056,s_9,base_6,i_10,strlen_2,v1057,v1058,v1059,v1060,s_10,base_7,i_11,strlen_3,v1061,v1062,v1063,v1064,s_11,base_8,val_0,i_12,sign_0,strlen_4,v1065,v1066,s_12,val_1,i_13,sign_1,strlen_5,v1067,v1068,val_2,sign_2,v1069,v1070,v1071,v1072,v1073,v1074,v1075,v1076,v1077,v1078,s_13,val_3,i_14,sign_3,strlen_6,v1079,v1080,v1081,v1082,s_14,val_4,sign_4,strlen_7,v1083,v1084,s_15,base_9,val_5,i_15,sign_5,strlen_8,v1085,v1086,v1087,v1088,v1089,s_16,base_10,c_1,val_6,i_16,sign_6,strlen_9,v1090,v1091,s_17,base_11,c_2,val_7,i_17,sign_7,strlen_10,v1092,v1093,s_18,base_12,c_3,val_8,i_18,sign_8,strlen_11,v1094,s_19,base_13,c_4,val_9,i_19,sign_9,strlen_12,v1095,v1096,s_20,base_14,val_10,i_20,sign_10,strlen_13,v1097,v1098,s_21,base_15,val_11,i_21,digit_0,sign_11,strlen_14,v1099,v1100,s_22,base_16,i_22,digit_1,sign_12,strlen_15,v1101,v1102,v1103,v1104,s_23,base_17,c_5,val_12,i_23,sign_13,strlen_16,v1105,s_24,base_18,c_6,val_13,i_24,sign_14,strlen_17,v1106,v1107,s_25,base_19,val_14,i_25,sign_15,strlen_18,v1108,v1109,v1110,s_26,base_20,c_7,val_15,i_26,sign_16,strlen_19,v1111,s_27,base_21,c_8,val_16,i_27,sign_17,strlen_20,v1112,v1113,s_28,base_22,val_17,i_28,sign_18,strlen_21,v1114,v1115,v1116,s_29,base_23,strlen_22,v1117,v1118,s_30,base_24,strlen_23,v1119,v1120,s_31,base_25,i_29,strlen_24,v1121,v1122,v1123,v1124,s_32,base_26,strlen_25,v1125,v1126;
var block = 0;
for(;;){
switch(block){
case 0:
- v1080 = (2<=base_0);
- v1081 = v1080;
- if (v1081 == true)
+ v1040 = (2<=base_0);
+ v1041 = v1040;
+ if (v1041 == true)
{
s_4 = s_3;
base_1 = base_0;
@@ -4137,25 +3973,25 @@
break;
}
case 1:
- v1082 = __consts_0.exceptions_ValueError;
- v1083 = v1082.meta;
- v1084 = v1082;
- etype_5 = v1083;
- evalue_5 = v1084;
+ v1042 = __consts_0.exceptions_ValueError;
+ v1043 = v1042.meta;
+ v1044 = v1042;
+ etype_5 = v1043;
+ evalue_5 = v1044;
block = 2;
break;
case 2:
throw(evalue_5);
case 3:
- v1085 = (base_1<=36);
+ v1045 = (base_1<=36);
s_5 = s_4;
base_2 = base_1;
- v1086 = v1085;
+ v1046 = v1045;
block = 4;
break;
case 4:
- v1087 = v1086;
- if (v1087 == true)
+ v1047 = v1046;
+ if (v1047 == true)
{
s_6 = s_5;
base_3 = base_2;
@@ -4167,18 +4003,18 @@
break;
}
case 5:
- v1088 = s_6;
- v1089 = v1088.length;
+ v1048 = s_6;
+ v1049 = v1048.length;
s_7 = s_6;
base_4 = base_3;
i_8 = 0;
- strlen_0 = v1089;
+ strlen_0 = v1049;
block = 6;
break;
case 6:
- v1090 = (i_8=base_15);
- v1140 = v1139;
- if (v1140 == true)
+ v1099 = (digit_0>=base_15);
+ v1100 = v1099;
+ if (v1100 == true)
{
s_12 = s_21;
val_1 = val_11;
@@ -4515,24 +4351,24 @@
digit_1 = digit_0;
sign_12 = sign_11;
strlen_15 = strlen_14;
- v1141 = val_11;
+ v1101 = val_11;
block = 26;
break;
}
case 26:
- v1142 = (v1141*base_16);
- v1143 = (v1142+digit_1);
- v1144 = (i_22+1);
+ v1102 = (v1101*base_16);
+ v1103 = (v1102+digit_1);
+ v1104 = (i_22+1);
s_11 = s_22;
base_8 = base_16;
- val_0 = v1143;
- i_12 = v1144;
+ val_0 = v1103;
+ i_12 = v1104;
sign_0 = sign_12;
strlen_4 = strlen_15;
block = 11;
break;
case 27:
- v1145 = (c_5<=90);
+ v1105 = (c_5<=90);
s_24 = s_23;
base_18 = base_17;
c_6 = c_5;
@@ -4540,12 +4376,12 @@
i_24 = i_23;
sign_14 = sign_13;
strlen_17 = strlen_16;
- v1146 = v1145;
+ v1106 = v1105;
block = 28;
break;
case 28:
- v1147 = v1146;
- if (v1147 == true)
+ v1107 = v1106;
+ if (v1107 == true)
{
s_25 = s_24;
base_19 = base_18;
@@ -4553,7 +4389,7 @@
i_25 = i_24;
sign_15 = sign_14;
strlen_18 = strlen_17;
- v1148 = c_6;
+ v1108 = c_6;
block = 29;
break;
}
@@ -4569,19 +4405,19 @@
break;
}
case 29:
- v1149 = (v1148-65);
- v1150 = (v1149+10);
+ v1109 = (v1108-65);
+ v1110 = (v1109+10);
s_21 = s_25;
base_15 = base_19;
val_11 = val_14;
i_21 = i_25;
- digit_0 = v1150;
+ digit_0 = v1110;
sign_11 = sign_15;
strlen_14 = strlen_18;
block = 25;
break;
case 30:
- v1151 = (c_7<=122);
+ v1111 = (c_7<=122);
s_27 = s_26;
base_21 = base_20;
c_8 = c_7;
@@ -4589,12 +4425,12 @@
i_27 = i_26;
sign_17 = sign_16;
strlen_20 = strlen_19;
- v1152 = v1151;
+ v1112 = v1111;
block = 31;
break;
case 31:
- v1153 = v1152;
- if (v1153 == true)
+ v1113 = v1112;
+ if (v1113 == true)
{
s_28 = s_27;
base_22 = base_21;
@@ -4602,7 +4438,7 @@
i_28 = i_27;
sign_18 = sign_17;
strlen_21 = strlen_20;
- v1154 = c_8;
+ v1114 = c_8;
block = 32;
break;
}
@@ -4618,48 +4454,48 @@
break;
}
case 32:
- v1155 = (v1154-97);
- v1156 = (v1155+10);
+ v1115 = (v1114-97);
+ v1116 = (v1115+10);
s_21 = s_28;
base_15 = base_22;
val_11 = val_17;
i_21 = i_28;
- digit_0 = v1156;
+ digit_0 = v1116;
sign_11 = sign_18;
strlen_14 = strlen_21;
block = 25;
break;
case 33:
- v1158 = (v1157+1);
+ v1118 = (v1117+1);
s_11 = s_29;
base_8 = base_23;
val_0 = 0;
- i_12 = v1158;
+ i_12 = v1118;
sign_0 = 1;
strlen_4 = strlen_22;
block = 11;
break;
case 34:
- v1160 = (v1159+1);
+ v1120 = (v1119+1);
s_11 = s_30;
base_8 = base_24;
val_0 = 0;
- i_12 = v1160;
+ i_12 = v1120;
sign_0 = -1;
strlen_4 = strlen_23;
block = 11;
break;
case 35:
- v1161 = s_31;
- v1162 = v1161[i_29];
- v1163 = (v1162==' ');
- v1164 = v1163;
- if (v1164 == true)
+ v1121 = s_31;
+ v1122 = v1121[i_29];
+ v1123 = (v1122==' ');
+ v1124 = v1123;
+ if (v1124 == true)
{
s_32 = s_31;
base_26 = base_25;
strlen_25 = strlen_24;
- v1165 = i_29;
+ v1125 = i_29;
block = 36;
break;
}
@@ -4672,10 +4508,10 @@
break;
}
case 36:
- v1166 = (v1165+1);
+ v1126 = (v1125+1);
s_7 = s_32;
base_4 = base_26;
- i_8 = v1166;
+ i_8 = v1126;
strlen_0 = strlen_25;
block = 6;
break;
@@ -4683,6 +4519,170 @@
}
}
+function ll_append__List_Dict_String__String___Dict_String_ (l_15,newitem_1) {
+ var v1017,v1018,v1019,v1020,v1021,v1022,v1023,v1024;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v1018 = l_15;
+ v1019 = v1018.length;
+ v1020 = l_15;
+ v1021 = (v1019+1);
+ v1020.length = v1021;
+ v1023 = l_15;
+ v1023[v1019]=newitem_1;
+ block = 1;
+ break;
+ case 1:
+ return ( v1017 );
+ }
+ }
+}
+
+function skip_come_back (msg_35) {
+ var v1035,v1036,v1037,v1038;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v1036 = ll_dict_getitem__Dict_String__String__String ( msg_35,__consts_0.const_str__100 );
+ v1037 = ll_dict_getitem__Dict_String__String__String ( msg_35,__consts_0.const_str__93 );
+ __consts_0.const_tuple__95[v1037]=v1036;
+ block = 1;
+ break;
+ case 1:
+ return ( v1035 );
+ }
+ }
+}
+
+function ll_newlist__List_String_LlT_Signed (LIST_1,length_1) {
+ var v1127,v1128,v1129,v1130;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v1128 = new Array();
+ v1129 = v1128;
+ v1129.length = length_1;
+ v1127 = v1128;
+ block = 1;
+ break;
+ case 1:
+ return ( v1127 );
+ }
+ }
+}
+
+function ll_newlist__List_Record_item2__String__ite_Signed (self_10,length_2) {
+ var v1131,v1132;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v1132 = ll_newlist__List_Record_item2__String__ite_Signed_ ( undefined,length_2 );
+ v1131 = v1132;
+ block = 1;
+ break;
+ case 1:
+ return ( v1131 );
+ }
+ }
+}
+
+function show_info_ (data_11) {
+ var v1133,v1134,v1135,v1136,v1137,v1138,v1139,v1140,v1141,v1142,v1143,v1144,data_12,info_0,v1145,v1146,v1147,info_1,v10,v1148,v1149,v1150,v1151,v1152,v1153,v1154,v1155,v1156,v1157,v1158,data_13,info_2,v1159,v1160,v1161,v1162;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v1134 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v1134.oenter_variant0(__consts_0.const_str__22,__consts_0.const_str__2,__consts_0.const_str__31,39);
+ undefined;
+ v1137 = document;
+ v1138 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v1138.oleave_variant0(__consts_0.const_str__22);
+ undefined;
+ v1141 = v1137;
+ v1142 = v1141.getElementById(__consts_0.const_str__97);
+ v1143 = v1142.style;
+ v1143.visibility = __consts_0.const_str__101;
+ data_12 = data_11;
+ info_0 = v1142;
+ block = 1;
+ break;
+ case 1:
+ v1145 = info_0.childNodes;
+ v1146 = ll_len__List_ExternalType_ ( v1145 );
+ v1147 = !!v1146;
+ if (v1147 == true)
+ {
+ data_13 = data_12;
+ info_2 = info_0;
+ block = 4;
+ break;
+ }
+ else{
+ info_1 = info_0;
+ v10 = data_12;
+ block = 2;
+ break;
+ }
+ case 2:
+ v1148 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v1148.oenter_variant0(__consts_0.const_str__37,__consts_0.const_str__102,__consts_0.const_str__31,43);
+ undefined;
+ v1151 = create_text_elem ( v10 );
+ v1152 = __consts_0.pypy_translator_transformer_debug_TracebackHandler;
+ v1152.oleave_variant0(__consts_0.const_str__37);
+ undefined;
+ v1155 = info_1;
+ v1155.appendChild(v1151);
+ v1157 = info_1.style;
+ v1157.backgroundColor = __consts_0.const_str__103;
+ block = 3;
+ break;
+ case 3:
+ return ( v1133 );
+ case 4:
+ v1159 = info_2;
+ v1160 = info_2.childNodes;
+ v1161 = ll_getitem_nonneg__dum_nocheckConst_List_ExternalT ( undefined,v1160,0 );
+ v1162 = v1159.removeChild(v1161);
+ data_12 = data_13;
+ info_0 = info_2;
+ block = 1;
+ break;
+ }
+ }
+}
+
+function ll_newlist__List_Dict_String__String__LlT_Signed_ (LIST_2,length_3) {
+ var v1163,v1164,v1165,v1166;
+ var block = 0;
+ for(;;){
+ switch(block){
+ case 0:
+ v1164 = new Array();
+ v1165 = v1164;
+ v1165.length = length_3;
+ v1163 = v1164;
+ block = 1;
+ break;
+ case 1:
+ return ( v1163 );
+ }
+ }
+}
+
+function Slice () {
+}
+
+Slice.prototype.toString = function (){
+ return ( '' );
+}
+
function exceptions_ValueError () {
}
@@ -4691,7 +4691,7 @@
}
inherits(exceptions_ValueError,exceptions_StandardError);
-function ll_newlist__List_Dict_String__String__LlT_Signed_ (LIST_3,length_4) {
+function ll_newlist__List_Record_item2__String__ite_Signed_ (LIST_3,length_4) {
var v1167,v1168,v1169,v1170;
var block = 0;
for(;;){
@@ -4710,111 +4710,111 @@
}
__consts_0 = {};
-__consts_0.const_str__82 = "javascript:show_skip('";
-__consts_0.const_str__28 = "('pre')";
-__consts_0.const_str__90 = 'Module';
-__consts_0.const_str__76 = 'a';
-__consts_0.const_str__51 = '#ff0000';
+__consts_0.const_str__74 = "javascript:show_skip('";
+__consts_0.const_str__56 = '(v6)';
+__consts_0.const_str__36 = "('pre')";
+__consts_0.const_str__82 = 'Module';
+__consts_0.const_str__68 = 'a';
+__consts_0.const_str__46 = '#ff0000';
__consts_0.const_str__11 = 'hide_info';
-__consts_0.const_str__75 = "('a')";
-__consts_0.const_str__62 = 'ReceivedItemOutcome';
-__consts_0.const_str__66 = "show_info('";
-__consts_0.const_str__24 = 'get_elem';
-__consts_0.const_str__70 = 'hide_info()';
-__consts_0.const_str__14 = 'get_document';
+__consts_0.const_str__67 = "('a')";
+__consts_0.const_str__54 = 'ReceivedItemOutcome';
+__consts_0.const_str__58 = "show_info('";
+__consts_0.const_str__32 = 'get_elem';
+__consts_0.const_str__62 = 'hide_info()';
+__consts_0.const_str__8 = '(v1)';
__consts_0.const_str__12 = 'entrypoint';
__consts_0.ExportedMethods = new ExportedMethods();
-__consts_0.const_str__94 = 'length';
-__consts_0.const_str__58 = 'main_table';
-__consts_0.const_str__81 = 'some error';
-__consts_0.const_str__67 = "')";
-__consts_0.const_str__79 = "('F')";
-__consts_0.const_str__54 = 'process';
-__consts_0.const_str__101 = 'stdout';
+__consts_0.const_str__86 = 'length';
+__consts_0.const_list = [];
+__consts_0.const_str__50 = 'main_table';
+__consts_0.const_str__73 = 'some error';
+__consts_0.const_str__59 = "')";
+__consts_0.const_str__71 = "('F')";
+__consts_0.const_str__40 = 'process';
+__consts_0.const_str__91 = 'stdout';
__consts_0.const_str__4 = 'aa';
-__consts_0.const_tuple__43 = {};
-__consts_0.const_str__61 = 'HostReady';
-__consts_0.const_str__6 = '(v0)';
-__consts_0.const_str__16 = 'info';
-__consts_0.const_str__64 = '(v7)';
-__consts_0.const_str__47 = '(item_name_1, v9)';
-__consts_0.const_str__50 = 'td';
-__consts_0.exceptions_StopIteration = new exceptions_StopIteration();
-__consts_0.const_str__33 = 'debug_div';
-__consts_0.const_str__80 = 'F';
-__consts_0.const_str__69 = 'onmouseout';
-__consts_0.const_str__49 = "('td')";
-__consts_0.const_str__59 = 'type';
-__consts_0.const_str__27 = 'create_elem';
-__consts_0.const_str__71 = 'passed';
-__consts_0.const_str__86 = '.';
__consts_0.const_list__105 = [];
__consts_0.pypy_translator_transformer_debug_TracebackHandler = new pypy_translator_transformer_debug_TracebackHandler();
__consts_0.pypy_translator_transformer_debug_TracebackHandler.otb = __consts_0.const_list__105;
-__consts_0.const_str__96 = ']';
+__consts_0.const_str__53 = 'HostReady';
+__consts_0.const_str__6 = '(v0)';
+__consts_0.const_str__97 = 'info';
+__consts_0.const_str__89 = '(v7)';
+__consts_0.const_str__30 = '(item_name_1, v9)';
+__consts_0.const_str__14 = 'debug_div';
+__consts_0.const_str__72 = 'F';
+__consts_0.const_str__61 = 'onmouseout';
+__consts_0.const_str__44 = "('td')";
+__consts_0.const_str__51 = 'type';
+__consts_0.const_str__35 = 'create_elem';
+__consts_0.const_str__63 = 'passed';
+__consts_0.const_str__78 = '.';
+__consts_0.const_str__88 = ']';
__consts_0.const_str__9 = 'show_info';
-__consts_0.const_str__52 = '(v3)';
-__consts_0.const_str__15 = '/home/fijal/lang/python/pypy-dist/py/test/rsession/webjs.py';
-__consts_0.const_str__26 = 'messagebox';
-__consts_0.const_str__65 = 'fullitemname';
-__consts_0.const_str__22 = 'set_msgbox';
-__consts_0.const_str__78 = 'href';
-__consts_0.const_str__17 = 'visible';
-__consts_0.const_str__19 = '(v10)';
-__consts_0.const_str__48 = 'hostrow';
-__consts_0.const_list = [];
-__consts_0.py____test_rsession_webjs_Pending = new py____test_rsession_webjs_Pending();
-__consts_0.py____test_rsession_webjs_Pending.opending = __consts_0.const_list;
-__consts_0.const_str__30 = '\n';
-__consts_0.const_str__29 = 'pre';
-__consts_0.const_str__45 = '\n======== Stdout: ========\n';
-__consts_0.const_str__88 = '#00ff00';
-__consts_0.const_str__20 = 'beige';
-__consts_0.const_str__84 = 's';
-__consts_0.const_str__100 = 'traceback';
+__consts_0.const_str__47 = '(v3)';
+__consts_0.const_str__23 = '/home/fijal/lang/python/pypy-dist/pypy/translator/js/helper.py';
+__consts_0.const_str__34 = 'messagebox';
+__consts_0.const_str__57 = 'fullitemname';
+__consts_0.const_str__29 = 'set_msgbox';
+__consts_0.const_str__70 = 'href';
+__consts_0.const_str__101 = 'visible';
+__consts_0.const_str__102 = '(v10)';
+__consts_0.const_str__43 = 'hostrow';
+__consts_0.const_tuple__95 = {};
+__consts_0.const_str__20 = '\n';
+__consts_0.exceptions_StopIteration = new exceptions_StopIteration();
+__consts_0.const_str__15 = 'pre';
+__consts_0.const_str__27 = '\n======== Stdout: ========\n';
+__consts_0.const_str__80 = '#00ff00';
+__consts_0.const_str__103 = 'beige';
+__consts_0.const_str__76 = 's';
+__consts_0.exceptions_KeyError = new exceptions_KeyError();
+__consts_0.const_str__90 = 'traceback';
__consts_0.const_str__7 = 'show_traceback';
__consts_0.const_str__10 = '(v2)';
-__consts_0.const_str__57 = 'testmain';
-__consts_0.const_str__25 = "('messagebox')";
+__consts_0.const_str__49 = 'testmain';
+__consts_0.const_str__33 = "('messagebox')";
__consts_0.const_str__5 = 'show_skip';
-__consts_0.const_str__95 = '[';
-__consts_0.const_str__39 = '/home/fijal/lang/python/pypy-dist/pypy/translator/js/helper.py';
-__consts_0.const_str__98 = 'reason';
-__consts_0.const_str__77 = "javascript:show_traceback('";
-__consts_0.const_str__31 = '(v11)';
-__consts_0.const_str__23 = '(item_name_0, v6)';
-__consts_0.const_str__74 = 'None';
-__consts_0.const_str__72 = 'True';
-__consts_0.const_str__56 = '(v5)';
+__consts_0.const_str__87 = '[';
+__consts_0.const_str__31 = '/home/fijal/lang/python/pypy-dist/py/test/rsession/webjs.py';
+__consts_0.const_str__100 = 'reason';
+__consts_0.const_str__69 = "javascript:show_traceback('";
+__consts_0.const_str__38 = '(v11)';
+__consts_0.const_str__66 = 'None';
+__consts_0.const_str__64 = 'True';
+__consts_0.const_str__42 = '(v5)';
__consts_0.const_tuple = {};
-__consts_0.const_str__89 = 'itemtype';
-__consts_0.const_str__87 = 'hostkey';
-__consts_0.const_str__97 = '(v8)';
-__consts_0.const_str__60 = 'ItemStart';
-__consts_0.const_str__93 = 'itemname';
-__consts_0.const_str__91 = "('tr')";
-__consts_0.const_str__85 = "('.')";
-__consts_0.const_str__46 = '\n========== Stderr: ==========\n';
-__consts_0.exceptions_ValueError = new exceptions_ValueError();
-__consts_0.const_str__40 = 'div';
-__consts_0.const_str__55 = '(v4)';
-__consts_0.const_str__102 = 'stderr';
-__consts_0.const_str__18 = 'create_text_elem';
-__consts_0.const_str__83 = "('s')";
-__consts_0.const_str__8 = '(v1)';
+__consts_0.const_str__81 = 'itemtype';
+__consts_0.const_str__79 = 'hostkey';
+__consts_0.const_str__52 = 'ItemStart';
+__consts_0.const_str__85 = 'itemname';
+__consts_0.const_str__83 = "('tr')";
+__consts_0.const_str__77 = "('.')";
+__consts_0.const_str__28 = '\n========== Stderr: ==========\n';
+__consts_0.py____test_rsession_webjs_Pending = new py____test_rsession_webjs_Pending();
+__consts_0.py____test_rsession_webjs_Pending.opending = __consts_0.const_list;
+__consts_0.const_str__24 = 'div';
+__consts_0.const_str__41 = '(v4)';
+__consts_0.const_str__92 = 'stderr';
+__consts_0.const_str__96 = '(item_name_0, v8)';
+__consts_0.const_str__37 = 'create_text_elem';
+__consts_0.const_str__75 = "('s')";
+__consts_0.const_str__22 = 'get_document';
__consts_0.const_str__3 = '';
-__consts_0.const_str__34 = '#FF0000';
-__consts_0.const_str__68 = 'onmouseover';
+__consts_0.const_str__16 = '#FF0000';
+__consts_0.const_str__60 = 'onmouseover';
__consts_0.const_str__2 = '()';
-__consts_0.exceptions_KeyError = new exceptions_KeyError();
-__consts_0.const_str__63 = 'fullmodulename';
-__consts_0.const_str__73 = 'skipped';
-__consts_0.const_str__36 = ' ';
+__consts_0.exceptions_ValueError = new exceptions_ValueError();
+__consts_0.const_str__55 = 'fullmodulename';
+__consts_0.const_str__65 = 'skipped';
+__consts_0.const_str__18 = ' ';
__consts_0.const_str = 'main';
-__consts_0.const_str__32 = 'hidden';
-__consts_0.const_str__44 = '====== Traceback: =========\n';
-__consts_0.const_str__92 = 'tr';
-__consts_0.const_str__99 = 'item_name';
-__consts_0.const_str__35 = ' ';
-__consts_0.const_str__37 = ': ';
+__consts_0.const_str__45 = 'td';
+__consts_0.const_str__26 = '====== Traceback: =========\n';
+__consts_0.const_str__84 = 'tr';
+__consts_0.const_str__93 = 'item_name';
+__consts_0.const_str__17 = ' ';
+__consts_0.const_str__98 = 'hidden';
+__consts_0.const_str__19 = ': ';
__consts_0.const_str__13 = '';
Modified: py/dist/py/test/rsession/webjs.py
==============================================================================
--- py/dist/py/test/rsession/webjs.py (original)
+++ py/dist/py/test/rsession/webjs.py Tue Sep 12 12:56:40 2006
@@ -61,7 +61,7 @@
tr = create_elem("tr")
td = create_elem("td")
tr.appendChild(td)
- td.appendChild(create_text_elem("%s[%d]" % (msg['itemname'], int(msg['length']))))
+ td.appendChild(create_text_elem("%s[%s]" % (msg['itemname'], msg['length'])))
tr.id = msg['fullitemname']
td.setAttribute("onmouseover", "show_info('%s')" % msg['fullitemname'])
td.setAttribute("onmouseout", "hide_info()")
From cfbolz at codespeak.net Tue Sep 12 13:05:21 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Tue, 12 Sep 2006 13:05:21 +0200 (CEST)
Subject: [py-svn] r32209 - in py/dist/py/test: . testing
Message-ID: <20060912110521.083D61007E@code0.codespeak.net>
Author: cfbolz
Date: Tue Sep 12 13:05:19 2006
New Revision: 32209
Modified:
py/dist/py/test/collect.py
py/dist/py/test/testing/test_session.py
Log:
fix a test (which was testing the wrong thing) and a problem with the test
collection: previously, if you started py.test in a directory that did not
contain an __init__.py file, py.test would go up one level and then look for
conftests in all subdirectories. This is not a good idea, since you are in the
correct directory already.
Modified: py/dist/py/test/collect.py
==============================================================================
--- py/dist/py/test/collect.py (original)
+++ py/dist/py/test/collect.py Tue Sep 12 13:05:19 2006
@@ -39,8 +39,11 @@
if not fspath.check():
raise py.error.ENOENT(fspath)
pkgpath = fspath.pypkgpath()
- if pkgpath is None:
- pkgpath = fspath.dirpath()
+ if pkgpath is None:
+ if fspath.check(dir=1):
+ pkgpath = fspath
+ else:
+ pkgpath = fspath.dirpath()
Directory = py.test.Config.getvalue('Directory', pkgpath)
current = Directory(pkgpath)
#print "pkgpath", pkgpath
Modified: py/dist/py/test/testing/test_session.py
==============================================================================
--- py/dist/py/test/testing/test_session.py (original)
+++ py/dist/py/test/testing/test_session.py Tue Sep 12 13:05:19 2006
@@ -273,7 +273,7 @@
item, result = l[-1]
assert item.name == 'test_4'
names = item.listnames()
- assert names == ['test_drive', 'ordertest', 'test_orderofexecution.py', 'Testmygroup', '()', 'test_4']
+ assert names == ['ordertest', 'test_orderofexecution.py', 'Testmygroup', '()', 'test_4']
def test_nested_import_error(self):
o = tmpdir.ensure('Ians_importfailure', dir=1)
From cfbolz at codespeak.net Tue Sep 12 13:45:23 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Tue, 12 Sep 2006 13:45:23 +0200 (CEST)
Subject: [py-svn] r32210 - py/dist/py/documentation
Message-ID: <20060912114523.2A9201007E@code0.codespeak.net>
Author: cfbolz
Date: Tue Sep 12 13:45:20 2006
New Revision: 32210
Modified:
py/dist/py/documentation/misc.txt
Log:
(cfbolz, briandorsey) Update paragraph about sysexec method working on win32.
Modified: py/dist/py/documentation/misc.txt
==============================================================================
--- py/dist/py/documentation/misc.txt (original)
+++ py/dist/py/documentation/misc.txt Tue Sep 12 13:45:20 2006
@@ -130,9 +130,10 @@
implementation`_ but don't expose any of its API apart
from the above ``sysexec()`` method.
-Note, however, that we currently don't support the ``sysexec``
-interface on win32. We want to integrate our `compile-on-the-fly`_
-and use the ``_subprocess.c`` file from the `PEP-324 subprocess module`_.
+Note, however, that currently the support for the ``sysexec`` interface on
+win32 is not thoroughly tested. If you run into problems with it, we are
+interested to hear about them. If you are running a Python older than 2.4 you
+will have to install the `pywin32 package`_.
.. _`compile-on-the-fly`: future.html#compile-on-the-fly
@@ -140,6 +141,7 @@
.. _`PEP-324 subprocess module`: http://www.python.org/peps/pep-0324.html
.. _`subprocess implementation`: http://www.lysator.liu.se/~astrand/popen5/
.. _`a more general view on path objects`: future.html#general-path
+.. _`pywin32 package`: http://pywin32.sourceforge.net/
finding an executable local path
--------------------------------
From fijal at codespeak.net Tue Sep 12 13:46:00 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Tue, 12 Sep 2006 13:46:00 +0200 (CEST)
Subject: [py-svn] r32211 - in py/dist/py: . path/local test/rsession
Message-ID: <20060912114600.A42F11007E@code0.codespeak.net>
Author: fijal
Date: Tue Sep 12 13:45:57 2006
New Revision: 32211
Modified:
py/dist/py/initpkg.py
py/dist/py/path/local/local.py
py/dist/py/test/rsession/rsync.py
Log:
(fijal, hpk) Removed assertions which are just not true. We do not guarantee order of tests in distributed mode.
Modified: py/dist/py/initpkg.py
==============================================================================
--- py/dist/py/initpkg.py (original)
+++ py/dist/py/initpkg.py Tue Sep 12 13:45:57 2006
@@ -46,7 +46,7 @@
implname = name + '.' + '__'
self.implmodule = ModuleType(implname)
self.implmodule.__name__ = implname
- self.implmodule.__file__ = pkgmodule.__file__
+ self.implmodule.__file__ = os.path.abspath(pkgmodule.__file__)
self.implmodule.__path__ = [os.path.abspath(p)
for p in pkgmodule.__path__]
pkgmodule.__ = self.implmodule
Modified: py/dist/py/path/local/local.py
==============================================================================
--- py/dist/py/path/local/local.py (original)
+++ py/dist/py/path/local/local.py Tue Sep 12 13:45:57 2006
@@ -366,12 +366,12 @@
if ensuresyspath:
self._prependsyspath(pkgpath.dirpath())
pkg = __import__(pkgpath.basename, None, None, [])
- assert py.path.local(pkg.__file__).realpath().relto(
- pkgpath.realpath())
+
if hasattr(pkg, '__package__'):
modname = pkg.__package__.getimportname(self)
assert modname is not None, "package %s doesn't know %s" % (
pkg.__name__, self)
+
else:
names = self.new(ext='').relto(pkgpath.dirpath())
names = names.split(self.sep)
Modified: py/dist/py/test/rsession/rsync.py
==============================================================================
--- py/dist/py/test/rsession/rsync.py (original)
+++ py/dist/py/test/rsession/rsync.py Tue Sep 12 13:45:57 2006
@@ -144,7 +144,7 @@
for path, (time, size) in modifiedfiles:
data = channel.receive()
if data is not None:
- assert len(data) == size
+ #assert len(data) == size
f = open(path, 'wb')
f.write(data)
f.close()
From fijal at codespeak.net Tue Sep 12 13:47:43 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Tue, 12 Sep 2006 13:47:43 +0200 (CEST)
Subject: [py-svn] r32212 - py/dist/py/test/rsession/webdata
Message-ID: <20060912114743.4036C1007E@code0.codespeak.net>
Author: fijal
Date: Tue Sep 12 13:47:38 2006
New Revision: 32212
Modified:
py/dist/py/test/rsession/webdata/source.js (contents, props changed)
Log:
Added binary flag
Modified: py/dist/py/test/rsession/webdata/source.js
==============================================================================
Binary files. No diff available.
From fijal at codespeak.net Tue Sep 12 13:51:06 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Tue, 12 Sep 2006 13:51:06 +0200 (CEST)
Subject: [py-svn] r32213 - py/dist/py/test/rsession
Message-ID: <20060912115106.5DA691007E@code0.codespeak.net>
Author: fijal
Date: Tue Sep 12 13:51:03 2006
New Revision: 32213
Modified:
py/dist/py/test/rsession/web.py
Log:
Fixed dependance on module.
Modified: py/dist/py/test/rsession/web.py
==============================================================================
--- py/dist/py/test/rsession/web.py (original)
+++ py/dist/py/test/rsession/web.py Tue Sep 12 13:51:03 2006
@@ -65,7 +65,11 @@
if isinstance(current, collect.Module):
return current
current = current.parent
- return None
+
+ if current is not None:
+ return str(current.name), str("/".join(current.listnames()))
+ else:
+ return str(item.parent.name), str("/".join(item.parent.listnames()))
def show_hosts(self):
self.start_event.wait()
@@ -115,10 +119,9 @@
for key, val in outcome.__dict__.iteritems():
args[key] = str(val)
args.update(add_item(event))
- mod = self.findmodule(event.item)
- assert mod is not None, "We should have some parent module"
- args['modulename'] = str(mod.name)
- args['fullmodulename'] = str("/".join(mod.listnames()))
+ mod_name, mod_fullname = self.findmodule(event.item)
+ args['modulename'] = str(mod_name)
+ args['fullmodulename'] = str(mod_fullname)
fullitemname = args['fullitemname']
if outcome.skipped:
self.skip_reasons[fullitemname] = outcome.skipped
From fijal at codespeak.net Tue Sep 12 13:52:49 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Tue, 12 Sep 2006 13:52:49 +0200 (CEST)
Subject: [py-svn] r32214 - py/dist/py/test/rsession
Message-ID: <20060912115249.D3A331007E@code0.codespeak.net>
Author: fijal
Date: Tue Sep 12 13:52:47 2006
New Revision: 32214
Modified:
py/dist/py/test/rsession/web.py
Log:
Typo
Modified: py/dist/py/test/rsession/web.py
==============================================================================
--- py/dist/py/test/rsession/web.py (original)
+++ py/dist/py/test/rsession/web.py Tue Sep 12 13:52:47 2006
@@ -63,7 +63,7 @@
current = item
while current:
if isinstance(current, collect.Module):
- return current
+ break
current = current.parent
if current is not None:
From fijal at codespeak.net Tue Sep 12 15:04:51 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Tue, 12 Sep 2006 15:04:51 +0200 (CEST)
Subject: [py-svn] r32215 - py/dist/py/test/rsession/webdata
Message-ID: <20060912130451.152FE1007E@code0.codespeak.net>
Author: fijal
Date: Tue Sep 12 15:04:48 2006
New Revision: 32215
Modified:
py/dist/py/test/rsession/webdata/index.html
Log:
Change position to fixed
Modified: py/dist/py/test/rsession/webdata/index.html
==============================================================================
--- py/dist/py/test/rsession/webdata/index.html (original)
+++ py/dist/py/test/rsession/webdata/index.html Tue Sep 12 15:04:48 2006
@@ -5,7 +5,7 @@
Tests
-
+
From fijal at codespeak.net Tue Sep 12 15:48:43 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Tue, 12 Sep 2006 15:48:43 +0200 (CEST)
Subject: [py-svn] r32218 - py/dist/py/test/rsession
Message-ID: <20060912134843.5D36B1007E@code0.codespeak.net>
Author: fijal
Date: Tue Sep 12 15:48:41 2006
New Revision: 32218
Modified:
py/dist/py/test/rsession/rsync.py
py/dist/py/test/rsession/web.py
Log:
Turn off regenerating the .js file.
Modified: py/dist/py/test/rsession/rsync.py
==============================================================================
--- py/dist/py/test/rsession/rsync.py (original)
+++ py/dist/py/test/rsession/rsync.py Tue Sep 12 15:48:41 2006
@@ -144,7 +144,7 @@
for path, (time, size) in modifiedfiles:
data = channel.receive()
if data is not None:
- #assert len(data) == size
+ assert len(data) == size
f = open(path, 'wb')
f.write(data)
f.close()
Modified: py/dist/py/test/rsession/web.py
==============================================================================
--- py/dist/py/test/rsession/web.py (original)
+++ py/dist/py/test/rsession/web.py Tue Sep 12 15:48:41 2006
@@ -262,7 +262,7 @@
javascript_source = rpython2javascript(webjs,
FUNCTION_LIST, Options)
- open(str(js_name), "w").write(javascript_source)
+ #open(str(js_name), "w").write(javascript_source)
self.serve_data("text/javascript", javascript_source)
else:
js_source = open(str(js_name), "r").read()
From briandorsey at codespeak.net Tue Sep 12 16:34:24 2006
From: briandorsey at codespeak.net (briandorsey at codespeak.net)
Date: Tue, 12 Sep 2006 16:34:24 +0200 (CEST)
Subject: [py-svn] r32219 - in py/dist/py/path/svn: . testing
Message-ID: <20060912143424.930D31007E@code0.codespeak.net>
Author: briandorsey
Date: Tue Sep 12 16:34:23 2006
New Revision: 32219
Modified:
py/dist/py/path/svn/svncommon.py
py/dist/py/path/svn/testing/svntestbase.py
py/dist/py/path/svn/urlcommand.py
py/dist/py/path/svn/wccommand.py
Log:
(cfbolz, brian)
- Moved all SVN escaping into one shared function.
- Factored out duplicate code in urlcommand _svn() & _svnwrite().
Modified: py/dist/py/path/svn/svncommon.py
==============================================================================
--- py/dist/py/path/svn/svncommon.py (original)
+++ py/dist/py/path/svn/svncommon.py Tue Sep 12 16:34:23 2006
@@ -17,6 +17,12 @@
ver.append(v)
return v
+def _escape_helper(text):
+ text = str(text)
+ if py.std.sys.platform != 'win32':
+ text = str(text).replace('$', '\\$')
+ return text
+
#_______________________________________________________________
class SvnPathBase(common.FSPathBase):
@@ -179,6 +185,9 @@
# shared help methods
+ def _escape(self, cmd):
+ return _escape_helper(cmd)
+
def _make_path_tuple(self, nameinfo_seq):
""" return a tuple of paths from a nameinfo-tuple sequence.
"""
Modified: py/dist/py/path/svn/testing/svntestbase.py
==============================================================================
--- py/dist/py/path/svn/testing/svntestbase.py (original)
+++ py/dist/py/path/svn/testing/svntestbase.py Tue Sep 12 16:34:23 2006
@@ -2,7 +2,7 @@
import py
from py import path, test, process
from py.__.path.testing.fscommon import CommonFSTests, setuptestfs
-from py.__.path.svn import cache
+from py.__.path.svn import cache, svncommon
mypath = py.magic.autopath()
repodump = mypath.dirpath('repotest.dump')
@@ -17,8 +17,10 @@
#assert not wcdir.check()
repo.ensure(dir=1)
try:
- py.process.cmdexec('svnadmin create "%s"' % str(repo).replace('$', '\$'))
- py.process.cmdexec('svnadmin load -q "%s" <"%s"' % (str(repo).replace('$', '\$'), repodump))
+ py.process.cmdexec('svnadmin create "%s"' %
+ svncommon._escape_helper(repo))
+ py.process.cmdexec('svnadmin load -q "%s" <"%s"' %
+ (svncommon._escape_helper(repo), repodump))
except py.process.cmdexec.Error:
raise
repo.remove()
Modified: py/dist/py/path/svn/urlcommand.py
==============================================================================
--- py/dist/py/path/svn/urlcommand.py (original)
+++ py/dist/py/path/svn/urlcommand.py Tue Sep 12 16:34:23 2006
@@ -25,9 +25,6 @@
self.rev = rev
return self
- def _escape(self, cmd):
- return str(cmd).replace('$', '\$')
-
def __repr__(self):
if self.rev == -1:
return 'svnurl(%r)' % self.strpath
@@ -36,26 +33,19 @@
def _svn(self, cmd, *args):
if self.rev is None:
- l = ['svn %s' % cmd]
+ return self._svnwrite(cmd, *args)
else:
- l = ['svn %s -r %d' % (cmd, self.rev)]
- args = map(lambda x: '"%s"' % str(x), args)
- l.extend(args)
- l.append('"%s"' % self._encodedurl())
- # fixing the locale because we can't otherwise parse
- string = svncommon.fixlocale() + " ".join(l)
- #print "execing", string
- out = process.cmdexec(string)
- return out
+ args = ['-r', self.rev] + list(args)
+ return self._svnwrite(cmd, *args)
def _svnwrite(self, cmd, *args):
l = ['svn %s' % cmd]
- args = map(lambda x: '"%s"' % str(x).replace('$', '\$'), args)
+ args = ['"%s"' % self._escape(item) for item in args]
l.extend(args)
l.append('"%s"' % self._encodedurl())
# fixing the locale because we can't otherwise parse
string = svncommon.fixlocale() + " ".join(l)
- #print "execing", string
+ print "execing", string
try:
out = process.cmdexec(string)
except py.process.cmdexec.Error, e:
Modified: py/dist/py/path/svn/wccommand.py
==============================================================================
--- py/dist/py/path/svn/wccommand.py (original)
+++ py/dist/py/path/svn/wccommand.py Tue Sep 12 16:34:23 2006
@@ -40,6 +40,9 @@
assert isinstance(self._url, str)
return self._url
+ def _escape(self, cmd):
+ return svncommon._escape_helper(cmd)
+
def dump(self, obj):
return self.localpath.dump(obj)
@@ -58,9 +61,9 @@
def _svn(self, cmd, *args):
l = ['svn %s' % cmd]
- args = map(lambda x: '"%s"' % str(x).replace('$', '\$'), args)
+ args = [self._escape(item) for item in args]
l.extend(args)
- l.append("%s" % self.strpath.replace('$', '\$'))
+ l.append("%s" % self._escape(self.strpath))
# try fixing the locale because we can't otherwise parse
string = svncommon.fixlocale() + " ".join(l)
if DEBUG:
From cfbolz at codespeak.net Tue Sep 12 16:48:34 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Tue, 12 Sep 2006 16:48:34 +0200 (CEST)
Subject: [py-svn] r32223 - in py/dist/py/path/local/testing: . data
Message-ID: <20060912144834.BC91A1007E@code0.codespeak.net>
Author: cfbolz
Date: Tue Sep 12 16:48:31 2006
New Revision: 32223
Removed:
py/dist/py/path/local/testing/data/
Modified:
py/dist/py/path/local/testing/test_local.py
Log:
don't check in the data but create it on the fly to not confuse the
test_importall test.
Modified: py/dist/py/path/local/testing/test_local.py
==============================================================================
--- py/dist/py/path/local/testing/test_local.py (original)
+++ py/dist/py/path/local/testing/test_local.py Tue Sep 12 16:48:31 2006
@@ -2,8 +2,6 @@
from py.path import local, checker
from py.__.path.testing.fscommon import CommonFSTests, setuptestfs
-datadir = py.magic.autopath().dirpath().join('data')
-
class LocalSetup:
def setup_class(cls):
cls.root = py.test.ensuretemp('TestLocalPath')
@@ -312,8 +310,12 @@
from xxxpackage import module1
assert module1 is mod1
-def test_pypgkdir():
- pkg = datadir.join('pkg1')
+def test_pypkgdir():
+ datadir = py.test.ensuretemp("pypkgdir")
+
+ pkg = datadir.ensure('pkg1', dir=1)
+ pkg.ensure("__init__.py")
+ pkg.ensure("subdir/__init__.py")
assert pkg.pypkgpath() == pkg
assert pkg.join('subdir', '__init__.py').pypkgpath() == pkg
From fijal at codespeak.net Tue Sep 12 16:58:54 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Tue, 12 Sep 2006 16:58:54 +0200 (CEST)
Subject: [py-svn] r32224 - in py/dist/py/test/rsession: . testing
Message-ID: <20060912145854.A5B9310080@code0.codespeak.net>
Author: fijal
Date: Tue Sep 12 16:58:52 2006
New Revision: 32224
Modified:
py/dist/py/test/rsession/rsync.py
py/dist/py/test/rsession/testing/test_rsync.py
Log:
Added symlink support (maybe not in a pleasant manner, symlinks are copied after everything)
Modified: py/dist/py/test/rsession/rsync.py
==============================================================================
--- py/dist/py/test/rsession/rsync.py (original)
+++ py/dist/py/test/rsession/rsync.py Tue Sep 12 16:58:52 2006
@@ -10,6 +10,7 @@
self.options = options
self.channels = {}
self.receivequeue = Queue()
+ self.links = []
def filter(self, path):
return True
@@ -32,7 +33,11 @@
while self.channels:
channel, req = self.receivequeue.get()
if req == 42:
+ for link in self.links:
+ channel.send(link)
# completion marker, this host is done
+ channel.send(42)
+ elif req == 41:
finishedcallback = self.channels.pop(channel)
if finishedcallback:
finishedcallback()
@@ -64,6 +69,9 @@
def _broadcast(self, msg):
for channel in self.channels:
channel.send(msg)
+
+ def _send_link(self, basename, linkpoint):
+ self.links.append(("link", basename, linkpoint))
def _send_directory_structure(self, path):
st = os.lstat(path)
@@ -83,7 +91,16 @@
for p in subpaths:
self._send_directory_structure(p)
elif stat.S_ISLNK(st.st_mode):
- self._broadcast(None) # ignore symlinks for now
+ linkpoint = os.readlink(path)
+ basename = path[len(self.sourcedir) + 1:]
+ if not linkpoint.startswith(os.sep):
+ # relative link, just send it
+ self._send_link(basename, linkpoint)
+ elif linkpoint.startswith(self.sourcedir):
+ self._send_link(basename, linkpoint[len(self.sourcedir) + 1:])
+ else:
+ self._send_link(basename, linkpoint)
+ self._broadcast(None)
else:
raise ValueError, "cannot sync %r" % (path,)
@@ -151,4 +168,20 @@
os.utime(path, (time, time))
del data
channel.send(42)
+
+ msg = channel.receive()
+ while msg is not 42:
+ # we get symlink
+ _type, relpath, linkpoint = msg
+ assert _type == "link"
+ path = os.path.join(destdir, relpath)
+ try:
+ os.unlink(path)
+ except OSError:
+ pass
+ open("/tmp/dupa", "w").write("%s %s " % (os.path.join(destdir, linkpoint), path))
+
+ os.symlink(os.path.join(destdir, linkpoint), path)
+ msg = channel.receive()
+ channel.send(41)
"""
Modified: py/dist/py/test/rsession/testing/test_rsync.py
==============================================================================
--- py/dist/py/test/rsession/testing/test_rsync.py (original)
+++ py/dist/py/test/rsession/testing/test_rsync.py Tue Sep 12 16:58:52 2006
@@ -43,3 +43,18 @@
rsync.send(source)
assert not dest.join('subdir', 'file1').check()
assert not dest2.join('subdir', 'file1').check()
+
+def test_symlink_rsync():
+ base = py.test.ensuretemp('symlinkrsync')
+ dest = base.join('dest')
+ source = base.join('source')
+ source.ensure("existant")
+ source.join("rellink").mksymlinkto(source.join("existant"), absolute=0)
+ source.join('abslink').mksymlinkto(source.join("existant"))
+
+ rsync = RSync()
+ rsync.add_target(gw, dest)
+ rsync.send(source)
+
+ assert dest.join('rellink').readlink() == dest.join("existant")
+ assert dest.join('abslink').readlink() == dest.join("existant")
From fijal at codespeak.net Tue Sep 12 17:30:03 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Tue, 12 Sep 2006 17:30:03 +0200 (CEST)
Subject: [py-svn] r32226 - py/dist/py/test/rsession
Message-ID: <20060912153003.7679B1007B@code0.codespeak.net>
Author: fijal
Date: Tue Sep 12 17:30:01 2006
New Revision: 32226
Modified:
py/dist/py/test/rsession/master.py
Log:
Typo
Modified: py/dist/py/test/rsession/master.py
==============================================================================
--- py/dist/py/test/rsession/master.py (original)
+++ py/dist/py/test/rsession/master.py Tue Sep 12 17:30:01 2006
@@ -37,7 +37,7 @@
if len(node.pending) < maxtasks_per_node:
item = itemgenerator.next()
if shouldstop():
- break
+ return
node.send(item)
except StopIteration:
break
From briandorsey at codespeak.net Tue Sep 12 17:32:07 2006
From: briandorsey at codespeak.net (briandorsey at codespeak.net)
Date: Tue, 12 Sep 2006 17:32:07 +0200 (CEST)
Subject: [py-svn] r32227 - py/dist/py/test/rsession/testing
Message-ID: <20060912153207.42F9C1007B@code0.codespeak.net>
Author: briandorsey
Date: Tue Sep 12 17:32:06 2006
New Revision: 32227
Modified:
py/dist/py/test/rsession/testing/test_rsync.py
Log:
Disabled symlink tests on Windows.
Modified: py/dist/py/test/rsession/testing/test_rsync.py
==============================================================================
--- py/dist/py/test/rsession/testing/test_rsync.py (original)
+++ py/dist/py/test/rsession/testing/test_rsync.py Tue Sep 12 17:32:06 2006
@@ -45,6 +45,8 @@
assert not dest2.join('subdir', 'file1').check()
def test_symlink_rsync():
+ if py.std.sys.platform == 'win32':
+ py.test.skip("symlinks are unsupported on Windows.")
base = py.test.ensuretemp('symlinkrsync')
dest = base.join('dest')
source = base.join('source')
From cfbolz at codespeak.net Tue Sep 12 17:35:22 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Tue, 12 Sep 2006 17:35:22 +0200 (CEST)
Subject: [py-svn] r32228 - in py/dist/py/rest: . testing
Message-ID: <20060912153522.251051007B@code0.codespeak.net>
Author: cfbolz
Date: Tue Sep 12 17:35:20 2006
New Revision: 32228
Modified:
py/dist/py/rest/rst.py
py/dist/py/rest/testing/test_htmlrest.py
py/dist/py/rest/testing/test_rst2pdf.py
Log:
2.2 compat
Modified: py/dist/py/rest/rst.py
==============================================================================
--- py/dist/py/rest/rst.py (original)
+++ py/dist/py/rest/rst.py Tue Sep 12 17:35:20 2006
@@ -1,3 +1,5 @@
+from __future__ import generators
+
import py
from py.xml import Namespace, Tag
#from py.__.xmlobj.visit import SimpleUnicodeVisitor
Modified: py/dist/py/rest/testing/test_htmlrest.py
==============================================================================
--- py/dist/py/rest/testing/test_htmlrest.py (original)
+++ py/dist/py/rest/testing/test_htmlrest.py Tue Sep 12 17:35:20 2006
@@ -1,3 +1,5 @@
+from __future__ import generators
+
import py
from py.__.misc import rest
from py.__.rest.testing.shared_helpers import is_on_path
Modified: py/dist/py/rest/testing/test_rst2pdf.py
==============================================================================
--- py/dist/py/rest/testing/test_rst2pdf.py (original)
+++ py/dist/py/rest/testing/test_rst2pdf.py Tue Sep 12 17:35:20 2006
@@ -1,3 +1,5 @@
+from __future__ import generators
+
import py
try:
from py.__.rest.latex import process_configfile, process_rest_file
From cfbolz at codespeak.net Tue Sep 12 17:48:46 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Tue, 12 Sep 2006 17:48:46 +0200 (CEST)
Subject: [py-svn] r32229 - py/dist/py/test/rsession
Message-ID: <20060912154846.55F7F1007B@code0.codespeak.net>
Author: cfbolz
Date: Tue Sep 12 17:48:45 2006
New Revision: 32229
Modified:
py/dist/py/test/rsession/slave.py
Log:
make test that is currently failing on some machines work: don't always do a
full collection, only collect things that are actually required by the master
node.
Modified: py/dist/py/test/rsession/slave.py
==============================================================================
--- py/dist/py/test/rsession/slave.py (original)
+++ py/dist/py/test/rsession/slave.py Tue Sep 12 17:48:45 2006
@@ -32,14 +32,21 @@
import os
assert os.path.exists(path)
path = os.path.abspath(path)
- rootcol = py.test.collect.Directory(path)
- node = SlaveNode(rootcol)
+ nodes = {}
+ def getnode(item):
+ node = nodes.get(item[0], None)
+ if node is not None:
+ return node
+ col = py.test.collect.Directory(str(py.path.local(path).join(item[0])))
+ node = nodes[item[0]] = SlaveNode(col)
+ return node
while 1:
nextitem = receive()
if nextitem is None:
break
try:
- res = node.run(nextitem)
+ node = getnode(nextitem)
+ res = node.run(nextitem[1:])
except:
excinfo = py.code.ExceptionInfo()
send(Outcome(excinfo=excinfo, is_critical=True).make_repr())
From cfbolz at codespeak.net Tue Sep 12 18:16:52 2006
From: cfbolz at codespeak.net (cfbolz at codespeak.net)
Date: Tue, 12 Sep 2006 18:16:52 +0200 (CEST)
Subject: [py-svn] r32230 - in py/dist/py/path/svn: . testing
Message-ID: <20060912161652.6DF111007E@code0.codespeak.net>
Author: cfbolz
Date: Tue Sep 12 18:16:50 2006
New Revision: 32230
Modified:
py/dist/py/path/svn/testing/svntestbase.py
py/dist/py/path/svn/testing/test_wccommand.py
py/dist/py/path/svn/urlcommand.py
Log:
run test with $ in the path to the repository. Add obnoxious characters if you
want to support them.
Modified: py/dist/py/path/svn/testing/svntestbase.py
==============================================================================
--- py/dist/py/path/svn/testing/svntestbase.py (original)
+++ py/dist/py/path/svn/testing/svntestbase.py Tue Sep 12 18:16:50 2006
@@ -10,9 +10,9 @@
# make a wc directory out of a given root url
# cache previously obtained wcs!
#
-def getrepowc():
- repo = py.test.ensuretemp('repo')
- wcdir = py.test.ensuretemp('wc')
+def getrepowc(reponame='abc$aaa', wcname='wc'):
+ repo = py.test.ensuretemp(reponame)
+ wcdir = py.test.ensuretemp(wcname)
if not repo.listdir():
#assert not wcdir.check()
repo.ensure(dir=1)
Modified: py/dist/py/path/svn/testing/test_wccommand.py
==============================================================================
--- py/dist/py/path/svn/testing/test_wccommand.py (original)
+++ py/dist/py/path/svn/testing/test_wccommand.py Tue Sep 12 18:16:50 2006
@@ -7,13 +7,6 @@
except py.error.ENOENT:
py.test.skip("cannot test py.path.svn, 'svn' binary not found")
-class disable_TestWCSvnCommandPathEscapeString(CommonSvnTests):
-
- def setup_class(cls):
- escape_string = 'df01c67e48$dc4d5b00$7f0aa8c0 at codespeak.net'
- root = py.test.ensuretemp(escape_string)
- cls.root = py.path.svnwc(root)
-
class TestWCSvnCommandPath(CommonSvnTests):
Modified: py/dist/py/path/svn/urlcommand.py
==============================================================================
--- py/dist/py/path/svn/urlcommand.py (original)
+++ py/dist/py/path/svn/urlcommand.py Tue Sep 12 18:16:50 2006
@@ -55,9 +55,8 @@
raise
return out
- def _encodedurl(self):
- # XXX do proper escaping of special characters
- return self.strpath
+ def _encodedurl(self):
+ return self._escape(self.strpath)
def open(self, mode='r'):
assert 'w' not in mode and 'a' not in mode, "XXX not implemented for svn cmdline"
From fijal at codespeak.net Tue Sep 12 18:47:04 2006
From: fijal at codespeak.net (fijal at codespeak.net)
Date: Tue, 12 Sep 2006 18:47:04 +0200 (CEST)
Subject: [py-svn] r32231 - in py/dist/py/test/rsession: . webdata
Message-ID: <20060912164704.7AA5310080@code0.codespeak.net>
Author: fijal
Date: Tue Sep 12 18:47:01 2006
New Revision: 32231
Modified:
py/dist/py/test/rsession/web.py
py/dist/py/test/rsession/webdata/index.html
py/dist/py/test/rsession/webjs.py
Log:
Polished web interface a bit.
Modified: py/dist/py/test/rsession/web.py
==============================================================================
--- py/dist/py/test/rsession/web.py (original)
+++ py/dist/py/test/rsession/web.py Tue Sep 12 18:47:01 2006
@@ -103,7 +103,7 @@
'itemname':itemname}
if itemtype == 'Module':
try:
- d['length'] = str(len(event.item.buildname2items()))
+ d['length'] = str(len(list(event.item.tryiter())))
except:
d['length'] = "?"
return d
Modified: py/dist/py/test/rsession/webdata/index.html
==============================================================================
--- py/dist/py/test/rsession/webdata/index.html (original)
+++ py/dist/py/test/rsession/webdata/index.html Tue Sep 12 18:47:01 2006
@@ -4,9 +4,25 @@