This book is geared toward those who already have programming knowledge. It covers topics that include: creation of user interfaces, computer graphics, internet applications, distributed systems, among other issues.
Dynamic languages were seen in the past only as scripting languages, used to automate small tasks, but with the passing of time, they grew, matured and conquered their place in the market, to the point of calling the attention of the major providers of technology.
Several factors contributed to this change, such as the internet, open source software and agile development methodologies. The internet has enabled the sharing of information in a way unprecedented in history, which made possible the growth of open source software. Dynamic languages are usually open source and share the same features and in some cases, the same goals.
Among the dynamic languages, Python stands out as one of the most popular and powerful. There is a lively community of language users in the world, and this is reflected in active mailing lists and many tools available in open source.
Learning a new programming language means learning to think differently. And learn a dynamic language represents a paradigm shift even harder for those people who have spent years developing in static languages.
The e-book "Python para Desenvolvedores" ("Python for Developers") aimed to fill a gap, which was the lack of free courseware in Portuguese about the Python programming language. The work was adopted as a support material for several universities in Brazil, served as a reference for academic papers and has been downloaded over 100,000 times from its official website.
This e-book was originally written in Portuguese and was translated by a small group of volunteers who do not speak English natively, so we ask for help from those who know better the English language, to refine the work, which we believe is a meaningful contribution to the Python users around the world.
The chapters below were rendered through nbviewer in real time. They are read-only. To change any of the content, simply clone this project in Github.
This part deals with the basics of Python programming language, including syntax, types, control structures, functions, and documentation.
- Chapter 1: Introduction
- Chapter 2: Syntax
- Chapter 3: Control Flow
- Chapter 4: Loops
- Chapter 5: Types
- Chapter 6: Functions
- Chapter 7: Documentation
- Exercises I
This part is about modules and packages, highlighting some of the most important ones that are present in standard library of the language, installation of third-party libraries, exceptions and introspection.
- Chapter 8: Modules
- Chapter 9: Scope of names
- Chapter 10: Packages
- Chapter 11: Standard library
- Chapter 12: Third party libraries
- Chapter 13: Exceptions
- Chapter 14: Introspection
- Exercises II
This part is divided into two topics: generators, an increasingly present technology in the language, and functional programming.
This part mainly focuses on object orientation, and also addresses decorators and automated tests.
- Chapter 17: Decorators
- Chapter 18: Classes
- Chapter 19: Single inheritance
- Chapter 20: Multiple Inheritance
- Chapter 21: Properties
- Chapter 22: Operator overloading
- Chapter 23: Metaclasses
- Chapter 24: Class decorators
- Chapter 25: Automated Testing
- Exercises IV
This part covers various technologies that today are provided by applications mainly to deal with storage and information exchange: database access, persistence, XML and Web. In addition to these topics, we have the use of threads and the MVC architecture.
- Chapter 26: Threads
- Chapter 27: Persistence
- Chapter 28: XML
- Chapter 29: Database
- Chapter 30: Web
- Chapter 31: MVC
- Exercises V
This part presents some features of the packages NumPy, SciPy and Matplolib, and also of known graphical interfaces toolkits . Also, a brief introduction to computer graphics and distributed processing. Finally, comments about performance in Python and ways of packaging and distribute applications.
- Chapter 32: Numerical Processing
- Chapter 33: GUI
- Chapter 34: Computer graphics
- Chapter 35: Image Processing
- Chapter 36: SVG
- Chapter 37: Images in three dimensions
- Chapter 38: Distributed Processing
- Chapter 39: Performance
- Chapter 40: Packaging and distribution
- Exercises VI
This part focuses on other technologies that have to live with Python in several ways. And the end, the answers of the exercises proposed in the previous parts.
- Appendix A: Integration with applications
- Appendix B: Blender
- Appendix C: GIMP
- Appendix D: Inkscape
- Appendix E: BrOffice.org
- Appendix F: Integration with other languages
- Appendix G: Integration with. NET
- Answers to exercises I
- Answers to exercises II
- Answers to exercises III
- Answers to exercises IV
- Answers to exercises V
- Answers to exercises VI
This work is licensed under a Creative Commons Attribution - Noncommercial - ShareAlike license. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/br/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.
I would like to thank my wife and my parents, for their patience during the creation of this work.
Besides them, I would like to thank everyone who supported and helped to publicize the book.
Luiz Eduardo Borges is an engineer and systems analyst, a graduate degree in Computer Graphics by State University of Rio de Janeiro (UERJ). He has been working for over two decades in computer science under various ways.
This book can be read in two different ways:
- The first way is the most interactive of all. Here you have to clone the repository of the book to download all files .ipynb to your local machine. If you have IPython installed, you can then view all the chapters in your browser and run the code examples. This is one of the best ways to maximize your learning, but some dependencies must be installed on a machine.
- The second way is to use the site nbviewer which presents the IPython Notebook right in your browser. The content is updated according to the repository updates. To access the chapters, use the links on the Content section above.