摘要: import tkinterfrom win32com.shell import shell, shellconfrom win32con import FILE_ATTRIBUTE_NORMAL def extension_to_bitmap(extension): """dot is mandatory in extension""" flags = shellcon.SHGFI_SMALLICON | \ shellcon.SHGFI_ICON | \ shellcon.SHGFI_USEFILEATTRIBUTES re... 阅读全文
posted @ 2014-03-14 17:01 @烈风 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 首先,感叹一下Python2.x系列的编码问题,确实让人蛋疼! 在写UninstallTool工具时,需要对获取到的字符串进行编码判断,谷歌了一下,大侠们都推荐用chardet第三方模块来处理,于是导入到自己的代码中还以为一切ok,可是杯具产生了,提示:libs\chardet\universaldetector.py:90: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal,十分蛋疼,于是又谷歌了一下,其中有一篇文章说道解决这个问题方法:使用chardet之前,需要先用string.decode("utf-8")之类的先去解码,然后copy到代码中,运行一下还是提示同样的问 阅读全文
posted @ 2013-10-25 19:23 @烈风 阅读(611) 评论(0) 推荐(0) 编辑
摘要: 打开“开始”菜单-控制面板-添加/卸载程序,步骤太多太烦了,即使这样一次也只能卸载一个软件,用360?每次打开都要弹出主程序界面,太慢!为了解决这个问题,本人写了一个小工具通过在桌面快捷方式上右键--选择“软件卸载”轻松搞定。 阅读全文
posted @ 2013-10-22 19:59 @烈风 阅读(704) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python #coding:utf-8 import _winreg key = "想要获取的键" open_key=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, key) countkey=_winreg.QueryInfoKey(open_key)[0] 阅读全文
posted @ 2013-10-22 19:26 @烈风 阅读(597) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python #coding:utf-8 import os path = os.path.dirname(amodule.__file__) 阅读全文
posted @ 2013-10-22 19:07 @烈风 阅读(250) 评论(0) 推荐(0) 编辑
摘要: windows = [ { "script": "myscript.py", "uac_info": "requireAdministrator"#获取管理员权限 } ] 阅读全文
posted @ 2013-10-22 19:04 @烈风 阅读(446) 评论(0) 推荐(1) 编辑
摘要: 下载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下面的大小了。 阅读全文
posted @ 2013-08-08 09:44 @烈风 阅读(781) 评论(0) 推荐(0) 编辑