• Complain

Mark Lutz - Python pocket reference

Here you can read online Mark Lutz - Python pocket reference full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2014, publisher: OReilly, genre: Home and family. 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.

Mark Lutz Python pocket reference
  • Book:
    Python pocket reference
  • Author:
  • Publisher:
    OReilly
  • Genre:
  • Year:
    2014
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Python pocket reference: summary, description and annotation

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

Mark Lutz: author's other books


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

Python pocket reference — 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 pocket reference" 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
Python Pocket Reference
Mark Lutz
Chapter 1. Python Pocket Reference
Introduction

Python is a general-purpose, multiparadigm, open source computer programming language, with support for object-oriented, functional, and procedural coding structures. It is commonly used both for standalone programs and for scripting applications in a wide variety of domains, and is generally considered to be one of the most widely used programming languages in the world.

Among Pythons features are an emphasis on code readability and library functionality, and a design that optimizes developer productivity, software quality, program portability, and component integration. Python programs run on most platforms in common use, including Unix and Linux, Windows and Macintosh, Java and .NET, Android and iOS, and more.

This pocket reference summarizes Python types and statements, special method names, built-in functions and exceptions, commonly used standard library modules, and other prominent Python tools. It is intended to serve as a concise reference tool for developers and is designed to be a companion to other books that provide tutorials, code examples, and other learning materials.

This fifth edition covers both Python 3.X and 2.X. It focuses primarily on 3.X, but also documents differences in 2.X along the way. Specifically, this edition has been updated to be current with Python versions 3.3 and 2.7 as well as prominent enhancements in the imminent 3.4 release, although most of its content also applies both to earlier and to later releases in the 3.X and 2.X lines.

This edition also applies to all major implementations of Pythonincluding CPython, PyPy, Jython, IronPython, and Stacklessand has been updated and expanded for recent changes in language, libraries, and practice. Its changes include new coverage of the MRO and super(); formal algorithms of inheritance, imports, context managers, and block indentation; and commonly used library modules and tools, including json, timeit, random, subprocess, enum, and the new Windows launcher.

Book Conventions

The following notational conventions are used in this book:

[]

In syntax formats, items in brackets are optional; brackets are also used literally in some parts of Pythons syntax as noted where applicable (e.g., lists).

*

In syntax formats, items followed by an asterisk can be repeated zero or more times; star is also used literally in some parts of Pythons syntax (e.g., multiplication).

a|b

In syntax formats, items separated by a bar are alternatives; bar is also used literally in some parts of Pythons syntax (e.g., union).

Italic

Used for filenames and URLs, and to highlight new or important terms.

Constant width

Used for code, commands, and command-line options, and to indicate the names of modules, functions, attributes, variables, and methods.

Constant width italic

Used for replaceable parameter names in the syntax of command lines, expressions, functions, and methods.

Function()

Except where noted, callable functions and methods are denoted by trailing parentheses, to distinguish them from other types of attributes.

See Section Header Name

References to other sections in this book are given by section header text in double quotes.

Note

In this book, 3.X and 2.X mean that a topic applies to all commonly used releases in a Python line. More specific release numbers are used for topics of more limited scope (e.g., 2.7 means 2.7 only). Because future Python changes can invalidate applicability to future releases, also see Pythons Whats New documents, currently maintained at http://docs.python.org/3/whatsnew/index.html for Pythons released after this book.

Python Command-Line Usage

Command lines used to launch Python programs from a system shell have the following format:

python [option*] [ scriptfile | -c command | -m module | - ] [arg*]

In this format, python denotes the Python interpreter executable with either a full directory path, or the word python that is resolved by the system shell (e.g., via PATH settings). Command-line options intended for Python itself appear before the specification of the program code to be run (option). Arguments intended for the code to be run appear after the program specification (arg).

Python Command Options

The option items in ahead for 2.X differences):

-b

Issue warnings for calling str() with a bytes or bytearray object and no encoding argument, and comparing a bytes or bytearray with a str. Option -bb issues errors instead.

-B

Do not write .pyc or .pyo byte-code files on imports.

-d

Turn on parser debugging output (for developers of the Python core).

-E

Ignore Python environment variables described ahead (such as PYTHONPATH).

-h

Print help message and exit.

-i

Enter interactive mode after executing a script. Hint: useful for postmortem debugging; see also pdb.pm(), described in Pythons library manuals.

-O

Optimize generated byte code (create and use .pyo byte-code files). Currently yields a minor performance improvement.

-OO

Operates like -O, the previous option, but also removes docstrings from byte code.

-q

Do not print version and copyright message on interactive startup (as of Python 3.2).

-s

Do not add the user site directory to the sys.path module search path.

-S

Do not imply import site on initialization.

-u

Force stdout and stderr to be unbuffered and binary.

-v

Print a message each time a module is initialized, showing the place from which it is loaded; repeat this flag for more verbose output.

-V

Print Python version number and exit (also available as --version).

-Warg

Warnings control: arg takes the form action:message:category:module:lineno. ).

-x

Skip first line of source, allowing use of non-Unix forms of #!cmd.

-Xoption

Set implementation-specific option (as of Python 3.2); see implementation documentation for supported option values.

Command-Line Program Specification

Code to be run and command-line arguments to send to it are specified in the following ways in Python command lines:

scriptfile

Denotes the name of a Python script file to run as the main, topmost file of a program (e.g., pythonmain.py runs the code in main.py). The scripts name may be an absolute or relative (to .) filename path, and is made available in sys.argv[0]. On some platforms, command lines may also omit the

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Python pocket reference»

Look at similar books to Python pocket reference. 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 pocket reference»

Discussion, reviews of the book Python pocket reference 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.