launch and demonize thread. :param target: target function that will run in thread :type target: function :param args: args to be passed to thread :type args: list
spawns a subprocess with command, args, and launch a watcher thread. :param command: command to be executed in the subprocess :type command: str :param args: arguments :type args: list :param observers: tuple of observer functions to be called for each line in the subprocess output. :type observers: tuple :return: a tuple containing the child process instance, and watcher_thread, :rtype: (Subprocess, Thread)
initializes dict of observer coroutines and pushes lines to each of them as they are received from the watched output. :param out: stdout of a process. :type out: fd :param observers: tuple of coroutines to send datafor each event :type observers: tuple
Bases: dict
Dictionary that remembers insertion order
and values equal to v (which defaults to None).
od.iteritems -> an iterator over the (key, value) items in od
od.itervalues -> an iterator over the values in od
remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised.
Pairs are returned in LIFO order if last is true or FIFO order if false.
If E is a dict instance, does: for k in E: od[k] = E[k] If E has a .keys() method, does: for k in E.keys():
od[k] = E[k]
Or if E is an iterable of items, does: for k, v in E: od[k] = v In either case, this is followed by: for k, v in F.items():
od[k] = v
test for 600 mode and try to set it if anything different found
implements mkdir -p functionality
an implementation of which that extends the path with other locations, like sbin (f.i., openvpn binary is likely to be there) @param program: a string representing the binary we’re looking for.
all the options for the leap arg parser Some of these could be switched on only if debug flag is present!
misc utils
Bases: exceptions.Exception
Bases: dict
An extended dict that implements a .tr method so it can be translated on the fly by our magic translate method
here I could not do all that I wanted. the context is not getting passed to the xml file. Looks like pylupdate4 is somehow a hack that does not parse too well the python ast. I guess we could generate the xml for ourselves as a last recourse.
QCoreApplication.translate(str, str, str disambiguation=None, QCoreApplication.Encoding encoding=QCoreApplication.CodecForTr) -> QString QCoreApplication.translate(str, str, str, QCoreApplication.Encoding, int) -> QString
our magic function. translate(Context, text, comment)