• Complain

Brad Dayley - Python Phrasebook

Here you can read online Brad Dayley - Python Phrasebook full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2006, publisher: Sams, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Brad Dayley Python Phrasebook
  • Book:
    Python Phrasebook
  • Author:
  • Publisher:
    Sams
  • Genre:
  • Year:
    2006
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Python Phrasebook: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Python Phrasebook" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Python Phrasebook Brad Dayley Essential Code and Commands Python Phrasebook gives you the code phrases you need to quickly and effectively complete your programming projects in Python. Concise and Accessible Easy to carry and easy to uselets you ditch all those bulky books for one portable guide Flexible and Functional Packed with more than 100 customizable code snippetsso you can readily code functional Python in just about any situation Brad Dayley is a software engineer at Novell, Inc. He has been a system administrator and software developer on the Unix, Windows, Linux, and NetWare platforms for the past 14 years. Brad co-developed an advanced debugging course used to train engineers and customers and is the co-author of several Novell Press books. Programming / Python $16.99 USA / $20.99 CAN / ?11.99 Net UK

Brad Dayley: author's other books


Who wrote Python Phrasebook? Find out the surname, the name of the author of the book and a list of all author's works by series.

Python Phrasebook — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Python Phrasebook" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Index
[] accessing adding attributes
Index
[] BaseHTTPServer module , beginnings of strings built-in types ,
Index
[] CGI scripts child nodes classes , closing code commands (SQL) communication (Internet) dataemailstreaming data connections
Index
[]dictionarieslistsvalues databases entriesMySQLobjects defining deleting dictionaries valuesHTMLXML DOM trees, child nodes
Index
[] email endings of strings endswith() method entries (databases) execute() method executing extracting
Index
[] files modesreadingshelveTARZIP functions [See methods.]
Index
[] GET requests
Index
[] handling HTML documents HTMLParser module (HTML documents) HTTP servers httplib module
Index
[] Internet communication dataemailstreaming data
Index
[]
Index
[]
Index
[] list() method lists items
Index
[]endswith()list()open()parse()quit()read()readlines()split()walk() modules ,HTMLParser (HTML documents)httplibsocketSocketServerxml.sax MySQL databases entries
Index
[] namespaces , negative indices (strings) nodes child
Index
[] objects ,shelve files open() method opening
Index
[] parameters parse() method parsing POP3 servers POST requests
Index
[] quit() method
Index
[] read() method reading files readlines() method , requests GETPOST retrieving
Index
[] scripts (CGI) searching [See finding.] sending servers HTTP shelve files objects slicing socket module sockets SocketServer module (streaming data) split() method SQL commands starting statements streaming data strings endingstext substrings syntax statements system tools (modules) ,
Index
[]
Index
[] tags TAR files text strings threads tools (system modules) , trees (DOM), child nodes tuples , types data [See .]
Index
[]
Index
[] values dictionaries
Index
[] walk() method web services CGI scriptsHTTP serversXML-RPC websites
Index
[] XML documents child nodes XML-RPC xml.sax module
Index
[] ZIP files
Introduction

I was excited when my editor asked me to write a phrasebook on the Python language. The phrasebook is one of the smallest books I have ever written; however, it was one of the hardest.

The idea of a conventional phrasebook is to provide readers with quick phrases that actually mean something in the language. The Python phrasebook is designed to provide you with meaningful Python phrases that you can actually understand and use to quickly begin programming Python applications.

The content of this book are based on Python 2.4. You should keep in mind that the Python language is constantly being added to. I would recommend visiting the Python website at http://www.python.org to familiarize yourself with accessing the online documentation, available extensions, and any changes that are occurring.

This book is not a reference manual or language guide that encompasses the entire languagethat's not the purpose. The purpose is to provide you with a small, simple-to-use phrasebook that will get you going and provide a quick, easy reference later as you delve into new areas of the language.

When designing the content for this book, I tried to come up with the most relevant and interesting phrases that will actually help programs accomplish tasks that are pertinent to real-world needs. I welcome your comments and any phrases that you feel really need to be added to this book.

Note

Almost all the sample code used in this book is taken from actual working files. For your convenience, the Python scripts, CGI scripts, and HTML and XML documents that are shown as examples in the phrases of this book are available for download from the publisher's website. Register your book at www.samspublishing.com/register and download the code examples from this book. Feel free to modify them for your own needs.

I hope that you enjoy the phrases in this book and that they will be useful to you.

Chapter 1. Understanding Python

Python is an extremely powerful and dynamic object-oriented programming language. It has similarities to scripting languages such as Perl, Scheme, and TCL, as well as other languages such as Java and C.

This chapter is designed to give you a quick glimpse into the Python language to help you understand the phrases in the subsequent chapters. It is not meant to be comprehensive; however, it should give you a feel for the language and help you understand the basics so that you can refer to the Python documentation for more information.

Why Use Python?

There are several reasons to use Python. It is one of the easier languages to pick up and start using, and yet it can be extremely powerful for larger applications. The following are just some of the good points of Python:

  • Portability Python runs on almost every operating system, including Linux/Unix, Windows, Mac, OS 2, and others.

  • Integration Python can integrate with COM, .NET, and CORBA objects. There is a Jython implementation to allow the use of Python on any Java platform. IronPython is an implementation that gives Python programmers access to the .NET libraries. Python can also contain wrapped C or C++ code.

  • Easy It is very easy to get up to speed and begin writing Python programs. The clear, readable syntax makes applications simple to create and debug.

  • Power There are new extensions being written to Python all the time for things such as database access, audio/video editing, GUI, web development, and so on.

  • Dynamic Python is one of the most flexible languages. It's easy to get creative with code to solve design and development issues.

  • Open Source Python is an open source language, which means it can be freely used and distributed.

Invoking the Interpreter

Python scripts are executed by a Python interpreter. On most systems, you can start the Python interpreter by executing the python command at a console prompt. However, this can vary based on the system and development environment you have set up. This section discusses the standard methods to invoke the interpreter to execute Python statements and script files.

Invoking the interpreter without passing a script file as a parameter brings up the following prompt:

bwd-linux:/book # pythonPython 2.4.2 (#1, Apr 9 2006, 19:25:19)[GCC 4.1.0 (SUSE Linux)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>>

The Python prompt is indicated by >>> . If you execute a command that requires more input, a ... prompt will be displayed. From the interpreter prompt, you can execute individual Python statements, as follows:

>>> print "Printing a String"Printing a String

Invoking the interpreter with a script parameter, as shown next, begins execution of the script and continues until the script is finished. When the script is finished, the interpreter is no longer active.

bwd-linux:/book # python script.pyExecuting a Scriptbwd-linux:/book #

Scripts can also be executed from within the interpreter using the execfile(script) function built in to Python. The following example shows a script being executed using the execfile() function:

>>> execfile("script.py")Executing a Script>>>
Built-In Types

The built-in types that you will most frequently use in Python can be grouped into the categories listed in that is associated with each built-in object type and can be used to determine whether an object is of a specific type using the isinstance( object, typename ) function, as follows:

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Python Phrasebook»

Look at similar books to Python Phrasebook. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Python Phrasebook»

Discussion, reviews of the book Python Phrasebook and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.