Cerca
Heus ací els resultats de la cerca.
Resultats de text complet:
- 2.1 PEP 20 – The Zen of Python @info:cursos:pue:python-pcpp1:m2
- ophy behind Python, its guiding principles, and design. Tim Peters, a long time major contributor to ... a collection of some general truths for Python design rules and decision making. Even though the "poem" seems to be imbued with contradictions and allusions, we assure you that the aphorisms are extremel
- 3.1 PEP 8 – Introduction @info:cursos:pue:python-pcpp1:m2
- (code style guide) for Python code. PEP 8 is considered one of the most important PEPs and a must-read for every professional Python programmer, as it helps to make the code more consistent, more readable, and more efficient. Even th... . == The Hobgoblin of Little Minds ”A foolish consistency is the hobgoblin of little minds.” This is
- 2.4 Decorators @info:cursos:pue:python-pcpp1:m1
- = 2.4 Decorators A decorator is one of the design patterns that describes the structure of related obj... , hence the name "decoration". This is done by passing the original function (i.e., the **decorated** ... dose of theory. So, let's create a function – ''simple_hello()'' is one of the simplest functions we could think of. We'll decorate it in a moment. <co
- 2.8 Composition vs Inheritance - two ways to the same destination @info:cursos:pue:python-pcpp1:m1
- = 2.8 Composition vs Inheritance - two ways to the same destination So far we've been using and following the inheritance concept when mode... ance is to reuse the code. If two classes perform similar tasks, we can create a common base class for... anges. In case of any problems, it will also be easier to find the cause of the error. As a result, y
- 4.1 PEP 257 – Docstring Conventions @info:cursos:pue:python-pcpp1:m2
- ations!) associated with documenting Python code using docstrings. In short, it tries to answer the fo... n be accessed by reading the source code, and by using the ''__doc__'' attribute or the ''help()'' function.| |The main purpose of comments is increasing the readability and understandability of the co... be turned into documentation; their purpose is to simplify the code, provide precise information, and
- Python Professional Course Series: GUI Programming @info:cursos:pue:python-pcpp1:m3
- = Python Professional Course Series: GUI Programming == What is GUI? GUI is an acronym. Moreover, it’s... How do you like it? Take a look at the two classical terminals which exerted the greatest influence... different from contemporary keyboards installed inside laptops) and nothing more. Some of the terminals (very expensive and very rare models) could be equipped with a
- 1.2 How to use sockets in Python @info:cursos:pue:python-pcpp1:m4
- Python == How to fetch a document from a server using Python We are going to write our first program ... rite **a program which reads the address of a WWW site** (e.g., pythoninstitute.org) using the standard ''input()'' function and **fetches the root document** (the main HTML document of the WWW site) of the specified site; * the program **outpu
- 1.5 What is XML and why do we prefer to use JSON? @info:cursos:pue:python-pcpp1:m4
- n't a programming language, and although it is possible to build a real programming language on top of... Office applications (the newer one with file extensions ending with x like docx) utilizes XML to creat... or nearly the same purpose. Take a look – it's a simple sample XML document: <code xml><?xml version = "1.0" encoding = "utf-8"?> <!-- cars.xml - List of
- 4.1 Logging in Python @info:cursos:pue:python-pcpp1:m5
- eful to you or other programmers. An example of using your own logs can be any Internet system. When users visit your site, you can log information about the browsers they use. If something goes wrong, you'll be a... t of the course, you'll learn how to create logs using the logging module. See what this module offers
- 1.1 SQLite @info:cursos:pue:python-pcpp1:m5
- ew days, or even years. Do you know how that’s possible? Data is simply information about users, the contents of their posts, and comments. The data are ... n, you send the application your account data, consisting of email address, login, and password, and w... you add new posts you send content that will be visible to other users. Sent data should be saved in s
- 2.1 File processing - XML files @info:cursos:pue:python-pcpp1:m5
- = 2.1 File processing - XML files == XML processing in Python Python is commonly used to process various types of data. P... XML: * **xml.etree.ElementTree** – has a very simple API for analyzing and creating XML data. It's... plementation of the Document Object Model (DOM). Using the DOM, the approach to an XML document is sli
- 1.6 Making life easier with the requests module @info:cursos:pue:python-pcpp1:m4
- = 1.6 Making life easier with the requests module We have reached the point where we can start the fin... know enough to communicate with the web service using JSON as an information carrier. Unfortunately, ... ren't able to avoid them) and we also need a tool simpler than the ''socket'' module to talk with the ... sary available at the higher levels of software design. The socket module is perfect when you want to
- 1.2 Let TkInter speak! @info:cursos:pue:python-pcpp1:m3
- GUI applications. The GUI application itself consists of four essential elements: * **importing**... ow it works. We’ll do it step-by-step. Ready The simplest (and at the same time the less controllable... m tkinter import Button</code> If you're an enthusiast of living life on the edge, you can simplify your import (but not the rest of your work) by using
- 2.4 Shaping the main window and conversing with the user @info:cursos:pue:python-pcpp1:m3
- = 2.4 Shaping the main window and conversing with the user The main window is a very specific construc... age in the same directory where the application resides; * **use** a ''PhotoImage'' class constructo... r you choose. If you want your main window to be sized in a non-default way, you have to use a low-le... height'' are decimal numbers specifying both dimensions in pixels. Note: you can use this invocation
- 2.2 Inheritance and polymorphism — Inheritance as a pillar of OOP @info:cursos:pue:python-pcpp1:m1
- all the traits (methods and attributes) defined inside any of the superclasses. This means that inher... f building a new class, not from scratch, but by using an already defined repertoire of traits. The ne... ython-pcpp1:pasted:20231013-035718.png }} A very simple example of two-level inheritance is presented... cle** classes. == Inheritance and polymorphism — Single inheritance vs. multiple inheritance There ar