Cerca
Heus ací els resultats de la cerca.
Resultats de text complet:
- 1.7 Four magic letters: CRUD @info:cursos:pue:python-pcpp1:m4
- * each car is described by: * ''id'' – a unique item number; note – each item in the collection m... ll grow soon – we promise: <code python> import requests try: reply = requests.get("http://localhost:3000/cars") except requests.RequestException: print("Communication error"
- 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 fina... ll enough equipped to start a discussion on the requests module – let's dive into it! The first program makes very basic use of the power of the ''requests'' module. Take a look: <code python> import requests reply = requests.get('http://localhost:3000')
- 2.4 Shaping the main window and conversing with the user @info:cursos:pue:python-pcpp1:m3
- nounce something to the user or to ask any simple question (e.g., yes/no), you don’t need to create you... for the dialog: possible values are: ERROR, INFO, QUESTION, and WARNING. The first of the functions we... dialog which: * contains an **icon** with a **question** mark in it; * returns ''True'' if the us... kinter as tk from tkinter import messagebox def question(): answer = messagebox.askyesno("?", "To
- 1.2 How to use sockets in Python @info:cursos:pue:python-pcpp1:m4
- HTTP server** of a given address; - **send a request to the server** (the server wants to know what ... ve the server's response** (it will contain the requested root document of the site) - **close the so... conversation with the HTTP server consists of **requests (sent by the client) and responses (sent by the server)**. HTTP defines a set of acceptable requests - these are **the request methods or HTTP word
- 1.1 SQLite @info:cursos:pue:python-pcpp1:m5
- eed some knowledge of SQL. SQL is a **Structured Query Language** for creating, modifying, and managin... d'' column is a primary key that allows you to uniquely identify records stored in the table. The secon... and optional parameters necessary to execute the query. The variant with optional parameters will be p... me. The solution to this problem is to modify the query as follows: <code sql> CREATE TABLE IF NOT EXIS
- 1.5 What is XML and why do we prefer to use JSON? @info:cursos:pue:python-pcpp1:m4
- FPI (Formal Public Identifier – a string which uniquely names the DTD on the scale of the universe) and... Let's dive into it. Try to answer the following question: how many cars can you buy here? <code xml> ... We hope that XML is clear now, but there is one question that has to be put here: **how do we process XML documents in Python?** The question (fortunately or not) has more than one answe
- 4.1 PEP 257 – Docstring Conventions @info:cursos:pue:python-pcpp1:m2
- s. In short, it tries to answer the following two questions: - What should Python docstrings contain... the topic of docstrings, let's try to answer the question: why is commenting and documenting code impo... ection we've only touched on the most fundamental questions related to the subject of type hinting in P... cts (Look at the Python Standard Library or the Requests library), and learn from them. Finally, you ca
- Python Professional Course Series: GUI Programming @info:cursos:pue:python-pcpp1:m3
- It's not surprising that the light pen didn't conquer the market. The most important aspect of the case is a question: how do we organize computer–user interactio... e window performs a very specific task (it asks a question and forces the user to reply), it needs two ... es care of this. It's automatic and completely opaque. You don't need to do anything (or almost anythin
- 1.2 Let TkInter speak! @info:cursos:pue:python-pcpp1:m3
- s able to create **dialog boxes** intended to ask questions, display messages, and to receive a user's ... sagebox def Click(): replay = messagebox.askquestion("Quit?", "Are you sure?") if replay == '... den inside the callback: * we invoke the ''askquestion()'' function by passing two arguments to it:... user aware of the incoming issue; * the ''askquestion()'' function returns a string which is equal
- 3.1 Advanced techniques of creating and serving exceptions @info:cursos:pue:python-pcpp1:m1
- = 3.1 Advanced techniques of creating and serving exceptions In this module, we'll talk about Python ex... t kind of exception might occur. So, when a subsequent exception (much better forecasted) occurs, we s... d output. The corresponding output reveals the sequence of exceptions and proves that the execution wa
- 4.1 Shallow and deep copy operations @info:cursos:pue:python-pcpp1:m1
- . This is an integer which is guaranteed to be unique and constant for this object during its lifetime.... ile copying objects. The side effect of this infrequent use is that some developers forget about its ex... %%'' operator. In other words, it responds to the question: “Are both variables referring to the same i
- 5.1 Metaprogramming @info:cursos:pue:python-pcpp1:m1
- etaclasses Metaprogramming is a programming technique in which computer programs have the ability to mo... velopment time. But the truth is that this technique could be used for tool preparation; those tools c... form one more experiment that will respond to the question: what type of objects are built-in classes a
- 3.1 PEP 8 – Introduction @info:cursos:pue:python-pcpp1:m2
- d indicate errors in the source code and their frequency). * More information: https://github.com/P... ur imports be **on separate lines**, rather than squeezed onto one line: Make sure you insert a blank ... he product variable and use it # for the subsequent x to y calculations to speed up the process.
- 1.3 Settling widgets in the window's interior @info:cursos:pue:python-pcpp1:m3
- ry manager is named ''pack()'' as it **packs subsequent widgets** into the window's interior. This mean... default pack's operation tends to deploy all subsequent widgets in one column, one below the other. You... 848.png }} We think that there is one intriguing question that can be asked here and now: do these but
- 1.8 Interacting with widget methods @info:cursos:pue:python-pcpp1:m3
- f their existence is very closely bound to the unique features of **event programming**. The methods a... h is as specific as the method itself – it’s a unique **id** of the planned invocation; is it usable? Y... e. Moreover, it isn’t assigned as a callback. The question is – who invokes it? The event managers do,