summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2012-06-22 08:36:30 +0200
committerFlorian Bruhin <me@the-compiler.org>2012-06-22 08:36:30 +0200
commit28389438b347b83d9c527d6a43f47116edf33981 (patch)
tree3156aa9fc264b32d9ca9b46c2d752e85ca5e3fc8
parent578aaeca49ed67a9bac1983a6958a2826bc43484 (diff)
downloadxdd2esi-28389438b347b83d9c527d6a43f47116edf33981.tar.gz
xdd2esi-28389438b347b83d9c527d6a43f47116edf33981.zip
docstrings++;
-rw-r--r--xdd2esilib.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/xdd2esilib.py b/xdd2esilib.py
index 3ce0989..78e9246 100644
--- a/xdd2esilib.py
+++ b/xdd2esilib.py
@@ -257,6 +257,7 @@ def _is_string(obj):
return retval
def _hexlify(obj):
+ """ Converts a string to an hex-value """
encodings = { 'string': 'ASCII', 'unicode': 'utf-8' }
encoding = encodings[obj.datatype.type_]
defaultstring = obj.default + '\0'
@@ -293,6 +294,7 @@ def _convert(xdd, addbasic=True):
convfunc(obj)
def output(outfile, pretty=True):
+ """ Writes the ESI-tree to the outfile or dumps it """
if outfile == '-':
esi.dump(pretty)
elif outfile is None: