From f2cd3cf2bdb40b3d63321852abeb52f78ab7e83d Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 9 Oct 2008 12:12:07 -0400 Subject: [PATCH] Fixed some spelling mistakes --- data_logger.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data_logger.py b/data_logger.py index 6562e39..697c92f 100644 --- a/data_logger.py +++ b/data_logger.py @@ -25,14 +25,14 @@ class data_log : log_dir specifies the base data directory. If it doesn't exist, log_dir is created. - A subdir of log_dir is created (if neccessary) named YYYYMMDD, + A subdir of log_dir is created (if necessary) named YYYYMMDD, where YYYYMMDD is the current day in localtime. If noclobber_logsubdir == True, this dir must not exist yet. log_name specifies the base name for the created log files (in the log subdir). The created log filenames are prefixed with a YYYYMMDDHHMMSS timestamp. If the target filename already exists, the filename is postfixed with - '_N', where N is the lowest integer that doesn't clober an existing file. + '_N', where N is the lowest integer that doesn't clobber an existing file. General data is saved to the log files with the write(obj) method. By default, write() cPickles the object passed. @@ -90,7 +90,7 @@ class data_log : def get_filename(self, timestamp=None) : """ Get a filename (using localtime if timestamp==None), - appending integers as neccessary to avoid clobbering. + appending integers as necessary to avoid clobbering. For use in write() routines. Returns (filepath, timestamp) """ @@ -243,7 +243,7 @@ def _check_data_log_binary_integrity() : raise error, "Saved %d uint16s, read %d" % (npts, len(data_in)) for i in range(npts) : if data_in[i] != data[i] : - print "Dissagreement in element %d" % i + print "Disagreement in element %d" % i print "Saved %d, read back %d" % (data[i], data_in[i]) raise error, "Poorly saved" os.remove(filepath) @@ -271,11 +271,11 @@ def _check_data_loc_dict_of_arrays() : data2_in = fromfile(filepath+"_data_2", dtype=uint16) for i in range(npts) : if data1_in[i] != data1[i] : - print "Dissagreement in element %d of data1" % i + print "Disagreement in element %d of data1" % i print "Saved %d, read back %d" % (data1[i], data1_in[i]) raise error, "Poorly saved" if data2_in[i] != data2[i] : - print "Dissagreement in element %d of data2" % i + print "Disagreement in element %d of data2" % i print "Saved %d, read back %d" % (data2[i], data2_in[i]) raise error, "Poorly saved" os.remove(filepath) -- 2.26.2