Introduction to Python Programming and developing GUI applications with PyQT

所需积分/C币:9 2018-12-19 09:31:58 20MB PDF
收藏 收藏
举报

Introduction to Python Programming and developing GUI applications with PyQT.pdf 作者B.M. Harwani © 2012 Course Technology, a part of Cengage Learning. ISBN-13: 978-1-4354-6097-3 ISBN-10: 1-4354-6097-9 eISBN-10: 1-4354-6098-7 B.M. Harwani is founder and owner of Microchip Computer Education (MCE), bas
For permission to use material from this text or product, submit all requests online at www.cengage.com/permissions Further permissions questions can be emailed to permissionrequest@cengage.com Python and the python logos are trademarks or registered trademarks of the python Software foundation All other trademarks are the property of their respective owners All images c Cengage Learning unless otherwise noted Library of Congress Control Number: 2011936040 ISBN-13:978-1-4354-6097-3 ISBN-10:1-4354-6097-9 iSbN-10:1-4354-6098-7 Course Technology, a part of Cengage Learning 20 Channel center street Boston MA 02210 USA Cengage Learning is a leading provider of customized learning solutions with office locations around the globe including Singapore the United Kingdom, australia, mexico, Brazil and Japan. Locate your local office at: international cengage. com/ region Cengage Learning products are represented in Canada by Nelson Education Ltd Foryourlifelonglearningsolutionsvisitcourseptr.com Visit our corporate website at cengage. com Printed in the united states of america 1234567131211 Dedication This book is dedicated to my mother, Mrs. Nita Harwani, and american inventor and entrepreneur, the late steve Jobs. My mother is next to God for me, and whatever i am today is because of the moral values taught by her. Steve Jobs, Co-founder chairman and chief executive officer of App/e Inc, has been and will always be a great inspiration for me Acknowledgments I owe a debt of gratitude to mitzi Koontz, senior Acquisitions editor at Course Technology, Cengage Learning for her initial acceptance and giving me an opportunity to create this work. i am highly grateful to the whole team at Cengage for their constant cooperation and contribution to create this book I must thank Keith Davenport the technical editor for his excellent detailed review of the work and the many helpful comments and suggestions he made. He offered a significant amount of feedback that helped to improve the book's content. He played a vital role in improving its structure and the quality of information Special thanks to Gene redding the copy editor for first class structural and language editing. I appreciate his efforts in enhancing the contents of the book and giving it a polished look Big and ongoing thanks to Kim Ben bow, my project editor, for doing a great job and her sincere efforts to get the book published on time a great big th lank you goes to the production staff who worked tirelessly to produce this book. I enjoyed working with each of you I am also thankful to my family(my small world): Anushka(my wife)and my two little darlings, Chirag and Naman for always inspiring me and giving me the courage to work harder I should not forget to thank my dear students who have been good teachers for me, as they help me to understand the basic problems they face with a subject, which enables me to directly teach those topics. Their endlessly interesting queries help me to write books with a practica approach. About the author B.M. Harwani is founder and owner of Microchip Computer Education (MCE, based in Ajmer, India, which provides computer education on al programming and web developing platforms. Harwani graduated with a BE in computer engineering from the University of Pune and also has a C Level (master's degree)in computer technology from dOEACCI Government of India. Being involved in the teaching field for over 16 years, he has developed the art of explaining even the most com plicated technical topics in a straightforward and easily understandable fashion. He has written several books on various subjects that include ]SP, ]SF e]B, PhP NET, Joomla, jQuery, and smartphones. His latest books include beginning Web Development for Smartphones (shroff, 2011), Core Data iOs Essentials(Packt Publishing, 2011)and blogging with WordPress 3 for Beginners(createSpace, 2011). He also writes articles on a variety of computer subjects, which can be seen on a number of websites. To find out morevisithisblogathttp://bmharwani.com/blog Copyright 2 Acknowledgments 4 about the author 5 Contens 6 Intrduction li Chapter 1 python and its Features 15 1.1 Python 16 1.2 Installing Py thon 19 1.3 Interacting with Py thon 24 1.4 Writing Your first Python Program 27 1.5 Data Types in Python 29 1.6 Basic Elements in a Program 31 1.7 Comments 32 1.8 Continuation lines 33 1.9 Printing 34 Summary 37 Chapter 2 Getting Wet in Python 38 2. 1 Performing Arithmetic Operations 39 2.2 Bitwise Operations 49 2.3 Complex Numbers 52 2.4 Making decisions 54 2.5 Logical operators 58 2. 6 Chaining Comparison Operators 60 2.7 Loops 63 Summary 73 Chapter 3 Sequences 74 3.1 Sequences 75 3.2 Strings 76 3.3 Lists 90 3. 4 Tuples 96 3.5Sets100 Summary 103 Chapter 4 Functions and Modules 104 4.1 Functions 105 4.2 Function Attributes 115 4.3 Recursion 117 4.4 Iterators 120 4.5 Modules 124 Summary 129 Chapter 5 Classes 130 5.1 The Class statement 131 5.2 Class methods 139 5.3 Static methods 141 5.4 Garbage Collection 144 5⊥ nheritance146 5.6 Multilevel Inheritance 153 5. 7 Operator Overloading 163 5.8 Descriptors 168 Summary 172 Chapter 6 File handling 173 6. 1 Exception Handling 186 6.2 Raising an Exception 19 Summary 193 Chapter 7 PyQt 194 7.1 Qt Toolkit 196 7.2PyQt197 7.3 Installing PyQt 198 7. 4 Window and Dialogs 201 7.5 Creating a GUI Application with Code 202 7.6 Using Qt Designer 205 7. 7 Understanding Fundamental Widgets 220 7.8 Event handling in PyQt 223 7.9 First Application in Qt Designer 224 7. 10 Using Custom Slots 231 7. 11 Converting data Types 234 7.12 Defining Buddies 237 Summary 242 Chapter 8 Basic Widgets 243 8. 1 Using Radio Buttons 244 8.2 Using Checkboxes 249 8.3 Entering Integer and Float values using a Spin box 256 8. 4 Scrollbars and sliders 260 8.5 Working with a list Widget 266 Summary 274 Chapter 9 Advanced Widgets 275 9. 1 Displaying System Clock Time in LCD Format 276 9. 2 Working with calendar and displaying dates in Different Formats 280 9.3 Using Combo Box 286 9. 4 Displaying a Table 291 9.5 Displaying Web Pages 295 9.6 Displaying Graphics 299 Summary 303 hapter 10 Menus and toolbars 304 10. 1 Understanding Menus 305 10. 2 Creating a toolbar 312 10.3 Dock Widget 319 10.4 Tab Widget 325 10. 5 Converting a tab Widget 332 Summary 337 Chapter 11 Multiple documents and layouts 338 11. 1 Multiple-document Inter face 339 11.2 Layouts 347 Summary 355 Chapter 12 Database Handling 356 12.1 Why My SQL? 357 12. 2 Creating a Database 361 12.3 Database Maintenance Through Console-Based Programs 365 12. 4 Database Maintenance Through GUi Programs 374 Summary 387 Index 388

...展开详情
试读 127P Introduction to Python Programming and developing GUI applications with PyQT
立即下载 低至0.43元/次 身份认证VIP会员低至7折
    抢沙发
    一个资源只可评论一次,评论内容不能少于5个字
    关注 私信 TA的资源
    上传资源赚积分,得勋章
    最新推荐
    Introduction to Python Programming and developing GUI applications with PyQT 9积分/C币 立即下载
    1/127
    Introduction to Python Programming and developing GUI applications with PyQT第1页
    Introduction to Python Programming and developing GUI applications with PyQT第2页
    Introduction to Python Programming and developing GUI applications with PyQT第3页
    Introduction to Python Programming and developing GUI applications with PyQT第4页
    Introduction to Python Programming and developing GUI applications with PyQT第5页
    Introduction to Python Programming and developing GUI applications with PyQT第6页
    Introduction to Python Programming and developing GUI applications with PyQT第7页
    Introduction to Python Programming and developing GUI applications with PyQT第8页
    Introduction to Python Programming and developing GUI applications with PyQT第9页
    Introduction to Python Programming and developing GUI applications with PyQT第10页
    Introduction to Python Programming and developing GUI applications with PyQT第11页
    Introduction to Python Programming and developing GUI applications with PyQT第12页
    Introduction to Python Programming and developing GUI applications with PyQT第13页
    Introduction to Python Programming and developing GUI applications with PyQT第14页
    Introduction to Python Programming and developing GUI applications with PyQT第15页
    Introduction to Python Programming and developing GUI applications with PyQT第16页
    Introduction to Python Programming and developing GUI applications with PyQT第17页
    Introduction to Python Programming and developing GUI applications with PyQT第18页
    Introduction to Python Programming and developing GUI applications with PyQT第19页
    Introduction to Python Programming and developing GUI applications with PyQT第20页

    试读已结束,剩余107页未读...

    9积分/C币 立即下载 >