├── .gitignore
├── .no-sublime-package
├── License.txt
├── README.md
├── lib
├── x32
│ ├── pythoncom.py
│ ├── win32
│ │ ├── _win32sysloader.pyd
│ │ ├── _winxptheme.pyd
│ │ ├── include
│ │ │ └── PyWinTypes.h
│ │ ├── lib
│ │ │ ├── afxres.py
│ │ │ ├── commctrl.py
│ │ │ ├── dbi.py
│ │ │ ├── mmsystem.py
│ │ │ ├── netbios.py
│ │ │ ├── ntsecuritycon.py
│ │ │ ├── pywin32_testutil.py
│ │ │ ├── pywintypes.py
│ │ │ ├── rasutil.py
│ │ │ ├── regcheck.py
│ │ │ ├── regutil.py
│ │ │ ├── sspi.py
│ │ │ ├── sspicon.py
│ │ │ ├── win32con.py
│ │ │ ├── win32cryptcon.py
│ │ │ ├── win32evtlogutil.py
│ │ │ ├── win32gui_struct.py
│ │ │ ├── win32inetcon.py
│ │ │ ├── win32netcon.py
│ │ │ ├── win32pdhquery.py
│ │ │ ├── win32pdhutil.py
│ │ │ ├── win32rcparser.py
│ │ │ ├── win32serviceutil.py
│ │ │ ├── win32timezone.py
│ │ │ ├── win32traceutil.py
│ │ │ ├── win32verstamp.py
│ │ │ ├── winerror.py
│ │ │ ├── winioctlcon.py
│ │ │ ├── winnt.py
│ │ │ ├── winperf.py
│ │ │ └── winxptheme.py
│ │ ├── libs
│ │ │ └── pywintypes.lib
│ │ ├── license.txt
│ │ ├── mmapfile.pyd
│ │ ├── odbc.pyd
│ │ ├── perfmon.pyd
│ │ ├── perfmondata.dll
│ │ ├── pythoncom33.dll
│ │ ├── pythonservice.exe
│ │ ├── pywintypes33.dll
│ │ ├── servicemanager.pyd
│ │ ├── timer.pyd
│ │ ├── win2kras.pyd
│ │ ├── win32api.pyd
│ │ ├── win32clipboard.pyd
│ │ ├── win32console.pyd
│ │ ├── win32cred.pyd
│ │ ├── win32crypt.pyd
│ │ ├── win32event.pyd
│ │ ├── win32evtlog.pyd
│ │ ├── win32file.pyd
│ │ ├── win32gui.pyd
│ │ ├── win32help.pyd
│ │ ├── win32inet.pyd
│ │ ├── win32job.pyd
│ │ ├── win32lz.pyd
│ │ ├── win32net.pyd
│ │ ├── win32pdh.pyd
│ │ ├── win32pipe.pyd
│ │ ├── win32print.pyd
│ │ ├── win32process.pyd
│ │ ├── win32profile.pyd
│ │ ├── win32ras.pyd
│ │ ├── win32security.pyd
│ │ ├── win32service.pyd
│ │ ├── win32trace.pyd
│ │ ├── win32transaction.pyd
│ │ ├── win32ts.pyd
│ │ ├── win32wnet.pyd
│ │ └── winxpgui.pyd
│ ├── win32com
│ │ ├── HTML
│ │ │ ├── GeneratedSupport.html
│ │ │ ├── PythonCOM.html
│ │ │ ├── QuickStartClientCom.html
│ │ │ ├── QuickStartServerCom.html
│ │ │ ├── docindex.html
│ │ │ ├── image
│ │ │ │ ├── BTN_HomePage.gif
│ │ │ │ ├── BTN_ManualTop.gif
│ │ │ │ ├── BTN_NextPage.gif
│ │ │ │ ├── BTN_PrevPage.gif
│ │ │ │ ├── blank.gif
│ │ │ │ ├── pycom_blowing.gif
│ │ │ │ ├── pythoncom.gif
│ │ │ │ └── www_icon.gif
│ │ │ ├── index.html
│ │ │ ├── misc.html
│ │ │ ├── package.html
│ │ │ └── variant.html
│ │ ├── License.txt
│ │ ├── __init__.py
│ │ ├── client
│ │ │ ├── CLSIDToClass.py
│ │ │ ├── __init__.py
│ │ │ ├── build.py
│ │ │ ├── combrowse.py
│ │ │ ├── connect.py
│ │ │ ├── dynamic.py
│ │ │ ├── gencache.py
│ │ │ ├── genpy.py
│ │ │ ├── makepy.py
│ │ │ ├── selecttlb.py
│ │ │ ├── tlbrowse.py
│ │ │ └── util.py
│ │ ├── decimal_23.py
│ │ ├── demos
│ │ │ ├── __init__.py
│ │ │ ├── connect.py
│ │ │ ├── dump_clipboard.py
│ │ │ ├── eventsApartmentThreaded.py
│ │ │ ├── eventsFreeThreaded.py
│ │ │ ├── excelAddin.py
│ │ │ ├── excelRTDServer.py
│ │ │ ├── iebutton.py
│ │ │ ├── ietoolbar.py
│ │ │ ├── outlookAddin.py
│ │ │ └── trybag.py
│ │ ├── include
│ │ │ ├── PythonCOM.h
│ │ │ ├── PythonCOMRegister.h
│ │ │ └── PythonCOMServer.h
│ │ ├── libs
│ │ │ ├── axscript.lib
│ │ │ └── pythoncom.lib
│ │ ├── makegw
│ │ │ ├── __init__.py
│ │ │ ├── makegw.py
│ │ │ ├── makegwenum.py
│ │ │ └── makegwparse.py
│ │ ├── olectl.py
│ │ ├── readme.htm
│ │ ├── server
│ │ │ ├── __init__.py
│ │ │ ├── connect.py
│ │ │ ├── dispatcher.py
│ │ │ ├── exception.py
│ │ │ ├── factory.py
│ │ │ ├── localserver.py
│ │ │ ├── policy.py
│ │ │ ├── register.py
│ │ │ └── util.py
│ │ ├── servers
│ │ │ ├── PythonTools.py
│ │ │ ├── __init__.py
│ │ │ ├── dictionary.py
│ │ │ ├── interp.py
│ │ │ ├── perfmon.py
│ │ │ └── test_pycomtest.py
│ │ ├── storagecon.py
│ │ ├── universal.py
│ │ └── util.py
│ └── win32comext
│ │ ├── adsi
│ │ ├── __init__.py
│ │ ├── adsi.pyd
│ │ ├── adsicon.py
│ │ └── demos
│ │ │ ├── objectPicker.py
│ │ │ ├── scp.py
│ │ │ ├── search.py
│ │ │ └── test.py
│ │ ├── authorization
│ │ ├── __init__.py
│ │ ├── authorization.pyd
│ │ └── demos
│ │ │ ├── EditSecurity.py
│ │ │ └── EditServiceSecurity.py
│ │ ├── axcontrol
│ │ ├── __init__.py
│ │ └── axcontrol.pyd
│ │ ├── axdebug
│ │ ├── __init__.py
│ │ ├── adb.py
│ │ ├── axdebug.pyd
│ │ ├── codecontainer.py
│ │ ├── contexts.py
│ │ ├── debugger.py
│ │ ├── documents.py
│ │ ├── dump.py
│ │ ├── expressions.py
│ │ ├── gateways.py
│ │ ├── stackframe.py
│ │ └── util.py
│ │ ├── axscript
│ │ ├── Demos
│ │ │ └── client
│ │ │ │ ├── asp
│ │ │ │ ├── CreateObject.asp
│ │ │ │ ├── caps.asp
│ │ │ │ ├── interrupt
│ │ │ │ │ ├── test.asp
│ │ │ │ │ ├── test.html
│ │ │ │ │ ├── test1.asp
│ │ │ │ │ └── test1.html
│ │ │ │ └── tut1.asp
│ │ │ │ ├── ie
│ │ │ │ ├── MarqueeText1.htm
│ │ │ │ ├── calc.htm
│ │ │ │ ├── dbgtest.htm
│ │ │ │ ├── demo.htm
│ │ │ │ ├── demo_check.htm
│ │ │ │ ├── demo_intro.htm
│ │ │ │ ├── demo_menu.htm
│ │ │ │ ├── docwrite.htm
│ │ │ │ ├── foo2.htm
│ │ │ │ ├── form.htm
│ │ │ │ ├── marqueeDemo.htm
│ │ │ │ ├── mousetrack.htm
│ │ │ │ └── pycom_blowing.gif
│ │ │ │ └── wsh
│ │ │ │ ├── blank.pys
│ │ │ │ ├── excel.pys
│ │ │ │ ├── registry.pys
│ │ │ │ └── test.pys
│ │ ├── __init__.py
│ │ ├── asputil.py
│ │ ├── axscript.pyd
│ │ ├── client
│ │ │ ├── __init__.py
│ │ │ ├── debug.py
│ │ │ ├── error.py
│ │ │ ├── framework.py
│ │ │ ├── pydumper.py
│ │ │ ├── pyscript.py
│ │ │ ├── pyscript_rexec.py
│ │ │ └── scriptdispatch.py
│ │ ├── server
│ │ │ ├── __init__.py
│ │ │ ├── axsite.py
│ │ │ └── error.py
│ │ └── test
│ │ │ ├── debugTest.pys
│ │ │ ├── debugTest.vbs
│ │ │ ├── leakTest.py
│ │ │ ├── test.html
│ │ │ ├── testHost.py
│ │ │ └── testHost4Dbg.py
│ │ ├── bits
│ │ ├── __init__.py
│ │ ├── bits.pyd
│ │ └── test
│ │ │ ├── show_all_jobs.py
│ │ │ └── test_bits.py
│ │ ├── directsound
│ │ ├── __init__.py
│ │ ├── directsound.pyd
│ │ └── test
│ │ │ ├── __init__.py
│ │ │ ├── ds_record.py
│ │ │ └── ds_test.py
│ │ ├── ifilter
│ │ ├── __init__.py
│ │ ├── demo
│ │ │ └── filterDemo.py
│ │ ├── ifilter.pyd
│ │ └── ifiltercon.py
│ │ ├── internet
│ │ ├── __init__.py
│ │ ├── inetcon.py
│ │ └── internet.pyd
│ │ ├── mapi
│ │ ├── __init__.py
│ │ ├── demos
│ │ │ └── mapisend.py
│ │ ├── emsabtags.py
│ │ ├── exchange.pyd
│ │ ├── exchdapi.pyd
│ │ ├── mapi.pyd
│ │ ├── mapitags.py
│ │ └── mapiutil.py
│ │ ├── propsys
│ │ ├── __init__.py
│ │ ├── propsys.pyd
│ │ ├── pscon.py
│ │ └── test
│ │ │ └── testpropsys.py
│ │ ├── shell
│ │ ├── __init__.py
│ │ ├── demos
│ │ │ ├── IActiveDesktop.py
│ │ │ ├── IShellLinkDataList.py
│ │ │ ├── IUniformResourceLocator.py
│ │ │ ├── browse_for_folder.py
│ │ │ ├── create_link.py
│ │ │ ├── dump_link.py
│ │ │ ├── explorer_browser.py
│ │ │ ├── servers
│ │ │ │ ├── column_provider.py
│ │ │ │ ├── context_menu.py
│ │ │ │ ├── copy_hook.py
│ │ │ │ ├── empty_volume_cache.py
│ │ │ │ ├── folder_view.py
│ │ │ │ ├── icon_handler.py
│ │ │ │ └── shell_view.py
│ │ │ ├── shellexecuteex.py
│ │ │ ├── viewstate.py
│ │ │ └── walk_shell_folders.py
│ │ ├── shell.pyd
│ │ ├── shellcon.py
│ │ └── test
│ │ │ ├── testSHFileOperation.py
│ │ │ ├── testShellFolder.py
│ │ │ └── testShellItem.py
│ │ └── taskscheduler
│ │ ├── __init__.py
│ │ ├── taskscheduler.pyd
│ │ └── test
│ │ ├── test_addtask.py
│ │ ├── test_addtask_1.py
│ │ ├── test_addtask_2.py
│ │ └── test_localsystem.py
└── x64
│ ├── pythoncom.py
│ ├── win32
│ ├── _win32sysloader.pyd
│ ├── _winxptheme.pyd
│ ├── include
│ │ └── PyWinTypes.h
│ ├── lib
│ │ ├── afxres.py
│ │ ├── commctrl.py
│ │ ├── dbi.py
│ │ ├── mmsystem.py
│ │ ├── netbios.py
│ │ ├── ntsecuritycon.py
│ │ ├── pywin32_testutil.py
│ │ ├── pywintypes.py
│ │ ├── rasutil.py
│ │ ├── regcheck.py
│ │ ├── regutil.py
│ │ ├── sspi.py
│ │ ├── sspicon.py
│ │ ├── win32con.py
│ │ ├── win32cryptcon.py
│ │ ├── win32evtlogutil.py
│ │ ├── win32gui_struct.py
│ │ ├── win32inetcon.py
│ │ ├── win32netcon.py
│ │ ├── win32pdhquery.py
│ │ ├── win32pdhutil.py
│ │ ├── win32rcparser.py
│ │ ├── win32serviceutil.py
│ │ ├── win32timezone.py
│ │ ├── win32traceutil.py
│ │ ├── win32verstamp.py
│ │ ├── winerror.py
│ │ ├── winioctlcon.py
│ │ ├── winnt.py
│ │ ├── winperf.py
│ │ └── winxptheme.py
│ ├── libs
│ │ └── pywintypes.lib
│ ├── license.txt
│ ├── mmapfile.pyd
│ ├── odbc.pyd
│ ├── perfmon.pyd
│ ├── perfmondata.dll
│ ├── pythoncom33.dll
│ ├── pythonservice.exe
│ ├── pywintypes33.dll
│ ├── servicemanager.pyd
│ ├── timer.pyd
│ ├── win2kras.pyd
│ ├── win32api.pyd
│ ├── win32clipboard.pyd
│ ├── win32console.pyd
│ ├── win32cred.pyd
│ ├── win32crypt.pyd
│ ├── win32event.pyd
│ ├── win32evtlog.pyd
│ ├── win32file.pyd
│ ├── win32gui.pyd
│ ├── win32help.pyd
│ ├── win32inet.pyd
│ ├── win32job.pyd
│ ├── win32lz.pyd
│ ├── win32net.pyd
│ ├── win32pdh.pyd
│ ├── win32pipe.pyd
│ ├── win32print.pyd
│ ├── win32process.pyd
│ ├── win32profile.pyd
│ ├── win32ras.pyd
│ ├── win32security.pyd
│ ├── win32service.pyd
│ ├── win32trace.pyd
│ ├── win32transaction.pyd
│ ├── win32ts.pyd
│ ├── win32wnet.pyd
│ └── winxpgui.pyd
│ ├── win32com
│ ├── HTML
│ │ ├── GeneratedSupport.html
│ │ ├── PythonCOM.html
│ │ ├── QuickStartClientCom.html
│ │ ├── QuickStartServerCom.html
│ │ ├── docindex.html
│ │ ├── image
│ │ │ ├── BTN_HomePage.gif
│ │ │ ├── BTN_ManualTop.gif
│ │ │ ├── BTN_NextPage.gif
│ │ │ ├── BTN_PrevPage.gif
│ │ │ ├── blank.gif
│ │ │ ├── pycom_blowing.gif
│ │ │ ├── pythoncom.gif
│ │ │ └── www_icon.gif
│ │ ├── index.html
│ │ ├── misc.html
│ │ ├── package.html
│ │ └── variant.html
│ ├── License.txt
│ ├── __init__.py
│ ├── client
│ │ ├── CLSIDToClass.py
│ │ ├── __init__.py
│ │ ├── build.py
│ │ ├── combrowse.py
│ │ ├── connect.py
│ │ ├── dynamic.py
│ │ ├── gencache.py
│ │ ├── genpy.py
│ │ ├── makepy.py
│ │ ├── selecttlb.py
│ │ ├── tlbrowse.py
│ │ └── util.py
│ ├── decimal_23.py
│ ├── demos
│ │ ├── __init__.py
│ │ ├── connect.py
│ │ ├── dump_clipboard.py
│ │ ├── eventsApartmentThreaded.py
│ │ ├── eventsFreeThreaded.py
│ │ ├── excelAddin.py
│ │ ├── excelRTDServer.py
│ │ ├── iebutton.py
│ │ ├── ietoolbar.py
│ │ ├── outlookAddin.py
│ │ └── trybag.py
│ ├── include
│ │ ├── PythonCOM.h
│ │ ├── PythonCOMRegister.h
│ │ └── PythonCOMServer.h
│ ├── libs
│ │ ├── axscript.lib
│ │ └── pythoncom.lib
│ ├── makegw
│ │ ├── __init__.py
│ │ ├── makegw.py
│ │ ├── makegwenum.py
│ │ └── makegwparse.py
│ ├── olectl.py
│ ├── readme.htm
│ ├── server
│ │ ├── __init__.py
│ │ ├── connect.py
│ │ ├── dispatcher.py
│ │ ├── exception.py
│ │ ├── factory.py
│ │ ├── localserver.py
│ │ ├── policy.py
│ │ ├── register.py
│ │ └── util.py
│ ├── servers
│ │ ├── PythonTools.py
│ │ ├── __init__.py
│ │ ├── dictionary.py
│ │ ├── interp.py
│ │ ├── perfmon.py
│ │ └── test_pycomtest.py
│ ├── storagecon.py
│ ├── universal.py
│ └── util.py
│ └── win32comext
│ ├── adsi
│ ├── __init__.py
│ ├── adsi.pyd
│ ├── adsicon.py
│ └── demos
│ │ ├── objectPicker.py
│ │ ├── scp.py
│ │ ├── search.py
│ │ └── test.py
│ ├── authorization
│ ├── __init__.py
│ ├── authorization.pyd
│ └── demos
│ │ ├── EditSecurity.py
│ │ └── EditServiceSecurity.py
│ ├── axcontrol
│ ├── __init__.py
│ └── axcontrol.pyd
│ ├── axdebug
│ ├── __init__.py
│ ├── adb.py
│ ├── axdebug.pyd
│ ├── codecontainer.py
│ ├── contexts.py
│ ├── debugger.py
│ ├── documents.py
│ ├── dump.py
│ ├── expressions.py
│ ├── gateways.py
│ ├── stackframe.py
│ └── util.py
│ ├── axscript
│ ├── Demos
│ │ └── client
│ │ │ ├── asp
│ │ │ ├── CreateObject.asp
│ │ │ ├── caps.asp
│ │ │ ├── interrupt
│ │ │ │ ├── test.asp
│ │ │ │ ├── test.html
│ │ │ │ ├── test1.asp
│ │ │ │ └── test1.html
│ │ │ └── tut1.asp
│ │ │ ├── ie
│ │ │ ├── MarqueeText1.htm
│ │ │ ├── calc.htm
│ │ │ ├── dbgtest.htm
│ │ │ ├── demo.htm
│ │ │ ├── demo_check.htm
│ │ │ ├── demo_intro.htm
│ │ │ ├── demo_menu.htm
│ │ │ ├── docwrite.htm
│ │ │ ├── foo2.htm
│ │ │ ├── form.htm
│ │ │ ├── marqueeDemo.htm
│ │ │ ├── mousetrack.htm
│ │ │ └── pycom_blowing.gif
│ │ │ └── wsh
│ │ │ ├── blank.pys
│ │ │ ├── excel.pys
│ │ │ ├── registry.pys
│ │ │ └── test.pys
│ ├── __init__.py
│ ├── asputil.py
│ ├── axscript.pyd
│ ├── client
│ │ ├── __init__.py
│ │ ├── debug.py
│ │ ├── error.py
│ │ ├── framework.py
│ │ ├── pydumper.py
│ │ ├── pyscript.py
│ │ ├── pyscript_rexec.py
│ │ └── scriptdispatch.py
│ ├── server
│ │ ├── __init__.py
│ │ ├── axsite.py
│ │ └── error.py
│ └── test
│ │ ├── debugTest.pys
│ │ ├── debugTest.vbs
│ │ ├── leakTest.py
│ │ ├── test.html
│ │ ├── testHost.py
│ │ └── testHost4Dbg.py
│ ├── bits
│ ├── __init__.py
│ ├── bits.pyd
│ └── test
│ │ ├── show_all_jobs.py
│ │ └── test_bits.py
│ ├── directsound
│ ├── __init__.py
│ ├── directsound.pyd
│ └── test
│ │ ├── __init__.py
│ │ ├── ds_record.py
│ │ └── ds_test.py
│ ├── ifilter
│ ├── __init__.py
│ ├── demo
│ │ └── filterDemo.py
│ ├── ifilter.pyd
│ └── ifiltercon.py
│ ├── internet
│ ├── __init__.py
│ ├── inetcon.py
│ └── internet.pyd
│ ├── mapi
│ ├── __init__.py
│ ├── demos
│ │ └── mapisend.py
│ ├── emsabtags.py
│ ├── mapi.pyd
│ ├── mapitags.py
│ └── mapiutil.py
│ ├── propsys
│ ├── __init__.py
│ ├── propsys.pyd
│ ├── pscon.py
│ └── test
│ │ └── testpropsys.py
│ ├── shell
│ ├── __init__.py
│ ├── demos
│ │ ├── IActiveDesktop.py
│ │ ├── IShellLinkDataList.py
│ │ ├── IUniformResourceLocator.py
│ │ ├── browse_for_folder.py
│ │ ├── create_link.py
│ │ ├── dump_link.py
│ │ ├── explorer_browser.py
│ │ ├── servers
│ │ │ ├── column_provider.py
│ │ │ ├── context_menu.py
│ │ │ ├── copy_hook.py
│ │ │ ├── empty_volume_cache.py
│ │ │ ├── folder_view.py
│ │ │ ├── icon_handler.py
│ │ │ └── shell_view.py
│ │ ├── shellexecuteex.py
│ │ ├── viewstate.py
│ │ └── walk_shell_folders.py
│ ├── shell.pyd
│ ├── shellcon.py
│ └── test
│ │ ├── testSHFileOperation.py
│ │ ├── testShellFolder.py
│ │ └── testShellItem.py
│ └── taskscheduler
│ ├── __init__.py
│ ├── taskscheduler.pyd
│ └── test
│ ├── test_addtask.py
│ ├── test_addtask_1.py
│ ├── test_addtask_2.py
│ └── test_localsystem.py
└── setup.py
/.gitignore:
--------------------------------------------------------------------------------
1 | *.py[co]
2 |
3 | # C extensions
4 | *.so
5 |
6 | # Packages
7 | *.egg
8 | *.egg-info
9 | dist
10 | build
11 | eggs
12 | parts
13 | bin
14 | var
15 | sdist
16 | develop-eggs
17 | .installed.cfg
18 | lib64
19 | __pycache__
20 |
21 | # Installer logs
22 | pip-log.txt
23 |
24 | # Unit test / coverage reports
25 | .coverage
26 | .tox
27 | nosetests.xml
28 |
29 | # Translations
30 | *.mo
31 |
32 | # Mr Developer
33 | .mr.developer.cfg
34 | .project
35 | .pydevproject
36 |
--------------------------------------------------------------------------------
/.no-sublime-package:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/License.txt:
--------------------------------------------------------------------------------
1 | Unless stated in the specfic source file, this work is
2 | Copyright (c) 1996-2008, Greg Stein and Mark Hammond.
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions
7 | are met:
8 |
9 | Redistributions of source code must retain the above copyright notice,
10 | this list of conditions and the following disclaimer.
11 |
12 | Redistributions in binary form must reproduce the above copyright
13 | notice, this list of conditions and the following disclaimer in
14 | the documentation and/or other materials provided with the distribution.
15 |
16 | Neither names of Greg Stein, Mark Hammond nor the name of contributors may be used
17 | to endorse or promote products derived from this software without
18 | specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
21 | IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Pywin32 (Deprecated)
2 | =======
3 |
4 | This package was deprecated in favor of the [`pywin32` library](https://pypi.org/project/pywin32/#files),
5 | which your package can depend on
6 | and Package Control will install accordingly.
7 | See https://packagecontrol.io/docs/dependencies on how to specify a dependency on this library
8 | (previously called "dependency")
9 | in your package.
10 |
11 | ---
12 |
13 | Pywin32 support for sublime (win32api etc)
14 |
15 | Still evaluating what needs to be included and what doesn't, so if it is missing something important, please let me know.
16 |
17 | # Using Pywin32
18 | Pywin32 modules should be accessible as soon as Sublime loads up the Pywin32 plugin...but since there is no guarunteed way to ensure all plugins are loaded after Pywin32 gets loaded, you should include `Pywin32.setup` before including any pywin32 modules. You can include it once in the top most level file, and all subsequent includes from that file should be guarunteed access. It does not have to be included in all files that call pywin32 modules, just once in the top level file that is the entry point. If I could guaruntee pywin32 to get loaded before all plugins, then even this requriement would not be necessary.
19 |
20 | Example (show url path of all open explorer windows):
21 |
22 | ```python
23 | import Pywin32.setup
24 | from win32com.client.gencache import EnsureDispatch
25 |
26 |
27 | def run():
28 | for w in EnsureDispatch("Shell.Application").Windows():
29 | print(w.LocationName + "=" + w.LocationURL)
30 |
31 | run()
32 | ```
33 |
--------------------------------------------------------------------------------
/lib/x32/pythoncom.py:
--------------------------------------------------------------------------------
1 | # Magic utility that "redirects" to pythoncomxx.dll
2 | import pywintypes
3 | pywintypes.__import_pywin32_system_module__("pythoncom", globals())
4 |
--------------------------------------------------------------------------------
/lib/x32/win32/_win32sysloader.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/_win32sysloader.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/_winxptheme.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/_winxptheme.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/lib/dbi.py:
--------------------------------------------------------------------------------
1 | """
2 | Skeleton replacement for removed dbi module.
3 | Use of objects created by this module should be replaced with native Python objects.
4 | Dates are now returned as datetime.datetime objects, but will still accept PyTime
5 | objects also.
6 | Raw data for binary fields should be passed as buffer objects for Python 2.x,
7 | and memoryview objects in Py3k.
8 | """
9 |
10 | import warnings
11 | warnings.warn(
12 | "dbi module is obsolete, code should now use native python datetime and buffer/memoryview objects",
13 | DeprecationWarning)
14 |
15 | import datetime
16 | dbDate = dbiDate = datetime.datetime
17 |
18 | try:
19 | dbRaw = dbiRaw = buffer
20 | except NameError:
21 | dbRaw = dbiRaw = memoryview
22 |
23 | # type names are still exported by odbc module
24 | from odbc import *
25 |
--------------------------------------------------------------------------------
/lib/x32/win32/lib/rasutil.py:
--------------------------------------------------------------------------------
1 | import win32ras
2 |
3 | stateStrings = {
4 | win32ras.RASCS_OpenPort : "OpenPort",
5 | win32ras.RASCS_PortOpened : "PortOpened",
6 | win32ras.RASCS_ConnectDevice : "ConnectDevice",
7 | win32ras.RASCS_DeviceConnected : "DeviceConnected",
8 | win32ras.RASCS_AllDevicesConnected : "AllDevicesConnected",
9 | win32ras.RASCS_Authenticate : "Authenticate",
10 | win32ras.RASCS_AuthNotify : "AuthNotify",
11 | win32ras.RASCS_AuthRetry : "AuthRetry",
12 | win32ras.RASCS_AuthCallback : "AuthCallback",
13 | win32ras.RASCS_AuthChangePassword : "AuthChangePassword",
14 | win32ras.RASCS_AuthProject : "AuthProject",
15 | win32ras.RASCS_AuthLinkSpeed : "AuthLinkSpeed",
16 | win32ras.RASCS_AuthAck : "AuthAck",
17 | win32ras.RASCS_ReAuthenticate : "ReAuthenticate",
18 | win32ras.RASCS_Authenticated : "Authenticated",
19 | win32ras.RASCS_PrepareForCallback : "PrepareForCallback",
20 | win32ras.RASCS_WaitForModemReset : "WaitForModemReset",
21 | win32ras.RASCS_WaitForCallback : "WaitForCallback",
22 | win32ras.RASCS_Projected : "Projected",
23 | win32ras.RASCS_StartAuthentication : "StartAuthentication",
24 | win32ras.RASCS_CallbackComplete : "CallbackComplete",
25 | win32ras.RASCS_LogonNetwork : "LogonNetwork",
26 | win32ras.RASCS_Interactive : "Interactive",
27 | win32ras.RASCS_RetryAuthentication : "RetryAuthentication",
28 | win32ras.RASCS_CallbackSetByCaller : "CallbackSetByCaller",
29 | win32ras.RASCS_PasswordExpired : "PasswordExpired",
30 | win32ras.RASCS_Connected : "Connected",
31 | win32ras.RASCS_Disconnected : "Disconnected"
32 | }
33 |
34 | def TestCallback( hras, msg, state, error, exterror):
35 | print("Callback called with ", hras, msg, stateStrings[state], error, exterror)
36 |
37 | def test(rasName = "_ Divert Off"):
38 | return win32ras.Dial(None, None, (rasName,),TestCallback)
--------------------------------------------------------------------------------
/lib/x32/win32/lib/win32traceutil.py:
--------------------------------------------------------------------------------
1 | # This is a helper for the win32trace module
2 |
3 | # If imported from a normal Python program, it sets up sys.stdout and sys.stderr
4 | # so output goes to the collector.
5 |
6 | # If run from the command line, it creates a collector loop.
7 |
8 | # Eg:
9 | # C:>start win32traceutil.py (or python.exe win32traceutil.py)
10 | # will start a process with a (pretty much) blank screen.
11 | #
12 | # then, switch to a DOS prompt, and type:
13 | # C:>python.exe
14 | # Python 1.4 etc...
15 | # >>> import win32traceutil
16 | # Redirecting output to win32trace remote collector
17 | # >>> print "Hello"
18 | # >>>
19 | # And the output will appear in the first collector process.
20 |
21 | # Note - the client or the collector can be started first.
22 | # There is a 0x20000 byte buffer. If this gets full, it is reset, and new
23 | # output appended from the start.
24 |
25 | import win32trace
26 |
27 | def RunAsCollector():
28 | import sys
29 | try:
30 | import win32api
31 | win32api.SetConsoleTitle("Python Trace Collector")
32 | except:
33 | pass # Oh well!
34 | win32trace.InitRead()
35 | print("Collecting Python Trace Output...")
36 | try:
37 | while 1:
38 | # a short timeout means ctrl+c works next time we wake...
39 | sys.stdout.write(win32trace.blockingread(500))
40 | except KeyboardInterrupt:
41 | print("Ctrl+C")
42 |
43 |
44 | def SetupForPrint():
45 | win32trace.InitWrite()
46 | try: # Under certain servers, sys.stdout may be invalid.
47 | print("Redirecting output to win32trace remote collector")
48 | except:
49 | pass
50 | win32trace.setprint() # this works in an rexec environment.
51 |
52 | if __name__=='__main__':
53 | RunAsCollector()
54 | else:
55 | SetupForPrint()
56 |
--------------------------------------------------------------------------------
/lib/x32/win32/lib/winxptheme.py:
--------------------------------------------------------------------------------
1 | """A useful wrapper around the "_winxptheme" module.
2 | Unlike _winxptheme, this module will load on any version of Windows.
3 |
4 | If _winxptheme is not available, then this module will have only 2 functions -
5 | IsAppThemed() and IsThemeActive, which will both always return False.
6 |
7 | If _winxptheme is available, this module will have all methods in that module,
8 | including real implementations of IsAppThemed() and IsThemeActive().
9 | """
10 |
11 | import win32api
12 | try:
13 | win32api.FreeLibrary(win32api.LoadLibrary("Uxtheme.dll"))
14 | # Life is good, everything is available.
15 | from _winxptheme import *
16 | except win32api.error:
17 | # Probably not running XP.
18 | def IsAppThemed():
19 | return False
20 | def IsThemeActive():
21 | return False
22 |
23 | del win32api
24 |
--------------------------------------------------------------------------------
/lib/x32/win32/libs/pywintypes.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/libs/pywintypes.lib
--------------------------------------------------------------------------------
/lib/x32/win32/license.txt:
--------------------------------------------------------------------------------
1 | Unless stated in the specfic source file, this work is
2 | Copyright (c) 1994-2008, Mark Hammond
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions
7 | are met:
8 |
9 | Redistributions of source code must retain the above copyright notice,
10 | this list of conditions and the following disclaimer.
11 |
12 | Redistributions in binary form must reproduce the above copyright
13 | notice, this list of conditions and the following disclaimer in
14 | the documentation and/or other materials provided with the distribution.
15 |
16 | Neither name of Mark Hammond nor the name of contributors may be used
17 | to endorse or promote products derived from this software without
18 | specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
21 | IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
--------------------------------------------------------------------------------
/lib/x32/win32/mmapfile.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/mmapfile.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/odbc.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/odbc.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/perfmon.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/perfmon.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/perfmondata.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/perfmondata.dll
--------------------------------------------------------------------------------
/lib/x32/win32/pythoncom33.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/pythoncom33.dll
--------------------------------------------------------------------------------
/lib/x32/win32/pythonservice.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/pythonservice.exe
--------------------------------------------------------------------------------
/lib/x32/win32/pywintypes33.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/pywintypes33.dll
--------------------------------------------------------------------------------
/lib/x32/win32/servicemanager.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/servicemanager.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/timer.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/timer.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win2kras.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win2kras.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32api.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32api.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32clipboard.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32clipboard.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32console.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32console.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32cred.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32cred.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32crypt.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32crypt.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32event.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32event.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32evtlog.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32evtlog.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32file.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32file.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32gui.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32gui.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32help.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32help.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32inet.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32inet.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32job.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32job.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32lz.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32lz.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32net.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32net.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32pdh.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32pdh.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32pipe.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32pipe.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32print.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32print.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32process.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32process.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32profile.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32profile.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32ras.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32ras.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32security.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32security.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32service.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32service.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32trace.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32trace.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32transaction.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32transaction.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32ts.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32ts.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/win32wnet.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/win32wnet.pyd
--------------------------------------------------------------------------------
/lib/x32/win32/winxpgui.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32/winxpgui.pyd
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/QuickStartClientCom.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/HTML/QuickStartClientCom.html
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/QuickStartServerCom.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/HTML/QuickStartServerCom.html
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/docindex.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/HTML/docindex.html
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/image/BTN_HomePage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/HTML/image/BTN_HomePage.gif
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/image/BTN_ManualTop.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/HTML/image/BTN_ManualTop.gif
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/image/BTN_NextPage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/HTML/image/BTN_NextPage.gif
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/image/BTN_PrevPage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/HTML/image/BTN_PrevPage.gif
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/image/blank.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/HTML/image/blank.gif
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/image/pycom_blowing.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/HTML/image/pycom_blowing.gif
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/image/pythoncom.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/HTML/image/pythoncom.gif
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/image/www_icon.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/HTML/image/www_icon.gif
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | win32com
6 |
7 |
8 |
9 |
10 |
11 |
12 | 
13 | Python and COM
14 | Introduction
15 | Python has an excellent interface to COM (also known variously as OLE2, ActiveX, etc).
16 | The Python COM package can be used to interface to almost any COM program (such as the MS-Office suite), write servers that can be hosted by any COM client (such as Visual Basic or C++), and has even been used to provide the core ActiveX Scripting Support.
17 |
18 |
19 |
22 |
23 |
24 |
25 | Documentation
26 | Preliminary Active Scripting and Debugging documentation is available.
27 | 2 Quick-Start guides have been provided, which also contain other links. See the Quick Start for Client side COM and the Quick Start for Server side COM
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/misc.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/HTML/misc.html
--------------------------------------------------------------------------------
/lib/x32/win32com/HTML/package.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/HTML/package.html
--------------------------------------------------------------------------------
/lib/x32/win32com/License.txt:
--------------------------------------------------------------------------------
1 | Unless stated in the specfic source file, this work is
2 | Copyright (c) 1996-2008, Greg Stein and Mark Hammond.
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions
7 | are met:
8 |
9 | Redistributions of source code must retain the above copyright notice,
10 | this list of conditions and the following disclaimer.
11 |
12 | Redistributions in binary form must reproduce the above copyright
13 | notice, this list of conditions and the following disclaimer in
14 | the documentation and/or other materials provided with the distribution.
15 |
16 | Neither names of Greg Stein, Mark Hammond nor the name of contributors may be used
17 | to endorse or promote products derived from this software without
18 | specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
21 | IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
--------------------------------------------------------------------------------
/lib/x32/win32com/client/CLSIDToClass.py:
--------------------------------------------------------------------------------
1 | """Manages a dictionary of CLSID strings to Python classes.
2 |
3 | Primary use of this module is to allow modules generated by
4 | makepy.py to share classes. @makepy@ automatically generates code
5 | which interacts with this module. You should never need to reference
6 | this module directly.
7 |
8 | This module only provides support for modules which have been previously
9 | been imported. The gencache module provides some support for loading modules
10 | on demand - once done, this module supports it...
11 |
12 | As an example, the MSACCESS.TLB type library makes reference to the
13 | CLSID of the Database object, as defined in DAO3032.DLL. This
14 | allows code using the MSAccess wrapper to natively use Databases.
15 |
16 | This obviously applies to all cooperating objects, not just DAO and
17 | Access.
18 | """
19 | mapCLSIDToClass = {}
20 |
21 | def RegisterCLSID( clsid, pythonClass ):
22 | """Register a class that wraps a CLSID
23 |
24 | This function allows a CLSID to be globally associated with a class.
25 | Certain module will automatically convert an IDispatch object to an
26 | instance of the associated class.
27 | """
28 |
29 | mapCLSIDToClass[str(clsid)] = pythonClass
30 |
31 | def RegisterCLSIDsFromDict( dict ):
32 | """Register a dictionary of CLSID's and classes.
33 |
34 | This module performs the same function as @RegisterCLSID@, but for
35 | an entire dictionary of associations.
36 |
37 | Typically called by makepy generated modules at import time.
38 | """
39 | mapCLSIDToClass.update(dict)
40 |
41 | def GetClass(clsid):
42 | """Given a CLSID, return the globally associated class.
43 |
44 | clsid -- a string CLSID representation to check.
45 | """
46 | return mapCLSIDToClass[clsid]
47 |
48 | def HasClass(clsid):
49 | """Determines if the CLSID has an associated class.
50 |
51 | clsid -- the string CLSID to check
52 | """
53 | return clsid in mapCLSIDToClass
54 |
--------------------------------------------------------------------------------
/lib/x32/win32com/client/connect.py:
--------------------------------------------------------------------------------
1 | """Utilities for working with Connections"""
2 | import win32com.server.util, pythoncom
3 |
4 | class SimpleConnection:
5 | "A simple, single connection object"
6 | def __init__(self, coInstance = None, eventInstance = None, eventCLSID = None, debug = 0):
7 | self.cp = None
8 | self.cookie = None
9 | self.debug = debug
10 | if not coInstance is None:
11 | self.Connect(coInstance , eventInstance, eventCLSID)
12 |
13 | def __del__(self):
14 | try:
15 | self.Disconnect()
16 | except pythoncom.error:
17 | # Ignore disconnection as we are torn down.
18 | pass
19 |
20 | def _wrap(self, obj):
21 | useDispatcher = None
22 | if self.debug:
23 | from win32com.server import dispatcher
24 | useDispatcher = dispatcher.DefaultDebugDispatcher
25 | return win32com.server.util.wrap(obj, useDispatcher=useDispatcher)
26 |
27 | def Connect(self, coInstance, eventInstance, eventCLSID = None):
28 | try:
29 | oleobj = coInstance._oleobj_
30 | except AttributeError:
31 | oleobj = coInstance
32 | cpc=oleobj.QueryInterface(pythoncom.IID_IConnectionPointContainer)
33 | if eventCLSID is None: eventCLSID = eventInstance.CLSID
34 | comEventInstance = self._wrap(eventInstance)
35 | self.cp=cpc.FindConnectionPoint(eventCLSID)
36 | self.cookie = self.cp.Advise(comEventInstance)
37 |
38 | def Disconnect(self):
39 | if not self.cp is None:
40 | if self.cookie:
41 | self.cp.Unadvise(self.cookie)
42 | self.cookie = None
43 | self.cp = None
44 |
--------------------------------------------------------------------------------
/lib/x32/win32com/demos/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/demos/__init__.py
--------------------------------------------------------------------------------
/lib/x32/win32com/demos/iebutton.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/demos/iebutton.py
--------------------------------------------------------------------------------
/lib/x32/win32com/demos/ietoolbar.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/demos/ietoolbar.py
--------------------------------------------------------------------------------
/lib/x32/win32com/demos/trybag.py:
--------------------------------------------------------------------------------
1 | import pythoncom
2 | from win32com.server import util
3 | from win32com.server import exception
4 |
5 | VT_EMPTY = pythoncom.VT_EMPTY
6 |
7 | class Bag:
8 | _public_methods_ = [ 'Read', 'Write' ]
9 | _com_interfaces_ = [ pythoncom.IID_IPropertyBag ]
10 |
11 | def __init__(self):
12 | self.data = { }
13 |
14 | def Read(self, propName, varType, errorLog):
15 | print("read: name=", propName, "type=", varType)
16 | if propName not in self.data:
17 | if errorLog:
18 | hr = 0x80070057
19 | exc = pythoncom.com_error(0, "Bag.Read", "no such item", None, 0, hr)
20 | errorLog.AddError(propName, exc)
21 | raise exception.Exception(scode=hr)
22 | return self.data[propName]
23 |
24 | def Write(self, propName, value):
25 | print("write: name=", propName, "value=", value)
26 | self.data[propName] = value
27 |
28 |
29 | class Target:
30 | _public_methods_ = [ 'GetClassID', 'InitNew', 'Load', 'Save' ]
31 | _com_interfaces_ = [ pythoncom.IID_IPersist,
32 | pythoncom.IID_IPersistPropertyBag ]
33 |
34 | def GetClassID(self):
35 | raise exception.Exception(scode=0x80004005) # E_FAIL
36 |
37 | def InitNew(self):
38 | pass
39 |
40 | def Load(self, bag, log):
41 | print(bag.Read('prop1', VT_EMPTY, log))
42 | print(bag.Read('prop2', VT_EMPTY, log))
43 | try:
44 | print(bag.Read('prop3', VT_EMPTY, log))
45 | except exception.Exception:
46 | pass
47 |
48 | def Save(self, bag, clearDirty, saveAllProps):
49 | bag.Write('prop1', 'prop1.hello')
50 | bag.Write('prop2', 'prop2.there')
51 |
52 | class Log:
53 | _public_methods_ = [ 'AddError' ]
54 | _com_interfaces_ = [ pythoncom.IID_IErrorLog ]
55 |
56 | def AddError(self, propName, excepInfo):
57 | print("error: propName=", propName, "error=", excepInfo)
58 |
59 | def test():
60 | bag = Bag()
61 | target = Target()
62 | log = Log()
63 |
64 | target.Save(bag, 1, 1)
65 | target.Load(bag, log)
66 |
67 | comBag = util.wrap(bag, pythoncom.IID_IPropertyBag)
68 | comTarget = util.wrap(target, pythoncom.IID_IPersistPropertyBag)
69 | comLog = util.wrap(log, pythoncom.IID_IErrorLog)
70 |
71 | comTarget.Save(comBag, 1, 1)
72 | comTarget.Load(comBag, comLog)
73 |
74 | if __name__ == '__main__':
75 | test()
76 |
--------------------------------------------------------------------------------
/lib/x32/win32com/libs/axscript.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/libs/axscript.lib
--------------------------------------------------------------------------------
/lib/x32/win32com/libs/pythoncom.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/libs/pythoncom.lib
--------------------------------------------------------------------------------
/lib/x32/win32com/makegw/__init__.py:
--------------------------------------------------------------------------------
1 | # indicates a python package.
2 |
--------------------------------------------------------------------------------
/lib/x32/win32com/server/__init__.py:
--------------------------------------------------------------------------------
1 | # Empty __init__ file to designate a sub-package.
--------------------------------------------------------------------------------
/lib/x32/win32com/server/factory.py:
--------------------------------------------------------------------------------
1 | # Class factory utilities.
2 | import pythoncom
3 |
4 | def RegisterClassFactories(clsids, flags = None, clsctx = None):
5 | """Given a list of CLSID, create and register class factories.
6 |
7 | Returns a list, which should be passed to RevokeClassFactories
8 | """
9 | if flags is None: flags = pythoncom.REGCLS_MULTIPLEUSE|pythoncom.REGCLS_SUSPENDED
10 | if clsctx is None: clsctx = pythoncom.CLSCTX_LOCAL_SERVER
11 | ret = []
12 | for clsid in clsids:
13 | # Some server append '-Embedding' etc
14 | if clsid[0] not in ['-', '/']:
15 | factory = pythoncom.MakePyFactory(clsid)
16 | regId = pythoncom.CoRegisterClassObject(clsid, factory, clsctx, flags)
17 | ret.append((factory, regId))
18 | return ret
19 |
20 | def RevokeClassFactories(infos):
21 | for factory, revokeId in infos:
22 | pythoncom.CoRevokeClassObject(revokeId)
23 |
--------------------------------------------------------------------------------
/lib/x32/win32com/server/localserver.py:
--------------------------------------------------------------------------------
1 | # LocalServer .EXE support for Python.
2 | #
3 | # This is designed to be used as a _script_ file by pythonw.exe
4 | #
5 | # In some cases, you could also use Python.exe, which will create
6 | # a console window useful for debugging.
7 | #
8 | # NOTE: When NOT running in any sort of debugging mode,
9 | # 'print' statements may fail, as sys.stdout is not valid!!!
10 |
11 | #
12 | # Usage:
13 | # wpython.exe LocalServer.py clsid [, clsid]
14 | import sys
15 | sys.coinit_flags = 2
16 | import pythoncom
17 | import win32api
18 | from win32com.server import factory
19 |
20 | usage = """\
21 | Invalid command line arguments
22 |
23 | This program provides LocalServer COM support
24 | for Python COM objects.
25 |
26 | It is typically run automatically by COM, passing as arguments
27 | The ProgID or CLSID of the Python Server(s) to be hosted
28 | """
29 |
30 | def serve(clsids):
31 | infos = factory.RegisterClassFactories(clsids)
32 |
33 | pythoncom.EnableQuitMessage(win32api.GetCurrentThreadId())
34 | pythoncom.CoResumeClassObjects()
35 |
36 | pythoncom.PumpMessages()
37 |
38 | factory.RevokeClassFactories( infos )
39 |
40 | pythoncom.CoUninitialize()
41 |
42 | def main():
43 | if len(sys.argv)==1:
44 | win32api.MessageBox(0, usage, "Python COM Server")
45 | sys.exit(1)
46 | serve(sys.argv[1:])
47 |
48 | if __name__=='__main__':
49 | main()
50 |
--------------------------------------------------------------------------------
/lib/x32/win32com/servers/PythonTools.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import time
3 |
4 | class Tools:
5 | _public_methods_ = [ 'reload', 'adddir', 'echo', 'sleep' ]
6 |
7 | def reload(self, module):
8 | if module in sys.modules:
9 | try:
10 | from imp import reload
11 | except ImportError:
12 | pass # builtin in py2k
13 | reload(sys.modules[module])
14 | return "reload succeeded."
15 | return "no reload performed."
16 |
17 | def adddir(self, dir):
18 | if type(dir) == type(''):
19 | sys.path.append(dir)
20 | return str(sys.path)
21 |
22 | def echo(self, arg):
23 | return repr(arg)
24 |
25 | def sleep(self, t):
26 | time.sleep(t)
27 |
28 |
29 | if __name__=='__main__':
30 | from win32com.server.register import RegisterServer, UnregisterServer
31 | clsid = "{06ce7630-1d81-11d0-ae37-c2fa70000000}"
32 | progid = "Python.Tools"
33 | verprogid = "Python.Tools.1"
34 | if "--unregister" in sys.argv:
35 | print("Unregistering...")
36 | UnregisterServer(clsid, progid, verprogid)
37 | print("Unregistered OK")
38 | else:
39 | print("Registering COM server...")
40 | RegisterServer(clsid,
41 | "win32com.servers.PythonTools.Tools",
42 | "Python Tools",
43 | progid,
44 | verprogid)
45 | print("Class registered.")
46 |
--------------------------------------------------------------------------------
/lib/x32/win32com/servers/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32com/servers/__init__.py
--------------------------------------------------------------------------------
/lib/x32/win32com/servers/interp.py:
--------------------------------------------------------------------------------
1 | """Python.Interpreter COM Server
2 |
3 | This module implements a very very simple COM server which
4 | exposes the Python interpreter.
5 |
6 | This is designed more as a demonstration than a full blown COM server.
7 | General functionality and Error handling are both limited.
8 |
9 | To use this object, ensure it is registered by running this module
10 | from Python.exe. Then, from Visual Basic, use "CreateObject('Python.Interpreter')",
11 | and call its methods!
12 | """
13 |
14 | from win32com.server.exception import Exception
15 | import winerror
16 |
17 | # Expose the Python interpreter.
18 | class Interpreter:
19 | """The interpreter object exposed via COM
20 | """
21 | _public_methods_ = [ 'Exec', 'Eval' ]
22 | # All registration stuff to support fully automatic register/unregister
23 | _reg_verprogid_ = "Python.Interpreter.2"
24 | _reg_progid_ = "Python.Interpreter"
25 | _reg_desc_ = "Python Interpreter"
26 | _reg_clsid_ = "{30BD3490-2632-11cf-AD5B-524153480001}"
27 | _reg_class_spec_ = "win32com.servers.interp.Interpreter"
28 |
29 | def __init__(self):
30 | self.dict = {}
31 |
32 | def Eval(self, exp):
33 | """Evaluate an expression.
34 | """
35 | if type(exp) not in [str, str]:
36 | raise Exception(desc="Must be a string",scode=winerror.DISP_E_TYPEMISMATCH)
37 |
38 | return eval(str(exp), self.dict)
39 | def Exec(self, exp):
40 | """Execute a statement.
41 | """
42 | if type(exp) not in [str, str]:
43 | raise Exception(desc="Must be a string",scode=winerror.DISP_E_TYPEMISMATCH)
44 | exec(str(exp), self.dict)
45 |
46 | def Register():
47 | import win32com.server.register
48 | return win32com.server.register.UseCommandLine(Interpreter)
49 |
50 | if __name__=='__main__':
51 | print("Registering COM server...")
52 | Register()
53 |
--------------------------------------------------------------------------------
/lib/x32/win32com/servers/perfmon.py:
--------------------------------------------------------------------------------
1 | """A COM Server which exposes the NT Performance monitor in a very rudimentary way
2 |
3 | Usage from VB:
4 | set ob = CreateObject("Python.PerfmonQuery")
5 | freeBytes = ob.Query("Memory", "Available Bytes")
6 | """
7 | from win32com.server import exception, register
8 | import pythoncom, win32pdhutil, winerror
9 |
10 | class PerfMonQuery:
11 | _reg_verprogid_ = "Python.PerfmonQuery.1"
12 | _reg_progid_ = "Python.PerfmonQuery"
13 | _reg_desc_ = "Python Performance Monitor query object"
14 | _reg_clsid_ = "{64cef7a0-8ece-11d1-a65a-00aa00125a98}"
15 | _reg_class_spec_ = "win32com.servers.perfmon.PerfMonQuery"
16 | _public_methods_ = [ 'Query' ]
17 | def Query(self, object, counter, instance = None, machine = None):
18 | try:
19 | return win32pdhutil.GetPerformanceAttributes(object, counter, instance, machine=machine)
20 | except win32pdhutil.error as exc:
21 | raise exception.Exception(desc=exc.strerror)
22 | except TypeError as desc:
23 | raise exception.Exception(desc=desc,scode=winerror.DISP_E_TYPEMISMATCH)
24 |
25 | if __name__=='__main__':
26 | print("Registering COM server...")
27 | register.UseCommandLine(PerfMonQuery)
28 |
--------------------------------------------------------------------------------
/lib/x32/win32com/util.py:
--------------------------------------------------------------------------------
1 | """General utility functions common to client and server.
2 |
3 | This module contains a collection of general purpose utility functions.
4 | """
5 | import pythoncom
6 | import win32api, win32con
7 |
8 | def IIDToInterfaceName(iid):
9 | """Converts an IID to a string interface name.
10 |
11 | Used primarily for debugging purposes, this allows a cryptic IID to
12 | be converted to a useful string name. This will firstly look for interfaces
13 | known (ie, registered) by pythoncom. If not known, it will look in the
14 | registry for a registered interface.
15 |
16 | iid -- An IID object.
17 |
18 | Result -- Always a string - either an interface name, or ''
19 | """
20 | try:
21 | return pythoncom.ServerInterfaces[iid]
22 | except KeyError:
23 | try:
24 | try:
25 | return win32api.RegQueryValue(win32con.HKEY_CLASSES_ROOT, "Interface\\%s" % iid)
26 | except win32api.error:
27 | pass
28 | except ImportError:
29 | pass
30 | return str(iid)
31 |
32 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/adsi/adsi.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/adsi/adsi.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/adsi/demos/objectPicker.py:
--------------------------------------------------------------------------------
1 | # A demo for the IDsObjectPicker interface.
2 | import win32clipboard
3 | import pythoncom
4 | from win32com.adsi import adsi
5 | from win32com.adsi.adsicon import *
6 |
7 | cf_objectpicker = win32clipboard.RegisterClipboardFormat(CFSTR_DSOP_DS_SELECTION_LIST)
8 |
9 | def main():
10 | hwnd = 0
11 |
12 | # Create an instance of the object picker.
13 | picker = pythoncom.CoCreateInstance(adsi.CLSID_DsObjectPicker,
14 | None,
15 | pythoncom.CLSCTX_INPROC_SERVER,
16 | adsi.IID_IDsObjectPicker)
17 |
18 | # Create our scope init info.
19 | siis = adsi.DSOP_SCOPE_INIT_INFOs(1)
20 | sii = siis[0]
21 |
22 | # Combine multiple scope types in a single array entry.
23 |
24 | sii.type = DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN | \
25 | DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN
26 |
27 | # Set uplevel and downlevel filters to include only computer objects.
28 | # Uplevel filters apply to both mixed and native modes.
29 | # Notice that the uplevel and downlevel flags are different.
30 |
31 | sii.filterFlags.uplevel.bothModes = DSOP_FILTER_COMPUTERS
32 | sii.filterFlags.downlevel = DSOP_DOWNLEVEL_FILTER_COMPUTERS
33 |
34 | # Initialize the interface.
35 | picker.Initialize(
36 | None, # Target is the local computer.
37 | siis, # scope infos
38 | DSOP_FLAG_MULTISELECT, # options
39 | ('objectGUID','displayName') ) # attributes to fetch
40 |
41 | do = picker.InvokeDialog(hwnd)
42 | # Extract the data from the IDataObject.
43 | format_etc = (cf_objectpicker, None,
44 | pythoncom.DVASPECT_CONTENT, -1,
45 | pythoncom.TYMED_HGLOBAL)
46 | medium = do.GetData(format_etc)
47 | data = adsi.StringAsDS_SELECTION_LIST(medium.data)
48 | for item in data:
49 | name, klass, adspath, upn, attrs, flags = item
50 | print("Item", name)
51 | print(" Class:", klass)
52 | print(" AdsPath:", adspath)
53 | print(" UPN:", upn)
54 | print(" Attrs:", attrs)
55 | print(" Flags:", flags)
56 |
57 | if __name__=='__main__':
58 | main()
59 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/authorization/__init__.py:
--------------------------------------------------------------------------------
1 | # This is a python package
2 | # __PackageSupportBuildPath__ not needed for distutil based builds,
3 | # but not everyone is there yet.
4 | import win32com
5 | win32com.__PackageSupportBuildPath__(__path__)
6 |
7 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/authorization/authorization.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/authorization/authorization.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/axcontrol/__init__.py:
--------------------------------------------------------------------------------
1 | # See if we have a special directory for the binaries (for developers)
2 | import win32com
3 | win32com.__PackageSupportBuildPath__(__path__)
4 |
5 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axcontrol/axcontrol.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/axcontrol/axcontrol.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/axdebug/__init__.py:
--------------------------------------------------------------------------------
1 | # See if we have a special directory for the binaries (for developers)
2 | import win32com
3 | win32com.__PackageSupportBuildPath__(__path__)
4 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axdebug/axdebug.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/axdebug/axdebug.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/axdebug/dump.py:
--------------------------------------------------------------------------------
1 | import sys, string
2 | import traceback
3 | from win32com.axdebug import axdebug
4 | from win32com.client.util import Enumerator
5 | import pythoncom
6 |
7 | def DumpDebugApplicationNode(node, level = 0):
8 | # Recursive dump of a DebugApplicationNode
9 | spacer = " " * level
10 | for desc, attr in [("Node Name", axdebug.DOCUMENTNAMETYPE_APPNODE),
11 | ("Title", axdebug.DOCUMENTNAMETYPE_TITLE),
12 | ("Filename", axdebug.DOCUMENTNAMETYPE_FILE_TAIL),
13 | ("URL", axdebug.DOCUMENTNAMETYPE_URL),
14 | ]:
15 | try:
16 | info = node.GetName(attr)
17 | except pythoncom.com_error:
18 | info = ""
19 | print("%s%s: %s" % (spacer, desc, info))
20 | try:
21 | doc = node.GetDocument()
22 | except pythoncom.com_error:
23 | doc = None
24 | if doc:
25 | doctext = doc.QueryInterface(axdebug.IID_IDebugDocumentText)
26 | numLines, numChars = doctext.GetSize()
27 | # text, attr = doctext.GetText(0, 20, 1)
28 | text, attr = doctext.GetText(0, numChars, 1)
29 | print("%sText is %s, %d bytes long" % (spacer, repr(text[:40]+"..."), len(text)))
30 | else:
31 | print("%s%s" % (spacer, ""))
32 |
33 | for child in Enumerator(node.EnumChildren()):
34 | DumpDebugApplicationNode(child, level+1)
35 |
36 | def dumpall():
37 | dm=pythoncom.CoCreateInstance(axdebug.CLSID_MachineDebugManager,None,pythoncom.CLSCTX_ALL, axdebug.IID_IMachineDebugManager)
38 | e=Enumerator(dm.EnumApplications())
39 | for app in e:
40 | print("Application: %s" % app.GetName())
41 | node = app.GetRootNode() # of type PyIDebugApplicationNode->PyIDebugDocumentProvider->PyIDebugDocumentInfo
42 | DumpDebugApplicationNode(node)
43 |
44 | if __name__=='__main__':
45 | try:
46 | dumpall()
47 | except:
48 | traceback.print_exc()
49 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/asp/CreateObject.asp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/asp/caps.asp:
--------------------------------------------------------------------------------
1 | <%@ Language=Python %>
2 |
3 |
4 |
5 |
6 |
7 |
8 | Python test
9 |
10 |
11 |
12 |
13 |
14 |
21 |
22 |
23 |
24 | <%
25 | import sys
26 | print sys.path
27 | from win32com.axscript.asputil import *
28 | print "Hello"
29 | print "There"
30 | print "How are you"
31 | %>
32 |
33 | <%bc = Server.CreateObject("MSWC.BrowserType")%>
34 |
35 |
36 | Browser | <%=bc.browser %>
37 | |
Version | <%=bc.version %> |
38 | Frames |
39 | <%Response.Write( iif(bc.frames, "TRUE", "FALSE")) %> |
40 | Tables |
41 | <%Response.Write( iif (bc.tables, "TRUE", "FALSE")) %> |
42 | BackgroundSounds |
43 | <%Response.Write( iif(bc.BackgroundSounds, "TRUE", "FALSE"))%> |
44 | VBScript |
45 | <%Response.Write( iif(bc.vbscript, "TRUE", "FALSE"))%> |
46 | JavaScript |
47 | <%Response.Write( iif(bc.javascript, "TRUE", "FALSE"))%> |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/asp/interrupt/test.asp:
--------------------------------------------------------------------------------
1 | <%@ language=python%>
2 |
3 | <%Response.Redirect("test1.html")%>
4 |
5 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/asp/interrupt/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | GOT There
5 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/asp/interrupt/test1.asp:
--------------------------------------------------------------------------------
1 | <%@ language =Python%>
2 |
3 |
4 | <%Response.Redirect("test.html")%>
5 |
6 |
7 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/asp/interrupt/test1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | GOT HERE
5 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/asp/tut1.asp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/ie/MarqueeText1.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Internet Workshop
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Python AX Script Engine
12 |
Demo using the Marquee Control
13 |
Mark Hammond.
14 |
15 |
This is really quite a boring demo, as the Marquee control does everything. However, there is Python code behind the buttons that change the speed. This code is all of 2 lines per button!!!
16 |
17 |
For more information on Python as an ActiveX scripting language, see
18 |
19 |
Python
20 |
http://www.python.org
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/ie/dbgtest.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/ie/demo.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | Python AXScript Demos
4 |
5 |
6 |
7 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/ie/demo_check.htm:
--------------------------------------------------------------------------------
1 |
2 | Engine Registration
3 |
4 |
5 |
6 | The Python ActiveX Scripting Engine is not currently registered.
7 |
8 |
Due to a privacy
9 | concern discovered in the engine, the use of Python inside IE has been disabled.
10 |
11 | Before any of the supplied demos will work, the engine must be successfully registered.
12 |
13 | To install a version of the engine, that does work with IE, you can execute the Python program
14 | win32com\axscript\client\pyscript_rexec.py
must be run. You can either do this manually, or follow the instructions below.
15 |
16 | Register the engine now!
17 |
18 | If you have read about the privacy
19 | concern and still wish to register the engine, just follow the process outlined below:
20 |
21 | - Click on the link below
22 |
- A dialog will be presented asking if the file should be opened or saved to disk. Select "Open it".
23 |
- A Console program will briefly open, while the server is registered.
24 |
25 |
26 | Register the engine now
27 |
28 |
Checking the registration
29 | After the registration is complete, simply hit the Reload button. If the
30 | registration was successful, the page will change to the Python/AvtiveX Demo Page.
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/ie/demo_intro.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 | Congratulations on installing the Python ActiveX Scripting Engine
11 |
12 | Be warned that there is a privacy
13 | concern with this engine. Please read this information, including how to disable the feature.
14 |
15 |
16 | Object model
17 | Except as described below, the object module exposed should be similar to that exposed
18 | by Visual Basic, etc. Due to the nature of ActiveX Scripting, the details for each
19 | host are different, but Python should work "correctly".
20 |
21 |
The object model exposed via Python for MSIE is not as seamless as VB. The biggest limitation is
22 | the concept of a "local" namespace. For example, in VB, you can
23 | code text="Hi there"
, but in Python, you must code
24 | MyForm.ThisButton.Text="Hi There"
. See the foo2 sample
25 | for futher details.
26 |
27 |
Known bugs and problems
28 |
29 | This release seems to have broken Aaron's mouse-trace sample. No idea why, and Im supposed to be looking into it.
30 |
Builtin objects such as MARQUEE are giving me grief. Objects accessed via forms are generally
31 | no problem.
32 |
If you are trying to use Python with the Windows Scripting Host, note that
33 | .pys files are not correct registered - you will need to explicitely
34 | specify either cscript.exe or wscript.exe on the command line.
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/ie/demo_menu.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | Scripting Demos
4 | An Introduction to the
5 | scripting engine.
6 |
7 |
The Calculator Demo is a very
8 | cool sample written by Aaron Watters.
9 |
10 |
Mouse track is another of
11 | Aaron's samples, and shows how fast the Python engine is!
12 |
13 |
The foo2 sample is mainly used
14 | for debugging and testing, but does show some forms in action.
15 |
16 |
17 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/ie/docwrite.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | A page generated by Python
4 |
5 |
10 |
11 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/axscript/Demos/client/ie/form.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
19 |
20 |
21 |
22 |
30 |
31 |
32 |
39 |
40 |
53 |
54 |
55 |
63 |
64 |
65 |
66 |
73 |
74 |
75 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/bits/__init__.py:
--------------------------------------------------------------------------------
1 | # This is a python package
2 | # __PackageSupportBuildPath__ not needed for distutil based builds,
3 | # but not everyone is there yet.
4 | import win32com
5 | win32com.__PackageSupportBuildPath__(__path__)
6 |
7 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/bits/bits.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/bits/bits.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/bits/test/show_all_jobs.py:
--------------------------------------------------------------------------------
1 | # Dump lots of info about BITS jobs.
2 | from win32com.bits import bits
3 | import pythoncom
4 |
5 | states = dict([(val, (name[13:]))
6 | for name, val in vars(bits).items()
7 | if name.startswith('BG_JOB_STATE_')])
8 |
9 | job_types = dict([(val, (name[12:]))
10 | for name, val in vars(bits).items()
11 | if name.startswith('BG_JOB_TYPE_')])
12 |
13 | bcm = pythoncom.CoCreateInstance(bits.CLSID_BackgroundCopyManager,
14 | None,
15 | pythoncom.CLSCTX_LOCAL_SERVER,
16 | bits.IID_IBackgroundCopyManager)
17 |
18 | try:
19 | enum = bcm.EnumJobs(bits.BG_JOB_ENUM_ALL_USERS)
20 | except pythoncom.error:
21 | print("Failed to get jobs for all users - trying for current user")
22 | enum = bcm.EnumJobs(0)
23 |
24 | for job in enum:
25 | print("Job:", job.GetDisplayName())
26 | print("Description:", job.GetDescription())
27 | print("Id:", job.GetId())
28 | print("State:", states.get(job.GetState()))
29 | print("Type:", job_types.get(job.GetType()))
30 | print("Owner:", job.GetOwner())
31 | print("Errors:", job.GetErrorCount())
32 | print("Created/Modified/Finished times:", [str(t) for t in job.GetTimes()])
33 | bytes_tot, bytes_xf, files_tot, files_xf = job.GetProgress()
34 | print("Bytes: %d complete of %d total" % (bytes_xf, bytes_tot))
35 | print("Files: %d complete of %d total" % (files_xf, files_tot))
36 | for f in job.EnumFiles():
37 | bytes, total, done = f.GetProgress()
38 | print(" Remote:", f.GetRemoteName())
39 | print(" Local:", f.GetLocalName())
40 | print(" Progress: %d of %d bytes - completed=%s)" % (bytes, total, done))
41 | print()
42 | print()
43 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/directsound/__init__.py:
--------------------------------------------------------------------------------
1 | # See if we have a special directory for the binaries (for developers)
2 | import win32com
3 | win32com.__PackageSupportBuildPath__(__path__)
4 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/directsound/directsound.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/directsound/directsound.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/directsound/test/__init__.py:
--------------------------------------------------------------------------------
1 | # This is a Python package, imported by the win32com test suite.
2 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/directsound/test/ds_record.py:
--------------------------------------------------------------------------------
1 | import pywintypes
2 | import struct
3 | import win32event, win32api
4 | import os
5 | import win32com.directsound.directsound as ds
6 |
7 | def wav_header_pack(wfx, datasize):
8 | return struct.pack('<4sl4s4slhhllhh4sl', 'RIFF', 36 + datasize,
9 | 'WAVE', 'fmt ', 16,
10 | wfx.wFormatTag, wfx.nChannels, wfx.nSamplesPerSec,
11 | wfx.nAvgBytesPerSec, wfx.nBlockAlign,
12 | wfx.wBitsPerSample, 'data', datasize);
13 |
14 | d = ds.DirectSoundCaptureCreate(None, None)
15 |
16 | sdesc = ds.DSCBUFFERDESC()
17 | sdesc.dwBufferBytes = 352800 # 2 seconds
18 | sdesc.lpwfxFormat = pywintypes.WAVEFORMATEX()
19 | sdesc.lpwfxFormat.wFormatTag = pywintypes.WAVE_FORMAT_PCM
20 | sdesc.lpwfxFormat.nChannels = 2
21 | sdesc.lpwfxFormat.nSamplesPerSec = 44100
22 | sdesc.lpwfxFormat.nAvgBytesPerSec = 176400
23 | sdesc.lpwfxFormat.nBlockAlign = 4
24 | sdesc.lpwfxFormat.wBitsPerSample = 16
25 |
26 | print(sdesc)
27 | print(d)
28 | buffer = d.CreateCaptureBuffer(sdesc)
29 |
30 | event = win32event.CreateEvent(None, 0, 0, None)
31 | notify = buffer.QueryInterface(ds.IID_IDirectSoundNotify)
32 |
33 | notify.SetNotificationPositions((ds.DSBPN_OFFSETSTOP, event))
34 |
35 | buffer.Start(0)
36 |
37 | win32event.WaitForSingleObject(event, -1)
38 |
39 | data = buffer.Update(0, 352800)
40 |
41 | fname=os.path.join(win32api.GetTempPath(), 'test_directsound_record.wav')
42 | f = open(fname, 'wb')
43 | f.write(wav_header_pack(sdesc.lpwfxFormat, 352800))
44 | f.write(data)
45 | f.close()
46 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/ifilter/__init__.py:
--------------------------------------------------------------------------------
1 | # empty file to designate as a package.
2 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/ifilter/ifilter.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/ifilter/ifilter.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/internet/__init__.py:
--------------------------------------------------------------------------------
1 | # See if we have a special directory for the binaries (for developers)
2 | import win32com
3 | win32com.__PackageSupportBuildPath__(__path__)
4 |
5 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/internet/internet.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/internet/internet.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/mapi/__init__.py:
--------------------------------------------------------------------------------
1 | if type(__path__)==type(''):
2 | # For freeze to work!
3 | import sys
4 | try:
5 | import mapi
6 | sys.modules['win32com.mapi.mapi'] = mapi
7 | except ImportError:
8 | pass
9 | try:
10 | import exchange
11 | sys.modules['win32com.mapi.exchange'] = exchange
12 | except ImportError:
13 | pass
14 | try:
15 | import exchdapi
16 | sys.modules['win32com.mapi.exchdapi'] = exchdapi
17 | except ImportError:
18 | pass
19 | else:
20 | import win32com
21 | # See if we have a special directory for the binaries (for developers)
22 | win32com.__PackageSupportBuildPath__(__path__)
23 |
24 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/mapi/exchange.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/mapi/exchange.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/mapi/exchdapi.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/mapi/exchdapi.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/mapi/mapi.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/mapi/mapi.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/propsys/__init__.py:
--------------------------------------------------------------------------------
1 | # this is a python package
2 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/propsys/propsys.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/propsys/propsys.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/propsys/test/testpropsys.py:
--------------------------------------------------------------------------------
1 | from win32com.propsys import propsys, pscon
2 | print("propsys was imported (sorry - that is the extent of the tests,")
3 | print("but see the shell folder_view demo, which uses this module)")
4 | # that's all folks!
--------------------------------------------------------------------------------
/lib/x32/win32comext/shell/__init__.py:
--------------------------------------------------------------------------------
1 | # See if we have a special directory for the binaries (for developers)
2 | import win32com
3 | win32com.__PackageSupportBuildPath__(__path__)
4 |
5 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/shell/demos/IActiveDesktop.py:
--------------------------------------------------------------------------------
1 | from win32com.shell import shell, shellcon
2 | import pythoncom
3 | import time
4 | website='http://sourceforge.net/projects/pywin32/'
5 | iad=pythoncom.CoCreateInstance(shell.CLSID_ActiveDesktop, None, pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IActiveDesktop)
6 | opts=iad.GetDesktopItemOptions()
7 | if not (opts['ActiveDesktop'] and opts['EnableComponents']):
8 | print('Warning: Enabling Active Desktop')
9 | opts['ActiveDesktop']=True
10 | opts['EnableComponents']=True
11 | iad.SetDesktopItemOptions(opts)
12 | iad.ApplyChanges(0xffff)
13 | iad=None
14 | ## apparently takes a short while for it to become active
15 | time.sleep(2)
16 | iad=pythoncom.CoCreateInstance(shell.CLSID_ActiveDesktop, None, pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IActiveDesktop)
17 |
18 | cnt=iad.GetDesktopItemCount()
19 | print('Count:', cnt)
20 | for i in range(cnt):
21 | print(iad.GetDesktopItem(i))
22 |
23 | component={
24 | 'ID': cnt+1,
25 | 'ComponentType': shellcon.COMP_TYPE_WEBSITE,
26 | 'CurItemState': shellcon.IS_NORMAL,
27 | 'SubscribedURL': website,
28 | 'Source' : website,
29 | 'FriendlyName' : 'Pywin32 on SF',
30 | 'Checked' : True, ## this controls whether item is currently displayed
31 | 'NoScroll' : False,
32 | 'Dirty': False,
33 | 'Pos': {'Top':69, 'Left':69, 'Height': 400, 'Width': 400, 'zIndex': 1002,
34 | 'CanResize': True, 'CanResizeX': True, 'CanResizeY': True,
35 | 'PreferredLeftPercent': 0, 'PreferredTopPercent': 0},
36 | 'Original': {'Top': 33, 'Left': 304, 'Height': 362, 'Width': 372, 'ItemState': shellcon.IS_NORMAL},
37 | 'Restored': {'Top': 33, 'Left': 304, 'Height': 362, 'Width': 372, 'ItemState': shellcon.IS_NORMAL}
38 | }
39 |
40 |
41 | try:
42 | existing_item=iad.GetDesktopItemBySource(website)
43 | except pythoncom.com_error:
44 | pass
45 | else:
46 | iad.RemoveDesktopItem(existing_item)
47 | iad.ApplyChanges(0xffff)
48 |
49 | iad.AddDesktopItem(component)
50 | iad.ApplyChanges(0xffff) ## need to check which AD_APPLY constants are actually needed
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/shell/demos/IShellLinkDataList.py:
--------------------------------------------------------------------------------
1 | from win32com.shell import shell, shellcon
2 | import pythoncom, win32api, os, sys
3 |
4 | temp_dir=win32api.GetTempPath()
5 | linkname=win32api.GetTempFileName(temp_dir,'cmd')[0]
6 | os.remove(linkname)
7 | linkname+='.lnk'
8 | print('Link name:',linkname)
9 | ish=pythoncom.CoCreateInstance(shell.CLSID_ShellLink, None,
10 | pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IShellLink)
11 | ish.SetPath(os.environ['cOMSPEC'])
12 | ish.SetWorkingDirectory(os.path.split(sys.executable)[0])
13 | ish.SetDescription('shortcut made by python')
14 |
15 | console_props={
16 | 'Signature':shellcon.NT_CONSOLE_PROPS_SIG,
17 | 'InsertMode':True,
18 | 'FullScreen':False, ## True looks like "DOS Mode" from win98!
19 | 'FontFamily':54,
20 | 'CursorSize':75, ## pct of character size
21 | 'ScreenBufferSize':(152, 256),
22 | 'AutoPosition':False,
23 | 'FontSize':(4, 5),
24 | 'FaceName':'',
25 | 'HistoryBufferSize':32,
26 | 'InputBufferSize':0,
27 | 'QuickEdit':True,
28 | 'Font':0, ## 0 should always be present, use win32console.GetNumberOfConsoleFonts() to find how many available
29 | 'FillAttribute':7,
30 | 'PopupFillAttribute':245,
31 | 'WindowSize':(128, 32),
32 | 'WindowOrigin':(0, 0),
33 | 'FontWeight':400,
34 | 'HistoryNoDup':False,
35 | 'NumberOfHistoryBuffers':32,
36 | ## ColorTable copied from a 'normal' console shortcut, with some obvious changes
37 | ## These do not appear to be documented. From experimentation, [0] is background, [7] is foreground text
38 | 'ColorTable':(255, 8388608, 32768, 8421376, 128, 8388736, 32896, 12582912,
39 | 8421504, 16711680, 65280, 16776960, 255, 16711935, 65535, 16777215)
40 | }
41 |
42 | ishdl=ish.QueryInterface(shell.IID_IShellLinkDataList)
43 | ishdl.AddDataBlock(console_props)
44 | ipf=ish.QueryInterface(pythoncom.IID_IPersistFile)
45 | ipf.Save(linkname,1)
46 | os.startfile(linkname)
47 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/shell/demos/IUniformResourceLocator.py:
--------------------------------------------------------------------------------
1 | import pythoncom
2 | from win32com.shell import shell, shellcon
3 | import win32api, os
4 |
5 | class InternetShortcut:
6 | def __init__( self ):
7 | self._base = pythoncom.CoCreateInstance(
8 | shell.CLSID_InternetShortcut, None,
9 | pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IUniformResourceLocator
10 | )
11 | def load( self, filename ):
12 | # Get an IPersist interface
13 | # which allows save/restore of object to/from files
14 | self._base.QueryInterface( pythoncom.IID_IPersistFile ).Load( filename )
15 | def save( self, filename ):
16 | self._base.QueryInterface( pythoncom.IID_IPersistFile ).Save( filename, 1 )
17 | def __getattr__( self, name ):
18 | if name != "_base":
19 | return getattr( self._base, name )
20 |
21 | temp_dir=win32api.GetTempPath()
22 | linkname=win32api.GetTempFileName(temp_dir, 'ish')[0]
23 | print('Link:',linkname)
24 | os.remove(linkname)
25 | linkname+='.url'
26 |
27 | ish=InternetShortcut()
28 | ish.SetURL('http://sourceforge.net/projects/pywin32/')
29 | ish.save(linkname)
30 |
31 | ## IUniformResourceLocator also give access to IPropertySetStorage
32 | pss=ish.QueryInterface(pythoncom.IID_IPropertySetStorage)
33 | ps=pss.Open(shell.FMTID_InternetSite)
34 | property_ids=[(k,v) for k,v in shellcon.__dict__.items() if k.startswith('PID_INTSITE_')]
35 | for pname, pval in property_ids:
36 | print(pname, ps.ReadMultiple((pval,))[0])
37 |
38 | ps=pss.Open(shell.FMTID_Intshcut)
39 | property_ids=[(k,v) for k,v in shellcon.__dict__.items() if k.startswith('PID_IS_')]
40 | for pname, pval in property_ids:
41 | print(pname, ps.ReadMultiple((pval,))[0])
42 |
43 | new_sh=InternetShortcut()
44 | new_sh.load(linkname)
45 | new_sh.InvokeCommand('Open')
46 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/shell/demos/browse_for_folder.py:
--------------------------------------------------------------------------------
1 | # A couple of samples using SHBrowseForFolder
2 |
3 | import sys, os
4 | from win32com.shell import shell, shellcon
5 | import win32gui
6 |
7 | # A callback procedure - called by SHBrowseForFolder
8 | def BrowseCallbackProc(hwnd, msg, lp, data):
9 | if msg== shellcon.BFFM_INITIALIZED:
10 | win32gui.SendMessage(hwnd, shellcon.BFFM_SETSELECTION, 1, data)
11 | elif msg == shellcon.BFFM_SELCHANGED:
12 | # Set the status text of the
13 | # For this message, 'lp' is the address of the PIDL.
14 | pidl = shell.AddressAsPIDL(lp)
15 | try:
16 | path = shell.SHGetPathFromIDList(pidl)
17 | win32gui.SendMessage(hwnd, shellcon.BFFM_SETSTATUSTEXT, 0, path)
18 | except shell.error:
19 | # No path for this PIDL
20 | pass
21 |
22 | if __name__=='__main__':
23 | # Demonstrate a dialog with the cwd selected as the default - this
24 | # must be done via a callback function.
25 | flags = shellcon.BIF_STATUSTEXT
26 | shell.SHBrowseForFolder(0, # parent HWND
27 | None, # root PIDL.
28 | "Default of %s" % os.getcwd(), # title
29 | flags, # flags
30 | BrowseCallbackProc, # callback function
31 | os.getcwd() # 'data' param for the callback
32 | )
33 | # Browse from this directory down only.
34 | # Get the PIDL for the cwd.
35 | desktop = shell.SHGetDesktopFolder()
36 | cb, pidl, extra = desktop.ParseDisplayName(0, None, os.getcwd())
37 | shell.SHBrowseForFolder(0, # parent HWND
38 | pidl, # root PIDL.
39 | "From %s down only" % os.getcwd(), # title
40 | )
41 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/shell/demos/create_link.py:
--------------------------------------------------------------------------------
1 | # link.py
2 | # From a demo by Mark Hammond, corrupted by Mike Fletcher
3 | # (and re-corrupted by Mark Hammond :-)
4 | from win32com.shell import shell
5 | import pythoncom, os
6 |
7 | class PyShortcut:
8 | def __init__( self ):
9 | self._base = pythoncom.CoCreateInstance(
10 | shell.CLSID_ShellLink, None,
11 | pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IShellLink
12 | )
13 | def load( self, filename ):
14 | # Get an IPersist interface
15 | # which allows save/restore of object to/from files
16 | self._base.QueryInterface( pythoncom.IID_IPersistFile ).Load( filename )
17 | def save( self, filename ):
18 | self._base.QueryInterface( pythoncom.IID_IPersistFile ).Save( filename, 0 )
19 | def __getattr__( self, name ):
20 | if name != "_base":
21 | return getattr( self._base, name )
22 |
23 | if __name__=='__main__':
24 | import sys
25 | if len(sys.argv)<2:
26 | print("Usage: %s LinkFile [path [, args[, description[, working_dir]]]]\n\nIf LinkFile does not exist, it will be created using the other args")
27 | sys.exit(1)
28 | file = sys.argv[1]
29 | shortcut = PyShortcut()
30 | if os.path.exists( file ):
31 | # load and dump info from file...
32 | shortcut.load( file )
33 | # now print data...
34 | print('Shortcut in file %s to file:\n\t%s\nArguments:\n\t%s\nDescription:\n\t%s\nWorking Directory:\n\t%s\nItemIDs:\n\t'%(
35 | file,
36 | shortcut.GetPath(shell.SLGP_SHORTPATH)[0],
37 | shortcut.GetArguments(),
38 | shortcut.GetDescription(),
39 | shortcut.GetWorkingDirectory(),
40 | #shortcut.GetIDList(),
41 | ))
42 | else:
43 | if len(sys.argv) <3:
44 | print("Link file does not exist\nYou must supply the path, args, description and working_dir as args")
45 | sys.exit(1)
46 | # create the shortcut using rest of args...
47 | data = map( None, sys.argv[2:], ("SetPath", "SetArguments", "SetDescription", "SetWorkingDirectory") )
48 | for value, function in data:
49 | if value and function:
50 | # call function on each non-null value
51 | getattr( shortcut, function)( value )
52 | shortcut.save( file )
53 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/shell/demos/dump_link.py:
--------------------------------------------------------------------------------
1 | # dump_link.py - dumps information about shell shortcuts
2 | #
3 | import sys, os
4 | from win32com.shell import shell, shellcon
5 | import pythoncom
6 | import glob
7 | from win32com.storagecon import *
8 |
9 | def DumpLink(fname):
10 | shellLink = pythoncom.CoCreateInstance(shell.CLSID_ShellLink, None, pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IShellLink)
11 | persistFile = shellLink.QueryInterface(pythoncom.IID_IPersistFile)
12 | persistFile.Load(fname,STGM_READ)
13 | shellLink.Resolve(0, shell.SLR_ANY_MATCH | shell.SLR_NO_UI)
14 | fname, findData = shellLink.GetPath(0)
15 | print("Filename:", fname, ", UNC=", shellLink.GetPath(shell.SLGP_UNCPRIORITY)[0])
16 | print("Description:", shellLink.GetDescription())
17 | print("Working Directory:", shellLink.GetWorkingDirectory())
18 | print("Icon:", shellLink.GetIconLocation())
19 |
20 | def FavDumper(nothing, path, names):
21 | # called by os.path.walk
22 | for name in names:
23 | print(name, end=' ')
24 | try:
25 | DumpLink(name)
26 | except pythoncom.com_error:
27 | print(" - not a link")
28 |
29 | def DumpFavorites():
30 | favfold = str(shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_FAVORITES))
31 | print("Your favourites are at", favfold)
32 | os.path.walk(favfold, FavDumper, None)
33 |
34 | if __name__=='__main__':
35 | if len(sys.argv)>1:
36 | for fspec in sys.argv[1:]:
37 | files = glob.glob(fspec)
38 | if files:
39 | for file in files:
40 | print(file)
41 | DumpLink(file)
42 | print()
43 | else:
44 | print("Can not find", fspec)
45 | else:
46 | print("Dumping your favorites folder!")
47 | DumpFavorites()
48 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/shell/demos/shellexecuteex.py:
--------------------------------------------------------------------------------
1 | from win32com.shell import shell, shellcon
2 | import win32con
3 |
4 | def ExplorePIDL():
5 | pidl = shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_DESKTOP)
6 | print("The desktop is at", shell.SHGetPathFromIDList(pidl))
7 | shell.ShellExecuteEx(fMask=shellcon.SEE_MASK_NOCLOSEPROCESS,
8 | nShow=win32con.SW_NORMAL,
9 | lpClass="folder",
10 | lpVerb="explore",
11 | lpIDList=pidl)
12 | print("Done!")
13 |
14 | if __name__=='__main__':
15 | ExplorePIDL()
16 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/shell/demos/viewstate.py:
--------------------------------------------------------------------------------
1 | """
2 | Demonstrates how to propagate a folder's view state to all its subfolders
3 | The format of the ColInfo stream is apparently undocumented, but
4 | it can be read raw from one folder and copied to another's view state.
5 | """
6 |
7 | from win32com.shell import shell, shellcon
8 | import pythoncom
9 | import os, sys
10 |
11 | template_folder=os.path.split(sys.executable)[0]
12 | print('Template folder:', template_folder)
13 | template_pidl=shell.SHILCreateFromPath(template_folder,0)[0]
14 | template_pb=shell.SHGetViewStatePropertyBag(template_pidl, "Shell", shellcon.SHGVSPB_FOLDERNODEFAULTS, pythoncom.IID_IPropertyBag)
15 |
16 | # Column info has to be read as a stream
17 | # This may blow up if folder has never been opened in Explorer and has no ColInfo yet
18 | template_iunk=template_pb.Read('ColInfo',pythoncom.VT_UNKNOWN)
19 | template_stream=template_iunk.QueryInterface(pythoncom.IID_IStream)
20 | streamsize=template_stream.Stat()[2]
21 | template_colinfo=template_stream.Read(streamsize)
22 |
23 | def update_colinfo(not_used, dir_name, fnames):
24 | for fname in fnames:
25 | full_fname=os.path.join(dir_name,fname)
26 | if os.path.isdir(full_fname):
27 | print(full_fname)
28 | pidl=shell.SHILCreateFromPath(full_fname,0)[0]
29 | pb=shell.SHGetViewStatePropertyBag(pidl, "Shell", shellcon.SHGVSPB_FOLDERNODEFAULTS, pythoncom.IID_IPropertyBag)
30 | ## not all folders already have column info, and we're replacing it anyway
31 | pb.Write('ColInfo', template_stream)
32 | iunk=pb.Read('ColInfo',pythoncom.VT_UNKNOWN)
33 | s=iunk.QueryInterface(pythoncom.IID_IStream)
34 | s.Write(template_colinfo)
35 | s=None
36 | ## attribute names read from registry, can't find any way to enumerate IPropertyBag
37 | for attr in ('Address','Buttons','Col','Vid','WFlags','FFlags','Sort','SortDir','ShowCmd','FolderType','Mode','Rev'):
38 | pb.Write(attr, template_pb.Read(attr))
39 | pb=None
40 | os.path.walk(template_folder,update_colinfo,None)
41 |
42 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/shell/demos/walk_shell_folders.py:
--------------------------------------------------------------------------------
1 | # A little sample that walks from the desktop into child
2 | # items.
3 | from win32com.shell import shell, shellcon
4 |
5 | def walk(folder, depth=2, indent=""):
6 | try:
7 | pidls = folder.EnumObjects(0, shellcon.SHCONTF_FOLDERS)
8 | except shell.error:
9 | # no items
10 | return
11 | for pidl in pidls:
12 | dn = folder.GetDisplayNameOf(pidl,
13 | shellcon.SHGDN_NORMAL)
14 | print(indent, dn)
15 | if depth:
16 | try:
17 | child = folder.BindToObject(pidl, None,
18 | shell.IID_IShellFolder)
19 | except shell.error:
20 | pass
21 | else:
22 | walk(child, depth-1, indent+" ")
23 |
24 | walk(shell.SHGetDesktopFolder())
25 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/shell/shell.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/shell/shell.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/shell/test/testSHFileOperation.py:
--------------------------------------------------------------------------------
1 | from win32com.shell import shell, shellcon
2 | import win32api
3 | import os
4 |
5 | def testSHFileOperation(file_cnt):
6 | temp_dir=os.environ['temp']
7 | orig_fnames=[win32api.GetTempFileName(temp_dir,'sfo')[0] for x in range(file_cnt)]
8 | new_fnames=[os.path.join(temp_dir,'copy of '+os.path.split(orig_fnames[x])[1]) for x in range(file_cnt)]
9 |
10 | pFrom='\0'.join(orig_fnames)
11 | pTo='\0'.join(new_fnames)
12 |
13 | shell.SHFileOperation((0, shellcon.FO_MOVE, pFrom, pTo, shellcon.FOF_MULTIDESTFILES|shellcon.FOF_NOCONFIRMATION))
14 | for fname in orig_fnames:
15 | assert not os.path.isfile(fname)
16 |
17 | for fname in new_fnames:
18 | assert os.path.isfile(fname)
19 | shell.SHFileOperation((0, shellcon.FO_DELETE, fname, None, shellcon.FOF_NOCONFIRMATION|shellcon.FOF_NOERRORUI))
20 |
21 | def testSHNAMEMAPPINGS(file_cnt):
22 | ## attemps to move a set of files to names that already exist, and generated filenames should be returned
23 | ## as a sequence of 2-tuples created from SHNAMEMAPPINGS handle
24 | temp_dir=os.environ['temp']
25 | orig_fnames=[win32api.GetTempFileName(temp_dir,'sfo')[0] for x in range(file_cnt)]
26 | new_fnames=[win32api.GetTempFileName(temp_dir,'sfo')[0] for x in range(file_cnt)]
27 | pFrom='\0'.join(orig_fnames)
28 | pTo='\0'.join(new_fnames)
29 | rc, banyaborted, NameMappings=shell.SHFileOperation((0, shellcon.FO_MOVE, pFrom, pTo,
30 | shellcon.FOF_MULTIDESTFILES|shellcon.FOF_NOCONFIRMATION|shellcon.FOF_RENAMEONCOLLISION|shellcon.FOF_WANTMAPPINGHANDLE))
31 |
32 | for old_fname, new_fname in NameMappings:
33 | print('Old:',old_fname, 'New:', new_fname)
34 | assert len(NameMappings)==file_cnt
35 | testSHFileOperation(10)
36 | testSHFileOperation(1)
37 | testSHNAMEMAPPINGS(5)
38 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/shell/test/testShellFolder.py:
--------------------------------------------------------------------------------
1 | from win32com.shell import shell
2 | from win32com.shell.shellcon import *
3 |
4 | sf = shell.SHGetDesktopFolder()
5 | print("Shell Folder is", sf)
6 |
7 | names = []
8 | for i in sf: # Magically calls EnumObjects
9 | name = sf.GetDisplayNameOf(i, SHGDN_NORMAL)
10 | names.append(name)
11 |
12 | # And get the enumerator manually
13 | enum = sf.EnumObjects(0, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN)
14 | num = 0
15 | for i in enum:
16 | num += 1
17 | if num != len(names):
18 | print("Should have got the same number of names!?")
19 | print("Found", len(names), "items on the desktop")
20 | for name in names:
21 | print(name)
22 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/taskscheduler/__init__.py:
--------------------------------------------------------------------------------
1 | # This is a python package
2 | # __PackageSupportBuildPath__ not needed for distutil based builds,
3 | # but not everyone is there yet.
4 | import win32com
5 | win32com.__PackageSupportBuildPath__(__path__)
6 |
7 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/taskscheduler/taskscheduler.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x32/win32comext/taskscheduler/taskscheduler.pyd
--------------------------------------------------------------------------------
/lib/x32/win32comext/taskscheduler/test/test_addtask.py:
--------------------------------------------------------------------------------
1 | import pythoncom, sys, os, time, win32api
2 | from win32com.taskscheduler import taskscheduler
3 | task_name='test_addtask.job'
4 | ts=pythoncom.CoCreateInstance(taskscheduler.CLSID_CTaskScheduler,None,
5 | pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITaskScheduler)
6 | tasks=ts.Enum()
7 | for task in tasks:
8 | print(task)
9 | if task_name in tasks:
10 | print('Deleting existing task '+task_name)
11 | ts.Delete(task_name)
12 |
13 | t=ts.NewWorkItem(task_name)
14 | t.SetComment('rude comments')
15 | t.SetApplicationName(sys.executable)
16 | t.SetPriority(taskscheduler.REALTIME_PRIORITY_CLASS)
17 | t.SetParameters('-c"import win32ui,time;win32ui.MessageBox(\'hey bubba I am running\');"')
18 | t.SetWorkingDirectory(os.path.dirname(sys.executable))
19 | t.SetCreator('test_addtask.py')
20 | t.SetMaxRunTime(20000) #milliseconds
21 | t.SetFlags(taskscheduler.TASK_FLAG_INTERACTIVE|taskscheduler.TASK_FLAG_RUN_ONLY_IF_LOGGED_ON)
22 | ## |taskscheduler.TASK_FLAG_DELETE_WHEN_DONE) #task self destructs when no more future run times
23 | t.SetAccountInformation(win32api.GetUserName(),None)
24 | ## None is only valid for local system acct or if task flags contain TASK_FLAG_RUN_ONLY_IF_LOGGED_ON
25 | t.SetWorkItemData('some binary garbage')
26 |
27 | run_time = time.localtime(time.time() + 60)
28 | tr_ind, tr=t.CreateTrigger()
29 | tt=tr.GetTrigger()
30 |
31 | ## flags default to TASK_TRIGGER_FLAG_DISABLED (4)
32 | tt.Flags=taskscheduler.TASK_TRIGGER_FLAG_KILL_AT_DURATION_END
33 | tt.BeginYear=int(time.strftime('%Y',run_time))
34 | tt.BeginMonth=int(time.strftime('%m',run_time))
35 | tt.BeginDay=int(time.strftime('%d',run_time))
36 | tt.StartMinute=int(time.strftime('%M',run_time))
37 | tt.StartHour=int(time.strftime('%H',run_time))
38 | tt.MinutesInterval=1
39 | tt.MinutesDuration=5
40 |
41 | tt.TriggerType=taskscheduler.TASK_TIME_TRIGGER_MONTHLYDATE
42 | #months can contain multiples in a bitmask, use 1<<(month_nbr-1)
43 | tt.MonthlyDate_Months=1<<(int(time.strftime('%m',run_time))-1) ## corresponds to TASK_JANUARY..TASK_DECEMBER constants
44 | #days too
45 | tt.MonthlyDate_Days=1<<(int(time.strftime('%d',run_time))-1)
46 | tr.SetTrigger(tt)
47 | print(t.GetTriggerString(tr_ind))
48 |
49 | pf=t.QueryInterface(pythoncom.IID_IPersistFile)
50 | pf.Save(None,1)
51 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/taskscheduler/test/test_addtask_1.py:
--------------------------------------------------------------------------------
1 | import pythoncom, time, win32api
2 | from win32com.taskscheduler import taskscheduler
3 | test_task_name='test_addtask_1.job'
4 |
5 | ts=pythoncom.CoCreateInstance(taskscheduler.CLSID_CTaskScheduler,None,
6 | pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITaskScheduler)
7 |
8 | tasks=ts.Enum()
9 | for task in tasks:
10 | print(task)
11 | if test_task_name in tasks:
12 | print('Deleting existing task '+test_task_name)
13 | ts.Delete(test_task_name)
14 |
15 | new_task=pythoncom.CoCreateInstance(taskscheduler.CLSID_CTask,None,
16 | pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITask)
17 | ts.AddWorkItem(test_task_name,new_task) ## task object is modified in place
18 |
19 | new_task.SetFlags(taskscheduler.TASK_FLAG_INTERACTIVE|taskscheduler.TASK_FLAG_RUN_ONLY_IF_LOGGED_ON)
20 | new_task.SetIdleWait(1,10000)
21 | new_task.SetComment('test task with idle trigger')
22 | new_task.SetApplicationName('c:\\python23\\python.exe')
23 | new_task.SetPriority(taskscheduler.REALTIME_PRIORITY_CLASS)
24 | new_task.SetParameters('-c"import win32ui,time;win32ui.MessageBox(\'why aint you doing no work ?\');"')
25 | new_task.SetWorkingDirectory('c:\\python23')
26 | new_task.SetCreator('test_addtask_1.py')
27 | new_task.SetAccountInformation(win32api.GetUserName(),None)
28 | ## None is only valid for local system acct or if Flags contain TASK_FLAG_RUN_ONLY_IF_LOGGED_ON
29 |
30 |
31 | run_time = time.localtime(time.time() + 30)
32 | end_time = time.localtime(time.time() + 60*60*24)
33 |
34 | tr_ind, tr=new_task.CreateTrigger()
35 | tt=tr.GetTrigger()
36 | tt.TriggerType=taskscheduler.TASK_EVENT_TRIGGER_ON_IDLE
37 | tt.Flags=taskscheduler.TASK_TRIGGER_FLAG_HAS_END_DATE
38 |
39 | tt.BeginYear=int(time.strftime('%Y',run_time))
40 | tt.BeginMonth=int(time.strftime('%m',run_time))
41 | tt.BeginDay=int(time.strftime('%d',run_time))
42 | tt.StartMinute=int(time.strftime('%M',run_time))
43 | tt.StartHour=int(time.strftime('%H',run_time))
44 |
45 | tt.EndYear=int(time.strftime('%Y',end_time))
46 | tt.EndMonth=int(time.strftime('%m',end_time))
47 | tt.EndDay=int(time.strftime('%d',end_time))
48 |
49 | tr.SetTrigger(tt)
50 | print(new_task.GetTriggerString(tr_ind))
51 |
52 | pf=new_task.QueryInterface(pythoncom.IID_IPersistFile)
53 | pf.Save(None,1)
54 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/taskscheduler/test/test_addtask_2.py:
--------------------------------------------------------------------------------
1 | import pythoncom, time, win32api
2 | from win32com.taskscheduler import taskscheduler
3 | task_name='test_addtask_2.job'
4 | ts=pythoncom.CoCreateInstance(taskscheduler.CLSID_CTaskScheduler,None,
5 | pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITaskScheduler)
6 | tasks=ts.Enum()
7 | for task in tasks:
8 | print(task)
9 | if task_name in tasks:
10 | print('Deleting existing task '+task_name)
11 | ts.Delete(task_name)
12 |
13 | t=ts.NewWorkItem(task_name)
14 | t.SetComment('Test a task running as local system acct')
15 | t.SetApplicationName('c:\\python23\\python.exe')
16 | t.SetPriority(taskscheduler.REALTIME_PRIORITY_CLASS)
17 | t.SetParameters('test_localsystem.py')
18 | t.SetWorkingDirectory('c:\\python23')
19 | t.SetCreator('test_addtask_2.py')
20 | t.SetMaxRunTime(20000) #milliseconds
21 | t.SetFlags(taskscheduler.TASK_FLAG_DELETE_WHEN_DONE)
22 | t.SetAccountInformation('',None) ## empty string for account name means to use local system
23 | ## None is only valid for local system acct or if task flags contain TASK_FLAG_RUN_ONLY_IF_LOGGED_ON
24 |
25 | run_time = time.localtime(time.time() + 60)
26 | tr_ind, tr=t.CreateTrigger()
27 |
28 | tt=tr.GetTrigger()
29 | tt.Flags=0 ## flags for a new trigger default to TASK_TRIGGER_FLAG_DISABLED (4), make sure to clear them if not using any
30 | tt.TriggerType=taskscheduler.TASK_TIME_TRIGGER_ONCE
31 | tt.BeginYear=int(time.strftime('%Y',run_time))
32 | tt.BeginMonth=int(time.strftime('%m',run_time))
33 | tt.BeginDay=int(time.strftime('%d',run_time))
34 | tt.StartMinute=int(time.strftime('%M',run_time))
35 | tt.StartHour=int(time.strftime('%H',run_time))
36 |
37 | tr.SetTrigger(tt)
38 | print(t.GetTriggerString(tr_ind))
39 |
40 | pf=t.QueryInterface(pythoncom.IID_IPersistFile)
41 | pf.Save(None,1)
42 |
--------------------------------------------------------------------------------
/lib/x32/win32comext/taskscheduler/test/test_localsystem.py:
--------------------------------------------------------------------------------
1 | f=open('test_localsystem.txt','w')
2 | f.write('I have run\n')
3 | f.close()
4 |
--------------------------------------------------------------------------------
/lib/x64/pythoncom.py:
--------------------------------------------------------------------------------
1 | # Magic utility that "redirects" to pythoncomxx.dll
2 | import pywintypes
3 | pywintypes.__import_pywin32_system_module__("pythoncom", globals())
4 |
--------------------------------------------------------------------------------
/lib/x64/win32/_win32sysloader.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/_win32sysloader.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/_winxptheme.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/_winxptheme.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/lib/dbi.py:
--------------------------------------------------------------------------------
1 | """
2 | Skeleton replacement for removed dbi module.
3 | Use of objects created by this module should be replaced with native Python objects.
4 | Dates are now returned as datetime.datetime objects, but will still accept PyTime
5 | objects also.
6 | Raw data for binary fields should be passed as buffer objects for Python 2.x,
7 | and memoryview objects in Py3k.
8 | """
9 |
10 | import warnings
11 | warnings.warn(
12 | "dbi module is obsolete, code should now use native python datetime and buffer/memoryview objects",
13 | DeprecationWarning)
14 |
15 | import datetime
16 | dbDate = dbiDate = datetime.datetime
17 |
18 | try:
19 | dbRaw = dbiRaw = buffer
20 | except NameError:
21 | dbRaw = dbiRaw = memoryview
22 |
23 | # type names are still exported by odbc module
24 | from odbc import *
25 |
--------------------------------------------------------------------------------
/lib/x64/win32/lib/rasutil.py:
--------------------------------------------------------------------------------
1 | import win32ras
2 |
3 | stateStrings = {
4 | win32ras.RASCS_OpenPort : "OpenPort",
5 | win32ras.RASCS_PortOpened : "PortOpened",
6 | win32ras.RASCS_ConnectDevice : "ConnectDevice",
7 | win32ras.RASCS_DeviceConnected : "DeviceConnected",
8 | win32ras.RASCS_AllDevicesConnected : "AllDevicesConnected",
9 | win32ras.RASCS_Authenticate : "Authenticate",
10 | win32ras.RASCS_AuthNotify : "AuthNotify",
11 | win32ras.RASCS_AuthRetry : "AuthRetry",
12 | win32ras.RASCS_AuthCallback : "AuthCallback",
13 | win32ras.RASCS_AuthChangePassword : "AuthChangePassword",
14 | win32ras.RASCS_AuthProject : "AuthProject",
15 | win32ras.RASCS_AuthLinkSpeed : "AuthLinkSpeed",
16 | win32ras.RASCS_AuthAck : "AuthAck",
17 | win32ras.RASCS_ReAuthenticate : "ReAuthenticate",
18 | win32ras.RASCS_Authenticated : "Authenticated",
19 | win32ras.RASCS_PrepareForCallback : "PrepareForCallback",
20 | win32ras.RASCS_WaitForModemReset : "WaitForModemReset",
21 | win32ras.RASCS_WaitForCallback : "WaitForCallback",
22 | win32ras.RASCS_Projected : "Projected",
23 | win32ras.RASCS_StartAuthentication : "StartAuthentication",
24 | win32ras.RASCS_CallbackComplete : "CallbackComplete",
25 | win32ras.RASCS_LogonNetwork : "LogonNetwork",
26 | win32ras.RASCS_Interactive : "Interactive",
27 | win32ras.RASCS_RetryAuthentication : "RetryAuthentication",
28 | win32ras.RASCS_CallbackSetByCaller : "CallbackSetByCaller",
29 | win32ras.RASCS_PasswordExpired : "PasswordExpired",
30 | win32ras.RASCS_Connected : "Connected",
31 | win32ras.RASCS_Disconnected : "Disconnected"
32 | }
33 |
34 | def TestCallback( hras, msg, state, error, exterror):
35 | print("Callback called with ", hras, msg, stateStrings[state], error, exterror)
36 |
37 | def test(rasName = "_ Divert Off"):
38 | return win32ras.Dial(None, None, (rasName,),TestCallback)
--------------------------------------------------------------------------------
/lib/x64/win32/lib/win32traceutil.py:
--------------------------------------------------------------------------------
1 | # This is a helper for the win32trace module
2 |
3 | # If imported from a normal Python program, it sets up sys.stdout and sys.stderr
4 | # so output goes to the collector.
5 |
6 | # If run from the command line, it creates a collector loop.
7 |
8 | # Eg:
9 | # C:>start win32traceutil.py (or python.exe win32traceutil.py)
10 | # will start a process with a (pretty much) blank screen.
11 | #
12 | # then, switch to a DOS prompt, and type:
13 | # C:>python.exe
14 | # Python 1.4 etc...
15 | # >>> import win32traceutil
16 | # Redirecting output to win32trace remote collector
17 | # >>> print "Hello"
18 | # >>>
19 | # And the output will appear in the first collector process.
20 |
21 | # Note - the client or the collector can be started first.
22 | # There is a 0x20000 byte buffer. If this gets full, it is reset, and new
23 | # output appended from the start.
24 |
25 | import win32trace
26 |
27 | def RunAsCollector():
28 | import sys
29 | try:
30 | import win32api
31 | win32api.SetConsoleTitle("Python Trace Collector")
32 | except:
33 | pass # Oh well!
34 | win32trace.InitRead()
35 | print("Collecting Python Trace Output...")
36 | try:
37 | while 1:
38 | # a short timeout means ctrl+c works next time we wake...
39 | sys.stdout.write(win32trace.blockingread(500))
40 | except KeyboardInterrupt:
41 | print("Ctrl+C")
42 |
43 |
44 | def SetupForPrint():
45 | win32trace.InitWrite()
46 | try: # Under certain servers, sys.stdout may be invalid.
47 | print("Redirecting output to win32trace remote collector")
48 | except:
49 | pass
50 | win32trace.setprint() # this works in an rexec environment.
51 |
52 | if __name__=='__main__':
53 | RunAsCollector()
54 | else:
55 | SetupForPrint()
56 |
--------------------------------------------------------------------------------
/lib/x64/win32/lib/winxptheme.py:
--------------------------------------------------------------------------------
1 | """A useful wrapper around the "_winxptheme" module.
2 | Unlike _winxptheme, this module will load on any version of Windows.
3 |
4 | If _winxptheme is not available, then this module will have only 2 functions -
5 | IsAppThemed() and IsThemeActive, which will both always return False.
6 |
7 | If _winxptheme is available, this module will have all methods in that module,
8 | including real implementations of IsAppThemed() and IsThemeActive().
9 | """
10 |
11 | import win32api
12 | try:
13 | win32api.FreeLibrary(win32api.LoadLibrary("Uxtheme.dll"))
14 | # Life is good, everything is available.
15 | from _winxptheme import *
16 | except win32api.error:
17 | # Probably not running XP.
18 | def IsAppThemed():
19 | return False
20 | def IsThemeActive():
21 | return False
22 |
23 | del win32api
24 |
--------------------------------------------------------------------------------
/lib/x64/win32/libs/pywintypes.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/libs/pywintypes.lib
--------------------------------------------------------------------------------
/lib/x64/win32/license.txt:
--------------------------------------------------------------------------------
1 | Unless stated in the specfic source file, this work is
2 | Copyright (c) 1994-2008, Mark Hammond
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions
7 | are met:
8 |
9 | Redistributions of source code must retain the above copyright notice,
10 | this list of conditions and the following disclaimer.
11 |
12 | Redistributions in binary form must reproduce the above copyright
13 | notice, this list of conditions and the following disclaimer in
14 | the documentation and/or other materials provided with the distribution.
15 |
16 | Neither name of Mark Hammond nor the name of contributors may be used
17 | to endorse or promote products derived from this software without
18 | specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
21 | IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
--------------------------------------------------------------------------------
/lib/x64/win32/mmapfile.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/mmapfile.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/odbc.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/odbc.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/perfmon.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/perfmon.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/perfmondata.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/perfmondata.dll
--------------------------------------------------------------------------------
/lib/x64/win32/pythoncom33.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/pythoncom33.dll
--------------------------------------------------------------------------------
/lib/x64/win32/pythonservice.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/pythonservice.exe
--------------------------------------------------------------------------------
/lib/x64/win32/pywintypes33.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/pywintypes33.dll
--------------------------------------------------------------------------------
/lib/x64/win32/servicemanager.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/servicemanager.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/timer.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/timer.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win2kras.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win2kras.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32api.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32api.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32clipboard.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32clipboard.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32console.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32console.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32cred.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32cred.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32crypt.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32crypt.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32event.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32event.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32evtlog.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32evtlog.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32file.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32file.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32gui.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32gui.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32help.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32help.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32inet.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32inet.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32job.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32job.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32lz.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32lz.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32net.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32net.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32pdh.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32pdh.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32pipe.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32pipe.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32print.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32print.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32process.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32process.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32profile.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32profile.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32ras.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32ras.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32security.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32security.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32service.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32service.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32trace.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32trace.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32transaction.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32transaction.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32ts.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32ts.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/win32wnet.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/win32wnet.pyd
--------------------------------------------------------------------------------
/lib/x64/win32/winxpgui.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32/winxpgui.pyd
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/QuickStartClientCom.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/HTML/QuickStartClientCom.html
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/QuickStartServerCom.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/HTML/QuickStartServerCom.html
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/docindex.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/HTML/docindex.html
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/image/BTN_HomePage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/HTML/image/BTN_HomePage.gif
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/image/BTN_ManualTop.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/HTML/image/BTN_ManualTop.gif
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/image/BTN_NextPage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/HTML/image/BTN_NextPage.gif
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/image/BTN_PrevPage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/HTML/image/BTN_PrevPage.gif
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/image/blank.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/HTML/image/blank.gif
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/image/pycom_blowing.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/HTML/image/pycom_blowing.gif
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/image/pythoncom.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/HTML/image/pythoncom.gif
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/image/www_icon.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/HTML/image/www_icon.gif
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | win32com
6 |
7 |
8 |
9 |
10 |
11 |
12 | 
13 | Python and COM
14 | Introduction
15 | Python has an excellent interface to COM (also known variously as OLE2, ActiveX, etc).
16 | The Python COM package can be used to interface to almost any COM program (such as the MS-Office suite), write servers that can be hosted by any COM client (such as Visual Basic or C++), and has even been used to provide the core ActiveX Scripting Support.
17 |
18 |
19 |
22 |
23 |
24 |
25 | Documentation
26 | Preliminary Active Scripting and Debugging documentation is available.
27 | 2 Quick-Start guides have been provided, which also contain other links. See the Quick Start for Client side COM and the Quick Start for Server side COM
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/misc.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/HTML/misc.html
--------------------------------------------------------------------------------
/lib/x64/win32com/HTML/package.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/HTML/package.html
--------------------------------------------------------------------------------
/lib/x64/win32com/License.txt:
--------------------------------------------------------------------------------
1 | Unless stated in the specfic source file, this work is
2 | Copyright (c) 1996-2008, Greg Stein and Mark Hammond.
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions
7 | are met:
8 |
9 | Redistributions of source code must retain the above copyright notice,
10 | this list of conditions and the following disclaimer.
11 |
12 | Redistributions in binary form must reproduce the above copyright
13 | notice, this list of conditions and the following disclaimer in
14 | the documentation and/or other materials provided with the distribution.
15 |
16 | Neither names of Greg Stein, Mark Hammond nor the name of contributors may be used
17 | to endorse or promote products derived from this software without
18 | specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
21 | IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
--------------------------------------------------------------------------------
/lib/x64/win32com/client/CLSIDToClass.py:
--------------------------------------------------------------------------------
1 | """Manages a dictionary of CLSID strings to Python classes.
2 |
3 | Primary use of this module is to allow modules generated by
4 | makepy.py to share classes. @makepy@ automatically generates code
5 | which interacts with this module. You should never need to reference
6 | this module directly.
7 |
8 | This module only provides support for modules which have been previously
9 | been imported. The gencache module provides some support for loading modules
10 | on demand - once done, this module supports it...
11 |
12 | As an example, the MSACCESS.TLB type library makes reference to the
13 | CLSID of the Database object, as defined in DAO3032.DLL. This
14 | allows code using the MSAccess wrapper to natively use Databases.
15 |
16 | This obviously applies to all cooperating objects, not just DAO and
17 | Access.
18 | """
19 | mapCLSIDToClass = {}
20 |
21 | def RegisterCLSID( clsid, pythonClass ):
22 | """Register a class that wraps a CLSID
23 |
24 | This function allows a CLSID to be globally associated with a class.
25 | Certain module will automatically convert an IDispatch object to an
26 | instance of the associated class.
27 | """
28 |
29 | mapCLSIDToClass[str(clsid)] = pythonClass
30 |
31 | def RegisterCLSIDsFromDict( dict ):
32 | """Register a dictionary of CLSID's and classes.
33 |
34 | This module performs the same function as @RegisterCLSID@, but for
35 | an entire dictionary of associations.
36 |
37 | Typically called by makepy generated modules at import time.
38 | """
39 | mapCLSIDToClass.update(dict)
40 |
41 | def GetClass(clsid):
42 | """Given a CLSID, return the globally associated class.
43 |
44 | clsid -- a string CLSID representation to check.
45 | """
46 | return mapCLSIDToClass[clsid]
47 |
48 | def HasClass(clsid):
49 | """Determines if the CLSID has an associated class.
50 |
51 | clsid -- the string CLSID to check
52 | """
53 | return clsid in mapCLSIDToClass
54 |
--------------------------------------------------------------------------------
/lib/x64/win32com/client/connect.py:
--------------------------------------------------------------------------------
1 | """Utilities for working with Connections"""
2 | import win32com.server.util, pythoncom
3 |
4 | class SimpleConnection:
5 | "A simple, single connection object"
6 | def __init__(self, coInstance = None, eventInstance = None, eventCLSID = None, debug = 0):
7 | self.cp = None
8 | self.cookie = None
9 | self.debug = debug
10 | if not coInstance is None:
11 | self.Connect(coInstance , eventInstance, eventCLSID)
12 |
13 | def __del__(self):
14 | try:
15 | self.Disconnect()
16 | except pythoncom.error:
17 | # Ignore disconnection as we are torn down.
18 | pass
19 |
20 | def _wrap(self, obj):
21 | useDispatcher = None
22 | if self.debug:
23 | from win32com.server import dispatcher
24 | useDispatcher = dispatcher.DefaultDebugDispatcher
25 | return win32com.server.util.wrap(obj, useDispatcher=useDispatcher)
26 |
27 | def Connect(self, coInstance, eventInstance, eventCLSID = None):
28 | try:
29 | oleobj = coInstance._oleobj_
30 | except AttributeError:
31 | oleobj = coInstance
32 | cpc=oleobj.QueryInterface(pythoncom.IID_IConnectionPointContainer)
33 | if eventCLSID is None: eventCLSID = eventInstance.CLSID
34 | comEventInstance = self._wrap(eventInstance)
35 | self.cp=cpc.FindConnectionPoint(eventCLSID)
36 | self.cookie = self.cp.Advise(comEventInstance)
37 |
38 | def Disconnect(self):
39 | if not self.cp is None:
40 | if self.cookie:
41 | self.cp.Unadvise(self.cookie)
42 | self.cookie = None
43 | self.cp = None
44 |
--------------------------------------------------------------------------------
/lib/x64/win32com/demos/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/demos/__init__.py
--------------------------------------------------------------------------------
/lib/x64/win32com/demos/iebutton.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/demos/iebutton.py
--------------------------------------------------------------------------------
/lib/x64/win32com/demos/ietoolbar.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/demos/ietoolbar.py
--------------------------------------------------------------------------------
/lib/x64/win32com/demos/trybag.py:
--------------------------------------------------------------------------------
1 | import pythoncom
2 | from win32com.server import util
3 | from win32com.server import exception
4 |
5 | VT_EMPTY = pythoncom.VT_EMPTY
6 |
7 | class Bag:
8 | _public_methods_ = [ 'Read', 'Write' ]
9 | _com_interfaces_ = [ pythoncom.IID_IPropertyBag ]
10 |
11 | def __init__(self):
12 | self.data = { }
13 |
14 | def Read(self, propName, varType, errorLog):
15 | print("read: name=", propName, "type=", varType)
16 | if propName not in self.data:
17 | if errorLog:
18 | hr = 0x80070057
19 | exc = pythoncom.com_error(0, "Bag.Read", "no such item", None, 0, hr)
20 | errorLog.AddError(propName, exc)
21 | raise exception.Exception(scode=hr)
22 | return self.data[propName]
23 |
24 | def Write(self, propName, value):
25 | print("write: name=", propName, "value=", value)
26 | self.data[propName] = value
27 |
28 |
29 | class Target:
30 | _public_methods_ = [ 'GetClassID', 'InitNew', 'Load', 'Save' ]
31 | _com_interfaces_ = [ pythoncom.IID_IPersist,
32 | pythoncom.IID_IPersistPropertyBag ]
33 |
34 | def GetClassID(self):
35 | raise exception.Exception(scode=0x80004005) # E_FAIL
36 |
37 | def InitNew(self):
38 | pass
39 |
40 | def Load(self, bag, log):
41 | print(bag.Read('prop1', VT_EMPTY, log))
42 | print(bag.Read('prop2', VT_EMPTY, log))
43 | try:
44 | print(bag.Read('prop3', VT_EMPTY, log))
45 | except exception.Exception:
46 | pass
47 |
48 | def Save(self, bag, clearDirty, saveAllProps):
49 | bag.Write('prop1', 'prop1.hello')
50 | bag.Write('prop2', 'prop2.there')
51 |
52 | class Log:
53 | _public_methods_ = [ 'AddError' ]
54 | _com_interfaces_ = [ pythoncom.IID_IErrorLog ]
55 |
56 | def AddError(self, propName, excepInfo):
57 | print("error: propName=", propName, "error=", excepInfo)
58 |
59 | def test():
60 | bag = Bag()
61 | target = Target()
62 | log = Log()
63 |
64 | target.Save(bag, 1, 1)
65 | target.Load(bag, log)
66 |
67 | comBag = util.wrap(bag, pythoncom.IID_IPropertyBag)
68 | comTarget = util.wrap(target, pythoncom.IID_IPersistPropertyBag)
69 | comLog = util.wrap(log, pythoncom.IID_IErrorLog)
70 |
71 | comTarget.Save(comBag, 1, 1)
72 | comTarget.Load(comBag, comLog)
73 |
74 | if __name__ == '__main__':
75 | test()
76 |
--------------------------------------------------------------------------------
/lib/x64/win32com/libs/axscript.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/libs/axscript.lib
--------------------------------------------------------------------------------
/lib/x64/win32com/libs/pythoncom.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/libs/pythoncom.lib
--------------------------------------------------------------------------------
/lib/x64/win32com/makegw/__init__.py:
--------------------------------------------------------------------------------
1 | # indicates a python package.
2 |
--------------------------------------------------------------------------------
/lib/x64/win32com/server/__init__.py:
--------------------------------------------------------------------------------
1 | # Empty __init__ file to designate a sub-package.
--------------------------------------------------------------------------------
/lib/x64/win32com/server/factory.py:
--------------------------------------------------------------------------------
1 | # Class factory utilities.
2 | import pythoncom
3 |
4 | def RegisterClassFactories(clsids, flags = None, clsctx = None):
5 | """Given a list of CLSID, create and register class factories.
6 |
7 | Returns a list, which should be passed to RevokeClassFactories
8 | """
9 | if flags is None: flags = pythoncom.REGCLS_MULTIPLEUSE|pythoncom.REGCLS_SUSPENDED
10 | if clsctx is None: clsctx = pythoncom.CLSCTX_LOCAL_SERVER
11 | ret = []
12 | for clsid in clsids:
13 | # Some server append '-Embedding' etc
14 | if clsid[0] not in ['-', '/']:
15 | factory = pythoncom.MakePyFactory(clsid)
16 | regId = pythoncom.CoRegisterClassObject(clsid, factory, clsctx, flags)
17 | ret.append((factory, regId))
18 | return ret
19 |
20 | def RevokeClassFactories(infos):
21 | for factory, revokeId in infos:
22 | pythoncom.CoRevokeClassObject(revokeId)
23 |
--------------------------------------------------------------------------------
/lib/x64/win32com/server/localserver.py:
--------------------------------------------------------------------------------
1 | # LocalServer .EXE support for Python.
2 | #
3 | # This is designed to be used as a _script_ file by pythonw.exe
4 | #
5 | # In some cases, you could also use Python.exe, which will create
6 | # a console window useful for debugging.
7 | #
8 | # NOTE: When NOT running in any sort of debugging mode,
9 | # 'print' statements may fail, as sys.stdout is not valid!!!
10 |
11 | #
12 | # Usage:
13 | # wpython.exe LocalServer.py clsid [, clsid]
14 | import sys
15 | sys.coinit_flags = 2
16 | import pythoncom
17 | import win32api
18 | from win32com.server import factory
19 |
20 | usage = """\
21 | Invalid command line arguments
22 |
23 | This program provides LocalServer COM support
24 | for Python COM objects.
25 |
26 | It is typically run automatically by COM, passing as arguments
27 | The ProgID or CLSID of the Python Server(s) to be hosted
28 | """
29 |
30 | def serve(clsids):
31 | infos = factory.RegisterClassFactories(clsids)
32 |
33 | pythoncom.EnableQuitMessage(win32api.GetCurrentThreadId())
34 | pythoncom.CoResumeClassObjects()
35 |
36 | pythoncom.PumpMessages()
37 |
38 | factory.RevokeClassFactories( infos )
39 |
40 | pythoncom.CoUninitialize()
41 |
42 | def main():
43 | if len(sys.argv)==1:
44 | win32api.MessageBox(0, usage, "Python COM Server")
45 | sys.exit(1)
46 | serve(sys.argv[1:])
47 |
48 | if __name__=='__main__':
49 | main()
50 |
--------------------------------------------------------------------------------
/lib/x64/win32com/servers/PythonTools.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import time
3 |
4 | class Tools:
5 | _public_methods_ = [ 'reload', 'adddir', 'echo', 'sleep' ]
6 |
7 | def reload(self, module):
8 | if module in sys.modules:
9 | try:
10 | from imp import reload
11 | except ImportError:
12 | pass # builtin in py2k
13 | reload(sys.modules[module])
14 | return "reload succeeded."
15 | return "no reload performed."
16 |
17 | def adddir(self, dir):
18 | if type(dir) == type(''):
19 | sys.path.append(dir)
20 | return str(sys.path)
21 |
22 | def echo(self, arg):
23 | return repr(arg)
24 |
25 | def sleep(self, t):
26 | time.sleep(t)
27 |
28 |
29 | if __name__=='__main__':
30 | from win32com.server.register import RegisterServer, UnregisterServer
31 | clsid = "{06ce7630-1d81-11d0-ae37-c2fa70000000}"
32 | progid = "Python.Tools"
33 | verprogid = "Python.Tools.1"
34 | if "--unregister" in sys.argv:
35 | print("Unregistering...")
36 | UnregisterServer(clsid, progid, verprogid)
37 | print("Unregistered OK")
38 | else:
39 | print("Registering COM server...")
40 | RegisterServer(clsid,
41 | "win32com.servers.PythonTools.Tools",
42 | "Python Tools",
43 | progid,
44 | verprogid)
45 | print("Class registered.")
46 |
--------------------------------------------------------------------------------
/lib/x64/win32com/servers/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32com/servers/__init__.py
--------------------------------------------------------------------------------
/lib/x64/win32com/servers/interp.py:
--------------------------------------------------------------------------------
1 | """Python.Interpreter COM Server
2 |
3 | This module implements a very very simple COM server which
4 | exposes the Python interpreter.
5 |
6 | This is designed more as a demonstration than a full blown COM server.
7 | General functionality and Error handling are both limited.
8 |
9 | To use this object, ensure it is registered by running this module
10 | from Python.exe. Then, from Visual Basic, use "CreateObject('Python.Interpreter')",
11 | and call its methods!
12 | """
13 |
14 | from win32com.server.exception import Exception
15 | import winerror
16 |
17 | # Expose the Python interpreter.
18 | class Interpreter:
19 | """The interpreter object exposed via COM
20 | """
21 | _public_methods_ = [ 'Exec', 'Eval' ]
22 | # All registration stuff to support fully automatic register/unregister
23 | _reg_verprogid_ = "Python.Interpreter.2"
24 | _reg_progid_ = "Python.Interpreter"
25 | _reg_desc_ = "Python Interpreter"
26 | _reg_clsid_ = "{30BD3490-2632-11cf-AD5B-524153480001}"
27 | _reg_class_spec_ = "win32com.servers.interp.Interpreter"
28 |
29 | def __init__(self):
30 | self.dict = {}
31 |
32 | def Eval(self, exp):
33 | """Evaluate an expression.
34 | """
35 | if type(exp) not in [str, str]:
36 | raise Exception(desc="Must be a string",scode=winerror.DISP_E_TYPEMISMATCH)
37 |
38 | return eval(str(exp), self.dict)
39 | def Exec(self, exp):
40 | """Execute a statement.
41 | """
42 | if type(exp) not in [str, str]:
43 | raise Exception(desc="Must be a string",scode=winerror.DISP_E_TYPEMISMATCH)
44 | exec(str(exp), self.dict)
45 |
46 | def Register():
47 | import win32com.server.register
48 | return win32com.server.register.UseCommandLine(Interpreter)
49 |
50 | if __name__=='__main__':
51 | print("Registering COM server...")
52 | Register()
53 |
--------------------------------------------------------------------------------
/lib/x64/win32com/servers/perfmon.py:
--------------------------------------------------------------------------------
1 | """A COM Server which exposes the NT Performance monitor in a very rudimentary way
2 |
3 | Usage from VB:
4 | set ob = CreateObject("Python.PerfmonQuery")
5 | freeBytes = ob.Query("Memory", "Available Bytes")
6 | """
7 | from win32com.server import exception, register
8 | import pythoncom, win32pdhutil, winerror
9 |
10 | class PerfMonQuery:
11 | _reg_verprogid_ = "Python.PerfmonQuery.1"
12 | _reg_progid_ = "Python.PerfmonQuery"
13 | _reg_desc_ = "Python Performance Monitor query object"
14 | _reg_clsid_ = "{64cef7a0-8ece-11d1-a65a-00aa00125a98}"
15 | _reg_class_spec_ = "win32com.servers.perfmon.PerfMonQuery"
16 | _public_methods_ = [ 'Query' ]
17 | def Query(self, object, counter, instance = None, machine = None):
18 | try:
19 | return win32pdhutil.GetPerformanceAttributes(object, counter, instance, machine=machine)
20 | except win32pdhutil.error as exc:
21 | raise exception.Exception(desc=exc.strerror)
22 | except TypeError as desc:
23 | raise exception.Exception(desc=desc,scode=winerror.DISP_E_TYPEMISMATCH)
24 |
25 | if __name__=='__main__':
26 | print("Registering COM server...")
27 | register.UseCommandLine(PerfMonQuery)
28 |
--------------------------------------------------------------------------------
/lib/x64/win32com/util.py:
--------------------------------------------------------------------------------
1 | """General utility functions common to client and server.
2 |
3 | This module contains a collection of general purpose utility functions.
4 | """
5 | import pythoncom
6 | import win32api, win32con
7 |
8 | def IIDToInterfaceName(iid):
9 | """Converts an IID to a string interface name.
10 |
11 | Used primarily for debugging purposes, this allows a cryptic IID to
12 | be converted to a useful string name. This will firstly look for interfaces
13 | known (ie, registered) by pythoncom. If not known, it will look in the
14 | registry for a registered interface.
15 |
16 | iid -- An IID object.
17 |
18 | Result -- Always a string - either an interface name, or ''
19 | """
20 | try:
21 | return pythoncom.ServerInterfaces[iid]
22 | except KeyError:
23 | try:
24 | try:
25 | return win32api.RegQueryValue(win32con.HKEY_CLASSES_ROOT, "Interface\\%s" % iid)
26 | except win32api.error:
27 | pass
28 | except ImportError:
29 | pass
30 | return str(iid)
31 |
32 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/adsi/adsi.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32comext/adsi/adsi.pyd
--------------------------------------------------------------------------------
/lib/x64/win32comext/adsi/demos/objectPicker.py:
--------------------------------------------------------------------------------
1 | # A demo for the IDsObjectPicker interface.
2 | import win32clipboard
3 | import pythoncom
4 | from win32com.adsi import adsi
5 | from win32com.adsi.adsicon import *
6 |
7 | cf_objectpicker = win32clipboard.RegisterClipboardFormat(CFSTR_DSOP_DS_SELECTION_LIST)
8 |
9 | def main():
10 | hwnd = 0
11 |
12 | # Create an instance of the object picker.
13 | picker = pythoncom.CoCreateInstance(adsi.CLSID_DsObjectPicker,
14 | None,
15 | pythoncom.CLSCTX_INPROC_SERVER,
16 | adsi.IID_IDsObjectPicker)
17 |
18 | # Create our scope init info.
19 | siis = adsi.DSOP_SCOPE_INIT_INFOs(1)
20 | sii = siis[0]
21 |
22 | # Combine multiple scope types in a single array entry.
23 |
24 | sii.type = DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN | \
25 | DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN
26 |
27 | # Set uplevel and downlevel filters to include only computer objects.
28 | # Uplevel filters apply to both mixed and native modes.
29 | # Notice that the uplevel and downlevel flags are different.
30 |
31 | sii.filterFlags.uplevel.bothModes = DSOP_FILTER_COMPUTERS
32 | sii.filterFlags.downlevel = DSOP_DOWNLEVEL_FILTER_COMPUTERS
33 |
34 | # Initialize the interface.
35 | picker.Initialize(
36 | None, # Target is the local computer.
37 | siis, # scope infos
38 | DSOP_FLAG_MULTISELECT, # options
39 | ('objectGUID','displayName') ) # attributes to fetch
40 |
41 | do = picker.InvokeDialog(hwnd)
42 | # Extract the data from the IDataObject.
43 | format_etc = (cf_objectpicker, None,
44 | pythoncom.DVASPECT_CONTENT, -1,
45 | pythoncom.TYMED_HGLOBAL)
46 | medium = do.GetData(format_etc)
47 | data = adsi.StringAsDS_SELECTION_LIST(medium.data)
48 | for item in data:
49 | name, klass, adspath, upn, attrs, flags = item
50 | print("Item", name)
51 | print(" Class:", klass)
52 | print(" AdsPath:", adspath)
53 | print(" UPN:", upn)
54 | print(" Attrs:", attrs)
55 | print(" Flags:", flags)
56 |
57 | if __name__=='__main__':
58 | main()
59 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/authorization/__init__.py:
--------------------------------------------------------------------------------
1 | # This is a python package
2 | # __PackageSupportBuildPath__ not needed for distutil based builds,
3 | # but not everyone is there yet.
4 | import win32com
5 | win32com.__PackageSupportBuildPath__(__path__)
6 |
7 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/authorization/authorization.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32comext/authorization/authorization.pyd
--------------------------------------------------------------------------------
/lib/x64/win32comext/axcontrol/__init__.py:
--------------------------------------------------------------------------------
1 | # See if we have a special directory for the binaries (for developers)
2 | import win32com
3 | win32com.__PackageSupportBuildPath__(__path__)
4 |
5 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axcontrol/axcontrol.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32comext/axcontrol/axcontrol.pyd
--------------------------------------------------------------------------------
/lib/x64/win32comext/axdebug/__init__.py:
--------------------------------------------------------------------------------
1 | # See if we have a special directory for the binaries (for developers)
2 | import win32com
3 | win32com.__PackageSupportBuildPath__(__path__)
4 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axdebug/axdebug.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32comext/axdebug/axdebug.pyd
--------------------------------------------------------------------------------
/lib/x64/win32comext/axdebug/dump.py:
--------------------------------------------------------------------------------
1 | import sys, string
2 | import traceback
3 | from win32com.axdebug import axdebug
4 | from win32com.client.util import Enumerator
5 | import pythoncom
6 |
7 | def DumpDebugApplicationNode(node, level = 0):
8 | # Recursive dump of a DebugApplicationNode
9 | spacer = " " * level
10 | for desc, attr in [("Node Name", axdebug.DOCUMENTNAMETYPE_APPNODE),
11 | ("Title", axdebug.DOCUMENTNAMETYPE_TITLE),
12 | ("Filename", axdebug.DOCUMENTNAMETYPE_FILE_TAIL),
13 | ("URL", axdebug.DOCUMENTNAMETYPE_URL),
14 | ]:
15 | try:
16 | info = node.GetName(attr)
17 | except pythoncom.com_error:
18 | info = ""
19 | print("%s%s: %s" % (spacer, desc, info))
20 | try:
21 | doc = node.GetDocument()
22 | except pythoncom.com_error:
23 | doc = None
24 | if doc:
25 | doctext = doc.QueryInterface(axdebug.IID_IDebugDocumentText)
26 | numLines, numChars = doctext.GetSize()
27 | # text, attr = doctext.GetText(0, 20, 1)
28 | text, attr = doctext.GetText(0, numChars, 1)
29 | print("%sText is %s, %d bytes long" % (spacer, repr(text[:40]+"..."), len(text)))
30 | else:
31 | print("%s%s" % (spacer, ""))
32 |
33 | for child in Enumerator(node.EnumChildren()):
34 | DumpDebugApplicationNode(child, level+1)
35 |
36 | def dumpall():
37 | dm=pythoncom.CoCreateInstance(axdebug.CLSID_MachineDebugManager,None,pythoncom.CLSCTX_ALL, axdebug.IID_IMachineDebugManager)
38 | e=Enumerator(dm.EnumApplications())
39 | for app in e:
40 | print("Application: %s" % app.GetName())
41 | node = app.GetRootNode() # of type PyIDebugApplicationNode->PyIDebugDocumentProvider->PyIDebugDocumentInfo
42 | DumpDebugApplicationNode(node)
43 |
44 | if __name__=='__main__':
45 | try:
46 | dumpall()
47 | except:
48 | traceback.print_exc()
49 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/asp/CreateObject.asp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/asp/caps.asp:
--------------------------------------------------------------------------------
1 | <%@ Language=Python %>
2 |
3 |
4 |
5 |
6 |
7 |
8 | Python test
9 |
10 |
11 |
12 |
13 |
14 |
21 |
22 |
23 |
24 | <%
25 | import sys
26 | print sys.path
27 | from win32com.axscript.asputil import *
28 | print "Hello"
29 | print "There"
30 | print "How are you"
31 | %>
32 |
33 | <%bc = Server.CreateObject("MSWC.BrowserType")%>
34 |
35 |
36 | Browser | <%=bc.browser %>
37 | |
Version | <%=bc.version %> |
38 | Frames |
39 | <%Response.Write( iif(bc.frames, "TRUE", "FALSE")) %> |
40 | Tables |
41 | <%Response.Write( iif (bc.tables, "TRUE", "FALSE")) %> |
42 | BackgroundSounds |
43 | <%Response.Write( iif(bc.BackgroundSounds, "TRUE", "FALSE"))%> |
44 | VBScript |
45 | <%Response.Write( iif(bc.vbscript, "TRUE", "FALSE"))%> |
46 | JavaScript |
47 | <%Response.Write( iif(bc.javascript, "TRUE", "FALSE"))%> |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/asp/interrupt/test.asp:
--------------------------------------------------------------------------------
1 | <%@ language=python%>
2 |
3 | <%Response.Redirect("test1.html")%>
4 |
5 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/asp/interrupt/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | GOT There
5 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/asp/interrupt/test1.asp:
--------------------------------------------------------------------------------
1 | <%@ language =Python%>
2 |
3 |
4 | <%Response.Redirect("test.html")%>
5 |
6 |
7 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/asp/interrupt/test1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | GOT HERE
5 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/asp/tut1.asp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/ie/MarqueeText1.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Internet Workshop
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Python AX Script Engine
12 |
Demo using the Marquee Control
13 |
Mark Hammond.
14 |
15 |
This is really quite a boring demo, as the Marquee control does everything. However, there is Python code behind the buttons that change the speed. This code is all of 2 lines per button!!!
16 |
17 |
For more information on Python as an ActiveX scripting language, see
18 |
19 |
Python
20 |
http://www.python.org
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/ie/dbgtest.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/ie/demo.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | Python AXScript Demos
4 |
5 |
6 |
7 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/ie/demo_check.htm:
--------------------------------------------------------------------------------
1 |
2 | Engine Registration
3 |
4 |
5 |
6 | The Python ActiveX Scripting Engine is not currently registered.
7 |
8 |
Due to a privacy
9 | concern discovered in the engine, the use of Python inside IE has been disabled.
10 |
11 | Before any of the supplied demos will work, the engine must be successfully registered.
12 |
13 | To install a version of the engine, that does work with IE, you can execute the Python program
14 | win32com\axscript\client\pyscript_rexec.py
must be run. You can either do this manually, or follow the instructions below.
15 |
16 | Register the engine now!
17 |
18 | If you have read about the privacy
19 | concern and still wish to register the engine, just follow the process outlined below:
20 |
21 | - Click on the link below
22 |
- A dialog will be presented asking if the file should be opened or saved to disk. Select "Open it".
23 |
- A Console program will briefly open, while the server is registered.
24 |
25 |
26 | Register the engine now
27 |
28 |
Checking the registration
29 | After the registration is complete, simply hit the Reload button. If the
30 | registration was successful, the page will change to the Python/AvtiveX Demo Page.
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/ie/demo_intro.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 | Congratulations on installing the Python ActiveX Scripting Engine
11 |
12 | Be warned that there is a privacy
13 | concern with this engine. Please read this information, including how to disable the feature.
14 |
15 |
16 | Object model
17 | Except as described below, the object module exposed should be similar to that exposed
18 | by Visual Basic, etc. Due to the nature of ActiveX Scripting, the details for each
19 | host are different, but Python should work "correctly".
20 |
21 |
The object model exposed via Python for MSIE is not as seamless as VB. The biggest limitation is
22 | the concept of a "local" namespace. For example, in VB, you can
23 | code text="Hi there"
, but in Python, you must code
24 | MyForm.ThisButton.Text="Hi There"
. See the foo2 sample
25 | for futher details.
26 |
27 |
Known bugs and problems
28 |
29 | This release seems to have broken Aaron's mouse-trace sample. No idea why, and Im supposed to be looking into it.
30 |
Builtin objects such as MARQUEE are giving me grief. Objects accessed via forms are generally
31 | no problem.
32 |
If you are trying to use Python with the Windows Scripting Host, note that
33 | .pys files are not correct registered - you will need to explicitely
34 | specify either cscript.exe or wscript.exe on the command line.
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/ie/demo_menu.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | Scripting Demos
4 | An Introduction to the
5 | scripting engine.
6 |
7 |
The Calculator Demo is a very
8 | cool sample written by Aaron Watters.
9 |
10 |
Mouse track is another of
11 | Aaron's samples, and shows how fast the Python engine is!
12 |
13 |
The foo2 sample is mainly used
14 | for debugging and testing, but does show some forms in action.
15 |
16 |
17 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/ie/docwrite.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 | A page generated by Python
4 |
5 |
10 |
11 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/axscript/Demos/client/ie/form.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
19 |
20 |
21 |
22 |
30 |
31 |
32 |
39 |
40 |
53 |
54 |
55 |
63 |
64 |
65 |
66 |
73 |
74 |
75 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/bits/__init__.py:
--------------------------------------------------------------------------------
1 | # This is a python package
2 | # __PackageSupportBuildPath__ not needed for distutil based builds,
3 | # but not everyone is there yet.
4 | import win32com
5 | win32com.__PackageSupportBuildPath__(__path__)
6 |
7 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/bits/bits.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32comext/bits/bits.pyd
--------------------------------------------------------------------------------
/lib/x64/win32comext/bits/test/show_all_jobs.py:
--------------------------------------------------------------------------------
1 | # Dump lots of info about BITS jobs.
2 | from win32com.bits import bits
3 | import pythoncom
4 |
5 | states = dict([(val, (name[13:]))
6 | for name, val in vars(bits).items()
7 | if name.startswith('BG_JOB_STATE_')])
8 |
9 | job_types = dict([(val, (name[12:]))
10 | for name, val in vars(bits).items()
11 | if name.startswith('BG_JOB_TYPE_')])
12 |
13 | bcm = pythoncom.CoCreateInstance(bits.CLSID_BackgroundCopyManager,
14 | None,
15 | pythoncom.CLSCTX_LOCAL_SERVER,
16 | bits.IID_IBackgroundCopyManager)
17 |
18 | try:
19 | enum = bcm.EnumJobs(bits.BG_JOB_ENUM_ALL_USERS)
20 | except pythoncom.error:
21 | print("Failed to get jobs for all users - trying for current user")
22 | enum = bcm.EnumJobs(0)
23 |
24 | for job in enum:
25 | print("Job:", job.GetDisplayName())
26 | print("Description:", job.GetDescription())
27 | print("Id:", job.GetId())
28 | print("State:", states.get(job.GetState()))
29 | print("Type:", job_types.get(job.GetType()))
30 | print("Owner:", job.GetOwner())
31 | print("Errors:", job.GetErrorCount())
32 | print("Created/Modified/Finished times:", [str(t) for t in job.GetTimes()])
33 | bytes_tot, bytes_xf, files_tot, files_xf = job.GetProgress()
34 | print("Bytes: %d complete of %d total" % (bytes_xf, bytes_tot))
35 | print("Files: %d complete of %d total" % (files_xf, files_tot))
36 | for f in job.EnumFiles():
37 | bytes, total, done = f.GetProgress()
38 | print(" Remote:", f.GetRemoteName())
39 | print(" Local:", f.GetLocalName())
40 | print(" Progress: %d of %d bytes - completed=%s)" % (bytes, total, done))
41 | print()
42 | print()
43 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/directsound/__init__.py:
--------------------------------------------------------------------------------
1 | # See if we have a special directory for the binaries (for developers)
2 | import win32com
3 | win32com.__PackageSupportBuildPath__(__path__)
4 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/directsound/directsound.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32comext/directsound/directsound.pyd
--------------------------------------------------------------------------------
/lib/x64/win32comext/directsound/test/__init__.py:
--------------------------------------------------------------------------------
1 | # This is a Python package, imported by the win32com test suite.
2 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/directsound/test/ds_record.py:
--------------------------------------------------------------------------------
1 | import pywintypes
2 | import struct
3 | import win32event, win32api
4 | import os
5 | import win32com.directsound.directsound as ds
6 |
7 | def wav_header_pack(wfx, datasize):
8 | return struct.pack('<4sl4s4slhhllhh4sl', 'RIFF', 36 + datasize,
9 | 'WAVE', 'fmt ', 16,
10 | wfx.wFormatTag, wfx.nChannels, wfx.nSamplesPerSec,
11 | wfx.nAvgBytesPerSec, wfx.nBlockAlign,
12 | wfx.wBitsPerSample, 'data', datasize);
13 |
14 | d = ds.DirectSoundCaptureCreate(None, None)
15 |
16 | sdesc = ds.DSCBUFFERDESC()
17 | sdesc.dwBufferBytes = 352800 # 2 seconds
18 | sdesc.lpwfxFormat = pywintypes.WAVEFORMATEX()
19 | sdesc.lpwfxFormat.wFormatTag = pywintypes.WAVE_FORMAT_PCM
20 | sdesc.lpwfxFormat.nChannels = 2
21 | sdesc.lpwfxFormat.nSamplesPerSec = 44100
22 | sdesc.lpwfxFormat.nAvgBytesPerSec = 176400
23 | sdesc.lpwfxFormat.nBlockAlign = 4
24 | sdesc.lpwfxFormat.wBitsPerSample = 16
25 |
26 | print(sdesc)
27 | print(d)
28 | buffer = d.CreateCaptureBuffer(sdesc)
29 |
30 | event = win32event.CreateEvent(None, 0, 0, None)
31 | notify = buffer.QueryInterface(ds.IID_IDirectSoundNotify)
32 |
33 | notify.SetNotificationPositions((ds.DSBPN_OFFSETSTOP, event))
34 |
35 | buffer.Start(0)
36 |
37 | win32event.WaitForSingleObject(event, -1)
38 |
39 | data = buffer.Update(0, 352800)
40 |
41 | fname=os.path.join(win32api.GetTempPath(), 'test_directsound_record.wav')
42 | f = open(fname, 'wb')
43 | f.write(wav_header_pack(sdesc.lpwfxFormat, 352800))
44 | f.write(data)
45 | f.close()
46 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/ifilter/__init__.py:
--------------------------------------------------------------------------------
1 | # empty file to designate as a package.
2 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/ifilter/ifilter.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32comext/ifilter/ifilter.pyd
--------------------------------------------------------------------------------
/lib/x64/win32comext/internet/__init__.py:
--------------------------------------------------------------------------------
1 | # See if we have a special directory for the binaries (for developers)
2 | import win32com
3 | win32com.__PackageSupportBuildPath__(__path__)
4 |
5 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/internet/internet.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32comext/internet/internet.pyd
--------------------------------------------------------------------------------
/lib/x64/win32comext/mapi/__init__.py:
--------------------------------------------------------------------------------
1 | if type(__path__)==type(''):
2 | # For freeze to work!
3 | import sys
4 | try:
5 | import mapi
6 | sys.modules['win32com.mapi.mapi'] = mapi
7 | except ImportError:
8 | pass
9 | try:
10 | import exchange
11 | sys.modules['win32com.mapi.exchange'] = exchange
12 | except ImportError:
13 | pass
14 | try:
15 | import exchdapi
16 | sys.modules['win32com.mapi.exchdapi'] = exchdapi
17 | except ImportError:
18 | pass
19 | else:
20 | import win32com
21 | # See if we have a special directory for the binaries (for developers)
22 | win32com.__PackageSupportBuildPath__(__path__)
23 |
24 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/mapi/mapi.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32comext/mapi/mapi.pyd
--------------------------------------------------------------------------------
/lib/x64/win32comext/propsys/__init__.py:
--------------------------------------------------------------------------------
1 | # this is a python package
2 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/propsys/propsys.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32comext/propsys/propsys.pyd
--------------------------------------------------------------------------------
/lib/x64/win32comext/propsys/test/testpropsys.py:
--------------------------------------------------------------------------------
1 | from win32com.propsys import propsys, pscon
2 | print("propsys was imported (sorry - that is the extent of the tests,")
3 | print("but see the shell folder_view demo, which uses this module)")
4 | # that's all folks!
--------------------------------------------------------------------------------
/lib/x64/win32comext/shell/__init__.py:
--------------------------------------------------------------------------------
1 | # See if we have a special directory for the binaries (for developers)
2 | import win32com
3 | win32com.__PackageSupportBuildPath__(__path__)
4 |
5 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/shell/demos/IActiveDesktop.py:
--------------------------------------------------------------------------------
1 | from win32com.shell import shell, shellcon
2 | import pythoncom
3 | import time
4 | website='http://sourceforge.net/projects/pywin32/'
5 | iad=pythoncom.CoCreateInstance(shell.CLSID_ActiveDesktop, None, pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IActiveDesktop)
6 | opts=iad.GetDesktopItemOptions()
7 | if not (opts['ActiveDesktop'] and opts['EnableComponents']):
8 | print('Warning: Enabling Active Desktop')
9 | opts['ActiveDesktop']=True
10 | opts['EnableComponents']=True
11 | iad.SetDesktopItemOptions(opts)
12 | iad.ApplyChanges(0xffff)
13 | iad=None
14 | ## apparently takes a short while for it to become active
15 | time.sleep(2)
16 | iad=pythoncom.CoCreateInstance(shell.CLSID_ActiveDesktop, None, pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IActiveDesktop)
17 |
18 | cnt=iad.GetDesktopItemCount()
19 | print('Count:', cnt)
20 | for i in range(cnt):
21 | print(iad.GetDesktopItem(i))
22 |
23 | component={
24 | 'ID': cnt+1,
25 | 'ComponentType': shellcon.COMP_TYPE_WEBSITE,
26 | 'CurItemState': shellcon.IS_NORMAL,
27 | 'SubscribedURL': website,
28 | 'Source' : website,
29 | 'FriendlyName' : 'Pywin32 on SF',
30 | 'Checked' : True, ## this controls whether item is currently displayed
31 | 'NoScroll' : False,
32 | 'Dirty': False,
33 | 'Pos': {'Top':69, 'Left':69, 'Height': 400, 'Width': 400, 'zIndex': 1002,
34 | 'CanResize': True, 'CanResizeX': True, 'CanResizeY': True,
35 | 'PreferredLeftPercent': 0, 'PreferredTopPercent': 0},
36 | 'Original': {'Top': 33, 'Left': 304, 'Height': 362, 'Width': 372, 'ItemState': shellcon.IS_NORMAL},
37 | 'Restored': {'Top': 33, 'Left': 304, 'Height': 362, 'Width': 372, 'ItemState': shellcon.IS_NORMAL}
38 | }
39 |
40 |
41 | try:
42 | existing_item=iad.GetDesktopItemBySource(website)
43 | except pythoncom.com_error:
44 | pass
45 | else:
46 | iad.RemoveDesktopItem(existing_item)
47 | iad.ApplyChanges(0xffff)
48 |
49 | iad.AddDesktopItem(component)
50 | iad.ApplyChanges(0xffff) ## need to check which AD_APPLY constants are actually needed
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/shell/demos/IShellLinkDataList.py:
--------------------------------------------------------------------------------
1 | from win32com.shell import shell, shellcon
2 | import pythoncom, win32api, os, sys
3 |
4 | temp_dir=win32api.GetTempPath()
5 | linkname=win32api.GetTempFileName(temp_dir,'cmd')[0]
6 | os.remove(linkname)
7 | linkname+='.lnk'
8 | print('Link name:',linkname)
9 | ish=pythoncom.CoCreateInstance(shell.CLSID_ShellLink, None,
10 | pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IShellLink)
11 | ish.SetPath(os.environ['cOMSPEC'])
12 | ish.SetWorkingDirectory(os.path.split(sys.executable)[0])
13 | ish.SetDescription('shortcut made by python')
14 |
15 | console_props={
16 | 'Signature':shellcon.NT_CONSOLE_PROPS_SIG,
17 | 'InsertMode':True,
18 | 'FullScreen':False, ## True looks like "DOS Mode" from win98!
19 | 'FontFamily':54,
20 | 'CursorSize':75, ## pct of character size
21 | 'ScreenBufferSize':(152, 256),
22 | 'AutoPosition':False,
23 | 'FontSize':(4, 5),
24 | 'FaceName':'',
25 | 'HistoryBufferSize':32,
26 | 'InputBufferSize':0,
27 | 'QuickEdit':True,
28 | 'Font':0, ## 0 should always be present, use win32console.GetNumberOfConsoleFonts() to find how many available
29 | 'FillAttribute':7,
30 | 'PopupFillAttribute':245,
31 | 'WindowSize':(128, 32),
32 | 'WindowOrigin':(0, 0),
33 | 'FontWeight':400,
34 | 'HistoryNoDup':False,
35 | 'NumberOfHistoryBuffers':32,
36 | ## ColorTable copied from a 'normal' console shortcut, with some obvious changes
37 | ## These do not appear to be documented. From experimentation, [0] is background, [7] is foreground text
38 | 'ColorTable':(255, 8388608, 32768, 8421376, 128, 8388736, 32896, 12582912,
39 | 8421504, 16711680, 65280, 16776960, 255, 16711935, 65535, 16777215)
40 | }
41 |
42 | ishdl=ish.QueryInterface(shell.IID_IShellLinkDataList)
43 | ishdl.AddDataBlock(console_props)
44 | ipf=ish.QueryInterface(pythoncom.IID_IPersistFile)
45 | ipf.Save(linkname,1)
46 | os.startfile(linkname)
47 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/shell/demos/IUniformResourceLocator.py:
--------------------------------------------------------------------------------
1 | import pythoncom
2 | from win32com.shell import shell, shellcon
3 | import win32api, os
4 |
5 | class InternetShortcut:
6 | def __init__( self ):
7 | self._base = pythoncom.CoCreateInstance(
8 | shell.CLSID_InternetShortcut, None,
9 | pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IUniformResourceLocator
10 | )
11 | def load( self, filename ):
12 | # Get an IPersist interface
13 | # which allows save/restore of object to/from files
14 | self._base.QueryInterface( pythoncom.IID_IPersistFile ).Load( filename )
15 | def save( self, filename ):
16 | self._base.QueryInterface( pythoncom.IID_IPersistFile ).Save( filename, 1 )
17 | def __getattr__( self, name ):
18 | if name != "_base":
19 | return getattr( self._base, name )
20 |
21 | temp_dir=win32api.GetTempPath()
22 | linkname=win32api.GetTempFileName(temp_dir, 'ish')[0]
23 | print('Link:',linkname)
24 | os.remove(linkname)
25 | linkname+='.url'
26 |
27 | ish=InternetShortcut()
28 | ish.SetURL('http://sourceforge.net/projects/pywin32/')
29 | ish.save(linkname)
30 |
31 | ## IUniformResourceLocator also give access to IPropertySetStorage
32 | pss=ish.QueryInterface(pythoncom.IID_IPropertySetStorage)
33 | ps=pss.Open(shell.FMTID_InternetSite)
34 | property_ids=[(k,v) for k,v in shellcon.__dict__.items() if k.startswith('PID_INTSITE_')]
35 | for pname, pval in property_ids:
36 | print(pname, ps.ReadMultiple((pval,))[0])
37 |
38 | ps=pss.Open(shell.FMTID_Intshcut)
39 | property_ids=[(k,v) for k,v in shellcon.__dict__.items() if k.startswith('PID_IS_')]
40 | for pname, pval in property_ids:
41 | print(pname, ps.ReadMultiple((pval,))[0])
42 |
43 | new_sh=InternetShortcut()
44 | new_sh.load(linkname)
45 | new_sh.InvokeCommand('Open')
46 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/shell/demos/browse_for_folder.py:
--------------------------------------------------------------------------------
1 | # A couple of samples using SHBrowseForFolder
2 |
3 | import sys, os
4 | from win32com.shell import shell, shellcon
5 | import win32gui
6 |
7 | # A callback procedure - called by SHBrowseForFolder
8 | def BrowseCallbackProc(hwnd, msg, lp, data):
9 | if msg== shellcon.BFFM_INITIALIZED:
10 | win32gui.SendMessage(hwnd, shellcon.BFFM_SETSELECTION, 1, data)
11 | elif msg == shellcon.BFFM_SELCHANGED:
12 | # Set the status text of the
13 | # For this message, 'lp' is the address of the PIDL.
14 | pidl = shell.AddressAsPIDL(lp)
15 | try:
16 | path = shell.SHGetPathFromIDList(pidl)
17 | win32gui.SendMessage(hwnd, shellcon.BFFM_SETSTATUSTEXT, 0, path)
18 | except shell.error:
19 | # No path for this PIDL
20 | pass
21 |
22 | if __name__=='__main__':
23 | # Demonstrate a dialog with the cwd selected as the default - this
24 | # must be done via a callback function.
25 | flags = shellcon.BIF_STATUSTEXT
26 | shell.SHBrowseForFolder(0, # parent HWND
27 | None, # root PIDL.
28 | "Default of %s" % os.getcwd(), # title
29 | flags, # flags
30 | BrowseCallbackProc, # callback function
31 | os.getcwd() # 'data' param for the callback
32 | )
33 | # Browse from this directory down only.
34 | # Get the PIDL for the cwd.
35 | desktop = shell.SHGetDesktopFolder()
36 | cb, pidl, extra = desktop.ParseDisplayName(0, None, os.getcwd())
37 | shell.SHBrowseForFolder(0, # parent HWND
38 | pidl, # root PIDL.
39 | "From %s down only" % os.getcwd(), # title
40 | )
41 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/shell/demos/create_link.py:
--------------------------------------------------------------------------------
1 | # link.py
2 | # From a demo by Mark Hammond, corrupted by Mike Fletcher
3 | # (and re-corrupted by Mark Hammond :-)
4 | from win32com.shell import shell
5 | import pythoncom, os
6 |
7 | class PyShortcut:
8 | def __init__( self ):
9 | self._base = pythoncom.CoCreateInstance(
10 | shell.CLSID_ShellLink, None,
11 | pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IShellLink
12 | )
13 | def load( self, filename ):
14 | # Get an IPersist interface
15 | # which allows save/restore of object to/from files
16 | self._base.QueryInterface( pythoncom.IID_IPersistFile ).Load( filename )
17 | def save( self, filename ):
18 | self._base.QueryInterface( pythoncom.IID_IPersistFile ).Save( filename, 0 )
19 | def __getattr__( self, name ):
20 | if name != "_base":
21 | return getattr( self._base, name )
22 |
23 | if __name__=='__main__':
24 | import sys
25 | if len(sys.argv)<2:
26 | print("Usage: %s LinkFile [path [, args[, description[, working_dir]]]]\n\nIf LinkFile does not exist, it will be created using the other args")
27 | sys.exit(1)
28 | file = sys.argv[1]
29 | shortcut = PyShortcut()
30 | if os.path.exists( file ):
31 | # load and dump info from file...
32 | shortcut.load( file )
33 | # now print data...
34 | print('Shortcut in file %s to file:\n\t%s\nArguments:\n\t%s\nDescription:\n\t%s\nWorking Directory:\n\t%s\nItemIDs:\n\t'%(
35 | file,
36 | shortcut.GetPath(shell.SLGP_SHORTPATH)[0],
37 | shortcut.GetArguments(),
38 | shortcut.GetDescription(),
39 | shortcut.GetWorkingDirectory(),
40 | #shortcut.GetIDList(),
41 | ))
42 | else:
43 | if len(sys.argv) <3:
44 | print("Link file does not exist\nYou must supply the path, args, description and working_dir as args")
45 | sys.exit(1)
46 | # create the shortcut using rest of args...
47 | data = map( None, sys.argv[2:], ("SetPath", "SetArguments", "SetDescription", "SetWorkingDirectory") )
48 | for value, function in data:
49 | if value and function:
50 | # call function on each non-null value
51 | getattr( shortcut, function)( value )
52 | shortcut.save( file )
53 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/shell/demos/dump_link.py:
--------------------------------------------------------------------------------
1 | # dump_link.py - dumps information about shell shortcuts
2 | #
3 | import sys, os
4 | from win32com.shell import shell, shellcon
5 | import pythoncom
6 | import glob
7 | from win32com.storagecon import *
8 |
9 | def DumpLink(fname):
10 | shellLink = pythoncom.CoCreateInstance(shell.CLSID_ShellLink, None, pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IShellLink)
11 | persistFile = shellLink.QueryInterface(pythoncom.IID_IPersistFile)
12 | persistFile.Load(fname,STGM_READ)
13 | shellLink.Resolve(0, shell.SLR_ANY_MATCH | shell.SLR_NO_UI)
14 | fname, findData = shellLink.GetPath(0)
15 | print("Filename:", fname, ", UNC=", shellLink.GetPath(shell.SLGP_UNCPRIORITY)[0])
16 | print("Description:", shellLink.GetDescription())
17 | print("Working Directory:", shellLink.GetWorkingDirectory())
18 | print("Icon:", shellLink.GetIconLocation())
19 |
20 | def FavDumper(nothing, path, names):
21 | # called by os.path.walk
22 | for name in names:
23 | print(name, end=' ')
24 | try:
25 | DumpLink(name)
26 | except pythoncom.com_error:
27 | print(" - not a link")
28 |
29 | def DumpFavorites():
30 | favfold = str(shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_FAVORITES))
31 | print("Your favourites are at", favfold)
32 | os.path.walk(favfold, FavDumper, None)
33 |
34 | if __name__=='__main__':
35 | if len(sys.argv)>1:
36 | for fspec in sys.argv[1:]:
37 | files = glob.glob(fspec)
38 | if files:
39 | for file in files:
40 | print(file)
41 | DumpLink(file)
42 | print()
43 | else:
44 | print("Can not find", fspec)
45 | else:
46 | print("Dumping your favorites folder!")
47 | DumpFavorites()
48 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/shell/demos/shellexecuteex.py:
--------------------------------------------------------------------------------
1 | from win32com.shell import shell, shellcon
2 | import win32con
3 |
4 | def ExplorePIDL():
5 | pidl = shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_DESKTOP)
6 | print("The desktop is at", shell.SHGetPathFromIDList(pidl))
7 | shell.ShellExecuteEx(fMask=shellcon.SEE_MASK_NOCLOSEPROCESS,
8 | nShow=win32con.SW_NORMAL,
9 | lpClass="folder",
10 | lpVerb="explore",
11 | lpIDList=pidl)
12 | print("Done!")
13 |
14 | if __name__=='__main__':
15 | ExplorePIDL()
16 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/shell/demos/viewstate.py:
--------------------------------------------------------------------------------
1 | """
2 | Demonstrates how to propagate a folder's view state to all its subfolders
3 | The format of the ColInfo stream is apparently undocumented, but
4 | it can be read raw from one folder and copied to another's view state.
5 | """
6 |
7 | from win32com.shell import shell, shellcon
8 | import pythoncom
9 | import os, sys
10 |
11 | template_folder=os.path.split(sys.executable)[0]
12 | print('Template folder:', template_folder)
13 | template_pidl=shell.SHILCreateFromPath(template_folder,0)[0]
14 | template_pb=shell.SHGetViewStatePropertyBag(template_pidl, "Shell", shellcon.SHGVSPB_FOLDERNODEFAULTS, pythoncom.IID_IPropertyBag)
15 |
16 | # Column info has to be read as a stream
17 | # This may blow up if folder has never been opened in Explorer and has no ColInfo yet
18 | template_iunk=template_pb.Read('ColInfo',pythoncom.VT_UNKNOWN)
19 | template_stream=template_iunk.QueryInterface(pythoncom.IID_IStream)
20 | streamsize=template_stream.Stat()[2]
21 | template_colinfo=template_stream.Read(streamsize)
22 |
23 | def update_colinfo(not_used, dir_name, fnames):
24 | for fname in fnames:
25 | full_fname=os.path.join(dir_name,fname)
26 | if os.path.isdir(full_fname):
27 | print(full_fname)
28 | pidl=shell.SHILCreateFromPath(full_fname,0)[0]
29 | pb=shell.SHGetViewStatePropertyBag(pidl, "Shell", shellcon.SHGVSPB_FOLDERNODEFAULTS, pythoncom.IID_IPropertyBag)
30 | ## not all folders already have column info, and we're replacing it anyway
31 | pb.Write('ColInfo', template_stream)
32 | iunk=pb.Read('ColInfo',pythoncom.VT_UNKNOWN)
33 | s=iunk.QueryInterface(pythoncom.IID_IStream)
34 | s.Write(template_colinfo)
35 | s=None
36 | ## attribute names read from registry, can't find any way to enumerate IPropertyBag
37 | for attr in ('Address','Buttons','Col','Vid','WFlags','FFlags','Sort','SortDir','ShowCmd','FolderType','Mode','Rev'):
38 | pb.Write(attr, template_pb.Read(attr))
39 | pb=None
40 | os.path.walk(template_folder,update_colinfo,None)
41 |
42 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/shell/demos/walk_shell_folders.py:
--------------------------------------------------------------------------------
1 | # A little sample that walks from the desktop into child
2 | # items.
3 | from win32com.shell import shell, shellcon
4 |
5 | def walk(folder, depth=2, indent=""):
6 | try:
7 | pidls = folder.EnumObjects(0, shellcon.SHCONTF_FOLDERS)
8 | except shell.error:
9 | # no items
10 | return
11 | for pidl in pidls:
12 | dn = folder.GetDisplayNameOf(pidl,
13 | shellcon.SHGDN_NORMAL)
14 | print(indent, dn)
15 | if depth:
16 | try:
17 | child = folder.BindToObject(pidl, None,
18 | shell.IID_IShellFolder)
19 | except shell.error:
20 | pass
21 | else:
22 | walk(child, depth-1, indent+" ")
23 |
24 | walk(shell.SHGetDesktopFolder())
25 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/shell/shell.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32comext/shell/shell.pyd
--------------------------------------------------------------------------------
/lib/x64/win32comext/shell/test/testSHFileOperation.py:
--------------------------------------------------------------------------------
1 | from win32com.shell import shell, shellcon
2 | import win32api
3 | import os
4 |
5 | def testSHFileOperation(file_cnt):
6 | temp_dir=os.environ['temp']
7 | orig_fnames=[win32api.GetTempFileName(temp_dir,'sfo')[0] for x in range(file_cnt)]
8 | new_fnames=[os.path.join(temp_dir,'copy of '+os.path.split(orig_fnames[x])[1]) for x in range(file_cnt)]
9 |
10 | pFrom='\0'.join(orig_fnames)
11 | pTo='\0'.join(new_fnames)
12 |
13 | shell.SHFileOperation((0, shellcon.FO_MOVE, pFrom, pTo, shellcon.FOF_MULTIDESTFILES|shellcon.FOF_NOCONFIRMATION))
14 | for fname in orig_fnames:
15 | assert not os.path.isfile(fname)
16 |
17 | for fname in new_fnames:
18 | assert os.path.isfile(fname)
19 | shell.SHFileOperation((0, shellcon.FO_DELETE, fname, None, shellcon.FOF_NOCONFIRMATION|shellcon.FOF_NOERRORUI))
20 |
21 | def testSHNAMEMAPPINGS(file_cnt):
22 | ## attemps to move a set of files to names that already exist, and generated filenames should be returned
23 | ## as a sequence of 2-tuples created from SHNAMEMAPPINGS handle
24 | temp_dir=os.environ['temp']
25 | orig_fnames=[win32api.GetTempFileName(temp_dir,'sfo')[0] for x in range(file_cnt)]
26 | new_fnames=[win32api.GetTempFileName(temp_dir,'sfo')[0] for x in range(file_cnt)]
27 | pFrom='\0'.join(orig_fnames)
28 | pTo='\0'.join(new_fnames)
29 | rc, banyaborted, NameMappings=shell.SHFileOperation((0, shellcon.FO_MOVE, pFrom, pTo,
30 | shellcon.FOF_MULTIDESTFILES|shellcon.FOF_NOCONFIRMATION|shellcon.FOF_RENAMEONCOLLISION|shellcon.FOF_WANTMAPPINGHANDLE))
31 |
32 | for old_fname, new_fname in NameMappings:
33 | print('Old:',old_fname, 'New:', new_fname)
34 | assert len(NameMappings)==file_cnt
35 | testSHFileOperation(10)
36 | testSHFileOperation(1)
37 | testSHNAMEMAPPINGS(5)
38 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/shell/test/testShellFolder.py:
--------------------------------------------------------------------------------
1 | from win32com.shell import shell
2 | from win32com.shell.shellcon import *
3 |
4 | sf = shell.SHGetDesktopFolder()
5 | print("Shell Folder is", sf)
6 |
7 | names = []
8 | for i in sf: # Magically calls EnumObjects
9 | name = sf.GetDisplayNameOf(i, SHGDN_NORMAL)
10 | names.append(name)
11 |
12 | # And get the enumerator manually
13 | enum = sf.EnumObjects(0, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN)
14 | num = 0
15 | for i in enum:
16 | num += 1
17 | if num != len(names):
18 | print("Should have got the same number of names!?")
19 | print("Found", len(names), "items on the desktop")
20 | for name in names:
21 | print(name)
22 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/taskscheduler/__init__.py:
--------------------------------------------------------------------------------
1 | # This is a python package
2 | # __PackageSupportBuildPath__ not needed for distutil based builds,
3 | # but not everyone is there yet.
4 | import win32com
5 | win32com.__PackageSupportBuildPath__(__path__)
6 |
7 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/taskscheduler/taskscheduler.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SublimeText/Pywin32/171ee707b4ce6bce0150db1b638a0703fa38ee27/lib/x64/win32comext/taskscheduler/taskscheduler.pyd
--------------------------------------------------------------------------------
/lib/x64/win32comext/taskscheduler/test/test_addtask.py:
--------------------------------------------------------------------------------
1 | import pythoncom, sys, os, time, win32api
2 | from win32com.taskscheduler import taskscheduler
3 | task_name='test_addtask.job'
4 | ts=pythoncom.CoCreateInstance(taskscheduler.CLSID_CTaskScheduler,None,
5 | pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITaskScheduler)
6 | tasks=ts.Enum()
7 | for task in tasks:
8 | print(task)
9 | if task_name in tasks:
10 | print('Deleting existing task '+task_name)
11 | ts.Delete(task_name)
12 |
13 | t=ts.NewWorkItem(task_name)
14 | t.SetComment('rude comments')
15 | t.SetApplicationName(sys.executable)
16 | t.SetPriority(taskscheduler.REALTIME_PRIORITY_CLASS)
17 | t.SetParameters('-c"import win32ui,time;win32ui.MessageBox(\'hey bubba I am running\');"')
18 | t.SetWorkingDirectory(os.path.dirname(sys.executable))
19 | t.SetCreator('test_addtask.py')
20 | t.SetMaxRunTime(20000) #milliseconds
21 | t.SetFlags(taskscheduler.TASK_FLAG_INTERACTIVE|taskscheduler.TASK_FLAG_RUN_ONLY_IF_LOGGED_ON)
22 | ## |taskscheduler.TASK_FLAG_DELETE_WHEN_DONE) #task self destructs when no more future run times
23 | t.SetAccountInformation(win32api.GetUserName(),None)
24 | ## None is only valid for local system acct or if task flags contain TASK_FLAG_RUN_ONLY_IF_LOGGED_ON
25 | t.SetWorkItemData('some binary garbage')
26 |
27 | run_time = time.localtime(time.time() + 60)
28 | tr_ind, tr=t.CreateTrigger()
29 | tt=tr.GetTrigger()
30 |
31 | ## flags default to TASK_TRIGGER_FLAG_DISABLED (4)
32 | tt.Flags=taskscheduler.TASK_TRIGGER_FLAG_KILL_AT_DURATION_END
33 | tt.BeginYear=int(time.strftime('%Y',run_time))
34 | tt.BeginMonth=int(time.strftime('%m',run_time))
35 | tt.BeginDay=int(time.strftime('%d',run_time))
36 | tt.StartMinute=int(time.strftime('%M',run_time))
37 | tt.StartHour=int(time.strftime('%H',run_time))
38 | tt.MinutesInterval=1
39 | tt.MinutesDuration=5
40 |
41 | tt.TriggerType=taskscheduler.TASK_TIME_TRIGGER_MONTHLYDATE
42 | #months can contain multiples in a bitmask, use 1<<(month_nbr-1)
43 | tt.MonthlyDate_Months=1<<(int(time.strftime('%m',run_time))-1) ## corresponds to TASK_JANUARY..TASK_DECEMBER constants
44 | #days too
45 | tt.MonthlyDate_Days=1<<(int(time.strftime('%d',run_time))-1)
46 | tr.SetTrigger(tt)
47 | print(t.GetTriggerString(tr_ind))
48 |
49 | pf=t.QueryInterface(pythoncom.IID_IPersistFile)
50 | pf.Save(None,1)
51 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/taskscheduler/test/test_addtask_1.py:
--------------------------------------------------------------------------------
1 | import pythoncom, time, win32api
2 | from win32com.taskscheduler import taskscheduler
3 | test_task_name='test_addtask_1.job'
4 |
5 | ts=pythoncom.CoCreateInstance(taskscheduler.CLSID_CTaskScheduler,None,
6 | pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITaskScheduler)
7 |
8 | tasks=ts.Enum()
9 | for task in tasks:
10 | print(task)
11 | if test_task_name in tasks:
12 | print('Deleting existing task '+test_task_name)
13 | ts.Delete(test_task_name)
14 |
15 | new_task=pythoncom.CoCreateInstance(taskscheduler.CLSID_CTask,None,
16 | pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITask)
17 | ts.AddWorkItem(test_task_name,new_task) ## task object is modified in place
18 |
19 | new_task.SetFlags(taskscheduler.TASK_FLAG_INTERACTIVE|taskscheduler.TASK_FLAG_RUN_ONLY_IF_LOGGED_ON)
20 | new_task.SetIdleWait(1,10000)
21 | new_task.SetComment('test task with idle trigger')
22 | new_task.SetApplicationName('c:\\python23\\python.exe')
23 | new_task.SetPriority(taskscheduler.REALTIME_PRIORITY_CLASS)
24 | new_task.SetParameters('-c"import win32ui,time;win32ui.MessageBox(\'why aint you doing no work ?\');"')
25 | new_task.SetWorkingDirectory('c:\\python23')
26 | new_task.SetCreator('test_addtask_1.py')
27 | new_task.SetAccountInformation(win32api.GetUserName(),None)
28 | ## None is only valid for local system acct or if Flags contain TASK_FLAG_RUN_ONLY_IF_LOGGED_ON
29 |
30 |
31 | run_time = time.localtime(time.time() + 30)
32 | end_time = time.localtime(time.time() + 60*60*24)
33 |
34 | tr_ind, tr=new_task.CreateTrigger()
35 | tt=tr.GetTrigger()
36 | tt.TriggerType=taskscheduler.TASK_EVENT_TRIGGER_ON_IDLE
37 | tt.Flags=taskscheduler.TASK_TRIGGER_FLAG_HAS_END_DATE
38 |
39 | tt.BeginYear=int(time.strftime('%Y',run_time))
40 | tt.BeginMonth=int(time.strftime('%m',run_time))
41 | tt.BeginDay=int(time.strftime('%d',run_time))
42 | tt.StartMinute=int(time.strftime('%M',run_time))
43 | tt.StartHour=int(time.strftime('%H',run_time))
44 |
45 | tt.EndYear=int(time.strftime('%Y',end_time))
46 | tt.EndMonth=int(time.strftime('%m',end_time))
47 | tt.EndDay=int(time.strftime('%d',end_time))
48 |
49 | tr.SetTrigger(tt)
50 | print(new_task.GetTriggerString(tr_ind))
51 |
52 | pf=new_task.QueryInterface(pythoncom.IID_IPersistFile)
53 | pf.Save(None,1)
54 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/taskscheduler/test/test_addtask_2.py:
--------------------------------------------------------------------------------
1 | import pythoncom, time, win32api
2 | from win32com.taskscheduler import taskscheduler
3 | task_name='test_addtask_2.job'
4 | ts=pythoncom.CoCreateInstance(taskscheduler.CLSID_CTaskScheduler,None,
5 | pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITaskScheduler)
6 | tasks=ts.Enum()
7 | for task in tasks:
8 | print(task)
9 | if task_name in tasks:
10 | print('Deleting existing task '+task_name)
11 | ts.Delete(task_name)
12 |
13 | t=ts.NewWorkItem(task_name)
14 | t.SetComment('Test a task running as local system acct')
15 | t.SetApplicationName('c:\\python23\\python.exe')
16 | t.SetPriority(taskscheduler.REALTIME_PRIORITY_CLASS)
17 | t.SetParameters('test_localsystem.py')
18 | t.SetWorkingDirectory('c:\\python23')
19 | t.SetCreator('test_addtask_2.py')
20 | t.SetMaxRunTime(20000) #milliseconds
21 | t.SetFlags(taskscheduler.TASK_FLAG_DELETE_WHEN_DONE)
22 | t.SetAccountInformation('',None) ## empty string for account name means to use local system
23 | ## None is only valid for local system acct or if task flags contain TASK_FLAG_RUN_ONLY_IF_LOGGED_ON
24 |
25 | run_time = time.localtime(time.time() + 60)
26 | tr_ind, tr=t.CreateTrigger()
27 |
28 | tt=tr.GetTrigger()
29 | tt.Flags=0 ## flags for a new trigger default to TASK_TRIGGER_FLAG_DISABLED (4), make sure to clear them if not using any
30 | tt.TriggerType=taskscheduler.TASK_TIME_TRIGGER_ONCE
31 | tt.BeginYear=int(time.strftime('%Y',run_time))
32 | tt.BeginMonth=int(time.strftime('%m',run_time))
33 | tt.BeginDay=int(time.strftime('%d',run_time))
34 | tt.StartMinute=int(time.strftime('%M',run_time))
35 | tt.StartHour=int(time.strftime('%H',run_time))
36 |
37 | tr.SetTrigger(tt)
38 | print(t.GetTriggerString(tr_ind))
39 |
40 | pf=t.QueryInterface(pythoncom.IID_IPersistFile)
41 | pf.Save(None,1)
42 |
--------------------------------------------------------------------------------
/lib/x64/win32comext/taskscheduler/test/test_localsystem.py:
--------------------------------------------------------------------------------
1 | f=open('test_localsystem.txt','w')
2 | f.write('I have run\n')
3 | f.close()
4 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | import sys
2 | from os.path import join, dirname
3 | import struct
4 |
5 | assert(sys.platform.startswith('win'))
6 |
7 | ARCH = "x%d" % (8 * struct.calcsize("P"))
8 | PACKAGE_PATH = dirname(__file__)
9 | LIB_PATHS = [
10 | (join(PACKAGE_PATH, "lib", ARCH, "win32"), "win32"),
11 | (join(PACKAGE_PATH, "lib", ARCH, "win32", "lib"), "win32/lib"),
12 | (join(PACKAGE_PATH, "lib", ARCH), "win32com"),
13 | (join(PACKAGE_PATH, "lib", ARCH, "win32comext"), "win32comext")
14 | ]
15 |
16 | for lib in LIB_PATHS:
17 | if lib[0] not in sys.path:
18 | sys.path.append(lib[0])
19 | print("Pywin32: Added '%s'" % lib[1])
20 |
--------------------------------------------------------------------------------