Skip to content

Instantly share code, notes, and snippets.

@barneygale
Created October 6, 2011 15:09
Show Gist options
  • Select an option

  • Save barneygale/1267637 to your computer and use it in GitHub Desktop.

Select an option

Save barneygale/1267637 to your computer and use it in GitHub Desktop.
barney@mononoke:~/snatch$ ./getattr.py
getting sync..
Returning a SyncNode...
getattr window
getattr: user function
getattr prompt
getattr: user function
__call__ ('What is your name?', 'blah')
Sending...
{'path': ['window', 'prompt'], 'args': ['What is your name?', 'blah'], 'type': 'fn'}
WAIT STARTED
localhost - - [06/Oct/2011 16:06:29] "GET / HTTP/1.1" 200 -
localhost - - [06/Oct/2011 16:06:29] "GET /jquery-1.6.4.js HTTP/1.1" 200 -
localhost - - [06/Oct/2011 16:06:29] "GET /jquery-json-2.3.js HTTP/1.1" 200 -
{'array': ['[]']}
locking buffer...
lock acquired!
building write...
WRITE LEN 1
sending headers
localhost - - [06/Oct/2011 16:06:29] "POST /ajax.cgi HTTP/1.1" 200 -
sending data
{'array': ['[{"type":"fn","id":1,"value":"blah"}]']}
locking buffer...
lock acquired!
Passing back a return...
syncnode get_return
WAIT ENDED!
blah
getting async..
Returning a pointer to a AsyncNode...
getattr window
getattr: user function
getattr prompt
getattr: user function
__call__ ('What is your age?', '12')
Sending...
{'path': ['window', 'prompt'], 'args': ['What is your age?', '12'], 'type': 'fn'}
building write...
WRITE LEN 1
sending headers
localhost - - [06/Oct/2011 16:06:39] "POST /ajax.cgi HTTP/1.1" 200 -
sending data
{'array': ['[{"type":"fn","id":2,"value":"15"}]']}
locking buffer...
lock acquired!
Passing back a return...
asyncnode get_return
Got value: 15
building write...
WRITE LEN 0
sending headers
localhost - - [06/Oct/2011 16:06:49] "POST /ajax.cgi HTTP/1.1" 200 -
sending data
{'array': ['[]']}
locking buffer...
lock acquired!
building write...
WRITE LEN 0
sending headers
localhost - - [06/Oct/2011 16:06:59] "POST /ajax.cgi HTTP/1.1" 200 -
sending data
{'array': ['[]']}
locking buffer...
lock acquired!
building write...
WRITE LEN 0
sending headers
localhost - - [06/Oct/2011 16:07:09] "POST /ajax.cgi HTTP/1.1" 200 -
sending data
Terminated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment