~bennabiy/+junk/python-xlib

« back to all changes in this revision

Viewing changes to examples/xinerama.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:
36
36
        if not self.d.has_extension('XINERAMA'):
37
37
            sys.stderr.write('%s: server does not have the XINERAMA extension\n'
38
38
                             % sys.argv[0])
39
 
            print self.d.query_extension('XINERAMA')
 
39
            print(self.d.query_extension('XINERAMA'))
40
40
            sys.stderr.write("\n".join(self.d.list_extensions()))
41
41
            if self.d.query_extension('XINERAMA') is None:
42
42
                sys.exit(1)
43
43
 
44
44
        # print version
45
45
        r = self.d.xinerama_query_version()
46
 
        print 'XINERAMA version %d.%d' % (r.major_version, r.minor_version)
 
46
        print('XINERAMA version %d.%d' % (r.major_version, r.minor_version))
47
47
 
48
48
 
49
49
        # Grab the current screen
93
93
 
94
94
        self.pp = pprint.PrettyPrinter(indent=4)
95
95
 
96
 
        print "Xinerama active:", bool(self.d.xinerama_is_active())
 
96
        print("Xinerama active:" + str(bool(self.d.xinerama_is_active())))
97
97
 
98
 
        print "Screen info:"
 
98
        print("Screen info:")
99
99
        self.pp.pprint(self.d.xinerama_query_screens()._data)
100
100
 
101
101
        # FIXME: This doesn't work!
102
102
        #print "Xinerama info:"
103
103
        #self.pp.pprint(self.d.xinerama_get_info(self.d.screen().root_visual)._data)
104
104
 
105
 
        print "Xinerama state:"
 
105
        print("Xinerama state:")
106
106
        self.pp.pprint(self.window.xinerama_get_state()._data)
107
107
 
108
 
        print "Screen count:"
 
108
        print("Screen count:")
109
109
        self.pp.pprint(self.window.xinerama_get_screen_count()._data)
110
110
 
111
111
        for screennum in range(self.window.xinerama_get_screen_count().screen_count):
112
 
            print "Screen %d size:" % (screennum, )
 
112
            print("Screen %d size:" % (screennum, ))
113
113
            self.pp.pprint(self.window.xinerama_get_screen_size(screennum)._data)
114
114
 
115
115
    def parseModes(self, mode_names, modes):