All-Feature 1.0.5__tar.gz → 1.0.7__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.
- {all_feature-1.0.5 → all_feature-1.0.7}/All_Feature/All_Feature.py +34 -12
- all_feature-1.0.7/All_Feature/__init__.py +4 -0
- {all_feature-1.0.5 → all_feature-1.0.7}/All_Feature.egg-info/PKG-INFO +1 -1
- {all_feature-1.0.5 → all_feature-1.0.7}/All_Feature.egg-info/SOURCES.txt +1 -0
- {all_feature-1.0.5 → all_feature-1.0.7}/PKG-INFO +1 -1
- all_feature-1.0.7/README.md +2 -0
- {all_feature-1.0.5 → all_feature-1.0.7}/pyproject.toml +1 -1
- all_feature-1.0.5/All_Feature/__init__.py +0 -1
- {all_feature-1.0.5 → all_feature-1.0.7}/All_Feature.egg-info/dependency_links.txt +0 -0
- {all_feature-1.0.5 → all_feature-1.0.7}/All_Feature.egg-info/requires.txt +0 -0
- {all_feature-1.0.5 → all_feature-1.0.7}/All_Feature.egg-info/top_level.txt +0 -0
- {all_feature-1.0.5 → all_feature-1.0.7}/setup.cfg +0 -0
|
@@ -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.
|
|
19
|
+
__version__ = "1.0.7"
|
|
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 "
|
|
31
|
+
return "file_not_exist"
|
|
32
32
|
|
|
33
33
|
def sysdetect():
|
|
34
|
-
return
|
|
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 "
|
|
39
|
+
return "file_not_exist"
|
|
40
40
|
try:
|
|
41
41
|
subprocess.Popen([software_path, abs_fp])
|
|
42
42
|
except Exception as e:
|
|
@@ -57,9 +57,9 @@ 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
|
|
60
|
+
except Timeout:
|
|
61
61
|
continue
|
|
62
|
-
except
|
|
62
|
+
except RequestException:
|
|
63
63
|
continue
|
|
64
64
|
|
|
65
65
|
return "Failed"
|
|
@@ -82,7 +82,7 @@ def 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 "
|
|
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
|
|
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
|
+
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .All_Feature import *
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|