وبلاگ بلیان

Hello! Python

معرفی کتاب «Hello! Python» نوشتهٔ Briggs, Anthony D، منتشرشده توسط نشر Manning Publications Co. LLC در سال 2012. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Hello! Python» در دستهٔ بدون دسته‌بندی قرار دارد.

**Summary** __Hello! Python__ fully covers the building blocks of Python programming and gives you a gentle introduction to more advanced topics such as object-oriented programming, functional programming, network programming, and program design. New (or nearly new) programmers will learn most of what they need to know to start using Python immediately. **About this Book**Programmers love Python because it's fast and efficient. Shouldn't learning Python be just the same? Hello! Python starts quickly and simply, with a line of Python code. You'll learn the basics the right way--by writing your own programs. Along the way, you'll get a gentle introduction to more advanced concepts and new programming styles.> No experience with Python needed. Exposure to another programming language is helpful but not required. Purchase includes free PDF, ePub, and Kindle eBooks downloadable at manning.com. **What Makes Hello! Python special** * **Learn Python fast** Even if you've never written a line of code before, you'll be writing real Python apps in just an hour or two. * **Great examples** There's something new in every chapter, including games, web programming with Django, databases, and more. * **User Friendly guides** Using lots of illustrations and a down-to-earth writing style, this book invites you to explore Python along with half-a-dozen traveling companions from the User Friendly cartoon strip. ========================================​== **Table of Contents**1. Why Python? 2. Hunt the Wumpus 3. Interacting with theWorld 4. Getting Organized 5. Business-Oriented Programming 6. Classes and Object-oriented Programming 7. Sufficiently Advanced Technology 8. Django! 9. Gaming with Pyglet 10. Twisted Networking 11. Django Revisted! 12. Where to from Here? Hello! Python......Page 1 Brief contents......Page 6 Contents......Page 8 Foreword......Page 16 Preface......Page 18 Acknowledgments......Page 20 About this book......Page 22 Roadmap......Page 23 About the author......Page 25 About Hello! books......Page 26 1 Why Python?......Page 28 Learning to program......Page 29 Telling a computer what to do......Page 30 Programming is design......Page 32 Python is easy......Page 34 Python has “batteries included”......Page 35 Installing Python......Page 36 Running Python programs on Windows......Page 39 Running Python programs from the command line......Page 41 Linux GUI......Page 45 Linux command line......Page 47 Updating the shell profile......Page 48 Setting the default application......Page 49 Troubleshooting......Page 50 Text editors and IDEs......Page 51 Summary......Page 53 2 Hunt the Wumpus......Page 55 What’s a program?......Page 56 Writing to the screen......Page 57 Remembering things with variables......Page 58 Making decisions......Page 59 Loops......Page 61 Functions......Page 62 Your first program......Page 63 The first version of Hunt the Wumpus......Page 64 Debugging......Page 66 A nicer wumpus......Page 67 Making the caves......Page 68 Lists......Page 69 Coding your caves......Page 71 The problem......Page 74 Coding connected caves......Page 75 Function basics......Page 78 Variable scope......Page 80 Shared state......Page 81 Fixing the wumpus......Page 82 Interacting with the caves......Page 83 Creating the caves......Page 84 Interacting with the player......Page 86 The rest of the program......Page 87 Bows and arrows......Page 89 More atmosphere......Page 92 Making the wumpus move......Page 95 Summary......Page 96 3 Interacting with the world......Page 97 “Batteries included”: Python’s libraries......Page 98 Using libraries......Page 99 What’s in a library, anyway?......Page 101 Using command-line arguments......Page 104 Using the sys module......Page 105 Paths and directories (a.k.a. dude, where’s my file?)......Page 106 Paths......Page 108 File, open!......Page 109 Fingerprinting a file......Page 110 Mugshots: storing your files’ fingerprints in a dictionary......Page 112 Putting it all together......Page 113 Testing your program......Page 118 Putting results in order......Page 120 Comparing directories......Page 122 Where to from here?......Page 124 Summary......Page 125 4 Getting organized......Page 126 Planning: specifying your program......Page 127 Testing manually—boring!......Page 128 Test-Driven Development......Page 129 Writing the program......Page 130 Making your tests pass......Page 132 Testing user interfaces......Page 134 What do you do with your input?......Page 136 Running commands......Page 137 Running your program......Page 140 Taking stock......Page 141 What to do next?......Page 142 I’m very busy and important......Page 145 List comprehensions......Page 146 Oops, a bug!......Page 149 Saving your work......Page 154 A quick fix......Page 158 Deleting to-dos......Page 161 Editing to-dos......Page 164 A help command......Page 167 Time management and estimation......Page 168 Summary......Page 169 5 Business-oriented programming......Page 170 Making programs talk to each other......Page 171 CSV to the rescue!......Page 172 Other formats......Page 173 Getting started......Page 174 Installing Firefox and Firebug......Page 175 Examining the page......Page 176 Downloading the page with Python......Page 177 Chopping out the bit you need......Page 179 Adding extra information......Page 180 Writing out to a CSV file......Page 183 Email structure......Page 186 Creating an email......Page 187 Sending email......Page 189 Other email modules......Page 190 A simple script—what could possibly go wrong?......Page 191 Data you haven’t thought of......Page 192 How to deal with breaking scripts......Page 193 Tolerance of failure......Page 194 Fail early and loudly......Page 195 Try again later......Page 196 Why use exceptions?......Page 199 What it means when your program goes “bang!”......Page 200 Catching errors......Page 203 The traceback module......Page 205 Summary......Page 206 6 Classes and object-oriented programming......Page 208 How do they work?......Page 209 Your first class......Page 210 Object-oriented design......Page 213 First steps: verbing nouns......Page 216 Where should your methods go?......Page 220 Finding the treasure......Page 222 Picking up the treasure......Page 223 Further into the caves......Page 226 Creating your monsters......Page 232 Some object-oriented design tips......Page 234 Tying it all together......Page 236 Danger and excitement......Page 239 Add more monsters and treasure......Page 242 Investigate some more advanced features of classes......Page 243 Summary......Page 244 7 Sufficiently advanced technology.........Page 245 Mixin classes......Page 246 super() and friends......Page 249 __getattr__......Page 250 __setattr__......Page 251 __getattribute__......Page 252 Properties......Page 254 Emulating other types......Page 256 Iterators......Page 260 Generators......Page 262 Generator expressions......Page 263 Reading files......Page 264 Getting to grips with your log lines......Page 268 Pulling out the bits......Page 269 Functional programming......Page 273 Map and filter......Page 274 Passing and returning functions......Page 275 Summary......Page 278 8 Django!......Page 280 Writing web-based applications with Django......Page 281 Setting up Django......Page 282 The simplest possible todo list......Page 287 Using a template......Page 288 Setting up the database......Page 291 Creating a model......Page 292 Django’s admin module......Page 294 Adding an admin interface......Page 296 Using the model......Page 298 Setting up your URLs......Page 301 Submitting forms......Page 304 Handling individual todos......Page 307 Final polishing......Page 312 Where to from here?......Page 313 Summary......Page 314 9 Gaming with Pyglet......Page 315 Installing Pyglet......Page 316 First steps......Page 318 Starship piloting 101......Page 320 Making things happen......Page 322 Back to school: Newton’s first law (and vectors)......Page 325 Gravity......Page 328 Calculating gravity......Page 329 Watch out for that planet!......Page 332 Guns, guns, guns!......Page 335 Evil aliens......Page 338 Altering the game play......Page 344 Summary......Page 345 Installing Twisted......Page 347 Your first application......Page 348 First steps with your MUD......Page 353 Bad monster!......Page 359 Back to the chat server......Page 362 Exploring unfamiliar code......Page 367 Putting it all together......Page 369 Write your own state machine......Page 374 Making your world permanent......Page 379 Where to from here?......Page 383 Summary......Page 384 Authentication......Page 385 Logging in......Page 386 Adding users......Page 390 Fixing your database......Page 391 Back on track.........Page 394 Covering all your bases......Page 395 Updating your interface......Page 398 Unit testing......Page 399 Functional testing......Page 400 Running your tests......Page 402 Serving media from Django......Page 404 Serving media from another server......Page 406 Where to from here?......Page 408 Summary......Page 409 12 Where to from here?......Page 410 Python recipes......Page 411 Sign up for some mailing lists......Page 412 Scratch your own itch......Page 413 Logging......Page 414 XML, ElementTree, and JSON......Page 415 Summary......Page 416 B......Page 418 D......Page 419 F......Page 420 I......Page 421 P......Page 422 T......Page 424 Z......Page 425 Hello! Python-back......Page 426 Summary Hello! Python fully covers the building blocks of Python programming and gives you a gentle introduction to more advanced topics such as object-oriented programming, functional programming, network programming, and program design. New (or nearly new) programmers will learn most of what they need to know to start using Python immediately. About this Book Programmers love Python because it's fast and efficient. Shouldn't learning Python be just the same? Hello! Python starts quickly and simply, with a line of Python code. You'll learn the basics the right way--by writing your own programs. Along the way, you'll get a gentle introduction to more advanced concepts and new programming styles.> No experience with Python needed. Exposure to another programming language is helpful but not required. Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book. What Makes Hello! Python special Learn Python fast Even if you've never written a line of code before, you'll be writing real Python apps in just an hour or two. Great examples There's something new in every chapter, including games, web programming with Django, databases, and more. User Friendly guides Using lots of illustrations and a down-to-earth writing style, this book invites you to explore Python along with half-a-dozen traveling companions from the User Friendly cartoon strip. ========================================== Table of Contents Why Python? Hunt the Wumpus Interacting with theWorld Getting Organized Business-Oriented Programming Classes and Object-oriented Programming Sufficiently Advanced Technology Django! Gaming with Pyglet Twisted Networking Django Revisted! Where to from Here? Hello! Python fully covers the building blocks of Python programming and gives you a gentle introduction to more advanced topics such as object-oriented programming, functional programming, network programming, and program design. New (or nearly new) programmers will learn most of what they need to know to start using Python immediately. About this Book Programmers love Python because it's fast and efficient. Shouldn't learning Python be just the same? Hello! Python starts quickly and simply, with a line of Python code. You'll learn the basics the right wayby writing your own programs. Along the way, you'll get a gentle introduction to more advanced concepts and new programming styles. No experience with Python needed. Exposure to another programming language is helpful but not required. What's Makes Hello! Python special Learn Python fast Even if you've never written a line of code before, you'll be writing real Python apps in just an hour or two. Great examples There's something new in every chapter, including games, web programming with Django, databases, and more. User Friendly guides Using lots of illustrations and a down-to-earth writing style, this book invites you to explore Python along with half-a-dozen travelling companions from the User Friendly cartoon strip. About the Author Anthony Briggs has taught and programmed Python for over a decade. He works for a communications company in Melbourne, Australia

Hello! Python fully covers the building blocks of Python programming and gives you a gentle introduction to more advanced topics such as object-oriented programming, functional programming, network programming, and program design. New (or nearly new) programmers will learn most of what they need to know to start using Python immediately.

Why Python? Hunt the wumpus Interacting with the world Getting organized Business-oriented programming Classes and object-oriented programming Sufficiently advanced technology ... Django! Gaming with pyglet Twisted networking Django revisited! Where to from here?
دانلود کتاب Hello! Python