Beginning Python:Using Python 2.6 and Python 3.1.pdf
《Beginning Python:Using Python 2.6 and Python 3.1.pdf》由会员分享,可在线阅读,更多相关《Beginning Python:Using Python 2.6 and Python 3.1.pdf(628页珍藏版)》请在文库网上搜索。
1、Wrox Programmer to ProgrammerJoin the discussion Using Python 2.6 and Python 3.1BeginningPythonJames Payne Get more out of Programmer to ProgrammerInteractTake an active role online by participating in our P2P forums Wrox Online LibraryHundreds of our books are available online through BWrox Blox Do
2、wnload short informational pieces and code to keep you up to date and out of trouble!Join the CommunitySign up for our free monthly newsletter at BrowseReady for more Wrox? We have books and e-books available on .NET, SQL Server, Java, XML, Visual Basic, C#/ C+, and much more!Contact Us. We always l
3、ike to get feedback from our readers. Have a book idea? Need community support? Let us know by e-mailing wrox- Beginning Python: Using Python 2.6 and Python 3.1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xxviiPart I: Dipping Your Toe into
4、 PythonChapter 1: Programming Basics and Strings . . . . . . . . . . . . . . . . . . . . . . . . . . 3Chapter 2: Numbers and Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Chapter 3: Variables Names for Values . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Part II
5、: Python Language and the Standard LibraryChapter 4: Making Decisions . 51Chapter 5: Functions . 71Chapter 6: Classes and Objects . 93Chapter 7: Organizing Programs . 111Chapter 8: Files and Directories . 127Chapter 9: Other Features of the Language . 143Chapter 10: Building a Module . 157Chapter 11
6、: Text Processing . 189Part III: Putting Python to WorkChapter 12: Testing . 207Chapter 13: Writing a GUI with Python . 227Chapter 14: Accessing Databases. 239Chapter 15: Using Python for XML . 265Chapter 16: Network Programming . 287Continues Chapter 17: Extension Programming with C . 337Chapter 18
7、: Numerical Programming . 367Chapter 19: An Introduction to Django . 387Chapter 20: Web Applications and Web Services . 407Chapter 21: Integrating Java with Python . 481Part IV: AppendicesAppendix A: Answers to the Exercises . 515Appendix B: Online Resources. 549Appendix C: Whats New in Python 3.1 .
8、 553Appendix D: Glossary . 559Index . 569 Beginning Python BeginningPythonUsing Python 2.6 and Python 3.1James PayneWiley Publishing, Inc. Beginning Python: Using Python 2.6 and Python 3.1 Published byWiley Publishing, Inc.10475 Crosspoint BoulevardIndianapolis, IN Copyright 2010 by Wiley Publishing
9、, Inc., Indianapolis, IndianaPublished simultaneously in CanadaISBN: 978-0-470-41463-7Manufactured in the United States of America10 9 8 7 6 5 4 3 2 1No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photoc
10、opying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosew
11、ood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http:/ of Liability/Disclaimer
12、of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created
13、or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is
14、required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising here from. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does no
15、t mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is rea
16、d.For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.Wiley also publishes its books in a variety of electronic formats. Some content that
17、appears in print may not be available in electronic books.Library of Congress Control Number: 2009936814Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affilia
18、tes, in the United States and other countries, and may not be used without written permission. Python is a registered trademark of Python Software Foundation. All other trademarks are the property of their respective owners. Wiley Publishing, Inc. is not associated with any product or vendor mention
19、ed in this book. To my patient and loving wife, Whitney, who believed in me before I did. And to my parents, Ronnie and Sharon Payne, who raised me to believe I could do anything I put my mind to, even when I told them I wanted to be Santa Claus. For my brother, Ron, who read my work even when it wa
20、s bad, Dorjan, Eric, Clem, and Nick because they know things about me and will tell them if I dont include them. About the AuthorJames Payne (Margate, FL) is Editor-in-Chief of Developer Shed, Inc. and has been writing and programming since the age of seven years old. Proficient in many languages, h
21、e has written over 400 articles covering practically every major programming language. As a contractor, he develops proprietary software for the financial industry using Python and likes to dabble in Django in his spare time. CreditsExecutive EditorCarol LongProject EditorEd ConnorTechnical EditorCh
22、ris McAvoyProduction EditorsAmy Weintraub and Tim TateCopy EditorKim CoferEditorial DirectorRobyn B. SieskyEditorial ManagerMary Beth Wakefield Marketing ManagerDavid MayhewProduction ManagerTim TateVice President and Executive Group PublisherRichard SwadleyVice President and Executive PublisherBarr
23、y PruettAssociate PublisherJim MinatelProject Coordinator, CoverLynsey StanfordProofreadersScott Klemp and Kristy Eldredge, Word OneIndexerRon StraussCover Image AcknowledgmentsI would like to acknowledge the gang at Developer Shed: Jack and Jay Kim, whose constant hatred is an inspiration, Charles
24、Fagundes, who made me an editor and not just a writer, Keith Lee, who provided coding support, and a special thanks to Jenny Ruggieri, who got me the job that got me this book. Lastly, Id like to thank all of the people that worked on the previous editions of this book for laying the groundwork, and
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
60 文币 0人已下载
下载 | 加入VIP,免费下载 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Beginning Python:Using Python 2.6 and 3.1 Using
链接地址:https://www.wenkunet.com/p-6195868.html