下载Png2Ico http://www.winterdrache.de/freeware/png2ico/ 编辑图标大小准备 248*248 128*128 64*64 48*48 32*32 16*16的图标 命令下执行 Png2Icon.exe Attach.ico logo248.png logo128.png,logo64.png logo48.png logo32.png logo16.png 生成Ico文件 这样
下载Png2Ico
http://www.winterdrache.de/freeware/png2ico/
编辑图标大小准备 248*248 128*128 64*64 48*48 32*32 16*16的图标
命令下执行 Png2Icon.exe Attach.ico logo248.png logo128.png,logo64.png logo48.png logo32.png logo16.png
生成Ico文件 这样就能适应win7下面的大小了。
如果程序需要管理员身份运行,在mainfest中 添加
<trustinfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedprivileges> <requestedexecutionlevel level="requireAdministrator" uiaccess="false"></requestedexecutionlevel> </requestedprivileges> </security> </trustinfo>
下面是我的完整打包代码
注意修改版本号为version="9.0.21022.8"
# -*- coding:gbk -*- from distutils.core import setup from glob import glob try: # py2exe 0.6.4 introduced a replacement modulefinder. # This means we have to add package paths there, not to the built-in # one. If this new modulefinder gets integrated into Python, then # we might be able to revert this some day. # if this doesn't work, try import modulefinder try: import py2exe.mf as modulefinder except ImportError: import modulefinder import win32com, sys for p in win32com.__path__[1:]: modulefinder.AddPackagePath("win32com", p) for extra in ["win32com.shell"]: #,"win32com.mapi" __import__(extra) m = sys.modules[extra] for p in m.__path__[1:]: modulefinder.AddPackagePath(extra, p) except ImportError: # no build path setup, no worries. pass manifest = """ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestversion="1.0"> <noinheritable></noinheritable> <assemblyidentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorarchitecture="x86" publickeytoken="1fc8b3b9a1e18e3b"> </assemblyidentity> <file name="msvcr90.dll" hashalg="SHA1" hash="9785b1c493deb5b2134dc4aef3719cee207001bc"> <hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"> <transforms><transform algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"> </transform></transforms><digestmethod algorithm="http://www.w3.org/2000/09/xmldsig#sha1"> </digestmethod><digestvalue>VF5ECUAHPV7EnUf+/UIXMPizPvs=</digestvalue></hash> </file> <file name="msvcp90.dll" hashalg="SHA1" hash="0f6bbf7fe4fb3fca2cb5b542eca1a1cad051f01c"> <hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"> <transforms><transform algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></transform> </transforms><digestmethod algorithm="http://www.w3.org/2000/09/xmldsig#sha1"> </digestmethod><digestvalue>3Wg+StVMq2uhx7POnAkl2w4dDmY=</digestvalue></hash> </file> <file name="msvcm90.dll" hashalg="SHA1" hash="7f3290ab2b7444c2b4a9b1fedfdb16466d7a21bb"> <hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"> <transforms><transform algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"> </transform> </transforms> <digestmethod algorithm="http://www.w3.org/2000/09/xmldsig#sha1"> </digestmethod><digestvalue>/YfRn7UQENzdMeoMHxTgdRMiObA=</digestvalue></hash> </file> <description>ETimes SafeDocument </description> <dependency> <dependentassembly> <assemblyidentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorarchitecture="x86" publickeytoken="6595b64144ccf1df" language="*"></assemblyidentity> </dependentassembly> </dependency> <trustinfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedprivileges> <requestedexecutionlevel level="requireAdministrator" uiaccess="false"></requestedexecutionlevel> </requestedprivileges> </security> </trustinfo> </assembly> """ data_files = [("Microsoft.VC90.CRT", glob(r'C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*'))] py2exe_options = {"py2exe": { "compressed": 1, "optimize": 0, "bundle_files": 1, "dll_excludes": ["mswsock.dll", "powrprof.dll"], "excludes": ["email", "System", "clr"], "typelibs": [("{A435DD76-804E-4475-8FAB-986EACD1C6BE}", 0x0, 1, 0), ] } } setup( data_files=data_files, windows=[{ 'script': 'EtimesDocument.pyw', "other_resources":[(24,1,manifest)], "icon_resources": [ (0, './png/Attach.ico') ]}], zipfile='core.lib', options=py2exe_options )

MySQL和SQLite的主要区别在于设计理念和使用场景:1.MySQL适用于大型应用和企业级解决方案,支持高性能和高并发;2.SQLite适合移动应用和桌面软件,轻量级且易于嵌入。

MySQL中的索引是数据库表中一列或多列的有序结构,用于加速数据检索。1)索引通过减少扫描数据量提升查询速度。2)B-Tree索引利用平衡树结构,适合范围查询和排序。3)创建索引使用CREATEINDEX语句,如CREATEINDEXidx_customer_idONorders(customer_id)。4)复合索引可优化多列查询,如CREATEINDEXidx_customer_orderONorders(customer_id,order_date)。5)使用EXPLAIN分析查询计划,避

在MySQL中使用事务可以确保数据一致性。1)通过STARTTRANSACTION开始事务,执行SQL操作后用COMMIT提交或ROLLBACK回滚。2)使用SAVEPOINT可以设置保存点,允许部分回滚。3)性能优化建议包括缩短事务时间、避免大规模查询和合理使用隔离级别。

选择PostgreSQL而非MySQL的场景包括:1)需要复杂查询和高级SQL功能,2)要求严格的数据完整性和ACID遵从性,3)需要高级空间功能,4)处理大数据集时需要高性能。PostgreSQL在这些方面表现出色,适合需要复杂数据处理和高数据完整性的项目。

MySQL数据库的安全可以通过以下措施实现:1.用户权限管理:通过CREATEUSER和GRANT命令严格控制访问权限。2.加密传输:配置SSL/TLS确保数据传输安全。3.数据库备份和恢复:使用mysqldump或mysqlpump定期备份数据。4.高级安全策略:使用防火墙限制访问,并启用审计日志记录操作。5.性能优化与最佳实践:通过索引和查询优化以及定期维护兼顾安全和性能。

如何有效监控MySQL性能?使用mysqladmin、SHOWGLOBALSTATUS、PerconaMonitoringandManagement(PMM)和MySQLEnterpriseMonitor等工具。1.使用mysqladmin查看连接数。2.用SHOWGLOBALSTATUS查看查询数。3.PMM提供详细性能数据和图形化界面。4.MySQLEnterpriseMonitor提供丰富的监控功能和报警机制。

MySQL和SQLServer的区别在于:1)MySQL是开源的,适用于Web和嵌入式系统,2)SQLServer是微软的商业产品,适用于企业级应用。两者在存储引擎、性能优化和应用场景上有显着差异,选择时需考虑项目规模和未来扩展性。

在需要高可用性、高级安全性和良好集成性的企业级应用场景下,应选择SQLServer而不是MySQL。1)SQLServer提供企业级功能,如高可用性和高级安全性。2)它与微软生态系统如VisualStudio和PowerBI紧密集成。3)SQLServer在性能优化方面表现出色,支持内存优化表和列存储索引。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

螳螂BT
Mantis是一个易于部署的基于Web的缺陷跟踪工具,用于帮助产品缺陷跟踪。它需要PHP、MySQL和一个Web服务器。请查看我们的演示和托管服务。

EditPlus 中文破解版
体积小,语法高亮,不支持代码提示功能

ZendStudio 13.5.1 Mac
功能强大的PHP集成开发环境

安全考试浏览器
Safe Exam Browser是一个安全的浏览器环境,用于安全地进行在线考试。该软件将任何计算机变成一个安全的工作站。它控制对任何实用工具的访问,并防止学生使用未经授权的资源。

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)