Commit 7c71eb93 authored by Michael Büsch's avatar Michael Büsch

Add helper to iterate over all elements in several iterables.

Signed-off-by: Michael Büsch's avatarMichael Buesch <>
parent 1bef3e81
......@@ -173,6 +173,13 @@ def CALL_NOEX(_callable, *args, **kwargs):
return None
# Return a generator over all elements of all iterables
# passed to allElementsIn().
def allElementsIn(*iterables):
for iterable in iterables:
for element in iterable:
yield element
def strToBase64(string, ignoreErrors=False):
"""Convert a string to a base64 encoded ascii string.
Throws ValueError on errors, if ignoreErrors is False."""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment