All-Feature 1.0.6__tar.gz → 1.0.8__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.
@@ -6,20 +6,20 @@ import platform
6
6
  import subprocess
7
7
  import requests
8
8
  import socket
9
- from requests.exceptions import Timeout
9
+ from requests.exceptions import RequestException,Timeout
10
10
  import cv2
11
11
  import qrcode
12
12
  from PIL import Image
13
- from pyzbar.pyzbar import decode
13
+ from pyzbar.pyzbar import decode
14
14
  from cryptography.fernet import Fernet
15
15
  import sys
16
+ from time import sleep
16
17
  #--------------------------------------------------------------------------------------
17
18
  #================================Var==================================================
18
- __version__ = "1.0.6"
19
+ __version__ = "1.0.8"
19
20
  #=====================================================================================
20
21
  def found_abs(rel_path):
21
- return os.path.normcase(os.path.normpath(os.path.abspath(rel_path)))
22
-
22
+ return os.path.normcase(os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), rel_path))))
23
23
  def webopen(URL):
24
24
  web.open(URL)
25
25
 
@@ -28,15 +28,15 @@ def play(path):
28
28
  if os.path.exists(abs_p):
29
29
  web.open(abs_p)
30
30
  else:
31
- return "file_not_found"
31
+ return "file_not_exist"
32
32
 
33
33
  def sysdetect():
34
- return f"System:{platform.system()},Version:{platform.release()}"
34
+ return [{platform.system()},{platform.release()}]
35
35
 
36
36
  def ofw(file_path,software_path):
37
37
  abs_fp = found_abs(file_path)
38
38
  if not os.path.isfile(abs_fp):
39
- return "not_exist"
39
+ return "file_not_exist"
40
40
  try:
41
41
  subprocess.Popen([software_path, abs_fp])
42
42
  except Exception as e:
@@ -57,16 +57,16 @@ def get_public_ip():
57
57
  response = requests.get(api, headers=headers, timeout=10)
58
58
  response.raise_for_status()
59
59
  return response.text.strip()
60
- except requests.Timeout:
60
+ except Timeout:
61
61
  continue
62
- except requests.RequestException:
62
+ except RequestException:
63
63
  continue
64
64
 
65
65
  return "Failed"
66
66
 
67
67
 
68
68
 
69
- def get_lan_ip():
69
+ def lan_ip():
70
70
  DNS_servers = ["114.114.114.114","1.1.1.1","8.8.8.8"]
71
71
  Port = 53
72
72
  for DNS in DNS_servers:
@@ -82,7 +82,7 @@ def get_lan_ip():
82
82
  def take_photo(save_path="photo.png"):
83
83
  cap = cv2.VideoCapture(0)
84
84
  if not cap.isOpened():
85
- return "Cannot_open_cam"
85
+ return "cannot_open_cam"
86
86
  ret,frame = cap.read()
87
87
  if not ret:
88
88
  cap.release()
@@ -183,4 +183,26 @@ def dec_file(encrypted_path,key_path="secret.key",decrypted_path=None):
183
183
  return "Done"
184
184
 
185
185
  __dir__ = lambda: [k for k, v in globals().items() if (callable(v) and v.__module__ == __name__)]
186
- #Test Line###123
186
+ #Test Line 123
187
+ if __name__ == "__main__":
188
+ print("Hello,This is a Python project,Please import it,instead of running it directly!\n")
189
+ print("Owner:https://space.bilibili.com/1803075060") #i am only 10 Years old!!!
190
+ exit(0) #Will exit. exit code:0
191
+
192
+
193
+
194
+
195
+ #--------------------------------------------------------
196
+ #Owenr:shx (https://space.bilibili.com/1803075060) 10y.o a Chinese
197
+ #All_Feature by shx
198
+ #Thank you for using!!!
199
+ #For Python! For All_Feature! For Better program!!!
200
+
201
+
202
+ #Also Try Deltarune!
203
+ #--------------------------------------------------------
204
+
205
+
206
+ # asdfghjkl
207
+
208
+
@@ -0,0 +1,4 @@
1
+ from .All_Feature import *
2
+ from .All_Feature import __version__
3
+
4
+ __all__ = [name for name in globals() if not name.startswith("_")] + ["__version__"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: All_Feature
3
- Version: 1.0.6
3
+ Version: 1.0.8
4
4
  Summary: A Toolkit
5
5
  Author-email: shx <q19333189819@outlook.com>
6
6
  Maintainer-email: shx <q19333189819@outlook.com>
@@ -8,9 +8,13 @@ License-Expression: MIT
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Operating System :: Microsoft :: Windows
10
10
  Requires-Python: >=3.14
11
+ Description-Content-Type: text/markdown
11
12
  Requires-Dist: requests
12
13
  Requires-Dist: opencv-python
13
14
  Requires-Dist: qrcode
14
15
  Requires-Dist: pillow
15
16
  Requires-Dist: pyzbar
16
17
  Requires-Dist: cryptography
18
+
19
+ # All_Feature
20
+ All_Feature is a library for python
@@ -1,11 +1,7 @@
1
+ README.md
1
2
  pyproject.toml
2
3
  ../All_Feature/All_Feature.py
3
4
  ../All_Feature/__init__.py
4
- ../All_Feature.egg-info/PKG-INFO
5
- ../All_Feature.egg-info/SOURCES.txt
6
- ../All_Feature.egg-info/dependency_links.txt
7
- ../All_Feature.egg-info/requires.txt
8
- ../All_Feature.egg-info/top_level.txt
9
5
  ../build_dir/All_Feature/All_Feature.py
10
6
  ../build_dir/All_Feature/__init__.py
11
7
  All_Feature/All_Feature.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: All_Feature
3
- Version: 1.0.6
3
+ Version: 1.0.8
4
4
  Summary: A Toolkit
5
5
  Author-email: shx <q19333189819@outlook.com>
6
6
  Maintainer-email: shx <q19333189819@outlook.com>
@@ -8,9 +8,13 @@ License-Expression: MIT
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Operating System :: Microsoft :: Windows
10
10
  Requires-Python: >=3.14
11
+ Description-Content-Type: text/markdown
11
12
  Requires-Dist: requests
12
13
  Requires-Dist: opencv-python
13
14
  Requires-Dist: qrcode
14
15
  Requires-Dist: pillow
15
16
  Requires-Dist: pyzbar
16
17
  Requires-Dist: cryptography
18
+
19
+ # All_Feature
20
+ All_Feature is a library for python
@@ -0,0 +1,2 @@
1
+ # All_Feature
2
+ All_Feature is a library for python
@@ -6,20 +6,20 @@ import platform
6
6
  import subprocess
7
7
  import requests
8
8
  import socket
9
- from requests.exceptions import Timeout
9
+ from requests.exceptions import RequestException,Timeout
10
10
  import cv2
11
11
  import qrcode
12
12
  from PIL import Image
13
- from pyzbar.pyzbar import decode
13
+ from pyzbar.pyzbar import decode
14
14
  from cryptography.fernet import Fernet
15
15
  import sys
16
+ from time import sleep
16
17
  #--------------------------------------------------------------------------------------
17
18
  #================================Var==================================================
18
- __version__ = "1.0.6"
19
+ __version__ = "1.0.8"
19
20
  #=====================================================================================
20
21
  def found_abs(rel_path):
21
- return os.path.normcase(os.path.normpath(os.path.abspath(rel_path)))
22
-
22
+ return os.path.normcase(os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), rel_path))))
23
23
  def webopen(URL):
24
24
  web.open(URL)
25
25
 
@@ -28,15 +28,15 @@ def play(path):
28
28
  if os.path.exists(abs_p):
29
29
  web.open(abs_p)
30
30
  else:
31
- return "file_not_found"
31
+ return "file_not_exist"
32
32
 
33
33
  def sysdetect():
34
- return f"System:{platform.system()},Version:{platform.release()}"
34
+ return [{platform.system()},{platform.release()}]
35
35
 
36
36
  def ofw(file_path,software_path):
37
37
  abs_fp = found_abs(file_path)
38
38
  if not os.path.isfile(abs_fp):
39
- return "not_exist"
39
+ return "file_not_exist"
40
40
  try:
41
41
  subprocess.Popen([software_path, abs_fp])
42
42
  except Exception as e:
@@ -57,16 +57,16 @@ def get_public_ip():
57
57
  response = requests.get(api, headers=headers, timeout=10)
58
58
  response.raise_for_status()
59
59
  return response.text.strip()
60
- except requests.Timeout:
60
+ except Timeout:
61
61
  continue
62
- except requests.RequestException:
62
+ except RequestException:
63
63
  continue
64
64
 
65
65
  return "Failed"
66
66
 
67
67
 
68
68
 
69
- def get_lan_ip():
69
+ def lan_ip():
70
70
  DNS_servers = ["114.114.114.114","1.1.1.1","8.8.8.8"]
71
71
  Port = 53
72
72
  for DNS in DNS_servers:
@@ -82,7 +82,7 @@ def get_lan_ip():
82
82
  def take_photo(save_path="photo.png"):
83
83
  cap = cv2.VideoCapture(0)
84
84
  if not cap.isOpened():
85
- return "Cannot_open_cam"
85
+ return "cannot_open_cam"
86
86
  ret,frame = cap.read()
87
87
  if not ret:
88
88
  cap.release()
@@ -183,4 +183,26 @@ def dec_file(encrypted_path,key_path="secret.key",decrypted_path=None):
183
183
  return "Done"
184
184
 
185
185
  __dir__ = lambda: [k for k, v in globals().items() if (callable(v) and v.__module__ == __name__)]
186
- #Test Line###123
186
+ #Test Line 123
187
+ if __name__ == "__main__":
188
+ print("Hello,This is a Python project,Please import it,instead of running it directly!\n")
189
+ print("Owner:https://space.bilibili.com/1803075060") #i am only 10 Years old!!!
190
+ exit(0) #Will exit. exit code:0
191
+
192
+
193
+
194
+
195
+ #--------------------------------------------------------
196
+ #Owenr:shx (https://space.bilibili.com/1803075060) 10y.o a Chinese
197
+ #All_Feature by shx
198
+ #Thank you for using!!!
199
+ #For Python! For All_Feature! For Better program!!!
200
+
201
+
202
+ #Also Try Deltarune!
203
+ #--------------------------------------------------------
204
+
205
+
206
+ # asdfghjkl
207
+
208
+
@@ -0,0 +1,4 @@
1
+ from .All_Feature import *
2
+ from .All_Feature import __version__
3
+
4
+ __all__ = [name for name in globals() if not name.startswith("_")] + ["__version__"]
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "All_Feature"
7
- version = "1.0.6"
7
+ version = "1.0.8"
8
8
  authors = [
9
9
  { name = "shx", email = "q19333189819@outlook.com" }
10
10
  ]
@@ -12,6 +12,7 @@ maintainers = [
12
12
  { name = "shx", email = "q19333189819@outlook.com" }
13
13
  ]
14
14
  description = "A Toolkit"
15
+ readme = "README.md"
15
16
  requires-python = ">=3.14"
16
17
 
17
18
  license = "MIT"
@@ -1 +0,0 @@
1
- from .All_Feature import *
@@ -1 +0,0 @@
1
- from .All_Feature import *
File without changes