1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-13 12:59:30 +03:00
Commit Graph

7 Commits

Author SHA1 Message Date
74a78fa42c examples: Fix white space
indent by 4 spaces
one spaces around assignments

Signed-off-by: Philipp Hahn <hahn@univention.de>
2020-08-05 07:43:02 +00:00
f496dc55ee examples: Cleanup imports
Break import into multiple lines as recommended by PEP-8

Move imports to top

Remove unused imports

Signed-off-by: Philipp Hahn <hahn@univention.de>
2020-08-05 07:43:02 +00:00
06aba185a8 examples: Convert to ArgumentParser
Replace getopt() and hand-rolled-parser with argparse.ArgumentParser.

Fix wrong header comments copy-pasted from domstart.py

Signed-off-by: Philipp Hahn <hahn@univention.de>
2020-08-05 07:43:02 +00:00
9cf539a2a8 examples: Add/fix PEP 484 type annotation
Signed-off-by: Philipp Hahn <hahn@univention.de>
2020-08-05 07:43:02 +00:00
6aa02b3292 examples/*: Remove stray semicolon
This is Python, not C

Signed-off-by: Philipp Hahn <hahn@univention.de>
2020-08-05 07:43:01 +00:00
b22e4f2441 Drop support for python 2
python2 will be end of life by the time of the next
libvirt release. All our supported build targets, including
CentOS7, have a python3 build available.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-04 12:14:51 +00:00
9b98fe2d6f examples: Introduce sparsestream.py
Sparse streams are not that straight forward to use for the very
first time. Especially the sparseRecvAll() and sparseSendAll()
methods which expects callbacks. What we can do to make it easier
for developers is to have an example where they can take an
inspiration from.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2017-05-24 13:32:41 +02:00