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

« back to all changes in this revision

Viewing changes to services/python-console

  • Committer: William Grant
  • Date: 2010-07-27 09:02:06 UTC
  • mto: This revision was merged to the branch mainline in revision 1824.
  • Revision ID: grantw@unimelb.edu.au-20100727090206-pmf5j6lu6xc892q8
Replace semester.semester with semester.{code,url_name,display_name}.

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
264
265
            self.globs = {'__name__': '__main__'}
265
266
            for g in params:
266
267
                try:
267
 
                    self.globs[g] = cPickle.loads(str(params[g]))
268
 
                except cPickle.UnpicklingError:
 
268
                    self.globs[g] = cPickle.loads(params[g])
 
269
                except:
269
270
                    pass
270
271
 
271
272
        # Return the current globals