Cerca

Heus ací els resultats de la cerca.

3.1 PEP 8 – Introduction @info:cursos:pue:python-pcpp1:m2
111 Resultats, Darrera modificació:
may adopt their own style guidelines (in which case such project-specific guidelines may be favored o... ntions provided for by PEP 8, especially in the case of any conflicts, or backwards-compatibility issu... nsistent in their beliefs and practices. In our case, it means we must not forget about one simple but... ow when to be inconsistent [...]. When in doubt, use your best judgement.// When should you **ignore*
1.7 Four magic letters: CRUD @info:cursos:pue:python-pcpp1:m4
109 Resultats, Darrera modificació:
to gather all new facts and tools and glue all these pieces into one functional block. You already kno... information. Moreover, the structure of the database (or the service) may vary, e.g., it may be a simple relational database residing in a single file, or on the contrary, a ... ry, store a new client's data in a customer database, etc. At REST level, the creation of new items i
1.1 SQLite @info:cursos:pue:python-pcpp1:m5
106 Resultats, Darrera modificació:
= 1.1 SQLite == What is a database? Nowadays, social applications such as Facebook, Twitter, and Insta... t. You’ve surely noticed that the data sent to those applications are still available after a few days... hat can be easily accessed. This place is a database, which is a set of information stored on a disk in a computer system. Access to the database is possible thanks to a database management syste
4.1 PEP 257 – Docstring Conventions @info:cursos:pue:python-pcpp1:m2
53 Resultats, Darrera modificació:
ncluding you) to remember and understand the purpose, operation, and capabilities of particular code b... ibute or the ''help()'' function.| |The main purpose of comments is increasing the readability and und... dify, extend, or maintain the code.|The main purpose of docstrings is documenting your code – describing its use, functionality, and capabilities to users who do
2.1 PEP 20 – The Zen of Python @info:cursos:pue:python-pcpp1:m2
49 Resultats, Darrera modificació:
e aphorisms are extremely practical and common sense, and you’re encouraged to accept them and implement in your code. These, of course, should be looked upon holistically, rather than individually, but, still, let’s try to me... ** that programmers are recommended to follow. These are, among other things: a 79-character maximum l
1.2 How to use sockets in Python @info:cursos:pue:python-pcpp1:m4
49 Resultats, Darrera modificació:
= 1.2 How to use sockets in Python == How to fetch a document from a server using Python We are going to write our first program making use of network sockets. Of course, we'll harness Python for this purpose. Here are our goals: * we want to write **a program which
4.1 Shallow and deep copy operations @info:cursos:pue:python-pcpp1:m1
46 Resultats, Darrera modificació:
forms any kind of data processing without making use of variables. As variables are fundamental elemen... of copying them. When you spot the following clause: <code python> a_list = [ 1, 'New York', 100] </c... used, so evaluation of the right side of the clause takes precedence over the left side.) * At fir... s rarely used in applications. More often you’ll use it to debug the code or to experiment while copyi
3.1 Advanced techniques of creating and serving exceptions @info:cursos:pue:python-pcpp1:m1
42 Resultats, Darrera modificació:
ial kind of data, called an **exception**. Of course, this exception is an object. Both of these activities are called **raising an exception**. We can s... message sent to the console by Python; * otherwise, if the exception is taken care of and **handled*... on handling When you suspect that the code may raise an exception, you should use the ''try: problemat
1.6 Making life easier with the requests module @info:cursos:pue:python-pcpp1:m4
42 Resultats, Darrera modificació:
ver serving** a web **service** (sorry for all these serv..., we weren't able to avoid them) and we al... aces when it tries to establish, maintain, and close internet connections. This is why we used it befo... **little chat** with a web service. Which of these demands (server or tool) should be satisfied earlier? The server, of course. We need our own, private HTTP server which will
2.1 File processing - XML files @info:cursos:pue:python-pcpp1:m5
41 Resultats, Darrera modificació:
ch to an XML document is slightly different, because it's parsed into a tree structure in which each n... using this module requires more work. In this course, you'll learn how to create and process XML docum... lement is the ''data'' tag. * **elements** – these consist of opening and closing tags. The elements... ''author'' and ''year''). * **attributes** – these are placed in the opening tags. They consist of k
2.6 Abstract classes @info:cursos:pue:python-pcpp1:m1
37 Resultats, Darrera modificació:
at doesn’t mean that there are no controls to impose a set of functionalities or an order in a class h... sed by the abstract class. == Why do we want to use abstract classes? The very important reason is: w... a is to design an abstract class representing a base music format and corresponding methods for “open”... eeds subclasses to provide implementations for those abstract methods which are declared in the abstra
2.4 Shaping the main window and conversing with the user @info:cursos:pue:python-pcpp1:m3
36 Resultats, Darrera modificació:
nnamed. To change the window’s title, you would use a method named ''title()''. Our sample code show... e directory where the application resides; * **use** a ''PhotoImage'' class constructor to convert t... toImage(file = 'logo.png') window.wm_iconphoto(False, photo) window.mainloop() </code> Note: we’ve us... g). Feel free to replace it with whatever you choose. If you want your main window to be sized in a n
1.5 What is XML and why do we prefer to use JSON? @info:cursos:pue:python-pcpp1:m4
36 Resultats, Darrera modificació:
= 1.5 What is XML and why do we prefer to use JSON? **XML** is a **language**. Anyway, this is what it... ansparent carrier** of any type of data. You can use it to store and transfer documents of virtually a... ed to JSON. We’re not going to teach you how to use XML in Python. We only want to show you how it’s ... solutions were invented for nearly the same purpose. Take a look – it's a simple sample XML document
2.4 Decorators @info:cursos:pue:python-pcpp1:m1
34 Resultats, Darrera modificació:
urns a function that can be called later. Of course, the **decorating** function does more, because it can take the parameters of the decorated function ... ze some examples before we get down to the next dose of theory. So, let's create a function – ''simpl... of arguments passed. In such a situation, we can use the *args and %%**%%kwargs concepts. We can also
2.9 Inheriting properties from built-in classes @info:cursos:pue:python-pcpp1:m1
32 Resultats, Darrera modificació:
arent or even parents and you can still access those attributes and methods. Later, you can override ... if type(value) is not int: raise ValueError('Not an integer type') def __seti... rter, cleaner and easier to maintain. We'll make use of this method a few times. In case the argument's type is not an integer, a ValueError exception is
2.1 Python core syntax @info:cursos:pue:python-pcpp1:m1
30 Resultats, Darrera modificació:
2.5 Different faces of Python methods @info:cursos:pue:python-pcpp1:m1
29 Resultats, Darrera modificació:
1.6 Events and how to handle them @info:cursos:pue:python-pcpp1:m3
28 Resultats, Darrera modificació:
5.1 The configparser module @info:cursos:pue:python-pcpp1:m5
27 Resultats, Darrera modificació:
1.3 JSON – our new friend @info:cursos:pue:python-pcpp1:m4
26 Resultats, Darrera modificació:
2.7 Encapsulation @info:cursos:pue:python-pcpp1:m1
25 Resultats, Darrera modificació:
1.4 Talking to JSON in Python @info:cursos:pue:python-pcpp1:m4
23 Resultats, Darrera modificació:
4.1 Logging in Python @info:cursos:pue:python-pcpp1:m5
20 Resultats, Darrera modificació:
5.1 Metaprogramming @info:cursos:pue:python-pcpp1:m1
19 Resultats, Darrera modificació:
1.2 Let TkInter speak! @info:cursos:pue:python-pcpp1:m3
18 Resultats, Darrera modificació:
2.5 Working with the Canvas @info:cursos:pue:python-pcpp1:m3
18 Resultats, Darrera modificació:
3.1 The CSV module in Python @info:cursos:pue:python-pcpp1:m5
14 Resultats, Darrera modificació:
2.3 Extended function argument syntax @info:cursos:pue:python-pcpp1:m1
12 Resultats, Darrera modificació:
1.4 Coloring your widgets @info:cursos:pue:python-pcpp1:m3
12 Resultats, Darrera modificació:
1.1 What is PEP? @info:cursos:pue:python-pcpp1:m2
11 Resultats, Darrera modificació:
1.7 Visiting widgets’ properties @info:cursos:pue:python-pcpp1:m3
11 Resultats, Darrera modificació:
1.5 A simple GUI application @info:cursos:pue:python-pcpp1:m3
9 Resultats, Darrera modificació:
1.8 Interacting with widget methods @info:cursos:pue:python-pcpp1:m3
9 Resultats, Darrera modificació:
1.9 Looking at variables @info:cursos:pue:python-pcpp1:m3
6 Resultats, Darrera modificació: