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

« back to all changes in this revision

Viewing changes to services/python-console

  • Committer: William Grant
  • Date: 2009-07-05 07:54:29 UTC
  • mto: (1294.4.2 ui-the-third)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: grantw@unimelb.edu.au-20090705075429-qyh9midyp0v73gnv
Add export details for the breadcrumb chevron SVG.

Show diffs side-by-side

added added

removed removed

Lines of Context:
181
181
 
182
182
        # Handlers for each action
183
183
        actions = {
184
 
            'splash': self.handle_splash,
185
184
            'chat': self.handle_chat,
186
185
            'block': self.handle_block,
187
186
            'globals': self.handle_globals,
199
198
                response = {'error': repr(e)}
200
199
            finally:
201
200
                self.cmdQ.put(response)
202
 
 
203
 
    def handle_splash(self, params):
204
 
        # Initial console splash screen
205
 
        python_version = '.'.join(str(v) for v in sys.version_info[:3])
206
 
        splash_text = ("""IVLE Python Console (Python %s)
207
 
Type "help", "copyright", "credits" or "license" for more information.
208
 
""" % python_version)
209
 
        return {'output': splash_text}
210
 
 
 
201
                   
211
202
    def handle_chat(self, params):
212
203
        # Set up the partial cmd buffer
213
204
        if self.curr_cmd == '':
408
399
    for o in object:
409
400
        try:
410
401
            flat[o] = cPickle.dumps(object[o], PICKLEVERSION)
411
 
        except (TypeError, cPickle.PicklingError):
 
402
        except TypeError:
412
403
            try:
413
404
                o_type = type(object[o]).__name__
414
405
                o_name = object[o].__name__