#其他文件夹py文件中各个小类前不要放内容,否则导致主程序每次运行都要运行这部分内容。
from PyQt5.QtWidgets import QMainWindow, QApplication
from PyQt5 import QtCore, QtGui, QtWidgets
#from createFolder import myclass2
import sys
sys.path.append(‘./AutoMoveFile/’)
from AutoMoveFile import moveFile
sys.path.append(‘./AutoMoveFolder/’)
from AutoMoveFolder import moveFolder
sys.path.append(‘./RenameStandard/’)
from RenameStandard import renameStandard
#调动其他文件夹的py文件,curn_path = os.getcwd() #current path获取当前路径是main的文件夹的路径,不是其他py文件的路径
#所以在其他地方写好的文件,放在main作为主程序,调用其他文件夹的py文件就容易报错,因为当前文件夹路径发生改变
sys.path.append(‘./RenameFolder/’)
from RenameFolder import renameFolder
sys.path.append(‘./CreateFolder/’)
from CreateFolder import createFolder
sys.path.append(‘./xls_and_xlsx/’)
from XlsAndXlsx import xlsAndXlsx
sys.path.append(‘./DealInvoice/’)
from DealInvoicePDF import dealInvoice
from PyQt5.QtWidgets import QWidget,QApplication,QMainWindow,QAction,QMessageBox
from PyQt5.QtWidgets import (QWidget, QPushButton, QApplication, QGridLayout, QLCDNumber)
from PyQt5.QtGui import QFont
font_size = 12
class myclass(QMainWindow): #继承Qmainwindow 功能更加强大
def init(self):
super(myclass, self).init()
self.initUI()
def initUI(self):
self.setWindowTitle(‘DIY小工具’)
self.setGeometry