1 """
2 Skype4Py is a multiplatform Skype API wrapper for Python.
3
4 Usage
5 =====
6
7 Everything that you should ever need is available as aliases in the ``Skype4Py`` package.
8 Import it using the standard form of the ``import`` statement:
9
10 .. python::
11
12 import Skype4Py
13
14 Importing the whole package into your script's namespace using ``from Skype4Py import *`` is
15 generally discouraged. You should also not access the modules in the package directly as they
16 are considered an implementation detail and may change in future versions without notice.
17
18 The package provides the following:
19
20 - Classes
21
22 ``Skype4Py.Skype``, an alias for `Skype4Py.skype.Skype`
23
24 ``Skype4Py.CallChannelManager``, an alias for `Skype4Py.callchannel.CallChannelManager`
25
26 - Constants
27
28 Everything from the `Skype4Py.enums` module.
29
30 ``platform``, either ``'windows'``, ``'posix'`` or ``'darwin'`` depending
31 on the current platform (Windows, Linux, Mac OS X).
32
33 - Errors
34
35 ``Skype4Py.SkypeError``, an alias for `Skype4Py.errors.SkypeError`
36
37 ``Skype4Py.SkypeAPIError``, an alias for `Skype4Py.errors.SkypeAPIError`
38
39 The two classes exposed by the ``Skype4Py`` package are the only ones that are to be instantiated
40 directly. They in turn provide means of instantiating the remaining ones. They are also the only
41 classes that provide event handlers (for more information about events and how to use them, see
42 the `EventHandlingBase` class.
43
44 Every Skype4Py script instantiates at least the ``Skype4Py.Skype`` class which gives access to
45 the Skype client running currently in the system. Follow the `Skype4Py.skype.Skype` reference to
46 see what you can do with it.
47
48 **Warning!** While reading this documentation, it is important to keep in mind that everything
49 needed is in the top package level because the documentation refers to all objects in the places
50 they actually live.
51
52 Quick example
53 =============
54
55 This short example connects to Skype client and prints the user's full name and the names of all the
56 contacts from the contacts list:
57
58 .. python::
59
60 import Skype4Py
61
62 # Create an instance of the Skype class.
63 skype = Skype4Py.Skype()
64
65 # Connect the Skype object to the Skype client.
66 skype.Attach()
67
68 # Obtain some information from the client and print it out.
69 print 'Your full name:', skype.CurrentUser.FullName
70 print 'Your contacts:'
71 for user in skype.Friends:
72 print ' ', user.FullName
73
74 Note on the naming convention
75 =============================
76
77 Skype4Py uses two different naming conventions. The first one applies to interfaces derived from
78 Skype4COM_, a COM library which was an inspiration for Skype4Py. This convention uses the ``CapCase``
79 scheme for class names, properties, methods and their arguments. The constants use the ``mixedCase``
80 scheme.
81
82 The second naming convention is more "Pythonic" and is used by all other parts of the package
83 including internal objects. It uses mostly the same ``CapCase`` scheme for class names (including
84 exception names) with a small difference in abbreviations. Where the first convention would use
85 a ``SkypeApiError`` name, the second one uses ``SkypeAPIError``. Other names including properties,
86 methods, arguments, variables and module names use lowercase letters with underscores.
87
88 .. _Skype4COM: https://developer.skype.com/Docs/Skype4COM
89 .. |copy| unicode:: U+000A9
90
91 :author: Arkadiusz Wahlig <arkadiusz.wahlig@gmail.com>
92 :requires: Python 2.4 up until but not including 3.0.
93 :see: The Skype4Py website: https://developer.skype.com/wiki/Skype4Py
94 :license: BSD License (see the accompanying LICENSE file for more information)
95 :copyright: |copy| 2007-2009 Arkadiusz Wahlig
96 """
97 __docformat__ = 'restructuredtext en'
98
99
100 from skype import Skype
101 from callchannel import CallChannelManager
102 from errors import SkypeError, SkypeAPIError
103 from enums import *
104 from api import platform
105 import logging
106
107
108 __version__ = '1.0.32.0'
109 """The version of Skype4Py."""
110
111
113 - def emit(self, record):
115
116
117
118 logging.getLogger('Skype4Py').addHandler(NullHandler())
119