Created
April 13, 2016 19:37
-
-
Save mathisonian/e86db529f18c95e066d950f088ab414a to your computer and use it in GitHub Desktop.
lightning remote
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lightning import Lightning, Line | |
lgn_host = 'http://localhost:3000/' | |
#### This instantiates everything | |
lgn = Lightning(host=lgn_host) | |
lgn.create_session() | |
session_id = lgn.session.id | |
print session_id | |
line_viz = lgn.line([1, 2, 3, 2, 1]) | |
line_viz.open() | |
### This hooks into everything | |
remote_lgn = Lightning(host=lgn_host) | |
remote_lgn.use_session(session_id) | |
remote_line = Line(session=lgn2.session, json={'id': line_viz.id}, auth=lgn2.session.auth) | |
## then you can do | |
remote_line.append() | |
remote_line.update() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment