Commit graph

223 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
cedd0fd249 systemd-python: hide ChainMap import 2015-07-05 14:19:17 -04:00
Zbigniew Jędrzejewski-Szmek
8d697bfd13 systemd-python: document attributes
In id128 it would be better to add everything automatically, but
sphinx cannot do this right now.
2015-07-05 14:19:16 -04:00
Zbigniew Jędrzejewski-Szmek
ec05eb1aef systemd-python: use PyModule_AddObject in id128 2015-07-05 14:19:16 -04:00
Zbigniew Jędrzejewski-Szmek
c18311bd54 systemd-python: polish the docstrings 2015-07-05 14:19:16 -04:00
Zbigniew Jędrzejewski-Szmek
2575a15b61 systemd-python: indenation and style tweaks 2015-07-05 14:19:16 -04:00
Zbigniew Jędrzejewski-Szmek
79931a5520 systemd-python: downgrade _reader.c to C89 2015-07-05 14:19:16 -04:00
Zbigniew Jędrzejewski-Szmek
b8b5706a1d systemd-python: add casts and fix unused variable warnings in _reader 2015-07-05 14:19:16 -04:00
Zbigniew Jędrzejewski-Szmek
2d3c2201a4 systemd-python: wrap some python differences using macros 2015-07-05 14:19:16 -04:00
Zbigniew Jędrzejewski-Szmek
544fbf3b3a systemd-python: introduce error setting helper 2015-07-05 14:19:16 -04:00
Steven Hiscocks
31d2aff90e systemd-python: Added doc string for Journal 2015-07-05 14:19:16 -04:00
Steven Hiscocks
7df62d3a00 systemd-python: Journal convert_unicode exception handling change
Rather than catch all, is now limited to UnicodeDecodeError
2015-07-05 14:19:16 -04:00
Steven Hiscocks
d21d05648d systemd-python: add Journal method to add MESSAGE_ID match 2015-07-05 14:19:16 -04:00
Steven Hiscocks
82ff2498de systemd-python: fix memory leak in _reader and minor bugs
iternext now checks for error from get_next, and changed a DECREF to
XDECREF rather than NULL check
2015-07-05 14:19:16 -04:00
Steven Hiscocks
3813a8ab26 systemd-python: update Journal python docstrings 2015-07-05 14:19:16 -04:00
Steven Hiscocks
8d5a8d3654 systemd-python: tidy up import names in journal 2015-07-05 14:19:16 -04:00
Steven Hiscocks
2f5a35a755 systemd-python: Journal this_boot/machine now accepts ID 2015-07-05 14:19:15 -04:00
Steven Hiscocks
9d405a0928 systemd-python: remove unneeded ifdef for query_unique 2015-07-05 14:19:15 -04:00
Steven Hiscocks
445332cb69 systemd-python: _reader now takes unix timestamp in seconds 2015-07-05 14:19:15 -04:00
Steven Hiscocks
029ac59922 systemd-python: Update _reader docstrings 2015-07-05 14:19:15 -04:00
Steven Hiscocks
097bcda6ce systemd-python: _reader add_match takes single string
python code now takes care of multiple matches
2015-07-05 14:19:15 -04:00
Steven Hiscocks
7258e1a44a systemd-python: correct data_threshold error return value 2015-07-05 14:19:15 -04:00
Steven Hiscocks
ab67680240 systemd-python: updated _reader header to standard license 2015-07-05 14:19:15 -04:00
Steven Hiscocks
716351a180 systemd-python: Moved _reader datetime usage to python 2015-07-05 14:19:15 -04:00
Steven Hiscocks
c5ba02c0a8 systemd-python: Tidy up _reader error handling 2015-07-05 14:19:15 -04:00
Steven Hiscocks
461dbcafe9 systemd-python: some python3 and bug fixes 2015-07-05 14:19:15 -04:00
Steven Hiscocks
55c89e4680 systemd-python: implement this_boot/this_machine in Python 2015-07-05 14:19:15 -04:00
Steven Hiscocks
87531b51f5 systemd-python: Journal log_level moved to python 2015-07-05 14:19:15 -04:00
Zbigniew Jędrzejewski-Szmek
108e4de1e4 sphinx: document Journal class too 2015-07-05 14:19:15 -04:00
Steven Hiscocks
7d270338de systemd-python: move default call dicts from C to python 2015-07-05 14:19:14 -04:00
Steven Hiscocks
98da3b4ec4 systemd-python: MESSAGE_ID as UUID for Journal 2015-07-05 14:19:14 -04:00
Steven Hiscocks
5ec357b071 systemd-python: moved PyRun_String to journal.py code 2015-07-05 14:19:14 -04:00
Steven Hiscocks
3503342886 systemd-python: add Journal class for reading journal 2015-07-05 14:19:14 -04:00
Zbigniew Jędrzejewski-Szmek
0c023a2c03 python: build html docs using sphinx
Build instructions:
   make
   make DESTIDIR=/tmp/... install
   make DESTIDIR=/tmp/... sphinx-html sphinx-man sphinx-epub ...
2015-07-05 14:19:14 -04:00
Zbigniew Jędrzejewski-Szmek
d6cd30aa2e python: utilize uuid.UUID in logging 2015-07-05 14:19:14 -04:00
Zbigniew Jędrzejewski-Szmek
37f8da3363 python: add systemd.id128 module
uuid.UUIDs are utilized to hold UUID values.
2015-07-05 14:19:14 -04:00
Marti Raudsepp
603876167a python: add journal backend for the logging framework
Supports Python versions 2.6 through 3.3 (tested on 2.7 and 3.2).
See JournalHandler docstring for usage details.

[zj: - use send() instead of using sendv() directly
     - do exception handling like in the logging module
     - bumped min version to python2.6, since the module
       does not work with python2.5 anyway ]
2015-07-05 14:19:14 -04:00
Zbigniew Jędrzejewski-Szmek
4b22c01793 systemd-python: fix nesting of #ifs and #pragmas 2015-07-05 14:19:14 -04:00
Lennart Poettering
059247a62f python: make gcc shut up 2015-07-05 14:19:14 -04:00
Lennart Poettering
da42130ac5 python: fix error handling, and allocate argument array on the stack 2015-07-05 14:19:14 -04:00
Lennart Poettering
3bb03b4e4d python: reindent to follow coding style 2015-07-05 14:19:14 -04:00
Lennart Poettering
5db22f490d python: change license to LGPL 2.1
The original license has been MIT for this code, but David Strauss (its
original author) agreed to relicense it to LGPL 2.1 for inclusion in
systemd.
2015-07-05 14:19:14 -04:00
Lennart Poettering
683fd2a640 python: integrate David Strauss' python-systemd package 2015-07-05 14:19:08 -04:00
David Strauss
5f531b971e Add Python 3 instructions. 2012-09-06 18:22:08 -07:00
David Strauss
7f96f34f10 Fix for Python 3. 2012-09-06 16:53:51 -07:00
David Strauss
7050e537b2 Doc updates 2012-09-06 16:48:51 -07:00
David Strauss
7ba24b5802 Make installable. 2012-09-06 16:45:52 -07:00
David Strauss
05bdd8ce12 Merge pull request #3 from keszybz/stream
sd_journal_stream_fd() wrapper
2012-09-03 15:46:58 -07:00
David Strauss
6f36264189 Merge pull request #2 from keszybz/master
Python 3 and UTF-8
2012-09-03 15:43:06 -07:00
Zbigniew Jędrzejewski-Szmek
a2df218d26 Add a wrapper for sd_journal_stream_fd(3)
A bare-bones wrapper is provided as _journald.stream_fd(),
and a more usable version as journald.stream().

Documentation is included. Tested under Python 2.7 and 3.2.
2012-07-13 09:10:08 -04:00
Zbigniew Jędrzejewski-Szmek
6f190657c0 Fix docstrings 2012-07-13 09:00:01 -04:00