چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

Beginning Python : From Novice to Professional

Hetland, Magnus Lie

قیمت نهایی

۴۴٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۰٪ تخفیف
  • تخفیف زمان‌دار−۵٬۰۰۰ تومان

۵٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

نویسنده
Hetland, Magnus Lie
سال انتشار
۲۰۱۷
فرمت
PDF
زبان
انگلیسی
حجم فایل
۶٫۳ مگابایت
شابک
9781280656583، 9781430200727، 9781484200285، 9781484200292، 9781590595190، 9786610656585، 1280656581، 1430200723، 1484200284، 1484200292، 159059519X، 6610656584

دربارهٔ کتاب

Gain a fundamental understanding of Python’s syntax and features with this up–to–date introduction and practical reference. Covering a wide array of Python–related programming topics, including addressing language internals, database integration, network programming, and web services, you’ll be guided by sound development principles. Ten accompanying projects will ensure you can get your hands dirty in no time. Updated to reflect the latest in Python programming paradigms and several of the most crucial features found in Python 3, __Beginning Python__ also covers advanced topics such as extending Python and packaging/distributing Python applications.**What You'll Learn** * Become a proficient Python programmer by following along with a friendly, practical guide to the language’s key features * Write code faster by learning how to take advantage of advanced features such as magic methods, exceptions, and abstraction * Gain insight into modern Python programming paradigms including testing, documentation, packaging, and distribution * Learn by following along with ten interesting projects, including a P2P file–sharing application, chat client, video game, remote text editor, and more **Who This Book Is For** Programmers, novice and otherwise, seeking a comprehensive introduction to the Python programming language. Contents at a Glance......Page 5 Contents......Page 7 About the Author......Page 25 About the Technical Reviewer......Page 26 Preface......Page 27 Introduction......Page 29 The Interactive Interpreter......Page 31 Algo . . . What?......Page 32 Numbers and Expressions......Page 33 Variables......Page 35 Statements......Page 36 Getting Input from the User......Page 37 Functions......Page 38 Modules......Page 39 cmath and Complex Numbers......Page 40 Saving and Executing Your Programs......Page 41 Making Your Scripts Behave Like Normal Programs......Page 43 Strings......Page 44 Single-Quoted Strings and Escaping Quotes......Page 45 String Representations, str and repr......Page 46 Long Strings......Page 47 Raw Strings......Page 48 Unicode, bytes, and bytearray......Page 49 A Quick Summary......Page 52 New Functions in This Chapter......Page 53 What Now?......Page 54 Sequence Overview......Page 55 Indexing......Page 56 A Nifty Shortcut......Page 58 Longer Steps......Page 59 Adding Sequences......Page 60 None, Empty Lists, and Initialization......Page 61 Membership......Page 62 Length, Minimum, and Maximum......Page 63 Changing Lists: Item Assignments......Page 64 Assigning to Slices......Page 65 append......Page 66 extend......Page 67 index......Page 68 pop......Page 69 sort......Page 70 Advanced Sorting......Page 71 Tuples: Immutable Sequences......Page 72 What Now?......Page 74 String Formatting: The Short Version......Page 75 Replacement Field Names......Page 77 Basic Conversions......Page 78 Width, Precision, and Thousands Separators......Page 79 Signs, Alignment, and Zero-Padding......Page 80 String Methods......Page 82 find......Page 83 lower......Page 84 split......Page 85 translate......Page 86 A Quick Summary......Page 87 What Now?......Page 88 Dictionary Uses......Page 89 The dict Function......Page 90 Basic Dictionary Operations......Page 91 Dictionary Methods......Page 93 copy......Page 94 get......Page 95 pop......Page 97 setdefault......Page 98 values......Page 99 What Now?......Page 100 Printing Multiple Arguments......Page 101 Importing Something as Something Else......Page 102 Sequence Unpacking......Page 103 Augmented Assignments......Page 105 So That’s What Those Boolean Values Are For......Page 106 else Clauses......Page 108 Comparison Operators......Page 109 The Equality Operator......Page 110 is: The Identity Operator......Page 111 String and Sequence Comparisons......Page 112 Boolean Operators......Page 113 Assertions......Page 114 while Loops......Page 115 for Loops......Page 116 Parallel Iteration......Page 117 Numbered Iteration......Page 118 break......Page 119 continue......Page 120 The while True/break Idiom......Page 121 Comprehensions—Slightly Loopy......Page 122 A Better Solution......Page 123 Deleting with del......Page 124 exec......Page 126 eval......Page 127 A Quick Summary......Page 128 What Now?......Page 129 Laziness Is a Virtue......Page 130 Creating Your Own Functions......Page 131 Documenting Functions......Page 132 Functions That Aren’t Really Functions......Page 133 Can I Change a Parameter?......Page 134 Why Would I Want to Modify My Parameters?......Page 136 What If My Parameter Is Immutable?......Page 139 Keyword Parameters and Defaults......Page 140 Collecting Parameters......Page 142 Reversing the Process......Page 144 Parameter Practice......Page 146 Scoping......Page 147 Recursion......Page 150 Two Classics: Factorial and Power......Page 151 Another Classic: Binary Search......Page 152 A Quick Summary......Page 155 What Now?......Page 156 The Magic of Objects......Page 157 Polymorphism......Page 158 Polymorphism and Methods......Page 159 Polymorphism Comes in Many Forms......Page 160 Encapsulation......Page 161 Inheritance......Page 162 Making Your Own Classes......Page 163 Privacy Revisited......Page 165 The Class Namespace......Page 167 Specifying a Superclass......Page 168 Investigating Inheritance......Page 169 Multiple Superclasses......Page 170 Interfaces and Introspection......Page 171 Abstract Base Classes......Page 172 Some Thoughts on Object-Oriented Design......Page 174 A Quick Summary......Page 175 What Now?......Page 176 Making Things Go Wrong . . . Your Way......Page 177 The raise Statement......Page 178 Catching Exceptions......Page 179 Look, Ma, No Arguments!......Page 180 More Than One except Clause......Page 181 Catching the Object......Page 182 When All Is Well......Page 183 And Finally . . .......Page 185 The Zen of Exceptions......Page 186 Not All That Exceptional......Page 188 A Quick Summary......Page 189 What Now?......Page 190 If You’re Not Using Python 3......Page 191 Constructors......Page 192 Overriding Methods in General, and the Constructor in Particular......Page 193 Calling the Unbound Superclass Constructor......Page 195 Using the super Function......Page 196 Item Access......Page 197 The Basic Sequence and Mapping Protocol......Page 198 Subclassing list, dict, and str......Page 200 More Magic......Page 201 Properties......Page 202 The property Function......Page 203 Static Methods and Class Methods......Page 204 __getattr__, __setattr__, and Friends......Page 205 The Iterator Protocol......Page 206 Generators......Page 208 Making a Generator......Page 209 A Recursive Generator......Page 210 Generators in General......Page 211 Generator Methods......Page 212 Simulating Generators......Page 213 Generators and Backtracking......Page 214 State Representation......Page 215 The Base Case......Page 216 The Recursive Case......Page 217 Wrapping It Up......Page 219 A Quick Summary......Page 220 What Now?......Page 221 Modules Are Programs......Page 222 Defining a Function in a Module......Page 224 Adding Test Code in a Module......Page 225 Making Your Modules Available......Page 226 Telling the Interpreter Where to Look......Page 227 Packages......Page 228 Using dir......Page 229 Getting Help with help......Page 230 Use the Source......Page 231 sys......Page 232 os......Page 234 fileinput......Page 235 Sets, Heaps, and Deques......Page 237 Sets......Page 238 Heaps......Page 240 Deques (and Other Collections)......Page 241 time......Page 242 random......Page 243 shelve and json......Page 246 A Simple Database Example......Page 247 The Wildcard......Page 250 Alternatives and Subpatterns......Page 251 The Beginning and End of a String......Page 252 Contents of the re Module......Page 253 Match Objects and Groups......Page 255 Group Numbers and Functions in Substitutions......Page 256 Finding the Sender of an Email......Page 258 A Sample Template System......Page 260 Other Interesting Standard Modules......Page 264 A Quick Summary......Page 265 What Now?......Page 266 File Modes......Page 267 The Basic File Methods......Page 268 Reading and Writing......Page 269 Piping Output......Page 270 Reading and Writing Lines......Page 271 Closing Files......Page 272 Using the Basic File Methods......Page 273 One Character (or Byte) at a Time......Page 274 Reading Everything......Page 275 File Iterators......Page 276 A Quick Summary......Page 277 What Now?......Page 278 Building a Sample GUI Application......Page 279 Initial Exploration......Page 280 Event Handling......Page 282 The Final Program......Page 283 What Now?......Page 285 The Python Database API......Page 286 Global Variables......Page 287 Connections and Cursors......Page 288 SQLite and PySQLite......Page 290 A Sample Database Application......Page 292 Creating and Populating Tables......Page 293 Searching and Dealing with Results......Page 294 A Quick Summary......Page 295 What Now?......Page 296 A Handful of Networking Modules......Page 297 The socket Module......Page 298 The urllib and urllib2 Modules......Page 299 Retrieving Remote Files......Page 300 Other Modules......Page 301 SocketServer and Friends......Page 302 Multiple Connections......Page 303 Forking and Threading with SocketServer......Page 304 Asynchronous I/O with select and poll......Page 305 Twisted......Page 307 Writing a Twisted Server......Page 308 A Quick Summary......Page 310 What Now?......Page 311 Screen Scraping......Page 312 What’s Tidy?......Page 313 Getting Tidy......Page 315 Using HTMLParser......Page 316 Beautiful Soup......Page 318 Step 1: Preparing the Web Server......Page 319 Step 3: Setting the File Permissions......Page 320 A Simple CGI Script......Page 321 Debugging with cgitb......Page 322 Using the cgi Module......Page 323 A Simple Form......Page 324 Other Web Application Frameworks......Page 326 RSS and Friends......Page 327 Remote Procedure Calls with XML-RPC......Page 328 What Now?......Page 329 Precise Requirement Specification......Page 330 Planning for Change......Page 332 doctest......Page 333 unittest......Page 335 Source Code Checking with PyChecker and PyLint......Page 338 Profiling......Page 341 A Quick Summary......Page 342 What Now?......Page 343 The Best of Both Worlds......Page 344 The Really Easy Way: Jython and IronPython......Page 345 Writing C Extensions......Page 348 A Swig of ... SWIG......Page 349 I Prefer Pi......Page 350 Running SWIG......Page 351 Compiling, Linking, and Using......Page 352 Hacking It on Your Own......Page 353 Reference Counting......Page 354 A Framework for Extensions......Page 355 Palindromes, Detartrated1 for Your Enjoyment......Page 356 A Quick Summary......Page 358 What Now?......Page 359 Setuptools Basics......Page 360 Wrapping Things Up......Page 362 Compiling Extensions......Page 363 Creating Executable Programs with py2exe......Page 364 What Now?......Page 365 The Jujitsu of Programming......Page 366 Prototyping......Page 367 Extracting Constants......Page 368 Configuration Files......Page 369 Logging......Page 371 If You Can’t Be Bothered......Page 372 A Quick Summary......Page 373 What Now?......Page 374 What’s the Problem?......Page 375 Preparations......Page 376 Finding Blocks of Text......Page 377 Adding Some Markup......Page 378 Handlers......Page 380 A Handler Superclass......Page 381 Rules......Page 382 Filters......Page 383 The Parser......Page 384 Constructing the Rules and Filters......Page 385 Putting It All Together......Page 388 Further Exploration......Page 392 What Now?......Page 393 What’s the Problem?......Page 394 Preparations......Page 395 Drawing with ReportLab......Page 396 Constructing Some PolyLines......Page 397 Writing the Prototype......Page 398 Getting the Data......Page 400 Using the LinePlot Class......Page 401 What Now?......Page 403 What’s the Problem?......Page 404 Useful Tools......Page 405 Preparations......Page 406 Creating a Simple Content Handler......Page 407 Creating HTML Pages......Page 409 A Dispatcher Mix-In Class......Page 412 Factoring Out the Header, Footer, and Default Handling......Page 413 Support for Directories......Page 414 The Event Handlers......Page 415 What Now?......Page 417 What’s the Problem?......Page 418 First Implementation......Page 419 Second Implementation......Page 421 Further Exploration......Page 428 What Now?......Page 429 Useful Tools......Page 430 Preparations......Page 431 The ChatServer Class......Page 432 The ChatSession Class......Page 433 Putting It Together......Page 435 Basic Command Interpretation......Page 437 Login and Logout Rooms......Page 438 The New Server......Page 439 What Now?......Page 445 Useful Tools......Page 446 First Implementation......Page 447 Second Implementation......Page 448 Writing the Editor Script......Page 449 Writing the Save Script......Page 450 Running the Editor......Page 452 Further Exploration......Page 453 What Now?......Page 454 What’s the Problem?......Page 455 Preparations......Page 456 First Implementation......Page 457 Writing the Main Script......Page 462 Writing the View Script......Page 463 Writing the Edit Script......Page 465 Writing the Save Script......Page 466 Trying It Out......Page 467 What Now?......Page 469 What’s the Problem?......Page 470 Useful Tools......Page 471 Implementing a Simple Node......Page 472 Trying Out the First Implementation......Page 477 Second Implementation......Page 478 Creating the Client Interface......Page 479 Validating File Names......Page 480 What Now?......Page 485 Preparations......Page 486 First Implementation......Page 487 Second Implementation......Page 489 Further Exploration......Page 491 What Now?......Page 492 What’s the Problem?......Page 493 pygame.display......Page 494 pygame.mouse......Page 495 Preparations......Page 496 First Implementation......Page 497 Second Implementation......Page 500 What Now?......Page 511 The Basics......Page 512 Functions......Page 514 Objects and Stuff . . .......Page 515 Some Loose Ends......Page 518 Expressions......Page 520 Augmented Assignment Statements......Page 530 The raise Statement......Page 531 The import Statement......Page 532 The if Statement......Page 533 The with Statement......Page 534 Class Definitions......Page 535 Index......Page 536 Gain a fundamental understanding of Python's syntax and features with this up--to--date introduction and practical reference. Covering a wide array of Python--related programming topics, including addressing language internals, database integration, network programming, and web services, you'll be guided by sound development principles. Ten accompanying projects will ensure you can get your hands dirty in no time. Updated to reflect the latest in Python programming paradigms and several of the most crucial features found in Python 3, Beginning Python also covers advanced topics such as extending Python and packaging/distributing Python applications. What You'll Learn Become a proficient Python programmer by following along with a friendly, practical guide to the language's key features Write code faster by learning how to take advantage of advanced features such as magic methods, exceptions, and abstraction Gain insight into modern Python programming paradigms including testing, documentation, packaging, and distribution Learn by following along with ten interesting projects, including a P2P file--sharing application, chat client, video game, remote text editor, and more Who This Book Is For Programmers, novice and otherwise, seeking a comprehensive introduction to the Python programming language Gain a fundamental understanding of Python's syntax and features with this up-to-date introduction and practical reference. Covering a wide array of Python-related programming topics, including addressing language internals, database integration, network programming, and web services, you'll be guided by sound development principles. Ten accompanying projects will ensure you can get your hands dirty in no time. Updated to reflect the latest in Python programming paradigms and several of the most crucial features found in Python 3, Beginning Python also covers advanced topics such as extending Python and packaging/distributing Python applications. You will: Become a proficient Python programmer by following along with a friendly, practical guide to the language's key features Write code faster by learning how to take advantage of advanced features such as magic methods, exceptions, and abstraction Gain insight into modern Python programming paradigms including testing, documentation, packaging, and distribution Learn by following along with ten interesting projects, including a P2P file-sharing application, chat client, video game, remote text editor, and more Offers an up-to-date introduction and practical reference to Python's syntax and features. Covering a wide array of Python-related programming topics, including addressing language internals, database integration, network programming, and web services, you'll be guided by sound development principles. Ten accompanying projects will ensure you can get your hands dirty in no time. Updated to reflect the latest in Python programming paradigms and several of the most crucial features found in latest Python 3. Advanced topics such as extending Python and packaging/distributing Python applications, are also covered. --From publisher description "Beginning Python: From Novice to Professional" is the most comprehensive book on the Python ever written. Based on "Practical Python," this newly revised book is both an introduction and practical reference for a swath of Python-related programming topics, including addressing language internals, database integration, network programming, and web services. Advanced topics, such as extending Python and packaging/distributing Python applications, are also covered. Ten different projects illustrate the concepts introduced in the book. You will learn how to create a P2P file-s

قیمت نهایی

۴۴٬۰۰۰ تومان