Home | History | Annotate | Download | only in gae_shell

Lines Matching refs:Session

78 class Session(db.Model):
79 """A shell session. Stores the session's globals.
81 Each session globals is stored in one of two places:
170 """Creates a new session and renders the shell.html template.
174 # set up the session. TODO: garbage collect old shell sessions
175 session_key = self.request.get('session')
177 session = Session.get(session_key)
179 # create a new session
180 session = Session()
181 session.unpicklables = [db.Text(line) for line in INITIAL_UNPICKLABLES]
182 session_key = session.put()
186 session_url = '/?session=%s' % session_key
189 'session': str(session_key),
199 """Evaluates a python statement in a given session and returns the result.
233 # load the session from the datastore
234 session = Session.get(self.request.get('session'))
236 # swap in our custom module for __main__. then unpickle the session
237 # globals, run the statement, and re-pickle the session globals, all
245 for code in session.unpicklables:
249 for name, val in session.globals_dict().items():
256 session.remove_global(name)
284 session.add_unpicklable(statement, new_globals.keys())
292 session.set_global(name, val)
297 session.put()