Python实现的解压缩软件源码及excel转图片工具源代码,基于pyqt5

1、GUI.py和GUI.ui:绘制界面相关
2、 UnRAR64.dll和compress.py:压缩解压相关
3、 excel2image.py:excel转图片相关
4、 main.py:主入口

完整程序下载地址:Python实现的解压缩软件及excel转图片工具源代码

main.py

import os.path
import sys
from PyQt5.QtWidgets import QApplication, QMainWindow
from GUI import *
from excel2image import *
from compress import *class MyWindow(QMainWindow, Ui_MainWindow):def __init__(self, parent=None):super(MyWindow, self).__init__(parent)self.setupUi(self)def debugPrint(self, msg):previous = self.plainTextEdit_debug.toPlainText().strip()self.plainTextEdit_debug.setPlainText(previous+'\n'+str(msg))# print(previous+'\n'+str(msg))QApplication.processEvents()def pathFilter(self, path):if path.startswith('file://'):path = path[8:]return pathdef uncompress_start(self):self.pushButton_uncompress_start.setEnabled(False)self.debugPrint('>> 开始解压')filePath = self.pathFilter(self.textEdit_uncompress_filePath.toPlainText().strip())# file:///C:/Users/SXF/Desktop/Converted files.zipif os.path.isfile(filePath):self.debugPrint('>> 是压缩包,即将进入解压模式!')if filePath.endswith('rar'):self.debugPrint('>> rar格式!')try:rar_uncompress(filePath, debugPrint=self.debugPrint)except Exception as e:self.debugPrint(">> 解压出错: " + str(e))elif filePath.endswith('zip'):self.debugPrint('>> zip格式!')try:zip_uncompress(filePath, debugPrint=self.debugPrint)except Exception as e:self.debugPrint(">> 解压出错: " + str(e))else:self.debugPrint('>> 格式不支持!')else:self.debugPrint('>> 不是压缩包!')self.pushButton_uncompress_start.setEnabled(True)def compress_start(self):self.pushButton_compress_start.setEnabled(False)self.debugPrint('>> 开始压缩')dirPath = self.pathFilter(self.textEdit_compress_filePath.toPlainText().strip())if os.path.isdir(dirPath):self.debugPrint('>> 是文件夹,即将进入压缩模式!')zip_compress(dirPath, debugPrint=self.debugPrint)else:self.debugPrint('>> 不是文件夹!')self.pushButton_compress_start.setEnabled(True)def excel2image_start(self):  # file:///C:/Users/SXF/Desktop/学术成果一览表.xlsxself.pushButton_excel2image_start.setEnabled(False)self.debugPrint('>> 开始Excel转图片')filePath = self.pathFilter(self.textEdit_excel2image_filePath.toPlainText().strip())self.debugPrint(">> 待转换文件为: " + filePath)if os.path.exists(filePath):try:res = excel2image(filePath, debugPrint=self.debugPrint)if res:downloadFile(res['FileName'], res['FolderName'], debugPrint=self.debugPrint)except Exception as e:self.debugPrint(">> 转换出错: "+str(e))else:self.debugPrint(">> 文件不存在")self.pushButton_excel2image_start.setEnabled(True)if __name__ == '__main__':app = QApplication(sys.argv)myWin = MyWindow()myWin.show()sys.exit(app.exec_())

完整程序下载地址:Python实现的解压缩软件及excel转图片工具源代码

Python实现的解压缩软件及excel转图片工具源代码,基于pyqt5相关推荐

  1. python制作解压工具_使用python制作一个解压缩软件

    python实现解压缩的重要模块就是--zipfile,其次是os 安装zipfile模块 首先得安装zipfile模块,打开cmd输入一下命令即可安装 pip install zipfile os是 ...

  2. python编写一个软件-使用python制作一个解压缩软件

    python实现解压缩的重要模块就是――zipfile,其次是os 安装zipfile模块 首先得安装zipfile模块,打开cmd输入一下命令即可安装 pip install zipfile os是 ...

  3. python如何制作一个工程软件_使用python制作一个解压缩软件

    python实现解压缩的重要模块就是--zipfile,其次是os 安装zipfile模块 首先得安装zipfile模块,打开cmd输入一下命令即可安装 pip install zipfile os是 ...

  4. python如何制作一个工程软件_如何利用python制作一个解压缩软件-Go语言中文社区...

    如何利用python制作一个解压缩软件 python实现解压缩的重要模块就是--zipfile,其次是os 安装zipfile模块 首先得安装zipfile模块,打开cmd输入一下命令即可安装 pip ...

  5. python应用系列教程——python操作office办公软件(excel)

    全栈工程师开发手册 (作者:栾鹏) python教程全解 python操作office办公软件(excel).本文对涉及xls文件读写上不方便.如果你需要通过python读写xls文件,可以参考htt ...

  6. 如何利用python制作一个解压缩软件

    文章目录 如何利用python制作一个解压缩软件 安装zipfile模块 编写核心代码 安装tkinter模块 整合代码 安装pyinstaller模块 打包程序为可执行文件 打包程序为可执行文件 如 ...

  7. 常用工具类五 Excel转图片工具类

    市面上大多数excel转图片为收费工具,借鉴他人用awt的Graphics2D自己实现的工具类,只涉及poi依赖. /** * 版权: taylor * 描述: 将excel转为图片工具类 * 创建时 ...

  8. excel转图片工具类

    添加依赖 <repository><id>AsposeJavaAPI</id><name>Aspose Java API</name>< ...

  9. android rar工具,安卓解压缩软件-ZArchiver Pro 解压工具下载v0.8.5 安卓版-安卓解压神器西西软件下载...

    ZArchiver解压工具:强大的压缩/解压工具,能够解压的文件类型非常广泛. 支持压缩和解压rar,zip,7z等等,支持压缩和解压带有密码保护的压缩文档,支持unicode格式文件名(UTF-8) ...

最新文章

  1. C 编程异常 — /usr/bin/ld: 找不到 -lm
  2. RT73 wifi无线网卡驱动移植过程 和wpa支持
  3. 判断pc浏览器和手机浏览器方法
  4. php 频繁dom和 文件,性能优化之为什么不要频繁操作DOM
  5. spring 安全编码_Spring安全性和密码编码
  6. [渝粤教育] 西南科技大学 中国现代文学 在线考试复习资料
  7. 车联网大数据框架_大数据基础:ORM框架入门简介
  8. 软考系统架构师笔记-综合知识重点(四)
  9. oracle mseq,一次RMAN备份报错的诊断过程(一)
  10. short类型占16位,可以赋给short类型的最大值32767,最小值为-32768
  11. 【一分钟知识】七种损失函数
  12. HTTP1.0/1.1/2.0特性对比_转
  13. dubbo超时机制原理
  14. PMP课程笔记:第1-3章 引论 项目运行环境 项目经理
  15. P1930 亚瑟王的宫殿
  16. java node对比_服务端I/O性能:Node、PHP、Java、Go的对比
  17. 百度搜索稳定性问题分析的故事(上)
  18. 加密通信(三):CA证书
  19. 解决树莓派鼠标延迟/迟滞问题解决
  20. Shape的属性介绍及使用

热门文章

  1. Qt 自定义仿iphone开关按钮
  2. 海康威视雅马哈RCX340标定流程笔记
  3. 畅想未来的我计算机,未来的计算机作文
  4. 奔跑吧,HR!RPA与人力资源自动化
  5. DSP28335 SPWM之斩波器PWM-Chopper (PC)与Trip-Zone (TZ)
  6. 华为Taurus云原生数据库论文分析
  7. Mentor-dft 学习笔记 day7-drc规则环路可测试性方法
  8. mysql表deptno,MySQL:多表查询
  9. 51单片机点灯、流水灯、跑马灯
  10. 计算机组成原理:比较SRAM和DRAM存储器