资源: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 ...
随机推荐
- 子坐标系C在父坐标系W中的旋转问题
关键词:空间旋转.旋转轴.刚体旋转 用途:相机位姿估计.无人机位姿估计 文章类型:概念.公式总结(本文不带推倒过程,若想了解公式是如何推出来的请自习搜索文献),C++函数展示 @Author:VSha ...
- es6还欠完善的地方
const的可变性 const用于声明常量. 什么是常量,声明后的值不可更改. 对于值类型,比如string,number等等.const声明确实有效. const str = "strin ...
- VR视频外包公司(长年承接虚拟全景外包、虚拟现实视频外包)
承接VR视频外包(虚拟全景外包),虚拟现实视频外包(北京公司) 我们制作各类型VR全景虚拟现实,增强现实视频制作.录制等项目! 品质保证,售后完备. 我们团队成立于2011年10月,是一个专业从事严肃 ...
- setTimeout和setInterval的区别以及如何写出效率高的倒计时
1.setTimeout和setInterval都属于js中的定时器,可以规定延迟时间再执行某个操作,不同的是setTimeout在规定时间后执行完某个操作就停止了,而setInterval则可以一直 ...
- shell中$0,$?,$!等变量意义
变量说明: $$ #Shell本身的PID(ProcessID) $! #Shell最后运行的后台Process的PID $? #最后运行的命令的结束代码(返回值) $- ...
- JS实现页面打印
[原文链接] 1.js实现(可实现局部打印) <input id="btnPrint" type="button" value="打印" ...
- What is SSL and what are Certificates?
Refer to http://www.tldp.org/HOWTO/SSL-Certificates-HOWTO/x64.html The content 1.2. What is SSL and ...
- openssl stack 数据结构栈基本操作
堆栈是两种不同的数据结构: 堆:数据先进先出: 栈:数据先进后观: 在stack.h 中 openssl 为我们提供了一个通用的栈,利用提供的接口我们可以方便的用此栈来存放开发中的任意数据. open ...
- iBATIS代码生成分析
1.分析目录结构"tools"(或者说模板) 2.首先分析ibatorConfig.xml文件 <?xml version="1.0" encoding= ...
- 日常积累之JSON.stringify和JSON.parse substr
1.substr(start,len) 从字符串中读取内容,第一个参数是读取的首位置,如果为负数,则从末尾倒数计数. 第二个参数是要读取的长度. eg: var str = "silence ...