An Introduction to Python: A python manual
By: Rossum, Guido Van.
Contributor(s): The Python Development Team.
Material type: BookPublisher: Mumbai Shroff Publishers & Distributors Pvt. Ltd. 2019Description: 143.ISBN: 978-93-5213-597-4.Subject(s): PythonDDC classification: 005.133Item type | Current location | Call number | Status | Date due | Barcode |
---|---|---|---|---|---|
Books | BSDU Knowledge Resource Center, Jaipur General Stacks | 005.133 ROS (Browse shelf) | Available | 017973 |
Browsing BSDU Knowledge Resource Center, Jaipur Shelves , Shelving location: General Stacks Close shelf browser
005.133 NUN Elegant Scipy: The art of scientific python | 005.133 PHI Creating Apps in Kivy | 005.133 PIM Computer Programming with C++ | 005.133 ROS An Introduction to Python: A python manual | 005.133 SEV Python for Everybody :Exploring Data Using Python 3 | 005.133 SHA Web Development | 005.133 SOL Programming Computer Vision With Python |
This manual provides an introduction to Python, an easy to learn object-oriented programming language.
Python combines power with clear syntax. It has modules, classes, exceptions, very high-level data types, and dynamic typing. Python can link directly to libraries written in C or C++ and can be embedded as an extension language for applications that need a programmable interface.
Contents
1 Whetting Your Appetite 3
2 Using the Python Interpreter 5
2.1 Invoking the Interpreter ......................................... 5
2.2 The Interpreter and Its Environment ................................... 6
3 An Informal Introduction to Python 9
3.1 Using Python as a Calculator ...................................... 9
3.2 First Steps Towards Programming .................................... 15
4 More Control Flow Tools 17
4.1 if Statements .............................................. 17
4.2 for Statements ............................................. 17
4.3 The range() Function ......................................... 18
4.4 break and continue Statements, and else Clauses on Loops ................... 19
4.5 pass Statements ............................................. 20
4.6 Defining Functions ............................................ 20
4.7 More on Defining Functions ....................................... 22
4.8 Intermezzo: Coding Style ........................................ 26
5 Data Structures 29
5.1 More on Lists ............................................... 29
5.2 The del statement ............................................ 33
5.3 Tuples and Sequences .......................................... 34
5.4 Sets .................................................... 35
5.5 Dictionaries ................................................ 35
5.6 Looping Techniques ........................................... 36
5.7 More on Conditions ........................................... 38
5.8 Comparing Sequences and Other Types ................................. 38
6 Modules 39
6.1 More on Modules ............................................ 40
6.2 Standard Modules ............................................ 42
6.3 The dir() Function ........................................... 42
6.4 Packages ................................................. 44
7 Input and Output 47
7.1 Fancier Output Formatting ........................................ 47
7.2 Reading and Writing Files ........................................ 50
8 Errors and Exceptions 55
8.1 Syntax Errors ............................................... 55
8.2 Exceptions ................................................ 55
8.3 Handling Exceptions ........................................... 56
8.4 Raising Exceptions ............................................ 58
8.5 User-defined Exceptions ......................................... 59
8.6 Defining Clean-up Actions ........................................ 60
8.7 Predefined Clean-up Actions ....................................... 60
9 Classes 63
9.1 A Word About Names and Objects ................................... 63
9.2 Python Scopes and Namespaces ..................................... 63
9.3 A First Look at Classes .......................................... 66
9.4 Random Remarks ............................................ 69
9.5 Inheritance ................................................ 70
9.6 Private Variables ............................................. 72
9.7 Odds and Ends .............................................. 72
9.8 Iterators .................................................. 73
9.9 Generators ................................................ 74
9.10 Generator Expressions .......................................... 75
10 Brief Tour of the Standard Library 77
10.1 Operating System Interface ....................................... 77
10.2 File Wildcards .............................................. 77
10.3 Command Line Arguments ....................................... 78
10.4 Error Output Redirection and Program Termination ........................... 78
10.5 String Pattern Matching ......................................... 78
10.6 Mathematics ............................................... 78
10.7 Internet Access .............................................. 79
10.8 Dates and Times ............................................. 79
10.9 Data Compression ............................................ 80
10.10 Performance Measurement ........................................ 80
10.11 Quality Control .............................................. 81
10.12 Batteries Included ............................................ 81
11 Brief Tour of the Standard Library — Part II 83
11.1 Output Formatting ............................................ 83
11.2 Templating ................................................ 84
11.3 Working with Binary Data Record Layouts ............................... 85
11.4 Multi-threading .............................................. 85
11.5 Logging .................................................. 86
11.6 Weak References ............................................. 86
11.7 Tools for Working with Lists ....................................... 87
11.8 Decimal Floating Point Arithmetic ................................... 88
12 Virtual Environments and Packages 91
12.1 Introduction ............................................... 91
12.2 Creating Virtual Environments ...................................... 91
12.3 Managing Packages with pip ....................................... 92
13 What Now? 95
14 Interactive Input Editing and History Substitution 97
14.1 Tab Completion and History Editing ................................... 97
14.2 Alternatives to the Interactive Interpreter ................................ 97
15 Floating Point Arithmetic: Issues and Limitations 99
15.1 Representation Error ........................................... 101
16 Appendix 105
16.1 Interactive Mode ............................................. 105
A Glossary 107
B About these documents 119
B.1 Contributors to the Python Documentation ............................... 119
C History and License 121
C.1 History of the software .......................................... 121
C.2 Terms and conditions for accessing or otherwise using Python ..................... 122
C.3 Licenses and Acknowledgements for Incorporated Software ...................... 125
D Copyright 139
Index
There are no comments for this item.