~bennabiy/+junk/python-xlib

« back to all changes in this revision

Viewing changes to Xlib/support/connect.py

  • Committer: Package Import Robot
  • Author(s): Andrew Shadura, Ramkumar Ramachandra, Andrew Shadura
  • Date: 2015-08-13 08:14:19 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20150813081419-hdefinnghp2iydkx
Tags: 0.14+20091101-3
[ Ramkumar Ramachandra ]
* Remove useless debugging output (Closes: #565996)

[ Andrew Shadura ]
* Switch to 3.0 (quilt) format.
* Rename patches.
* Use debhelper 9 in its short form.
* Use pybuild.
* Bump Standards-Version.
* Don't build or install PostScript documentation and info files.
* Use system-provided texi2html instead of a shipped version
  (Closes: #795057).
* Update debian/copyright (Closes: #795057).
* Don't install Makefile or texi2html with the documentation.
* Set executable bit for examples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
18
 
19
19
import sys
20
 
import string
21
20
 
22
21
# List the modules which contain the corresponding functions
23
22
 
43
42
# Figure out which OS we're using.
44
43
# sys.platform is either "OS-ARCH" or just "OS".
45
44
 
46
 
_parts = string.split(sys.platform, '-')
 
45
_parts = sys.platform.split('-')
47
46
platform = _parts[0]
48
47
del _parts
49
48
 
61
60
    """
62
61
 
63
62
    modname = _display_mods.get(platform, _default_display_mod)
64
 
    mod = __import__(modname, globals())
65
 
    return mod.get_display(display)
 
63
    mod = __import__('Xlib.support', globals(), fromlist=(modname,))
 
64
    return getattr(mod, modname).get_display(display)
66
65
 
67
66
 
68
67
def get_socket(dname, host, dno):
75
74
    """
76
75
 
77
76
    modname = _socket_mods.get(platform, _default_socket_mod)
78
 
    mod = __import__(modname, globals())
79
 
    return mod.get_socket(dname, host, dno)
 
77
    mod = __import__('Xlib.support', globals(), fromlist=(modname,))
 
78
    return getattr(mod, modname).get_socket(dname, host, dno)
80
79
 
81
80
 
82
81
def get_auth(sock, dname, host, dno):
90
89
    """
91
90
 
92
91
    modname = _auth_mods.get(platform, _default_auth_mod)
93
 
    mod = __import__(modname, globals())
94
 
    return mod.get_auth(sock, dname, host, dno)
 
92
    mod = __import__('Xlib.support', globals(), fromlist=(modname,))
 
93
    return getattr(mod, modname).get_auth(sock, dname, host, dno)