Commit cbd054a5 authored by Suzhi Bi's avatar Suzhi Bi

Update begin_3.py

parent 3ab3a771
...@@ -12,7 +12,6 @@ def sender(ip, time_max, filepath): ...@@ -12,7 +12,6 @@ def sender(ip, time_max, filepath):
print(msg) print(msg)
sys.exit(1) sys.exit(1)
# time_max = input("please enter the maximum time (seconds) allowed for picture(s): ")
if time_max.isdigit(): if time_max.isdigit():
s.send(time_max.encode('utf-8')) s.send(time_max.encode('utf-8'))
s.close() s.close()
...@@ -27,7 +26,6 @@ def sender(ip, time_max, filepath): ...@@ -27,7 +26,6 @@ def sender(ip, time_max, filepath):
img_type = ['.jpg','.JPG','.png','.PNG','.bmp','.BMP'] img_type = ['.jpg','.JPG','.png','.PNG','.bmp','.BMP']
while 1: while 1:
# filepath = input("please input file or folder path: ")
if os.path.isdir(filepath): if os.path.isdir(filepath):
img_path_vec = [os.path.join(filepath,imgpath) for imgpath in os.listdir(filepath) if os.path.splitext(imgpath)[1] in img_type] img_path_vec = [os.path.join(filepath,imgpath) for imgpath in os.listdir(filepath) if os.path.splitext(imgpath)[1] in img_type]
for img_name in img_path_vec: for img_name in img_path_vec:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment