[pypy-svn] r40903 - in pypy/dist/pypy/translator/js/examples: console console/data data
fijal at codespeak.net
fijal at codespeak.net
Wed Mar 21 13:13:55 CET 2007
Author: fijal
Date: Wed Mar 21 13:13:53 2007
New Revision: 40903
Modified:
pypy/dist/pypy/translator/js/examples/console/client.py
pypy/dist/pypy/translator/js/examples/console/console.py
pypy/dist/pypy/translator/js/examples/console/data/console.html
pypy/dist/pypy/translator/js/examples/data/style.css
Log:
Minor style updates, help box
Modified: pypy/dist/pypy/translator/js/examples/console/client.py
==============================================================================
--- pypy/dist/pypy/translator/js/examples/console/client.py (original)
+++ pypy/dist/pypy/translator/js/examples/console/client.py Wed Mar 21 13:13:53 2007
@@ -31,14 +31,16 @@
if msg[0] == "refresh":
inp_elem.scrollIntoView()
data = msg[1]
- log(data)
exported_methods.refresh_empty(glob.sess_id, refresh_console)
add_text(data)
elif msg[0] == 'disconnect':
dom.document.getElementById("error").innerHTML = "ERROR! disconnected"
-def set_sessid(sessid):
+def set_sessid(data):
+ sessid = int(data[0])
+ help_msg = data[1]
glob.sess_id = sessid
+ dom.document.getElementById("helpcontents").innerHTML = help_msg
exported_methods.refresh_empty(sessid, refresh_console)
def empty_callback(msg):
Modified: pypy/dist/pypy/translator/js/examples/console/console.py
==============================================================================
--- pypy/dist/pypy/translator/js/examples/console/console.py (original)
+++ pypy/dist/pypy/translator/js/examples/console/console.py Wed Mar 21 13:13:53 2007
@@ -15,6 +15,24 @@
commproxy.USE_MOCHIKIT = True
FUNCTION_LIST = ["load_console", "console_onload"]
+HELP = {'python':"just python, play as you like :)",
+ 'pypy-c':
+'''
+This is the PyPy standart interpreter translated to C with following features:
+<ul>
+ <li><b>Stackless</b> - You can use full stackless features including
+ tasklets, channels, coroutines and greenlets, full list of examples
+ and niceties can be found <a href="http://codespeak.net/pypy/dist/pypy/doc/stackless.html">on a stackless docs</a>
+ </li>
+ <li><b>Transparent proxy</b> - This is a unique PyPy interpreter feature,
+ which allows you to provide application-level controller for every possible
+ object. Details and snippets can be found on <a href="http://codespeak.net/pypy/dist/pypy/doc/objspace-proxies.html#tproxy">a transparent proxy doc</a></li>
+</ul>
+''',
+ 'pypy-c-thunk':'''the PyPy standart interpreter compiled to C with
+ a <a href="http://codespeak.net/pypy/dist/pypy/doc/objspace-proxies.html#the-thunk-object-space">thunk object space</a>''',
+ 'pypy-c-taint':'''the PyPy standart interpreter compiled to C with
+ a <a href="http://codespeak.net/pypy/dist/pypy/doc/objspace-proxies.html#the-taint-object-space">taint object space</a>'''}
class Ignore(Exception):
pass
@@ -78,10 +96,10 @@
sessions = Sessions()
class ExportedMethods(server.ExportedMethods):
- @callback(args=[str], retval=int)
+ @callback(args=[str], retval=[str])
def get_console(self, python="python"):
retval = sessions.new_session(python)
- return retval
+ return [str(retval), HELP[python]]
@callback(retval=[str])
def refresh(self, pid=0, to_write=""):
Modified: pypy/dist/pypy/translator/js/examples/console/data/console.html
==============================================================================
--- pypy/dist/pypy/translator/js/examples/console/data/console.html (original)
+++ pypy/dist/pypy/translator/js/examples/console/data/console.html Wed Mar 21 13:13:53 2007
@@ -31,7 +31,7 @@
>>> <input id="inp" size="80" type="text" autocomplete="off"/>
</fieldset>
<fieldset id="help">
- <legend><b>Help box</b></legend>
+ <legend><b>Help box</b></legend>
<p id="helpcontents">
</p>
</fieldset>
Modified: pypy/dist/pypy/translator/js/examples/data/style.css
==============================================================================
--- pypy/dist/pypy/translator/js/examples/data/style.css (original)
+++ pypy/dist/pypy/translator/js/examples/data/style.css Wed Mar 21 13:13:53 2007
@@ -43,7 +43,7 @@
div#metaspace {
position: absolute;
- top: 40px;
+ top: 20px;
left: 170px;
}
More information about the Pypy-commit
mailing list