~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to services/python-console

  • Committer: David Coles
  • Date: 2010-02-26 12:33:21 UTC
  • Revision ID: coles.david@gmail.com-20100226123321-9v46hs5xhqv1bg21
console: Fix up crash do to passing unixid rather than User when restarting a console that has timed out

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# usage:
4
4
#   python-console <port> <magic> [<working-dir>]
5
5
 
 
6
import cjson
6
7
import codeop
7
8
import cPickle
8
9
import cStringIO
169
170
 
170
171
    def run(self):
171
172
        # Set up global space and partial command buffer
172
 
        self.globs = {'__name__': '__main__'}
 
173
        self.globs = {}
173
174
        self.curr_cmd = ''
174
175
 
175
176
        # Set up I/O to use web interface
261
262
    def handle_globals(self, params):
262
263
        # Unpickle the new space (if provided)
263
264
        if isinstance(params, dict):
264
 
            self.globs = {'__name__': '__main__'}
 
265
            self.globs = {}
265
266
            for g in params:
266
267
                try:
267
268
                    self.globs[g] = cPickle.loads(params[g])