TSVZ 3.20__py3-none-any.whl → 3.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- TSVZ.py +13 -6
- {tsvz-3.20.dist-info → tsvz-3.22.dist-info}/METADATA +1 -1
- tsvz-3.22.dist-info/RECORD +6 -0
- {tsvz-3.20.dist-info → tsvz-3.22.dist-info}/WHEEL +1 -1
- tsvz-3.20.dist-info/RECORD +0 -6
- {tsvz-3.20.dist-info → tsvz-3.22.dist-info}/entry_points.txt +0 -0
- {tsvz-3.20.dist-info → tsvz-3.22.dist-info}/top_level.txt +0 -0
TSVZ.py
CHANGED
|
@@ -22,7 +22,7 @@ if os.name == 'nt':
|
|
|
22
22
|
elif os.name == 'posix':
|
|
23
23
|
import fcntl
|
|
24
24
|
|
|
25
|
-
version = '3.
|
|
25
|
+
version = '3.22'
|
|
26
26
|
__version__ = version
|
|
27
27
|
author = 'pan@zopyr.us'
|
|
28
28
|
|
|
@@ -498,10 +498,16 @@ def _verifyFileExistence(fileName,createIfNotExist = True,teeLogger = None,heade
|
|
|
498
498
|
__teePrintOrNot(f'Warning: Filename {fileName} does not end with .psv','warning',teeLogger=teeLogger)
|
|
499
499
|
if not os.path.isfile(fileName):
|
|
500
500
|
if createIfNotExist:
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
501
|
+
try:
|
|
502
|
+
with open(fileName, mode ='w',encoding=encoding)as file:
|
|
503
|
+
file.write(header+'\n')
|
|
504
|
+
__teePrintOrNot('Created '+fileName,teeLogger=teeLogger)
|
|
505
|
+
return True
|
|
506
|
+
except:
|
|
507
|
+
__teePrintOrNot('Failed to create '+fileName,'error',teeLogger=teeLogger)
|
|
508
|
+
if strict:
|
|
509
|
+
raise FileNotFoundError("Failed to create file")
|
|
510
|
+
return False
|
|
505
511
|
elif strict:
|
|
506
512
|
__teePrintOrNot('File not found','error',teeLogger=teeLogger)
|
|
507
513
|
raise FileNotFoundError("File not found")
|
|
@@ -662,7 +668,8 @@ def appendLinesTabularFile(fileName,linesToAppend,teeLogger = None,header = '',c
|
|
|
662
668
|
line[i] = str(line[i])
|
|
663
669
|
except Exception as e:
|
|
664
670
|
line[i] = str(e)
|
|
665
|
-
if isinstance(linesToAppend,dict)
|
|
671
|
+
if isinstance(linesToAppend,dict):
|
|
672
|
+
if (not line or line[0] != key):
|
|
666
673
|
line = [key]+line
|
|
667
674
|
formatedLines.append(line)
|
|
668
675
|
with open(fileName, mode ='r+b')as file:
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
TSVZ.py,sha256=Sk_rnni6yqL3GYJKuVNqpMBELxZ_fflUKmPR5Y2huU4,68704
|
|
2
|
+
tsvz-3.22.dist-info/METADATA,sha256=GRBc-k-8yjt1fL7lCiew4C4bRz0pgwd-naUBziBh4VQ,1826
|
|
3
|
+
tsvz-3.22.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
|
4
|
+
tsvz-3.22.dist-info/entry_points.txt,sha256=WeXidyV5yKCRLaVsnAY35xGa08QgytOfvr1CK9aescI,60
|
|
5
|
+
tsvz-3.22.dist-info/top_level.txt,sha256=OPx4LvOpaYykaos7oL_jGaObSWXxLzhHiWLuz-K147g,5
|
|
6
|
+
tsvz-3.22.dist-info/RECORD,,
|
tsvz-3.20.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
TSVZ.py,sha256=TcVMZcPjeBn9IF0jg6b8Z3xVOIoDqDLP90o3nsVLM1w,68422
|
|
2
|
-
tsvz-3.20.dist-info/METADATA,sha256=TGyylT7aW0QwyQQqUvtD677ISp6XDo5gl5PS8qy5m-U,1826
|
|
3
|
-
tsvz-3.20.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
|
4
|
-
tsvz-3.20.dist-info/entry_points.txt,sha256=WeXidyV5yKCRLaVsnAY35xGa08QgytOfvr1CK9aescI,60
|
|
5
|
-
tsvz-3.20.dist-info/top_level.txt,sha256=OPx4LvOpaYykaos7oL_jGaObSWXxLzhHiWLuz-K147g,5
|
|
6
|
-
tsvz-3.20.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|