第一范文网 - 专业文章范例文档资料分享平台

PythonWindowsTutorial

来源:用户分享 时间:2025/6/1 15:06:49 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

Using Python To Harness Windows

4.9 Debugging

Currently stepping through, at ?print z? line in right pane. ? ? ? ? ?

Conditional breakpoints breakpoints watch list Stack

Code Browser if you wish!

Page 13 of 71

6795.doc

Using Python To Harness Windows

4.10 Grep

…leads to…

Click any line to go to source file.

4.11 Conclusion

? ? ?

evolving fast, extensible

not too shabby for a free editor!

Page 14 of 71

6795.doc

Using Python To Harness Windows

Part 2: - COM

Page 15 of 71

6795.doc

Using Python To Harness Windows

5 Introduction to Python and COM

5.1 What’s COM about anyway?

COM ? ? ? ? ?

Most big apps expose their functionality through COM servers. You can borrow their functionality for your own programs.

Programming for Windows is like being in a sea of objects all waiting to help you.

Discuss: Windows – the most open Operating System?

The Registry: where COM objects find out about each other. (Not just a big INI file!)

Lets objects in different languages talk to each other Lets objects in different processes talk to each other Lets objects on different machines talk to each other Hides the details from the programmer No performance penalties compared to DLLs

5.2 A Minimal COM Client

Connect to Excel and insert some data >>> from win32com.client import Dispatch >>> xlApp = Dispatch(\>>> xlApp.Visible = 1 >>> xlApp.Workbooks.Add() >>> xlSheet.Cells(1,1).Value = 'What shall be the number of thy counting?' >>> xlSheet.Cells(2,1).Value = 3 Remember to install your Office Object Model Documentation!

Page 16 of 71

6795.doc

搜索更多关于: PythonWindowsTutorial 的文档
PythonWindowsTutorial.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c8kzf631ezc5v45r563hb_4.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top