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

« back to all changes in this revision

Viewing changes to lib/common/console.py

  • Committer: dcoles
  • Date: 2008-08-14 03:51:51 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1018
Console: Improvements to the console python library so we can attempt to call 
any function using a string version of it's arguments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import socket
29
29
import uuid
30
30
 
 
31
import cjson
 
32
 
31
33
import conf
32
34
from common import chat
33
35
 
167
169
    def call(self, function, *args, **kwargs):
168
170
        """ Calls a function in the python console """
169
171
        call_args = {
170
 
            'function': cPickle.dumps(function),
171
 
            'args':args,
 
172
            'function': function,
 
173
            'args': args,
172
174
            'kwargs': kwargs}
173
175
        response = self.__chat('call', call_args)
174
176
        if 'output' in response: