Displaying 3 results from an estimated 3 matches for "_python_return_dict".
Did you mean:
python_return_dict
2016 May 05
1
[PATCH] python: use constants instead of raw values
...if not environment:
- flags |= 1
+ flags |= libguestfsmod.GUESTFS_CREATE_NO_ENVIRONMENT
if not close_on_exit:
- flags |= 2
+ flags |= libguestfsmod.GUESTFS_CREATE_NO_CLOSE_ON_EXIT
self._o = libguestfsmod.create(flags)
self._python_return_dict = python_return_dict
diff --git a/python/guestfs-py-byhand.c b/python/guestfs-py-byhand.c
index cf8576f..9e2debf 100644
--- a/python/guestfs-py-byhand.c
+++ b/python/guestfs-py-byhand.c
@@ -37,6 +37,13 @@
static PyObject **get_all_event_callbacks (guestfs_h *g, size_t *len_rtn);
+void
+guest...
2015 Sep 16
0
[PATCH] python: Set program name to the true name instead of 'python'.
...8f8..1e043fc 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -671,6 +671,8 @@ logvols = g.lvs ()
\"\"\"
+import os
+import sys
import libguestfsmod
";
@@ -714,6 +716,10 @@ class GuestFS(object):
self._o = libguestfsmod.create (flags)
self._python_return_dict = python_return_dict
+ # If we don't do this, the program name is always set to 'python'.
+ program = os.path.basename (sys.argv[0])
+ libguestfsmod.set_program (self._o, program)
+
def __del__ (self):
if self._o:
libguestfsmod.close (se...
2016 May 04
9
[PATCH 0/8] python: PEP 8 fixes
Hi,
this series cleans up the Python sources, either static or generated,
including also tests, to make them PEP 8 compliant; see
https://www.python.org/dev/peps/pep-0008/ and tools like pep8.
Almost all the issues reported by pep8 are fixed, reducing the issues
from 3818 to 7.
The changes should have no effect on the actual code, while it will
help Python users with consistency with other