From: W. Trevor King Date: Thu, 9 Oct 2008 16:12:07 +0000 (-0400) Subject: Fixed some spelling mistakes X-Git-Tag: 0.1~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f2cd3cf2bdb40b3d63321852abeb52f78ab7e83d;p=data_logger.git Fixed some spelling mistakes --- 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)