This is the source code for Beginning Python : From Novice to Professional,
second edition. Each code listing in the book can be found in a correspondingly
numbered directory/file. In order to work properly together, some of these
may need to be renamed (as indicated by the book).
Chapter02/listing2-1.py: Indexing Example
Chapter02/listing2-2.py: Slicing Example
Chapter02/listing2-3.py: Sequence (String) Multiplication Example
Chapter02/listing2-4.py: Sequence Membership Example
Chapter03/listing3-1.py: String Formatting Example
Chapter04/listing4-1.py: Dictionary Example
Chapter04/listing4-2.py: Dictionary Method Example
Chapter10/listing10-1.py: A Simple Module
Chapter10/listing10-2.py: A Simple Module Containing a Function
Chapter10/listing10-3.py: A Simple Module with Some Problematic Test Code
Chapter10/listing10-4.py: A Module with Conditional Test Code
Chapter10/listing10-5.py: Reversing and Printing Command-Line Arguments
Chapter10/listing10-6.py: Adding Line Numbers to a Python Script
Chapter10/listing10-7.py: The Line Numbering Program with Line Numbers Added
Chapter10/listing10-8.py: A Simple Database Application
Chapter10/listing10-10.py: A Program for Finding the Sender of an E-mail
Chapter10/listing10-11.py: A Template System
Chapter10/listing10-12.txt: A Simple Template Example
Chapter10/listing10-13.txt: Some Template Definitions
Chapter10/listing10-14.txt: A Template
Chapter11/listing11-1.py: Simple Script That Counts the Words in sys.stdin
Chapter11/listing11-2.txt: A File Containing Some Nonsensical Text
Chapter11/listing11-3.txt: A Simple Text File
Chapter11/listing11-4.txt: The Modified Text File
Chapter11/listing11-5.txt: The Text File, Modified Again
Chapter11/listing11-6.py: Looping over Characters with read
Chapter11/listing11-7.py: Writing the Loop Differently
Chapter11/listing11-8.py: Using readline in a while Loop
Chapter11/listing11-9.py: Iterating over Characters with read
Chapter11/listing11-10.py: Iterating over Lines with readlines
Chapter11/listing11-11.py: Iterating over Lines with fileinput
Chapter11/listing11-12.py: Iterating over a File
Chapter11/listing11-13.py: Iterating over a File Without Storing the File Object in a Variable
Chapter12/listing12-1.py: Creating and Showing a Frame
Chapter12/listing12-2.py: Adding a Button to a Frame
Chapter12/listing12-3.py: Adding Labels and Titles with Keyword Arguments
Chapter12/listing12-4.py: Setting Button Positions
Chapter12/listing12-5.py: Using a Sizer
Chapter12/listing12-6.py: The Final GUI Program
Chapter13/listing13-1.py: Importing Data into the Database (importdata.py)
Chapter13/listing13-2.py: Food Database Query Program (food_query.py)
Chapter14/listing14-1.py: A Minimal Server
Chapter14/listing14-2.py: A Minimal Client
Chapter14/listing14-3.py: A SocketServer-Based Minimal Server
Chapter14/listing14-4.py: A Forking Server
Chapter14/listing14-5.py: A Threading Server
Chapter14/listing14-6.py: A Simple Server Using select
Chapter14/listing14-7.py: A Simple Server Using poll
Chapter14/listing14-8.py: A Simple Server Using Twisted
Chapter14/listing14-9.py: An Improved Logging Server, Using the LineReceiver Protocol
Chapter15/listing15-1.py: A Simple Screen Scraping Program
Chapter15/listing15-2.py: A Screen Scraping Program Using the HTMLParser Module
Chapter15/listing15-3.py: A Screen Scraping Program Using Beautiful Soup
Chapter15/listing15-4.py: A Simple CGI Script
Chapter15/listing15-5.py: A CGI Script That Invokes a Traceback (faulty.cgi)
Chapter15/listing15-6.py: A CGI Script That Retrieves a Single Value from a FieldStorage (simple2.cgi)
Chapter15/listing15-7.py: A Greeting Script with an HTML Form (simple3.cgi)
Chapter15/listing15-8.psp: A Slightly Stochastic PSP Example
Chapter15/listing15-9.py: Simple Authentication with the mod_python Publisher
Chapter15/listing15-1.py: A Simple Screen Scraping Program
Chapter16/listing16-1.py: A Simple Test Program
Chapter16/listing16-2.py: A Simple Test Using the unittest Framework
Chapter16/listing16-3.py: Calling External Checkers Using the subprocess Module
Chapter17/listing17-1.java: A Simple Java Class (JythonTest.java)
Chapter17/listing17-2.cs: A Simple C# Class (IronPythonTest.cs)
Chapter17/listing17-3.c: A Simple C Function for Detecting a Palindrome (palindrome.c)
Chapter17/listing17-4.py: Detecting Palindromes in Python
Chapter17/listing17-5.i: Interface to the Palindrome Library (palindrome.i)
Chapter17/listing17-6.c: Palindrome Checking Again (palindrome2.c)
Chapter18/listing18-1.py: Simple Distutils Setup Script (setup.py)
Chapter19/listing19-1.cfg: A Simple Configuration File
Chapter19/listing19-2.py: A Program Using ConfigParser
Chapter19/listing19-3.py: A Program Using the logging Module
Chapter20/listing20-1.txt: A Sample Plain-Text Document (test_input.txt)
Chapter20/listing20-2.py: A Text Block Generator (util.py)
Chapter20/listing20-3.py: A Simple Markup Program (simple_markup.py)
Chapter20/listing20-4.py: The Handlers (handlers.py)
Chapter20/listing20-5.py: The Rules (rules.py)
Chapter20/listing20-6.py: The Main Program (markup.py)
Chapter21/listing21-1.py: A Simple ReportLab Program (hello_report.py)
Chapter21/listing21-2.py: The First Prototype for the Sunspot Graph Program (sunspots_proto.py)
Chapter21/listing21-3.py: The Final Sunspot Program (sunspots.py)
Chapter22/listing22-1.xml: A Simple Web Site Represented As an XML File (website.xml)
Chapter22/listing22-2.py: A Simple Page Maker Script (pagemaker.py)
Chapter22/listing22-3.py: The Web Site Constructor (website.py)
Chapter23/listing23-1.py: A Simple News-Gathering Agent (newsagent1.py)
Chapter23/listing23-2.py: A More Flexible News-Gathering Agent (newsagent2.py)
Chapter24/listing24-1.py: A Minimal Server Program
Chapter24/listing24-2.py: A Server That Accepts Connections
Chapter24/listing24-3.py: The Basic Server with Some Cleanups
Chapter24/listing24-4.py: Server Program with ChatSession Class
Chapter24/listing24-5.py: A Simple Chat Server (simple_chat.py)
Chapter24/listing24-6.py: A Slightly More Complicated Chat Server (chatserver.py)
Chapter25/listing25-1.py: A Simple Web Editor (simple_edit.cgi)
Chapter25/listing25-2.py: The Editor Script (edit.cgi)
Chapter25/listing25-3.py: The Saving Script (save.cgi)
Chapter26/listing26-1.sql: Creating the Database in PostgreSQL
Chapter26/listing26-2.sql: Creating the Database in MySQL
Chapter26/listing26-3.sql: Creating the Database in SQLite
Chapter26/listing26-4.py: The Main Bulletin Board (simple_main.cgi)
Chapter26/listing26-5.py: The Main Bulletin Board (main.cgi)
Chapter26/listing26-6.py: The Message Viewer (view.cgi)
Chapter26/listing26-7.py: The Message Editor (edit.cgi)
Chapter26/listing26-8.py: The Save Script (save.cgi)
Chapter27/listing27-1.py: A Simple Node Implementation (simple_node.py)
Chapter27/listing27-2.py: A New Node Implementation (server.py)
Chapter27/listing27-3.py: A Node Controller Interface (client.py)
Chapter28/listing28-1.py: A Simple GUI Client (simple_guiclient.py)
Chapter28/listing28-2.py: The Finished GUI Client (guiclient.py)
Chapter29/listing29-1.py: A Simple “Falling Weights” Animation (weights.py)
Chapter29/listing29-2.py: The Squish Configuration File (config.py)
Chapter29/listing29-4.py: The Main Game Module (squish.py)
没有合适的资源?快使用搜索试试~ 我知道了~
python基础教程(Beginning Python From Novice to Professional)书中源码例子
共112个文件
py:92个
txt:9个
sql:3个
5星 · 超过95%的资源 需积分: 9 86 下载量 82 浏览量
2014-04-01
17:25:42
上传
评论
收藏 52KB RAR 举报
温馨提示
python基础教程 (Beginning Python From Novice to Professional) 书中源码例子
资源推荐
资源详情
资源评论
收起资源包目录
python基础教程(Beginning Python From Novice to Professional)书中源码例子 (112个子文件)
listing17-6.c 973B
listing17-3.c 164B
listing19-1.cfg 160B
listing17-2.cs 160B
listing17-5.i 84B
listing17-1.java 105B
listing15-8.psp 214B
listing29-4.py 9KB
listing24-6.py 6KB
listing23-2.py 5KB
listing29-2.py 4KB
listing27-2.py 3KB
listing28-2.py 3KB
listing27-1.py 3KB
listing28-1.py 3KB
listing22-3.py 2KB
listing20-4.py 2KB
listing20-5.py 2KB
listing24-5.py 2KB
listing29-1.py 2KB
listing27-3.py 2KB
listing10-8.py 2KB
listing20-6.py 2KB
listing21-2.py 1KB
listing26-7.py 1KB
listing26-8.py 1KB
listing21-3.py 1KB
listing4-1.py 1022B
listing22-2.py 1017B
listing16-3.py 1016B
listing12-6.py 1013B
listing26-5.py 987B
listing24-4.py 983B
listing26-4.py 885B
listing15-2.py 859B
listing26-6.py 839B
listing25-2.py 799B
listing10-11.py 796B
listing2-1.py 746B
listing12-5.py 719B
listing13-1.py 706B
listing14-7.py 703B
listing2-3.py 683B
listing14-6.py 671B
listing23-1.py 648B
listing3-1.py 625B
listing4-2.py 619B
listing19-2.py 618B
listing16-2.py 597B
listing25-3.py 583B
listing24-3.py 537B
listing14-9.py 503B
listing12-4.py 478B
listing25-1.py 469B
listing14-8.py 459B
listing15-3.py 386B
listing14-5.py 378B
listing15-7.py 378B
listing20-3.py 375B
listing14-4.py 374B
listing10-7.py 351B
listing14-3.py 318B
listing24-2.py 317B
listing15-9.py 309B
listing13-2.py 302B
listing2-4.py 270B
listing20-2.py 267B
listing21-1.py 243B
listing19-3.py 237B
listing14-1.py 237B
listing15-1.py 221B
listing16-1.py 186B
listing12-3.py 183B
listing18-1.py 175B
listing10-6.py 171B
listing15-6.py 165B
listing10-10.py 157B
listing17-4.py 152B
listing2-2.py 148B
listing15-4.py 127B
listing15-5.py 125B
listing11-1.py 124B
listing14-2.py 119B
listing24-1.py 117B
listing10-4.py 110B
listing11-8.py 105B
listing11-7.py 102B
listing11-6.py 96B
listing12-2.py 92B
listing10-5.py 83B
listing11-10.py 73B
listing11-11.py 73B
listing12-1.py 71B
listing10-3.py 70B
listing11-9.py 68B
listing11-12.py 61B
listing10-2.py 50B
listing11-13.py 45B
listing10-1.py 32B
listing26-2.sql 226B
共 112 条
- 1
- 2
资源评论
- lilianxu182014-12-29又一个需要攻克的难关,此书深有用。
- jian4197259472014-11-12非常牛啊....非常喜欢...谢谢兄弟共享出来
milanlakers
- 粉丝: 12
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Ruby基于Ruby的MKS rebase脚本 Ruby语言基础
- 基于GPT+Pyhon开发的网页游戏,类似于最火的文字游戏《人生重开模拟器》源码
- 基于qt+C++实现u盘插拔检测.+源码(毕业设计&课程设计&项目开发)
- rust开发封装的windows gui源码
- checkpoint.zip
- 无人机姿态和轨迹跟踪控制-反步控制方法
- 基于Qt+opencv+C++实现图像旋转+自动&&手动+直线检测,角度计算+界面操作+源码(期末大作业&课程设计&项目开发)
- Object-CC++对象库,实现类似于Java的Object类的Object
- 基于servlet的简单游戏管理系统
- 广工基于Libero的数字逻辑设计仿真及验证实验报告
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功