Python通过ctypes调用windows api函数ShellExecute,ctypesshellexecute,#!c:/python2


#!c:/python27/python.exe#-*- coding:utf-8 -*-"执行程序"import ctypes;handler = None;operator = "open";fpath = r"D:\\Program Files\\TTPlayer\\TTPlayer.exe";param = None;dirpath = None;ncmd = 1;shell32 = ctypes.windll.LoadLibrary("shell32.dll");shell32.ShellExecuteA(handler,operator,fpath,param,dirpath,ncmd);#该片段来自于http://byrx.net

评论关闭