home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.6)
-
- import sys
- import simplejson
- IPC_HOOK = 'digsby.ipcaction'
-
- def quote_escape(s):
- return s.replace('"', '\\"')
-
-
- def quote_unescape(s):
- return s.replace('\\"', '"')
-
-
- def register_ipc_handlers():
- import config as digsbyconfig
- if digsbyconfig.platformName != 'win':
- return None
- import wx
- import hooks
- listen = listen
- import ipc
-
- def on_ipc(msg):
-
- try:
- (method, kwargs) = msg.split(':', 1)
- except ValueError:
- method = msg
- kwargs = '{}'
-
- kwargs = simplejson.loads(quote_unescape(kwargs))
- wx.CallAfter(hooks.notify, IPC_HOOK, impl = method, **kwargs)
-
- listen(on_ipc)
-
-
- def funccall(method, **kwargs):
- if kwargs:
- argstring = quote_escape(simplejson.dumps(kwargs))
- return '"%s"' % ':'.join([
- method,
- argstring])
- return method
-
-
- def handle_ipc_action():
- if sys.opts.action:
- import ipc
- ipc.send_message(sys.opts.action)
- return True
-
-