• R/O
  • SSH

un-xtab: 提交

Source, documentation, and distribution code for un-xtab.py


Commit MetaInfo

修訂415764f4be1956d9c3698ae218c20d65803a661a (tree)
時間2022-02-02 23:10:01
作者rdnielsen
Commiterrdnielsen

Log Message

Cleanup

Change Summary

差異

diff -r 6baeae66ed1d -r 415764f4be19 CHANGELOG.rst
--- a/CHANGELOG.rst Tue Feb 01 18:09:21 2022 -0800
+++ b/CHANGELOG.rst Wed Feb 02 06:10:01 2022 -0800
@@ -1,7 +1,7 @@
11 ========== ========== =================================================================================
22 Date Version Features
33 ========== ========== =================================================================================
4-2022-02-01 1.1.0 Changed argument parser.
4+2022-02-02 1.1.0 Changed argument parser and other Python 3 compatibility changes.
55 2019-09-11 1.0.0 Accepts spreadsheet-style column identifiers for the *data_columns* configuration setting.
66 2019-07-20 0.8.0 Completed documentation for ReadTheDocs.
77 2016-01-23 0.3.0 Added the '-n' command-line option.
diff -r 6baeae66ed1d -r 415764f4be19 un-xtab/un-xtab.py
--- a/un-xtab/un-xtab.py Tue Feb 01 18:09:21 2022 -0800
+++ b/un-xtab/un-xtab.py Wed Feb 02 06:10:01 2022 -0800
@@ -60,6 +60,7 @@
6060 # 2021-08-16 Modified to seek(0) in the output buffer before truncating it. RDN.
6161 # 2022-02-01 Corrected setting of error_type. Modified to use argparse instead of optparse.
6262 # Replaced "string.letters", which no longer exists. RDN.
63+# 2022-02-02 Cleanup. RDN
6364 #=====================================================================================
6465
6566
@@ -83,7 +84,7 @@
8384 import pprint
8485
8586 _version = "1.1.0"
86-_vdate = "2022-02-01"
87+_vdate = "2022-02-02"
8788
8889
8990 # ******************** Globals ********************
@@ -436,7 +437,6 @@
436437 def letters_to_decimal(col_id):
437438 """Converts a spreadsheet column ID, consisting of one or more letters,
438439 into the decimal equivalent."""
439- #ltrs = string.letters[:26]
440440 ltrs = 'abcdefghijklmnopqrstuvwxyz'
441441 val = 0
442442 for c in col_id.lower():
@@ -799,13 +799,12 @@
799799 process_errors
800800
801801
802-main()
803802
804-#if __name__=='__main__':
805-# try:
806-# main()
807-# except SystemExit:
808-# pass
809-# except Exception as oops:
810-# register_error(_FATAL, True, "Unexpected error")
803+if __name__=='__main__':
804+ try:
805+ main()
806+ except SystemExit:
807+ pass
808+ except Exception as oops:
809+ register_error(_FATAL, True, "Unexpected error")
811810
Show on old repository browser