Cerca
Heus ací els resultats de la cerca.
Resultats de text complet:
- 3.1 PEP 8 – Introduction @info:cursos:pue:python-pcpp1:m2
- PEP 8 style guidelines. The online tool is built using Flask, Twitter Bootstrap, and the PEP8 module (t... ons related to such things as: * indentation, using tabs and spaces; * line length, line breaks, a... you want to improve readability) are allowed if using parentheses/brackets/braces: <code python ❌> # ... locks of code more easily. In the same fashion, using too many blank lines in your code will make it l
- 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. Per... plementation of the Document Object Model (DOM). Using the DOM, the approach to an XML document is slig... e above modules, analyzing a simple XML document using this module requires more work. In this course,
- Python Professional Course Series: GUI Programming @info:cursos:pue:python-pcpp1:m3
- to it was usually thick and stiff. It's not surprising that the light pen didn't conquer the market. T... ce to utilize. The user's answer was given by pressing a set of allowed keys. Simple? Simple. From our ... . == Widgets The user interacts with the GUI by using gestures: a mouse's movements, clicks targeting ... Touch screens may offer something more: tapping (single or double or even more complex), swiping, and
- 2.1 PEP 20 – The Zen of Python @info:cursos:pue:python-pcpp1:m2
- adjusted to the specificity** of your project. Using a plane to transport yourself to a nearby shop c... mple one, especially in the case of the latter causing misunderstanding, doubt, or misinterpretation. You should avoid those. On the other hand, complex is... ll be good, but anything beyond that becomes confusing and unreadable. Even though you can actually ha
- 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 u... t of the course, you'll learn how to create logs using the logging module. See what this module offers and start using it to become a better programmer. == The Logger... gged. It's worth mentioning that loggers created using the name argument have the ''NOTSET'' level set
- 1.1 SQLite @info:cursos:pue:python-pcpp1:m5
- oftware? == How to work with an SQLite database using Python You've probably already used the standard... at will allow you to create amazing applications using SQLite databases. Can you guess what it’s called... : The sqlite3 module has been available in Python since version 2.5. == sqlite3 – creating a database As we already said, the SQLite database is a single file, which is saved on your computer. Each fi
- 5.1 The configparser module @info:cursos:pue:python-pcpp1:m5
- tion with these services requires authentication using data such as a login and password, or simply an ... ailable in the Python standard library. To start using it, we need to import the appropriate module: <... In a moment, you'll learn how to read this data using the ''configparser'' module. **NOTE**: The whit... ing and end of keys and values is removed. == Parsing the configuration file Parsing the configuration
- 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 fol... 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 cod... he code's whys and hows, as this will make the reusing of and contributing to code much easier. So, we
- 3.1 The CSV module in Python @info:cursos:pue:python-pcpp1:m5
- . However, for commercial projects, we recommend using an excellent library called ''pandas''. We encou... writing data in CSV format. Reading data is done using the ''reader'' object, while writing is done using the ''writer'' object. First, we'll take a closer look at reading data using the reader object. The ''reader'' function retu
- 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 m... ress of a WWW site** (e.g., pythoninstitute.org) using the standard ''input()'' function and **fetches ... s we mentioned before, we aren't and won't be focusing on network programming. We want to show you how ... networks, you may need to continue your reading using another of our courses. The socket module provi
- 1.2 Working with class and instance data – instance variables @info:cursos:pue:python-pcpp1:m1
- - we instantiate the class twice, each time passing a different value to be stored inside the object... Moreover, it lists the contents of each object, using the built-in __dict__ property that is present f... get access to a class variable, simply access it using the class name, and then provide the variable na... en you try to set a value for the class variable using the object (a variable referring to the object o
- 1.1 Python Professional Course Series: RESTful APIs @info:cursos:pue:python-pcpp1:m4
- t possible to send and receive all kinds of data using plain text?" It's a very good question. Probabl... Of course, you can access the server's resources using the network, but you can't just get the object a... ble. You can't do it directly. But you can do it using REST. How? We'll show you very soon. Let's now t... n different computer systems, connected together using a TCP/IP network (note: this doesn't preclude th
- 2.2 Inheritance and polymorphism — Inheritance as a pillar of OOP @info:cursos:pue:python-pcpp1:m1
- f building a new class, not from scratch, but by using an already defined repertoire of traits. The new... cle** classes. == Inheritance and polymorphism — Single inheritance vs. multiple inheritance There are no obstacles to using multiple inheritance in Python. You can derive a... nheritance should be used with more prudence than single inheritance because: * a single inheritance
- 2.5 Different faces of Python methods @info:cursos:pue:python-pcpp1:m1
- e indicated instance. This is possible thanks to using ''self''. The name of the parameter ''self'' wa... s has been signaled to the Python interpreter by using an appropriate decorator. Additionally, the meth... The first parameter is used to create an object using the standard ''%%__init__%%'' method. In accord... __init__%%'' method, among other things) is done using ''cls(vin)''. Then the class method performs an
- 2.8 Composition vs Inheritance - two ways to the same destination @info:cursos:pue:python-pcpp1:m1
- ways to the same destination So far we've been using and following the inheritance concept when model... ptable objects. You can achieve similar goals by using a concept named composition. This concept model... cific engine. Composition is the process of composing an object using other different objects. The objects used in the composition deliver a set of desired