Package Skype4Py :: Package api :: Module posix
[frames] | no frames]

Source Code for Module Skype4Py.api.posix

 1  """ 
 2  Low level *Skype for Linux* interface. 
 3   
 4  This module handles the options that you can pass to `Skype.__init__` for Linux machines. 
 5  The options include: 
 6   
 7  - ``Transport`` (str) - Name of a channel used to communicate with the Skype client. 
 8    Currently supported values: 
 9     
10    - ``'dbus'`` (default) 
11   
12      Uses *DBus* thrugh *dbus-python* package. 
13      This is the default if no transport is specified. 
14   
15      Look into `Skype4Py.api.posix_dbus` for additional options. 
16   
17    - ``'x11'`` 
18   
19      Uses *X11* messaging through *Xlib*. 
20   
21      Look into `Skype4Py.api.posix_x11` module for additional options. 
22  """ 
23  __docformat__ = 'restructuredtext en' 
24   
25   
26  from Skype4Py.errors import SkypeAPIError 
27   
28   
29  __all__ = ['SkypeAPI'] 
30   
31   
32 -def SkypeAPI(opts):
33 trans = opts.pop('Transport', 'dbus') 34 if trans == 'dbus': 35 from posix_dbus import SkypeAPI 36 elif trans == 'x11': 37 from posix_x11 import SkypeAPI 38 else: 39 raise SkypeAPIError('Unknown transport: %s' % trans) 40 return SkypeAPI(opts)
41