ExtraFunctions 0.1.0__tar.gz → 0.1.2__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.
@@ -42,18 +42,20 @@ class SaveError(Exception):
42
42
 
43
43
 
44
44
  def Save(variable, name):
45
- with open("save.json", "r") as file:
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
- if item[0] == name:
50
- raise SaveError(f"{name} already exists.")
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,7 @@
1
+ Metadata-Version: 2.4
2
+ Name: ExtraFunctions
3
+ Version: 0.1.2
4
+ Summary: A collection of useful Python utility functions including negative (reverses both integers and strings), DistanceTranslate (Translates distances) and PlanetInfo (Self Explanetary).
5
+ Requires-Python: >=3.8
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: Pillow
@@ -1,8 +1,8 @@
1
1
  README.md
2
2
  pyproject.toml
3
- ExtraFunctions/__init__.py
4
3
  ExtraFunctions.egg-info/PKG-INFO
5
4
  ExtraFunctions.egg-info/SOURCES.txt
6
5
  ExtraFunctions.egg-info/dependency_links.txt
7
6
  ExtraFunctions.egg-info/requires.txt
8
- ExtraFunctions.egg-info/top_level.txt
7
+ ExtraFunctions.egg-info/top_level.txt
8
+ ExtraFunctions/ExtraFunctions/__init__.py
@@ -0,0 +1,7 @@
1
+ Metadata-Version: 2.4
2
+ Name: ExtraFunctions
3
+ Version: 0.1.2
4
+ Summary: A collection of useful Python utility functions including negative (reverses both integers and strings), DistanceTranslate (Translates distances) and PlanetInfo (Self Explanetary).
5
+ Requires-Python: >=3.8
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: Pillow
@@ -0,0 +1,16 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "ExtraFunctions"
7
+ version = "0.1.2"
8
+ description = "A collection of useful Python utility functions including negative (reverses both integers and strings), DistanceTranslate (Translates distances) and PlanetInfo (Self Explanetary)."
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ dependencies = [
12
+ "Pillow"
13
+ ]
14
+
15
+ [tool.setuptools.packages.find]
16
+ where = ["."]
@@ -1,7 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: ExtraFunctions
3
- Version: 0.1.0
4
- Summary: A collection of useful Python utility functions.
5
- Requires-Python: >=3.8
6
- Description-Content-Type: text/markdown
7
- Requires-Dist: Pillow
@@ -1,7 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: ExtraFunctions
3
- Version: 0.1.0
4
- Summary: A collection of useful Python utility functions.
5
- Requires-Python: >=3.8
6
- Description-Content-Type: text/markdown
7
- Requires-Dist: Pillow
@@ -1,16 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools>=61"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "ExtraFunctions"
7
- version = "0.1.0"
8
- description = "A collection of useful Python utility functions."
9
- readme = "README.md"
10
- requires-python = ">=3.8"
11
- dependencies = [
12
- "Pillow"
13
- ]
14
-
15
- [tool.setuptools.packages.find]
16
- where = ["."]
File without changes
File without changes