ExtraFunctions 0.1.0__tar.gz → 0.1.1__tar.gz
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.
- {extrafunctions-0.1.0 → extrafunctions-0.1.1}/ExtraFunctions/__init__.py +10 -8
- extrafunctions-0.1.1/ExtraFunctions.egg-info/PKG-INFO +6 -0
- extrafunctions-0.1.1/PKG-INFO +6 -0
- extrafunctions-0.1.1/README.md +1 -0
- {extrafunctions-0.1.0 → extrafunctions-0.1.1}/pyproject.toml +2 -3
- extrafunctions-0.1.0/ExtraFunctions.egg-info/PKG-INFO +0 -7
- extrafunctions-0.1.0/PKG-INFO +0 -7
- extrafunctions-0.1.0/README.md +0 -0
- {extrafunctions-0.1.0 → extrafunctions-0.1.1}/ExtraFunctions.egg-info/SOURCES.txt +0 -0
- {extrafunctions-0.1.0 → extrafunctions-0.1.1}/ExtraFunctions.egg-info/dependency_links.txt +0 -0
- {extrafunctions-0.1.0 → extrafunctions-0.1.1}/ExtraFunctions.egg-info/requires.txt +0 -0
- {extrafunctions-0.1.0 → extrafunctions-0.1.1}/ExtraFunctions.egg-info/top_level.txt +0 -0
- {extrafunctions-0.1.0 → extrafunctions-0.1.1}/setup.cfg +0 -0
|
@@ -42,18 +42,20 @@ class SaveError(Exception):
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
def Save(variable, name):
|
|
45
|
-
|
|
45
|
+
if os.path.exists("save.json"):
|
|
46
|
+
with open("save.json", "r") as file:
|
|
46
47
|
saved = json.load(file)
|
|
47
|
-
|
|
48
|
+
else:
|
|
49
|
+
saved = []
|
|
50
|
+
|
|
48
51
|
for item in saved:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
if item[0] == name:
|
|
53
|
+
raise SaveError(f"{name} already exists.")
|
|
54
|
+
|
|
53
55
|
saved.append([name, variable])
|
|
54
|
-
with open("save.json", "w") as file:
|
|
55
|
-
json.dump(saved, file)
|
|
56
56
|
|
|
57
|
+
with open("save.json", "w") as file:
|
|
58
|
+
json.dump(saved, file)
|
|
57
59
|
|
|
58
60
|
|
|
59
61
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#DONT README
|
|
@@ -4,9 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ExtraFunctions"
|
|
7
|
-
version = "0.1.
|
|
8
|
-
description = "A collection of useful Python utility functions."
|
|
9
|
-
readme = "README.md"
|
|
7
|
+
version = "0.1.1"
|
|
8
|
+
description = "A collection of useful Python utility functions. - 0.1.1 Adds a bug fix on save."
|
|
10
9
|
requires-python = ">=3.8"
|
|
11
10
|
dependencies = [
|
|
12
11
|
"Pillow"
|
extrafunctions-0.1.0/PKG-INFO
DELETED
extrafunctions-0.1.0/README.md
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|