docstrings added

Wed, 19 Dec 2007 00:25:30 +0100

author
David Douard <david.douard@logilab.fr>
date
Wed, 19 Dec 2007 00:25:30 +0100
changeset 17
fb8aa055f6e4
parent 16
de9122b5680a
child 18
c691b040e8c9

docstrings added

HP3562A/dump_datablock.py file | annotate | diff | comparison | revisions
HP3562A/enum_types.py file | annotate | diff | comparison | revisions
--- a/HP3562A/dump_datablock.py	Wed Dec 19 00:19:25 2007 +0100
+++ b/HP3562A/dump_datablock.py	Wed Dec 19 00:25:30 2007 +0100
@@ -5,7 +5,10 @@
 
 
 class HP3562dumper(prologix.GPIB):
-
+    """
+    Class dedicated to dump data blocks from HP3562A DSA (trace,
+    internal state or coordinate).
+    """
     MODES = {'trace': 'DD',
              'state': 'DS',
              'coord': 'DC',
@@ -20,6 +23,12 @@
         super(HP3562dumper, self).__init__(device, baudrate, timeout, address, mode=1)
 
     def dump(self, mode='trace', format="binary"): 
+        """
+        Dump the required data block and return it as a raw string buffer.
+
+        'mode' can be 'trace' [default], 'state' or 'coord'.
+        'format' can be 'binary' [default], 'ascii' or 'ansi'.
+        """
         format = format.lower()
         mode = mode.lower()
         assert mode in self.MODES
--- a/HP3562A/enum_types.py	Wed Dec 19 00:19:25 2007 +0100
+++ b/HP3562A/enum_types.py	Wed Dec 19 00:25:30 2007 +0100
@@ -1,4 +1,7 @@
 # -*- coding: utf-8 -*-
+"""
+Constants used for HP3562A data block interpretation.
+"""
 
 EDSP = {0: "No data",
         1: "Frequency response",

mercurial