Cerca

Heus ací els resultats de la cerca.

1.2 How to use sockets in Python @info:cursos:pue:python-pcpp1:m4
18 Resultats, Darrera modificació:
n the requested root document of the site) - **close the socket** (end the connection) This is our ro... HTTP/1.1\r\n Host: www.site.com\r\n Connection: close\r\n \r\n </code> The ''GET'' method requires: ... meter named ''Connection:'' along with its value close, which forces the server to close the connection after the first request is served; it will simplify
1.7 Four magic letters: CRUD @info:cursos:pue:python-pcpp1:m4
18 Resultats, Darrera modificació:
**inactive for some time**, the server silently closes the connection; this means that the client is o... <code ; output> Connection=keep-alive </code> ''close'' means that the server is going to close the connection as soon as the response is fully transmitted... the server to temporarily change its habits and close the connection immediately. It will conserve the
1.1 SQLite @info:cursos:pue:python-pcpp1:m5
10 Resultats, Darrera modificació:
at all, because it's a self-contained library enclosed in one source file. SQLite also supports transa... (?,?)', ('My first task', 1)) conn.commit() conn.close() </code> The ''commit'' method confirms our c... thod of the ''Connection'' object is used. The ''close'' method closes the database connection, e.g., after inserting all tasks. **NOTE**: Restarting the p
4.3 Making Python objects persistent using the shelve module @info:cursos:pue:python-pcpp1:m1
6 Resultats, Darrera modificació:
eady for action, so let's insert a few items and close the shelve object. <code python> my_shelve['USD'... {'code':'Japanese yen', 'symbol': '¥'} my_shelve.close() </code> Now let's open the shelve file to dem... shelve_name) print(new_shelve['USD']) new_shelve.close() </code> The final code is presented in the ri... {'code':'Japanese yen', 'symbol': '¥'} my_shelve.close() new_shelve = shelve.open(shelve_name) print(n
1.2 Let TkInter speak! @info:cursos:pue:python-pcpp1:m3
5 Resultats, Darrera modificació:
ith the window, and the most important is how to close it while also causing the application to quit. C... the OS's default behaviors, e.g., clicking the **closing button** (ours is red – and yours?) or using a... very useful solution in some cases. Of course, closing the window without asking the user if they are... ry disappointing. For example, the window can be closed instantly, without any question, when the user
1.5 What is XML and why do we prefer to use JSON? @info:cursos:pue:python-pcpp1:m4
5 Resultats, Darrera modificació:
ry original “parentheses” in which the line is enclosed: <? and ?> . As you can see, XML uses **plain ... y a **pair of tags**: an **opening** tag and a **closing** tag. Both tags look nearly identical, but the closing tag's name starts with /. Tags can be easily identified as they are enclosed inside **<** and** >**. This means that the el
2.4 Decorators @info:cursos:pue:python-pcpp1:m1
4 Resultats, Darrera modificació:
and %%**%%kwargs concepts. We can also employ a closure technique to persist arguments. The code pres... ould reference an object (own_function) in its enclosing scope thanks to the closure. == Decorators can accept their own attributes In Python, we can creat... extend its behavior. Decorators rely heavily on closures and *args and %%**kwargs%%. Interesting note
4.1 PEP 257 – Docstring Conventions @info:cursos:pue:python-pcpp1:m2
4 Resultats, Darrera modificació:
omment. Generally, you should insert comments **close to the code** you're describing in order to make... tion about the topic, we encourage you to have a closer look at PEP 483 – The theory of type hints, PEP... , and be surrounded by triple double quotes (the closing quotes should be on the same line as the openi... (and possibly should) adopt the Zen of Python philosophy, with all its good advice for writing an eleg
Python Professional Course Series: GUI Programming @info:cursos:pue:python-pcpp1:m3
4 Resultats, Darrera modificació:
tons. Our sample window contains only one: the **closing button**. Note that the location of these butt... he focus always engages two widgets: the one that loses the focus and the one that gains it). This mean... ual programming demands a completely different philosophy, or (expressing this thought in a more fashio... default behaviors (e.g., focus moving and window closing). Of course, just implementing an event handl
2.4 Shaping the main window and conversing with the user @info:cursos:pue:python-pcpp1:m3
4 Resultats, Darrera modificació:
t to bind your own callback to the main window’s close operation (which can be caused by the user clicking the window’s closing button), you can use a low-level ''tkinter'' m... s// and ''False'' otherwise (e.g., when the user closes the dialog using its close button) In the editor we've provided a simple sample code showing the fu
1.3 JSON – our new friend @info:cursos:pue:python-pcpp1:m4
4 Resultats, Darrera modificació:
TLA? It's simple – it's a Three-Letter Acronym. Close your eyes, strain your mind and try to recall fi... erties), JSON offers a syntax which looks like a close relative of Python's dictionary, which is, in fa... wo ways: * inside **arrays** (which are a very close relative to Python lists); * inside **objects*... colon as a separator where the name **must be enclosed in quotes**. It's worth mentioning that braces
2.1 PEP 20 – The Zen of Python @info:cursos:pue:python-pcpp1:m2
3 Resultats, Darrera modificació:
collection of 19 aphorisms, which reflect the philosophy behind Python, its guiding principles, and de... ans. In fact, it’s **the essence of the Python philosophy**, and the whole of Python design and culture... ng as a perfect thing. You can work hard to move closer to perfection, refine your code, refactor it se
1.1 Python Professional Course Series: RESTful APIs @info:cursos:pue:python-pcpp1:m4
3 Resultats, Darrera modificació:
"C" course. The main idea behind BSD sockets is closely connected to Unix philosophy contained in the words everything is a file. A socket may be often tre... the target (moreover, if any of the datagrams is lost, it may remain undetected) * the datagram will
2.1 File processing - XML files @info:cursos:pue:python-pcpp1:m5
3 Resultats, Darrera modificació:
* **elements** – these consist of opening and closing tags. The elements include text, attributes, a... E**: Each open XML tag must have a corresponding closing tag. <code xml><?xml version="1.0"?> <data> ... only iterate over the book elements that are the closest children of the root element. The correct code
3.1 PEP 8 – Introduction @info:cursos:pue:python-pcpp1:m2
2 Resultats, Darrera modificació:
ing, as they help you to better understand the philosophy behind Python and become a more aware and pro... ace**: * after a trailing comma followed by a closing parenthesis, or * immediately before an open
1.4 Coloring your widgets @info:cursos:pue:python-pcpp1:m3
2 Resultats, Darrera modificació:
1.8 Interacting with widget methods @info:cursos:pue:python-pcpp1:m3
2 Resultats, Darrera modificació:
4.1 Logging in Python @info:cursos:pue:python-pcpp1:m5
2 Resultats, Darrera modificació:
2.5 Different faces of Python methods @info:cursos:pue:python-pcpp1:m1
1 Resultats, Darrera modificació:
1.1 What is PEP? @info:cursos:pue:python-pcpp1:m2
1 Resultats, Darrera modificació:
1.6 Events and how to handle them @info:cursos:pue:python-pcpp1:m3
1 Resultats, Darrera modificació:
3.1 The CSV module in Python @info:cursos:pue:python-pcpp1:m5
1 Resultats, Darrera modificació:
5.1 The configparser module @info:cursos:pue:python-pcpp1:m5
1 Resultats, Darrera modificació: