PythonExtensionsCollection 0.15.0__py3-none-any.whl → 0.15.1__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.
- PythonExtensionsCollection/Comparison/CComparison.py +1 -1
- PythonExtensionsCollection/Comparison/__init__.py +1 -1
- PythonExtensionsCollection/File/CFile.py +1 -1
- PythonExtensionsCollection/File/__init__.py +1 -1
- PythonExtensionsCollection/Folder/CFolder.py +1 -1
- PythonExtensionsCollection/Folder/__init__.py +1 -1
- PythonExtensionsCollection/PythonExtensionsCollection.pdf +0 -0
- PythonExtensionsCollection/String/CString.py +20 -9
- PythonExtensionsCollection/String/__init__.py +1 -1
- PythonExtensionsCollection/Utils/CUtils.py +1 -1
- PythonExtensionsCollection/Utils/__init__.py +1 -1
- PythonExtensionsCollection/__init__.py +1 -1
- PythonExtensionsCollection/version.py +3 -3
- {PythonExtensionsCollection-0.15.0.dist-info → PythonExtensionsCollection-0.15.1.dist-info}/METADATA +2 -2
- PythonExtensionsCollection-0.15.1.dist-info/RECORD +18 -0
- {PythonExtensionsCollection-0.15.0.dist-info → PythonExtensionsCollection-0.15.1.dist-info}/WHEEL +1 -1
- PythonExtensionsCollection-0.15.0.dist-info/RECORD +0 -18
- {PythonExtensionsCollection-0.15.0.dist-info → PythonExtensionsCollection-0.15.1.dist-info}/LICENSE +0 -0
- {PythonExtensionsCollection-0.15.0.dist-info → PythonExtensionsCollection-0.15.1.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# **************************************************************************************************************
|
|
2
2
|
#
|
|
3
|
-
# Copyright 2020-
|
|
3
|
+
# Copyright 2020-2023 Robert Bosch GmbH
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# **************************************************************************************************************
|
|
2
2
|
#
|
|
3
|
-
# Copyright 2020-
|
|
3
|
+
# Copyright 2020-2023 Robert Bosch GmbH
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# **************************************************************************************************************
|
|
2
2
|
#
|
|
3
|
-
# Copyright 2020-
|
|
3
|
+
# Copyright 2020-2023 Robert Bosch GmbH
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# **************************************************************************************************************
|
|
2
2
|
#
|
|
3
|
-
# Copyright 2020-
|
|
3
|
+
# Copyright 2020-2023 Robert Bosch GmbH
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
#
|
|
21
21
|
# XC-CT/ECA3-Queckenstedt
|
|
22
22
|
#
|
|
23
|
-
#
|
|
23
|
+
# 19.10.2023
|
|
24
24
|
#
|
|
25
25
|
# **************************************************************************************************************
|
|
26
26
|
|
|
27
27
|
# -- import standard Python modules
|
|
28
|
-
import os, ntpath, re
|
|
28
|
+
import os, ntpath, platform, re
|
|
29
29
|
|
|
30
30
|
# **************************************************************************************************************
|
|
31
31
|
|
|
@@ -47,7 +47,8 @@ Normalizes local paths, paths to local network resources and internet addresses
|
|
|
47
47
|
|
|
48
48
|
/ *Condition*: required / *Type*: str /
|
|
49
49
|
|
|
50
|
-
The path to be normalized
|
|
50
|
+
The path to be normalized. Paths can start with environment variables. Accepted are notations for both Windows
|
|
51
|
+
(``%ENVVAR%``) and Linux (``${ENVVAR}``). Under Windows also the Linux notation will be resolved.
|
|
51
52
|
|
|
52
53
|
* ``bWin``
|
|
53
54
|
|
|
@@ -94,10 +95,6 @@ Normalizes local paths, paths to local network resources and internet addresses
|
|
|
94
95
|
|
|
95
96
|
if sPath is not None:
|
|
96
97
|
|
|
97
|
-
# -- expand Windows environment variables
|
|
98
|
-
if bExpandEnvVars is True:
|
|
99
|
-
sPath = os.path.expandvars(sPath)
|
|
100
|
-
|
|
101
98
|
# - remove leading and trailing horizontal space
|
|
102
99
|
sPath = sPath.strip(" \t\r\n")
|
|
103
100
|
|
|
@@ -115,6 +112,20 @@ Normalizes local paths, paths to local network resources and internet addresses
|
|
|
115
112
|
# - remove trailing slash or backslash (maybe at end of path to folder)
|
|
116
113
|
sPath = sPath.rstrip("/\\")
|
|
117
114
|
|
|
115
|
+
# -- expand environment variables
|
|
116
|
+
if bExpandEnvVars is True:
|
|
117
|
+
sPattern_envvar = r"^\$\{(\w+?)\}" # check for Linux notation (shall be usable also under Windows)
|
|
118
|
+
regex_envvar = re.compile(sPattern_envvar)
|
|
119
|
+
sPlatformSystem = platform.system()
|
|
120
|
+
sPathModified = sPath
|
|
121
|
+
for sEnvVar in regex_envvar.findall(sPath):
|
|
122
|
+
sSearch = "${" + sEnvVar + "}"
|
|
123
|
+
if sPlatformSystem == "Windows":
|
|
124
|
+
sReplace = "%" + sEnvVar + "%"
|
|
125
|
+
sPathModified = sPathModified.replace(sSearch, sReplace)
|
|
126
|
+
# eof for sEnvVar in regex_envvar.findall(sPath):
|
|
127
|
+
sPath = os.path.expandvars(sPathModified)
|
|
128
|
+
|
|
118
129
|
# --------------------------------------------------------------------------------------------------------------
|
|
119
130
|
# consider internet addresses and local network resources
|
|
120
131
|
# --------------------------------------------------------------------------------------------------------------
|
|
@@ -480,7 +491,7 @@ while walking through the file system.
|
|
|
480
491
|
|
|
481
492
|
/ *Condition*: required / *Type*: str /
|
|
482
493
|
|
|
483
|
-
The input string that has to be investigated.
|
|
494
|
+
The input string that has to be investigated.
|
|
484
495
|
|
|
485
496
|
* ``bCaseSensitive``
|
|
486
497
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# **************************************************************************************************************
|
|
2
2
|
#
|
|
3
|
-
# Copyright 2020-
|
|
3
|
+
# Copyright 2020-2023 Robert Bosch GmbH
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# **************************************************************************************************************
|
|
2
2
|
#
|
|
3
|
-
# Copyright 2020-
|
|
3
|
+
# Copyright 2020-2023 Robert Bosch GmbH
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
#
|
|
19
19
|
# Version and date of PythonExtensionsCollection
|
|
20
20
|
#
|
|
21
|
-
VERSION = "0.15.
|
|
22
|
-
VERSION_DATE = "
|
|
21
|
+
VERSION = "0.15.1"
|
|
22
|
+
VERSION_DATE = "19.10.2023"
|
|
23
23
|
|
{PythonExtensionsCollection-0.15.0.dist-info → PythonExtensionsCollection-0.15.1.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PythonExtensionsCollection
|
|
3
|
-
Version: 0.15.
|
|
3
|
+
Version: 0.15.1
|
|
4
4
|
Summary: Additional Python functions
|
|
5
5
|
Home-page: https://github.com/test-fullautomation/python-extensions-collection
|
|
6
6
|
Author: Holger Queckenstedt
|
|
@@ -128,7 +128,7 @@ Contributors
|
|
|
128
128
|
License
|
|
129
129
|
-------
|
|
130
130
|
|
|
131
|
-
Copyright 2020-
|
|
131
|
+
Copyright 2020-2023 Robert Bosch GmbH
|
|
132
132
|
|
|
133
133
|
Licensed under the Apache License, Version 2.0 (the \"License\"); you
|
|
134
134
|
may not use this file except in compliance with the License. You may
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
PythonExtensionsCollection/PythonExtensionsCollection.pdf,sha256=jX_yZLHxyixRqoUkmBAZilWhwc4aeGpJB8rSzOw-fJ8,286711
|
|
2
|
+
PythonExtensionsCollection/__init__.py,sha256=YKDTJjDsnQkr5X-gjjO8opwKUVKm6kc8sIUpURYMk48,596
|
|
3
|
+
PythonExtensionsCollection/version.py,sha256=mCVk09gvDXhYgM4Cn5luDuiWWMpD2aqVA7ZjYKdA7kk,932
|
|
4
|
+
PythonExtensionsCollection/Comparison/CComparison.py,sha256=MfA1JX7DVUtPPyFNINGmcG5c_euB1foW5X1CSXGJwZM,12552
|
|
5
|
+
PythonExtensionsCollection/Comparison/__init__.py,sha256=YKDTJjDsnQkr5X-gjjO8opwKUVKm6kc8sIUpURYMk48,596
|
|
6
|
+
PythonExtensionsCollection/File/CFile.py,sha256=5idGq3H35azgmB-lFHNDFmdUKUzSln0J7narq7u6fJw,36382
|
|
7
|
+
PythonExtensionsCollection/File/__init__.py,sha256=YKDTJjDsnQkr5X-gjjO8opwKUVKm6kc8sIUpURYMk48,596
|
|
8
|
+
PythonExtensionsCollection/Folder/CFolder.py,sha256=3a-KXyUoeUwVtH4Bhb9EMP1r3btUI1cnbtQAd5bFNfQ,15985
|
|
9
|
+
PythonExtensionsCollection/Folder/__init__.py,sha256=YKDTJjDsnQkr5X-gjjO8opwKUVKm6kc8sIUpURYMk48,596
|
|
10
|
+
PythonExtensionsCollection/String/CString.py,sha256=oIb8MeZoEdF8KrDPNhnj0o3K4HR6lO9ZEN9gVv8FwzU,38423
|
|
11
|
+
PythonExtensionsCollection/String/__init__.py,sha256=YKDTJjDsnQkr5X-gjjO8opwKUVKm6kc8sIUpURYMk48,596
|
|
12
|
+
PythonExtensionsCollection/Utils/CUtils.py,sha256=l8u_MYKLAwFvA9jQnoKSiMwDJ2JeJAZj76MzmoT4bQ4,15438
|
|
13
|
+
PythonExtensionsCollection/Utils/__init__.py,sha256=YKDTJjDsnQkr5X-gjjO8opwKUVKm6kc8sIUpURYMk48,596
|
|
14
|
+
PythonExtensionsCollection-0.15.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
15
|
+
PythonExtensionsCollection-0.15.1.dist-info/METADATA,sha256=22ftGaKHI_KoqZsB864pFyUuBTGim1w1g7sQZNnKnW8,4643
|
|
16
|
+
PythonExtensionsCollection-0.15.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
17
|
+
PythonExtensionsCollection-0.15.1.dist-info/top_level.txt,sha256=xv5w-C3GQkdbxctBNzEqPfWvpJ1kpAaHBe3TEdGcozQ,27
|
|
18
|
+
PythonExtensionsCollection-0.15.1.dist-info/RECORD,,
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
PythonExtensionsCollection/PythonExtensionsCollection.pdf,sha256=zb8lcIG2c5QQdgn3R2WWwTPGe-z60FZaDIJidRN4zN4,277904
|
|
2
|
-
PythonExtensionsCollection/__init__.py,sha256=hr5YI0Et3k8uubFLR_hLILpLtqgnJvEYil0neGoKXhA,596
|
|
3
|
-
PythonExtensionsCollection/version.py,sha256=08Qo57bGo_oa7aL__KG5ue9zvop2uOdPaEji--jiT1k,932
|
|
4
|
-
PythonExtensionsCollection/Comparison/CComparison.py,sha256=QS9ianplFbS8aN1oT8ax2kgh1TT6lE1djQhljJqloCQ,12552
|
|
5
|
-
PythonExtensionsCollection/Comparison/__init__.py,sha256=hr5YI0Et3k8uubFLR_hLILpLtqgnJvEYil0neGoKXhA,596
|
|
6
|
-
PythonExtensionsCollection/File/CFile.py,sha256=vLEmVnYowxqLilEtQmPuomUBiyABEtnUu5XFZW27skU,36382
|
|
7
|
-
PythonExtensionsCollection/File/__init__.py,sha256=hr5YI0Et3k8uubFLR_hLILpLtqgnJvEYil0neGoKXhA,596
|
|
8
|
-
PythonExtensionsCollection/Folder/CFolder.py,sha256=WUMITkZnpPNdxGPZraPsmxe0IzGmlZBbeEwiKv4AR7o,15985
|
|
9
|
-
PythonExtensionsCollection/Folder/__init__.py,sha256=hr5YI0Et3k8uubFLR_hLILpLtqgnJvEYil0neGoKXhA,596
|
|
10
|
-
PythonExtensionsCollection/String/CString.py,sha256=iJxfMW5NwJ5Mc9sFqHMWrNMTfH2KgAzPj19Mask4cig,37642
|
|
11
|
-
PythonExtensionsCollection/String/__init__.py,sha256=hr5YI0Et3k8uubFLR_hLILpLtqgnJvEYil0neGoKXhA,596
|
|
12
|
-
PythonExtensionsCollection/Utils/CUtils.py,sha256=-vEz6g4yIUAIqqQbZjemJpihvF7hIKksg501AGtVp2g,15438
|
|
13
|
-
PythonExtensionsCollection/Utils/__init__.py,sha256=hr5YI0Et3k8uubFLR_hLILpLtqgnJvEYil0neGoKXhA,596
|
|
14
|
-
PythonExtensionsCollection-0.15.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
15
|
-
PythonExtensionsCollection-0.15.0.dist-info/METADATA,sha256=70SYcgawBuDIMC0DpaZ5UF-V0Lv1WW-n488GGZgoKbk,4643
|
|
16
|
-
PythonExtensionsCollection-0.15.0.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
|
17
|
-
PythonExtensionsCollection-0.15.0.dist-info/top_level.txt,sha256=xv5w-C3GQkdbxctBNzEqPfWvpJ1kpAaHBe3TEdGcozQ,27
|
|
18
|
-
PythonExtensionsCollection-0.15.0.dist-info/RECORD,,
|
{PythonExtensionsCollection-0.15.0.dist-info → PythonExtensionsCollection-0.15.1.dist-info}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|