使用Python调用工作目录下所有快捷方式
来源:互联网 发布:云计算教程 百度网盘 编辑:程序博客网 时间:2024/05/16 03:26
使用Python调用工作目录下所有快捷方式
方法就是使用ShellExecute,类似VC,Python调用Windows API也很简单。
ActivePython 2.5 Documentation 中关于ShellExecute函数的说明:
win32api.ShellExecute
int = ShellExecute(hwnd, op , file , params , dir , bShow )
Opens or prints a file.
Parameters
hwnd : int
The handle of the parent window, or 0 for no parent. This window receives any message boxes an application produces (for example, for error reporting).
op : string
The operation to perform. May be "open", "print", or None, which defaults to "open".
file : string
The name of the file to open.
params : string
The parameters to pass, if the file name contains an executable. Should be None for a document file.
dir : string
The initial directory for the application.
bShow : int
Specifies whether the application is shown when it is opened. If the lpszFile parameter specifies a document file, this parameter is zero.
Win32 API References
Search for ShellExecute at msdn, google or google groups.
Return Value
The instance handle of the application that was run. (This handle could also be the handle of a dynamic data exchange [DDE] server application.) If there is an error, the method raises an exception.
- 使用Python调用工作目录下所有快捷方式
- 使用ls命令列举当前工作目录下所有目录的可用命令
- Python 遍历目录下的所有文件
- python列出目录下所有的文件
- Python 打印某一目录下所有文件名
- python 列出文件目录下所有文件
- python 获取指定目录下所有文件名
- python 遍历目录下所有文件
- Python递归遍历目录下所有文件
- Python递归遍历目录下所有文件
- python目录下的所有文件
- python读取目录下所有内容
- python 遍历目录下的所有文件
- python读取目录下所有文件
- python 在Windows 下切换工作目录
- python 读取一个目录下的所有目录和文件
- python 列出指定目录下的所有目录和文件
- 打印出当前工作目录下所有的文件
- 使用的 SQL Server 版本不支持数据类型“date”的解决方法
- lucene搜索优化
- c++文件指针总结
- java合成jpeg图像 压缩问题 resize问题
- lucene日期索引与搜索
- 使用Python调用工作目录下所有快捷方式
- 一种朋友
- struct2.0(一)
- Java Annotation基本介绍
- mysql绿色版安装问题解决(ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061))
- struct2.0(二)
- 了解 ibatis
- cctype字符函数
- java 二叉树算法(一)