Commit e30ddf31 authored by Andrej Shadura's avatar Andrej Shadura

Updated version 0.20 from 'upstream/0.20'

with Debian dir 958cb14e00cefdb12c3ed2f0fcd8eaf2f7d58838
parents 6453ba2d 42378183
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# IntelliJ
.idea/
python-targets: [2, 3]
mccabe:
run: false
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
# command to install dependencies
install:
- pip install -r requirements.txt
- pip install -r dev-requirements.txt
# command to run tests
script:
python -W all runtests.py --with-coverage --cover-html --cover-html-dir=Coverage_report
after_success:
- codecov
before_deploy:
# Generate source distribution.
# Note: only do this with Python 3.5 because the contents
# of the distribution are the same for all versions.
- case "$TRAVIS_PYTHON_VERSION" in 3.5) python setup.py sdist --formats=bztar;; esac
# Generate egg distribution.
- python setup.py bdist_egg
# Generate wheel distribution.
# Note: only do this once, since we create a universal wheel.
- case "$TRAVIS_PYTHON_VERSION" in 3.5) python setup.py bdist_wheel;; esac
deploy:
- provider: releases
api_key:
secure: "kZHDE09hKehX8bFRWa5qM56J3ujc3Stl5j2u9KfdXwmZyYlremZTJ5J9gdiLqqRrTI1jF5n+3miacYSdups1VSqgXYsGzoz99HurtcoMfkFxWkkeCnd6ORwvTXYFN28t2CcjWXV6jCyUABPaEv8TCK3/+LeFfuf30O5Hxg/KiUfpqBwXj6sWaht0whhay45r6D5nYb8omhqa7n4DDLlrStRqkp1SB895EElessFFuHjn/jkxlyEUjGjQ+x79h8JKiXVozYRcyb4eC75xIaE6+yeA6q2ZxMrNRdBnWbRrFBNYsx4QbMCe9vq2m0IQMkrh0kk5N53eA6/8Yy6ZpDUNAb/Alvql8+y/qWwVQl3TYwcMGd0PctmfGH6rElByiOIVV9Zv52hTK9jXky0ab+avLufXlL8tUDVSNReXR7En37vbxlq+AU+xNhHN3girkJJ7jU6saQpj1tROGBpPkLIIHQFh3dbubfgw9qdW5qYBZyLHK9yKNnlzFIr7yktqJvJ/jGz/YDER12UdlCzaoWtVdw8Ogm9faAFlMUvzExYt5BIneDYUe13GtoDw69aLiuq5YGcFKClsgDIqBqYYBTVIHwAS9kTV4CZV0L4C15ylmUIP68LFxZ/stufXW0MJxvhIaJ7gJ9d9LyCK1a0u0j5a78cX/OUx9RfqjOMCuVbGTys="
file_glob: true
file:
- dist/*.tar.*
- dist/*.egg
- dist/*.whl
on:
tags: true
skip_cleanup: true
This diff is collapsed.
This diff is collapsed.
include MANIFEST.in
include README COPYING NEWS TODO
global-include .cvsignore
recursive-include doc Makefile
include doc/src/*.texi
include doc/info/python-xlib.info doc/info/python-xlib.info-*[0-9]
include doc/html/index.html doc/html/python-xlib_toc.html
include doc/html/python-xlib_*.html doc/html/texi2html
include doc/ps/python-xlib.ps
include utils/tcpbug.py utils/parsexbug.py
include examples/draw.py examples/draw-proto.py examples/profilex.py
include examples/shapewin.py
include examples/threadtest.py
......@@ -2,7 +2,100 @@
NEWS for Python X Library
* Version 0.15 ???
* Version 0.20
** Bug Fixes
- fix unclosed file in Xauth implementation
- fix support for `Window.set_wm_transient_for`
- fix support for `Drawable.put_image` / `Drawable.get_image`
- use ASCII for decoding strings in Python 3 (same as Python 2)
- fix Python 3 warnings about `array.tostring()` (deprecated)
** Misc
Improve response processing performance: reduce the number of `socket.recv`
calls needed to receive a full response.
* Version 0.19
** Bug Fixes
- don't throw an exception if $XAUTHFILE / ~/.Xauthority is missing
- fix authentication work-around for SSH forwarding under Python 3
- improve $DISPLAY handling: support optional protocol prefix, and
correctly handle `unix:0.0` as `:0.0`
* Version 0.18
** Bug Fixes
- fix Python 3 buffer abstraction
- fix interrupted select handling for Python 3.3/3.4
- fix Unix socket support when only an abstract address is available
* Version 0.17
** Bug Fixes
- fix Xauth handling when using Python 2 and DISPLAY contains a remote IP
- fix String16 request field handling when using Python 3
- fix RECORD extension and example when using Python 3
- fix handling of properties: use byte strings for all X11 8-bits
strings, as not all of them are text properties (the window
getters/setters for wm_name, wm_icon_name, wm_class, and
wm_client_machine still return/expect Unicode strings)
** API Changes
Core:
- new window getter/setter for text properties: get_full_text_property
and change_text_property; with automatic conversion to/from Unicode
when the property type encoding is supported (STRING and UTF8_STRING)
Composite extension:
- support for GetOverlayWindow request
* Version 0.16
** Licensing
The project is now licensed under the GNU Lesser General Public License
v2.1 or later (see the LICENSE file for details).
** Compatibility
Support for Python versions older than 2.7 has been dropped. Support for
Python 3 (3.3, 3.4 and 3.5) has been added. Note that Python-Xlib now
depends on the six package (>=1.10) for combined Python 2 / 3 support.
** API Changes
With the change of license, and no way to contact the original author of
the SHAPE extension, the code had to be rewritten from scratch. This
resulted in a few minor API changes (see examples/shapewin.py).
Partial support for the SECURITY. XInput, and XFIXES extensions has been
added.
** Bug Fixes
- fix RECORD extension
- fixed OS X socket path
- fix handling of generic events
- fix handling of KeymapNotify events
- several fixes for the RandR extension
* Version 0.15rc1 - 14 Nov 2009
Improved support for newer versions of Mac OS X, a couple of new
extensions, and several bugfixes.
** Composite extension
......@@ -14,7 +107,6 @@ together with the DAMAGE and XFIXES extensions. Typically you would
also need RENDER or glX or some similar method of creating fancy
graphics.
** XF86 special function keysyms
Keysym definitions for special function keys found on modern
......@@ -26,9 +118,14 @@ importing Xlib.XK:
Xlib.XK.load_keysym_group('xf86')
** RANDR extension
The RANDR extension complements XINERAMA as a way of getting data about the
physical screens making up a virtual screen in X. An example of usage can
be found in examples/xrandr.py.
* Version 0.14 1 Oct 2007 (trialed as 0.14rc1 on 10 Jun 2007)
* Version 0.14 - 1 Oct 2007 (trialed as 0.14rc1 on 10 Jun 2007)
A couple of new extensions, a Python 2.5 fix and a couple of aliases
(Display.get_atom() now uses the internal cache and added
......@@ -56,7 +153,7 @@ Bugfix to correct handling of XAuthority file parsing under Python 2.5
causing failed authentication.
* Version 0.13 6 Aug 2006 (trialed as 0.13pre1 on 22 Jul 2006)
* Version 0.13 - 6 Aug 2006 (trialed as 0.13pre1 on 22 Jul 2006)
A small release to incorporate a number of minor corrections and bug
fixes, including small changes to keysym handling, .Xauthority parsing,
......@@ -65,7 +162,7 @@ WithdrawnState to WMHints. petli completed documentation for Display
objects.
* Version 0.12 29 Mar 2002
* Version 0.12 - 29 Mar 2002
** SHAPE extension
......@@ -82,7 +179,7 @@ is deprecated, so that had to be dealt with to make the Xlib work with
that version.
* Version 0.11 23 Feb 2002
* Version 0.11 - 23 Feb 2002
** Regression tests for the protocol definition
......@@ -97,7 +194,7 @@ Additionally, a subtle bug in the core engine which could cause a
"can't happen"-error has also been found and fixed.
* Version 0.10 16 Dec 2001
* Version 0.10 - 16 Dec 2001
** Event bugfix
......@@ -120,7 +217,7 @@ that will work on some combinations of image and drawable depth. It's
not perfect, but it's a start.
* Version 0.9 4 Dec 2001
* Version 0.9 - 4 Dec 2001
** Documentation improved
......@@ -158,7 +255,7 @@ included a comma.
* Version 0.8 12 Jan 2001
* Version 0.8 - 12 Jan 2001
** Uses distutils
......@@ -170,7 +267,7 @@ building easier.
A few incompatibilities with Python 2.0 has been fixed.
* Version 0.7 8 Jan 2001
* Version 0.7 - 8 Jan 2001
** Fixed the 64-bit platform fix.
......@@ -190,7 +287,7 @@ class in Xlib/protocol/rq.py.
* Version 0.6 29 Dec 2000
* Version 0.6 - 29 Dec 2000
** Fix to make python-xlib work on 64-bytes architectures.
......@@ -200,7 +297,7 @@ this is 32 bits as expected. On Alpha, it's 64 bits. python-xlib now
probes how large each type code is to avoid this problem.
* Version 0.5 28 Dec 2000
* Version 0.5 - 28 Dec 2000
** Functions implemented to get and set all ICCCM WM properties on
Window objects.
......@@ -216,7 +313,7 @@ be fed into utils/parsexbug.py, which will output all requests,
responses, errors and events in a readable format.
* Version 0.4 4 Oct 2000
* Version 0.4 - 4 Oct 2000
** Thread support completed, but not really stresstested yet.
......@@ -227,5 +324,3 @@ together with generic Unix code and some simple VMS code.
** The usual bunch of bugfixes.
Metadata-Version: 1.1
Name: python-xlib
Version: 0.20
Summary: Python X Library
Home-page: https://github.com/python-xlib/python-xlib
Author: Peter Liljenberg
Author-email: petli@ctrl-c.liu.se
License: LGPLv2+
Download-URL: https://github.com/python-xlib/python-xlib/releases
Description: UNKNOWN
Keywords: xlib x11 x windows
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: X11 Applications
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: User Interfaces
The Python X Library
*** Copyright
The main part of the code is
Copyright (C) 2000-2002 Peter Liljenberg
Some contributed code is copyrighted by the contributors, in these
cases that is indicated in the source files in question.
The Python X Library is released under GPL, see the file COPYING for
details.
*** Requirements
The Python X Library requires Python 1.5.2 or newer. It has been
tested to various extents with Pythons 1.5.2, 2.0 - 2.5.
*** Installation
The Python Xlib uses the standard distutils to make installation
easy. Distutils is shipped with Python 1.6 and newer. Python 1.5.2
users must download and install distutils before Python Xlib can be
installed. Distutils can be downloaded from
http://www.python.org/sigs/distutils-sig/.
Install Python Xlib by running this command:
python setup.py install
Installation can be modified with the normal install options, see the
documentation of distutils for details.
Alternatively, you can run programs from the distribution directory,
or changing the module path in programs.
There's a simple example program, implemented twice using both the
high-level interface and the low-level protocol.
*** Introduction
The Python X Library is intended to be a fully functional X client
library for Python programs. It is written entirely in Python, in
contrast to earlier X libraries for Python (the ancient X extension
and the newer plxlib) which were interfaces to the C Xlib.
This is possible to do since X client programs communicate with the X
server via the X protocol. The communication takes place over TCP/IP,
Unix sockets, DECnet or any other streaming network protocol. The C
Xlib is merely an interface to this protocol, providing functions
suitable for a C environment.
There are three advantages of implementing a pure Python library:
* Integration: The library can make use of the wonderful object
system in Python, providing an easy-to-use class hierarchy.
* Portability: The library will be usable on (almost) any computer
which have Python installed. A C interface could be problematic to
port to non-Unix systems, such as MS Windows or OpenVMS.
* Maintainability: It is much easier to develop and debug native
Python modules than modules written in C.
*** Project status
The low-level protocol is complete, implementing client-side X11R6.
The high-level object oriented interface is also fully functional.
It is possible to write client applications with the library.
Currently, the only real application using Python Xlib is the window
manager PLWM, starting with version 2.0.
There is a resource database implementation, ICCCM support and a
framework for adding X extension code. Currently only the XTEST
extension has been implemented.
There are most likely still bugs, but the library is at least stable
enough to run PLWM. A continously bigger part of the library is
covered by regression tests, improving stability.
The documentation is still quite rudimentary, but should be of some
help for people programming with the Xlib. X beginners should first
find some general texts on X. A very good starting point is
http://www.rahul.net/kenton/xsites.html
See the file TODO for a detailed list of what is missing,
approximately ordered by importance.
*** Contact information
Author email: Peter Liljenberg <petli@ctrl-c.liu.se>
Mailing list: http://sourceforge.net/mail/?group_id=10350
The Python X Library is a SourceForged project. The project page is
http://sourceforge.net/projects/python-xlib/. Source is available
from that page as tar.gz-releases and from the CVS tree.
There isn't any real web page yet, only a derivative of this file. It
is located at http://python-xlib.sourceforge.net/. It now also
features the documentation for downloading or browsing.
|Build Status| |codecov.io| |Code Health|
The Python X Library
====================
Copyright
~~~~~~~~~
The main part of the code is
::
Copyright (C) 2000-2002 Peter Liljenberg
Some contributed code is copyrighted by `the
contributors <https://github.com/python-xlib/python-xlib/graphs/contributors>`__,
in these cases that is indicated in the source files in question.
The Python X Library is released under LGPL v2.1 or later (since 2016),
see the file LICENSE for details. 0.15rc1 and before were released under
GPL v2.
Requirements
~~~~~~~~~~~~
The Python X Library requires Python 2.7 or newer. It has been tested to
various extents with Python 2.7 and 3.3 through 3.5.
Installation
~~~~~~~~~~~~
The Python Xlib uses the standard setuptools package, to install run
this command:
::
python setup.py install
See the command help for details: ``python setup.py install -h``.
Alternatively, you can run programs from the distribution directory, or
change the module path in programs.
There's a simple example program, implemented twice using both the
high-level interface and the low-level protocol.
Introduction
~~~~~~~~~~~~
The Python X Library is intended to be a fully functional X client
library for Python programs. It is written entirely in Python, in
contrast to earlier X libraries for Python (the ancient X extension and
the newer plxlib) which were interfaces to the C Xlib.
This is possible to do since X client programs communicate with the X
server via the X protocol. The communication takes place over TCP/IP,
Unix sockets, DECnet or any other streaming network protocol. The C Xlib
is merely an interface to this protocol, providing functions suitable
for a C environment.
There are three advantages of implementing a pure Python library:
- Integration: The library can make use of the wonderful object system
in Python, providing an easy-to-use class hierarchy.
- Portability: The library will be usable on (almost) any computer
which have Python installed. A C interface could be problematic to
port to non-Unix systems, such as MS Windows or OpenVMS.
- Maintainability: It is much easier to develop and debug native Python
modules than modules written in C.
Documentation
~~~~~~~~~~~~~
The reference manual is not finished by far, but is probably still useful. It can be `browsed online <http://python-xlib.sourceforge.net/doc/html/index.html>`__.
There are also some `example programs <examples/>`__ and, of course, `the standard X11 documentation <http://tronche.com/gui/x/xlib/>`__ applies.
Project status
~~~~~~~~~~~~~~
The low-level protocol is complete, implementing client-side X11R6. The
high-level object oriented interface is also fully functional. It is
possible to write client applications with the library. Currently, the
only real application using Python Xlib is the window manager PLWM,
starting with version 2.0.
There is a resource database implementation, ICCCM support and a
framework for adding X extension code. Several extensions have been
implemented; (RECORD, SHAPE, Xinerama, Composite, RANDR, and XTEST)
patches for additions are very welcome.
There are most likely still bugs, but the library is at least stable
enough to run PLWM. A continuously bigger part of the library is covered
by regression tests, improving stability.
The documentation is still quite rudimentary, but should be of some help
for people programming with the Xlib. X beginners should first find some
general texts on X. A very good starting point is
http://www.rahul.net/kenton/xsites.html
See the file TODO for a detailed list of what is missing, approximately
ordered by importance.
Contact information
~~~~~~~~~~~~~~~~~~~
Author email: Peter Liljenberg petli@ctrl-c.liu.se
Mailing list: http://sourceforge.net/mail/?group\_id=10350
The Python X Library is a SourceForged project (currently migrating to
GitHub). The project page is
http://sourceforge.net/projects/python-xlib/. Source is available from
that page as zip archive and from the `releases
list <https://github.com/python-xlib/python-xlib/releases>`__.
There isn't any real web page yet, only a derivative of this file. It is
located at http://python-xlib.sourceforge.net/. It now also features the
documentation for downloading or browsing.
.. |Build Status| image:: https://travis-ci.org/python-xlib/python-xlib.svg?branch=master
:target: https://travis-ci.org/python-xlib/python-xlib
.. |codecov.io| image:: https://codecov.io/github/python-xlib/python-xlib/coverage.svg?branch=master
:target: https://codecov.io/github/python-xlib/python-xlib?branch=master
.. |Code Health| image:: https://landscape.io/github/python-xlib/python-xlib/master/landscape.svg?style=flat
:target: https://landscape.io/github/python-xlib/python-xlib/master
......@@ -42,3 +42,4 @@
could be usable for writing X proxies, or for that matter, a
complete X server in Python (this might be a little too spaced-out,
though...)
......@@ -2,19 +2,22 @@
#
# Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.se>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2.1
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc.,
# 59 Temple Place,
# Suite 330,
# Boston, MA 02111-1307 USA
# Avoid overwriting None if doing "from Xlib.X import *"
NONE = 0
......
......@@ -2,19 +2,22 @@
#
# Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.se>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2.1
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc.,
# 59 Temple Place,
# Suite 330,
# Boston, MA 02111-1307 USA
#
# This module defines some functions for working with X keysyms as well
# as a modular keysym definition and loading mechanism. See the keysym
......
......@@ -2,19 +2,22 @@
#
# Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.se>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2.1
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc.,
# 59 Temple Place,
# Suite 330,
# Boston, MA 02111-1307 USA
PRIMARY = 1
SECONDARY = 2
......
......@@ -2,19 +2,22 @@
#
# Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.se>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2.1
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc.,
# 59 Temple Place,
# Suite 330,
# Boston, MA 02111-1307 USA
num_glyphs = 154
X_cursor = 0
......