دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
دسته بندی: برنامه نویسی: زبان های برنامه نویسی ویرایش: 2 نویسندگان: Wesley Chun سری: ISBN (شابک) : 0132269937, 9780132269933 ناشر: Prentice Hall سال نشر: 2007 تعداد صفحات: 1137 زبان: English فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود) حجم فایل: 16 مگابایت
در صورت تبدیل فایل کتاب Core Python programming, 2nd Edition به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب برنامه نویسی هسته پایتون ، نسخه 2 نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
Praise for Core Python Programming "The long-awaited second edition of Wesley Chun's Core Python Programming proves to be well worth the wait—its deep and broad coverage and useful exercises will help readers learn and practice good Python." —Alex Martelli, author of Python in a Nutshell and editor of Python Cookbook "There has been lot of good buzz around Wesley Chun's Core Python Programming. It turns out that all the buzz is well earned. I think this is the best book currently available for learning Python. I would recommend Chun's book over Learning Python (O'Reilly), Programming Python (O'Reilly), or The Quick Python Book (Manning)." —David Mertz, Ph.D., IBM DeveloperWorks® "I have been doing a lot of research [on] Python for the past year and have seen a number of positive reviews of your book. The sentiment expressed confirms the opinion that Core Python Programming is now considered the standard introductory text." —Richard Ozaki, Lockheed Martin "Finally, a book good enough to be both a textbook and a reference on the Python language now exists." —Michael Baxter, Linux Journal "Very well written. It is the clearest, friendliest book I have come across yet for explaining Python, and putting it in a wider context. It does not presume a large amount of other experience. It does go into some important Python topics carefully and in depth. Unlike too many beginner books, it never condescends or tortures the reader with childish hide-and-seek prose games. [It] sticks to gaining a solid grasp of Python syntax and structure." —http://python.org bookstore Web site "[If ] I could only own one Python book, it would be Core Python Programming by Wesley Chun. This book manages to cover more topics in more depth than Learning Python but includes it all in one book that also more than adequately covers the core language. [If] you are in the market for just one book about Python, I recommend this book. You will enjoy reading it, including its wry programmer's wit. More importantly, you will learn Python. Even more importantly, you will find it invaluable in helping you in your day-to-day Python programming life. Well done, Mr. Chun!" —Ron Stephens, Python Learning Foundation "I think the best language for beginners is Python, without a doubt. My favorite book is Core Python Programming." —s003apr, MP3Car.com Forums "Personally, I really like Python. It's simple to learn, completely intuitive, amazingly flexible, and pretty darned fast. Python has only just started to claim mindshare in the Windows world, but look for it to start gaining lots of support as people discover it. To learn Python, I'd start with Core Python Programming by Wesley Chun." —Bill Boswell, MCSE, Microsoft Certified Professional Magazine Online "If you learn well from books, I suggest Core Python Programming. It is by far the best I've found. I'm a Python newbie as well and in three months time I've been able to implement Python in projects at work (automating MSOffice, SQL DB stuff, etc.)." —ptonman, Dev Shed Forums "Python is simply a beautiful language. It's easy to learn, it's cross-platform, and it works. It has achieved many of the technical goals that Java strives for. A one-sentence description of Python would be: 'All other languages appear to have evolved over time--but Python was designed.' And it was designed well. Unfortunately, there aren't a large number of books for Python. The best one I've run across so far is Core Python Programming." —Chris Timmons, C. R. Timmons Consulting "If you like the Prentice Hall Core series, another good full-blown treatment to consider would be Core Python Programming. It addresses in elaborate concrete detail many practical topics that get little, if any, coverage in other books." —Mitchell L Model, MLM Consulting "Core Python Programming is an amazingly easy read! The liberal use of examples helps clarify some of the more subtle points of the language. And the comparisons to languages with which I'm already familiar (C/C++/Java) get you programming in record speed." —Michael Santos, Ph.D., Green Hills Software The Complete Developer's Guide to Python New to Python? The definitive guide to Python development for experienced programmers Covers core language features thoroughly, including those found in the latest Python releases—learn more than just the syntax! Learn advanced topics such as regular expressions, networking, multithreading, GUI, Web/CGI, and Python extensions Includes brand-new material on databases, Internet clients, Java/Jython, and Microsoft Office, plus Python 2.6 and 3 Presents hundreds of code snippets, interactive examples, and practical exercises to strengthen your Python skills Python is an agile, robust, expressive, fully object-oriented, extensible, and scalable programming language. It combines the power of compiled languages with the simplicity and rapid development of scripting languages. In Core Python Programming, Second Edition, leading Python developer and trainer Wesley Chun helps you learn Python quickly and comprehensively so that you can immediately succeed with any Python project. Using practical code examples, Chun introduces all the fundamentals of Python programming: syntax, objects and memory management, data types, operators, files and I/O, functions, generators, error handling and exceptions, loops, iterators, functional programming, object-oriented programming and more. After you learn the core fundamentals of Python, he shows you what you can do with your new skills, delving into advanced topics, such as regular expressions, networking programming with sockets, multithreading, GUI development, Web/CGI programming and extending Python in C. This edition reflects major enhancements in the Python 2.x series, including 2.6 and tips for migrating to 3. It contains new chapters on database and Internet client programming, plus coverage of many new topics, including new-style classes, Java and Jython, Microsoft Office (Win32 COM Client) programming, and much more. Learn professional Python style, best practices, and good programming habits Gain a deep understanding of Python's objects and memory model as well as its OOP features, including those found in Python's new-style classes Build more effective Web, CGI, Internet, and network and other client/server applications Learn how to develop your own GUI applications using Tkinter and other toolkits available for Python Improve the performance of your Python applications by writing extensions in C and other languages, or enhance I/O-bound applications by using multithreading Learn about Python's database API and how to use a variety of database systems with Python, including MySQL, Postgres, and SQLite Features appendices on Python 2.6 & 3, including tips on migrating to the next generation! Core Python Programming delivers Systematic, expert coverage of Python's core features Powerful insights for developing complex applications Easy-to-use tables and charts detailing Python modules, operators, functions, and methods Dozens of professional-quality code examples, from quick snippets to full-fledged applications
Contents......Page 10
Preface......Page 24
Acknowledgments......Page 36
PART I: CORE PYTHON......Page 39
1 WELCOME TO PYTHON!......Page 41
1.1 What Is Python?......Page 42
1.3 Features......Page 43
1.4 Downloading and Installing Python......Page 48
1.5 Running Python......Page 50
1.6 Python Documentation......Page 59
1.7 Comparing Python......Page 60
1.8 Other Implementations......Page 63
1.9 Exercises......Page 64
2 GETTING STARTED......Page 67
2.1 Program Output, the print Statement, and \"Hello World!\"......Page 69
2.2 Program Input and the raw_input ( ) Built-in Function......Page 70
2.4 Operators......Page 72
2.5 Variables and Assignment......Page 74
2.6 Numbers......Page 75
2.7 Strings......Page 76
2.9 Dictionaries......Page 77
2.11 if Statement......Page 78
2.12 while Loop......Page 79
2.13 for Loop and the range ( ) Built-in Function......Page 80
2.14 List Comprehensions......Page 82
2.15 Files and the open ( ) and file ( ) Built-in Functions......Page 83
2.16 Errors and Exceptions......Page 84
2.17 Functions......Page 85
2.18 Classes......Page 87
2.19 Modules......Page 89
2.20 Useful Functions......Page 91
2.21 Exercises......Page 92
3 PYTHON BASICS......Page 97
3.1 Statements and Syntax......Page 98
3.2 Variable Assignment......Page 101
3.3 Identifiers......Page 104
3.4 Basic Style Guidelines......Page 106
3.5 Memory Management......Page 112
3.6 First Python Programs......Page 116
3.7 Related Modules/Developer Tools......Page 121
3.8 Exercises......Page 122
4 PYTHON OBJECTS......Page 125
4.1 Python Objects......Page 126
4.3 Other Built-in Types......Page 128
4.4 Internal Types......Page 130
4.5 Standard Type Operators......Page 133
4.6 Standard Type Built-in Functions......Page 138
4.8 Categorizing the Standard Types......Page 148
4.9 Unsupported Types......Page 153
4.10 Exercises......Page 154
5 NUMBERS......Page 157
5.1 Introduction to Numbers......Page 158
5.2 Integers......Page 159
5.3 Double Precision Floating Point Numbers......Page 162
5.4 Complex Numbers......Page 163
5.5 Operators......Page 164
5.6 Built-in and Factory Functions......Page 173
5.7 Other Numeric Types......Page 182
5.8 Related Modules......Page 185
5.9 Exercises......Page 188
6 SEQUENCES: STRINGS, LISTS, AND TUPLES......Page 193
6.1 Sequences......Page 195
6.2 Strings......Page 205
6.3 Strings and Operators......Page 207
6.4 String-Only Operators......Page 215
6.5 Built-in Functions......Page 221
6.6 String Built-in Methods......Page 225
6.7 Special Features of Strings......Page 229
6.8 Unicode......Page 234
6.9 Related Modules......Page 243
6.10 Summary of String Highlights......Page 245
6.11 Lists......Page 246
6.12 Operators......Page 248
6.13 Built-in Functions......Page 253
6.14 List Type Built-in Methods......Page 257
6.15 Special Features of Lists......Page 261
6.16 Tuples......Page 269
6.17 Tuple Operators and Built-in Functions......Page 270
6.18 Special Features of Tuples......Page 272
6.19 Related Modules......Page 276
6.20 *Copying Python Objects and Shallow and Deep Copies......Page 277
6.21 Summary of Sequences......Page 280
6.22 Exercises......Page 283
7 MAPPING AND SET TYPES......Page 289
7.1 Mapping Type: Dictionaries......Page 290
7.2 Mapping Type Operators......Page 295
7.3 Mapping Type Built-in and Factory Functions......Page 297
7.4 Mapping Type Built-in Methods......Page 302
7.5 Dictionary Keys......Page 305
7.6 Set Types......Page 310
7.7 Set Type Operators......Page 313
7.8 Built-in Functions......Page 317
7.9 Set Type Built-in Methods......Page 318
7.11 Related Modules......Page 320
7.12 Exercises......Page 322
8 CONDITIONALS AND LOOPS......Page 327
8.1 if Statement......Page 328
8.2 else Statement......Page 329
8.3 elif (aka else-if) Statement......Page 331
8.4 Conditional Expressions (aka \"the Ternary Operator\")......Page 332
8.5 while Statement......Page 333
8.6 for Statement......Page 335
8.7 break Statement......Page 341
8.8 continue Statement......Page 342
8.9 pass Statement......Page 343
8.10 else Statement . . . Take Two......Page 344
8.11 Iterators and the iter ( ) Function......Page 346
8.12 List Comprehensions......Page 350
8.13 Generator Expressions......Page 352
8.15 Exercises......Page 357
9 FILES AND INPUT/OUTPUT......Page 361
9.1 File Objects......Page 362
9.2 File Built-in Functions [open ( ) and file ( )]......Page 363
9.3 File Built-in Methods......Page 366
9.4 File Built-in Attributes......Page 373
9.5 Standard Files......Page 374
9.6 Command-Line Arguments......Page 375
9.7 File System......Page 376
9.9 Persistent Storage Modules......Page 385
9.10 Related Modules......Page 388
9.11 Exercises......Page 390
10 ERRORS AND EXCEPTIONS......Page 395
10.1 What Are Exceptions?......Page 397
10.2 Exceptions in Python......Page 398
10.3 Detecting and Handling Exceptions......Page 401
10.4 Context Management......Page 419
10.6 Raising Exceptions......Page 423
10.7 Assertions......Page 426
10.8 Standard Exceptions......Page 428
10.9 *Creating Exceptions......Page 431
10.10 Why Exceptions (Now)?......Page 438
10.11 Why Exceptions at All?......Page 439
10.12 Exceptions and the sys Module......Page 440
10.13 Related Modules......Page 441
10.14 Exercises......Page 442
11 FUNCTIONS AND FUNCTIONAL PROGRAMMING......Page 445
11.1 What Are Functions?......Page 446
11.2 Calling Functions......Page 449
11.3 Creating Functions......Page 455
11.4 Passing Functions......Page 463
11.5 Formal Arguments......Page 465
11.6 Variable-Length Arguments......Page 470
11.7 Functional Programming......Page 476
11.8 Variable Scope......Page 490
11.9 *Recursion......Page 503
11.10 Generators......Page 504
11.11 Exercises......Page 508
12 MODULES......Page 513
12.1 What Are Modules?......Page 514
12.2 Modules and Files......Page 515
12.3 Namespaces......Page 517
12.4 Importing Modules......Page 521
12.5 Features of Module Import......Page 523
12.6 Module Built-in Functions......Page 528
12.7 Packages......Page 530
12.8 Other Features of Modules......Page 533
12.9 Related Modules......Page 537
12.10 Exercises......Page 538
13 OBJECT-ORIENTED PROGRAMMING......Page 541
13.1 Introduction......Page 543
13.2 Object-Oriented Programming......Page 551
13.3 Classes......Page 555
13.4 Class Attributes......Page 557
13.5 Instances......Page 563
13.6 Instance Attributes......Page 568
13.7 Binding and Method Invocation......Page 577
13.8 Static Methods and Class Methods......Page 579
13.9 Composition......Page 581
13.10 Subclassing and Derivation......Page 582
13.11 Inheritance......Page 584
13.12 Built-in Functions for Classes, Instances, and Other Objects......Page 595
13.13 Customizing Classes with Special Methods......Page 601
13.14 Privacy......Page 622
13.15 *Delegation......Page 624
13.16 Advanced Features of New-Style Classes (Python 2.2+)......Page 632
13.17 Related Modules and Documentation......Page 652
13.18 Exercises......Page 655
14 EXECUTION ENVIRONMENT......Page 663
14.1 Callable Objects......Page 665
14.2 Code Objects......Page 672
14.3 Executable Object Statements and Built-in Functions......Page 673
14.4 Executing Other (Python) Programs......Page 686
14.5 Executing Other (Non-Python) Programs......Page 690
14.7 Terminating Execution......Page 700
14.8 Miscellaneous Operating System Interface......Page 703
14.10 Exercises......Page 705
PART II: ADVANCED TOPICS......Page 707
15 REGULAR EXPRESSIONS......Page 709
15.1 Introduction/Motivation......Page 710
15.2 Special Symbols and Characters......Page 713
15.3 REs and Python......Page 720
15.4 Regular Expressions Example......Page 735
15.5 Exercises......Page 742
16 NETWORK PROGRAMMING......Page 747
16.1 Introduction......Page 748
16.2 Sockets: Communication Endpoints......Page 752
16.3 Network Programming in Python......Page 755
16.4 *SocketServer Module......Page 769
16.5 *Introduction to the Twisted Framework......Page 774
16.6 Related Modules......Page 778
16.7 Exercises......Page 779
17 INTERNET CLIENT PROGRAMMING......Page 783
17.1 What Are Internet Clients?......Page 784
17.2 Transferring Files......Page 785
17.3 Network News......Page 793
17.4 Electronic Mail......Page 803
17.5 Related Modules......Page 815
17.6 Exercises......Page 816
18 MULTITHREADED PROGRAMMING......Page 823
18.1 Introduction/Motivation......Page 824
18.2 Threads and Processes......Page 826
18.3 Python, Threads, and the Global Interpreter Lock......Page 827
18.4 thread Module......Page 832
18.5 threading Module......Page 837
18.7 Exercises......Page 851
19 GUI PROGRAMMING......Page 855
19.1 Introduction......Page 856
19.2 Tkinter and Python Programming......Page 858
19.3 Tkinter Examples......Page 863
19.4 Brief Tour of Other GUIs......Page 877
19.5 Related Modules and Other GUIs......Page 885
19.6 Exercises......Page 888
20 WEB PROGRAMMING......Page 891
20.1 Introduction......Page 892
20.2 Web Surfing with Python: Creating Simple Web Clients......Page 896
20.3 Advanced Web Clients......Page 906
20.4 CGI: Helping Web Servers Process Client Data......Page 912
20.5 Building CGI Applications......Page 915
20.6 Using Unicode with CGI......Page 929
20.7 Advanced CGI......Page 931
20.8 Web (HTTP) Servers......Page 943
20.9 Related Modules......Page 946
20.10 Exercises......Page 950
21 DATABASE PROGRAMMING......Page 955
21.1 Introduction......Page 956
21.2 Python Database Application Programmer\'s Interface (DB-API)......Page 961
21.3 Object-Relational Managers (ORMs)......Page 983
21.4 Related Modules......Page 995
21.5 Exercises......Page 997
22 EXTENDING PYTHON......Page 999
22.1 Introduction/Motivation......Page 1000
22.2 Extending Python by Writing Extensions......Page 1002
22.3 Related Topics......Page 1018
22.4 Exercises......Page 1019
23 MISCELLANEOUS......Page 1021
23.1 Web Services......Page 1022
23.2 Programming Microsoft Office with Win32 COM......Page 1026
23.3 Python and Java Programming with Jython......Page 1039
23.4 Exercises......Page 1043
Appendix A: Answers to Selected Exercises......Page 1048
Appendix B: Reference Tables......Page 1058
Appendix C: Python 3: The Evolution Of A Programming Language......Page 1086
Appendix D: Migrating to Python 3 Starts with 2.6......Page 1096
A......Page 1108
C......Page 1110
D......Page 1112
E......Page 1114
F......Page 1116
H......Page 1118
I......Page 1119
L......Page 1121
M......Page 1122
N......Page 1124
O......Page 1125
P......Page 1127
R......Page 1128
S......Page 1129
T......Page 1133
U......Page 1134
W......Page 1135
Z......Page 1136