资源:Python for Windows
http://win32com.goermezer.de/content/blogsection/7/284/
一个网站,有各种Windows 下使用 Python 的脚本示例,很不错,有待继续挖掘。
举一个例子:
https://win32com.goermezer.de/content/view/287/285/
import win32com.client
# look in the makepy output for IE for the 'CLSIDToClassMap'
# dictionary, and find the entry for 'ShellWindows'
clsid='{9BA05972-F6A8-11CF-A442-00A0C90A8F39}'
ShellWindows=win32com.client.Dispatch(clsid) # a busy state can be detected:
# while ShellWindows[0].Busy == False:
# go in for-loop here for i in range(ShellWindows.Count):
print ShellWindows[i].LocationURL
for j in range(ShellWindows[i].Document.SelectedItems().Count):
print ' ', ShellWindows[i].Document.SelectedItems().Item(j).Path # Be careful: Internet Explorer uses also the same CLSID. You should implement a detection!
这段代码获取当前打开Windows Explorer窗口的名字,以及选中的文件,是不是有种黑科技的感觉呀!
资源:Python for Windows的更多相关文章
- 使用Python写Windows Service服务程序
1.背景 如果你想用Python开发Windows程序,并让其开机启动等,就必须写成windows的服务程序Windows Service,用Python来做这个事情必须要借助第三方模块pywin32 ...
- python 基于windows环境的ftp功能
描述: 1.基于备份服务器部署的py程序,将需要备份主机目录下的内容下载至备份服务器(服务端和远端都是windows server 2008) 2.py程序部署在windows服务器,后台运行,基于b ...
- 关于Python 获取windows信息收集
收集一些Python操作windows的代码 (不管是自带的or第三方库)均来自网上 1.shutdown 操作 定时关机.重启.注销 #!/usr/bin/python #-*-coding:utf ...
- python安装(windows)
1.python安装(windows) 1.1 下载安装包 https://www.python.org/downloads/ 1.2 安装 python2.7默认安装路径:C:\python27 注 ...
- Python入门-----Windows安装
摘要:Python,windows安装 1.进入python的官方网站下载:https://www.python.org 点击Download,选择windows版本:
- python在windows(双版本)及linux环境下安装
python下载 下载地址:https://www.python.org/downloads/ 可以下载需要的版本,这里选择2.7.12和3.6.2 下面第一个是linux版本,第二个是windows ...
- Python做windows服务
Python做windows服务(多进程服务),并结束多进程 Python中_,__,__xx__的区别 在注册MyWinService服务时,再使用 "sc delete 服务器名称&qu ...
- python 在windows下的 虚拟环境
解决 python 环境问题 windows 下安装 pip install virtualenv virtualenv的基本使用 1.1 创建虚拟环境 virtualenv venv 为环境指定Py ...
- python实现windows Service服务程序
python实现windows Service服务程序 win32serviceutil.ServiceFramework是封装得很好的Windows服务框架,本文通过继承它来实现. 通过SvcDoR ...
- 【Python】Windows平台下Python、Pydev连接Mysql数据库
Mysql数据库是跨平台的,不是说Python一定就要连接Mongodb. Python连接Mysql数据库是非常easy的. 首先,你要配置好Python的开发环境,详见<[Python]Wi ...
随机推荐
- s
echo. 输出空行 echo; 输出空行 请求用户输入 set /p LOG_PATH=请输入log绝对路径: http://159.20.127:9009/gamesdk/doroot.jsp ...
- Mac系统下配置Tomcat
1.下载Tomcat,网址:http://tomcat.apache.org/download-70.cgi: 2.进入终端Terminal,打开配置文件.bash_profile,输入open .b ...
- GitHub 用到的英语
1.Github首页Pull requests Issues Gist请求 问题 要点Learn Git and GitHub without any code!没有任何代码学习Git和GitHu ...
- NodeJS 初体验
console.log('%s: %d', 'Hello', 25); // 可以像C语言格式一样输出//app.jsvar http = require('http');http.createSe ...
- typedef与#define的区别
1. typedef typedef故名思意就是类型定义的意思,但是它并不是定义一个新的类型而是给已有的类型起一个别名,在这一点上与引用的含义类似,引用是变量或对象的别名,而typedef定义的是类 ...
- web-app子元素
?表示可选,最多一个:*表示0个或多个. web-app (icon?, display-name?, description?, distributable?, context-param*, fi ...
- 大数据运算模型 MapReduce 原理
大数据运算模型 MapReduce 原理 2016-01-24 杜亦舒 MapReduce 是一个大数据集合的并行运算模型,由google提出,现在流行的hadoop中也使用了MapReduce作为计 ...
- ORACLE误删除ASM磁盘修复
在数据库运维中,总会遇到一些粗心大意的DBA,一不小心删除一些东西,这里举例讲解在误删除ASM磁盘之后,如果用KFED工具进行恢复: [grid@RAC1 ~]$ sqlplus / as sysas ...
- MySQL wamp密码修改
WAMP安装好后,mysql密码是为空的,那么要如何修改呢?其实很简单,通过几条指令就行了,下面我就一步步来操作. 首先,通过WAMP打开mysql控制台. 提示输入密码,因为现在是空,所以直接按回车 ...
- ORACLE RAISE
ORACLE 出错信息的输出 偷懒的办法直接在Exception 后使用raise但是错误信息不是很完整使用RAISE_APPLICATION_ERROR(-20999, DBMS_UTILITY.f ...