This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import logging | |
import os | |
import signal | |
import socket | |
import sys | |
import time | |
from select import select | |
from evdev import InputDevice, ecodes, list_devices |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import piexif | |
def checkFormat(photoPwd): | |
''' | |
检查文件类型是否为图片格式 | |
''' | |
(root, ext) = os.path.splitext(photoPwd) | |
return str.upper(ext[1:]) # 返回文件后缀类型 |