Hello! Python.pdf

所需积分/C币:16 2012-10-14 09:48:42 30.92MB PDF
收藏 收藏

Hello! Python.pdf pdf 英文 完美版
Downloadfromwowlebook<www.wowebook.com> Downloadfromwowlebook<www.wowebook.com> Hello! Python Anthony Briggs MANNING SHELTER ISLAND Downloadfromwowlebook<www.wowebook.com> For online information and ordering of this and other Manning books, please visit www.manning.com.Thepublisheroffersdiscountsonthis s DOOK When ordered in quantity For more information, please contact Special sales department Manning Publications Co 20 Baldwin Road PO Box 26 Shelter island.NY11964 Email:orders@manning.com C2012 by Manning Publications Co. All rights reserved No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Uoer Friendly artwork, characters, and strips used by permission from UserFriendly. Org All Rights reserved o Recognizing the importance of preserving what has been written, it is Mannings policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without elemental chlorine Developmenteditor: Sebastian Stirling Manning Publications Co. Technical proofreader: Marion Newlevant 20 Baldwin Road Copyeditors: June Eding, Tiffany Taylor PO Box 261 Typesetter: Marija Tudor Shelter island. ny11964 Cover designer: Leslie haimes ISBN:9781935182085 Printed in the united states of america 12345678910-MAL-171615141312 Downloadfromwowlebook<www.wowebook.com> Brief contents 1 WHY PYTHON 1 2 HUNT THE WUMPUs 28 3 INTERACTING WITH THE WORLD 70 4 GETTING ORGANIZED 99 5 BUSINESS-ORIENTED PROGRAMMING 143 6 CLASSES AND OBJECT-ORIENTED PROGRAMMING 181 7 SUFFICIENTLY ADVANCED TECHNOLOGY .. 218 8 DJANGo! 253 9 GAMING WITH PYGLET 288 10 TWISTED NETWORKING 320 11 DJANGO REVISITED! 358 12 WHERE TO FROM HERE 383 Downloadfromwowlebook<www.wowebook.com> Downloadfromwowlebook<www.wowebook.com> Contents Foreword Xv Presa Acknowledgments xix About this book xXi About hello books xxv /hy Python? Learning to program 2 Telling a computer what to do 3o Programming is made of ideas 5 o Programming is design 5 What makes Python so great, 7 Python is easy 7 o Python is a real language 8 o Python has"batteries included" 8o Python has a large community 9 9et加 up Python for Wing Installing Python 9 o Running Python programs on Windows 12 Running python programs from the command line 14 12 Installing under Linux 18 o Linux GUI 18 o Linux command line 20 Macintosh 21 Updating the shell profile 21 o Setting the default pplication 7b900t+i12 A syntax error 24 o An incorrect file extension( Windows) 24 Python is installed in a different place (Linux) 24 Downloadfromwowlebook<www.wowebook.com> 7e0a1E524 Summary 26 2 Hunt the Wumpus 28 Whats a program2 29 Writing to the screen 30 o Remembering things with ariables 31 o Asking the pla layer what to do 32 o makine decisions 32 o Loops 34 o Functions 35 Your first program 30 The first version of Hunt the Wumpus 37 o Debugging 39 Exem1ntM计yB02am240 More(or fewer)caves 40 o A nicer wumpus 40 o More than one wumpus 41 Making the caves 41 Lists 42 o For loops 44 o Coding your caves 44 Fixing a more subtle bug 47 The problem 47 o The solution 48 o Coding connected caves 48 Clean up your code with functions! 51 Function basics 51 o Variable scope 53 o Shared state 54 Fixing the wumpus 55 Interacting with the caves 56 o Creating the caves 57 Interacting with the player 59 o The rest of the program 60 Bows and arrows 62 More atmosphere 65 Where to from here? 68 Bats and pits 68 o Making the wumpus move 68 Different cave structures 9 5my69 3 Interacting with the world 70 Batteries included: Pythons libraries 71 Python's standard library 72 o Other libraries 72 Using libraries 72 o What's in a library, anyway? 74 Downloadfromwowlebook<www.wowebook.com>

试读 427P Hello! Python.pdf
立即下载 低至0.43元/次 身份认证VIP会员低至7折
gsmcy1 深入浅出,且讲解了若干重要的 用途
    Hello! Python.pdf 16积分/C币 立即下载
    Hello! Python.pdf第1页
    Hello! Python.pdf第2页
    Hello! Python.pdf第3页
    Hello! Python.pdf第4页
    Hello! Python.pdf第5页
    Hello! Python.pdf第6页
    Hello! Python.pdf第7页
    Hello! Python.pdf第8页
    Hello! Python.pdf第9页
    Hello! Python.pdf第10页
    Hello! Python.pdf第11页
    Hello! Python.pdf第12页
    Hello! Python.pdf第13页
    Hello! Python.pdf第14页
    Hello! Python.pdf第15页
    Hello! Python.pdf第16页
    Hello! Python.pdf第17页
    Hello! Python.pdf第18页
    Hello! Python.pdf第19页
    Hello! Python.pdf第20页

    试读结束, 可继续阅读

    16积分/C币 立即下载 >