Cerca

Heus ací els resultats de la cerca.

1.2 How to use sockets in Python @info:cursos:pue:python-pcpp1:m4
147 Resultats, Darrera modificació:
ckets in Python == How to fetch a document from a server using Python We are going to write our first ... * the program **uses TCP to connect to the HTTP server**. Our program has to perform the following ... ased on TCP; - **connect the socket to the HTTP server** of a given address; - **send a request to the server** (the server wants to know what we want
2.6 Abstract classes @info:cursos:pue:python-pcpp1:m1
128 Resultats, Darrera modificació:
esn’t mean that there are no controls to impose a set of functionalities or an order in a class hierar... r__ and a __programmer__: * the class designer sets requirements regarding methods that must be imp... upon your abstract class, will be equipped with a set of concrete methods imposed by the abstract clas... polymorphic, so all subclasses have to deliver a set of their own method implementations in order to
2.1 Python core syntax @info:cursos:pue:python-pcpp1:m1
120 Resultats, Darrera modificació:
ng operators, or to get a number of elements in a sequence or dictionary. We are able to add two or m... sents a person; each instance of the class owns a set of attributes describing a person: age, salary, ... tion: <code python>class Person: def __init__(self, weight, age, salary): self.weight = weight self.age = age self.salary = sa
1.7 Four magic letters: CRUD @info:cursos:pue:python-pcpp1:m4
115 Resultats, Darrera modificació:
mounted on top of the TCP stack and how the HTTP server is able to do much more for us than just stor... nd funny videos. In fact, a properly trained web server can be a very **effective and convenient gate... to very complicated and heavy databases or other services designed for storing and processing informa... . Moreover, the structure of the database (or the service) may vary, e.g., it may be a simple relation
1.6 Making life easier with the requests module @info:cursos:pue:python-pcpp1:m4
83 Resultats, Darrera modificació:
rney – we know enough to communicate with the web service using JSON as an information carrier. Unfort... knowledge needs to be supplemented – we need a **server serving** a web **service** (sorry for all these serv..., we weren't able to avoid them) and we also nee
2.7 Encapsulation @info:cursos:pue:python-pcpp1:m1
74 Resultats, Darrera modificació:
ance is washing it ( **processing** ). You have a set of controls ( **methods** ) that allow you to manage your laundry, or even see it (many wash machines are equipped with a trans... t** access it directly and without some checks or security. This is a basic countermeasure to protect ... * ) exceeding the total tank capacity, or request setting the liquid level to a negative value. Pytho
1.1 Classes, Instances, Attributes, Methods — introduction @info:cursos:pue:python-pcpp1:m1
60 Resultats, Darrera modificació:
unctions, modules, lists, etc.). In the very last section of this module, you'll see that even classes are instances. Why is everything in Python organiz... ism adds classes with a minimum of new syntax and semantics: <code python> class Duck: def __init__(self, height, weight, sex): self.height = he
2.8 Composition vs Inheritance - two ways to the same destination @info:cursos:pue:python-pcpp1:m1
52 Resultats, Darrera modificació:
ts. The objects used in the composition deliver a set of desired traits (properties and/or methods) so... program runtime. Let's try to write some code to see how composition works. Look at the simple code ... pane. <code python> class Car: def __init__(self, engine): self.engine = engine class GasEngine: def __init__(self, horse_power):
1.1 SQLite @info:cursos:pue:python-pcpp1:m5
51 Resultats, Darrera modificació:
rent content. You’ve surely noticed that the data sent to those applications are still available after... The data are all kinds of information that we can send to the application. During registration, you send the application your account data, consisting of ... gin, and password, and when you add new posts you send content that will be visible to other users. Se
2.9 Inheriting properties from built-in classes @info:cursos:pue:python-pcpp1:m1
49 Resultats, Darrera modificació:
hods by delivering your own modifications for the selected methods. In the following example, we’ll c... an object? Imagine that you need to collect the serial numbers of sold tickets. Sound reasonable eno... aise ValueError('Not an integer type') def __setitem__(self, index, value): IntegerList.check_value_type(value) list.__setitem__(self
5.1 The configparser module @info:cursos:pue:python-pcpp1:m5
49 Resultats, Darrera modificació:
o the configparser module Currently, many popular services provide an API that we can use in our applications. Integration with these services requires authentication using data such as ... in and password, or simply an access token. Each service may require different data for authenticatio... ar to Microsoft Windows INI files. It consists of sections that are identified by names enclosed in sq
1.4 Talking to JSON in Python @info:cursos:pue:python-pcpp1:m4
46 Resultats, Darrera modificació:
ough, to be honest, it's not as complex as it may seem and we're convinced that you’d be able to cope ... Monty Python's Flying Circus" </code> As you can see, all JSON requirements have been met. Now’s a g... ]] print(json.dumps(my_list)) </code> As you can see, there are actually two lists. Is that a problem... on", 'pi': 3.141592653589, 'data': (1, 2, 4, 8), 'set': None} print(json.dumps(my_dict)) </code> And
1.2 Working with class and instance data – instance variables @info:cursos:pue:python-pcpp1:m1
40 Resultats, Darrera modificació:
removed at any time. Each object carries its own set of variables – they don't interfere with one ano... elow. <code python> class Demo: def __init__(self, value): self.instance_var = value d1 = Demo(100) d2 = Demo(200) print("d1's instance var... stance_var variable for the instance. The keyword self is used to indicate that this variable is creat
4.1 Logging in Python @info:cursos:pue:python-pcpp1:m5
39 Resultats, Darrera modificació:
can also be an output stream, or even an external service. To start logging, we need to import the app... earn how to create logs using the logging module. See what this module offers and start using it to be... r. == The Logger object One application may have several loggers created both by us and by programmer... the names of the Python modules in which the dot separator is used. Their format is as follows: **he
3.1 PEP 8 – Introduction @info:cursos:pue:python-pcpp1:m2
38 Resultats, Darrera modificació:
This is a quote from Ralph Waldo Emerson’s essay “Self-Reliance” where Emerson urges readers to be con... n determine its syntactic legality, too. In this section, we’ll focus on style recommendations relate... 9 characters as this will help you avoid wrapping several lines of code. If line wrapping is inevitabl... code. They allow the person reading your code to see the division of the code into sections, help the
4.1 PEP 257 – Docstring Conventions @info:cursos:pue:python-pcpp1:m2
32 Resultats, Darrera modificació:
2.5 Different faces of Python methods @info:cursos:pue:python-pcpp1:m1
28 Resultats, Darrera modificació:
2.4 Decorators @info:cursos:pue:python-pcpp1:m1
23 Resultats, Darrera modificació:
2.1 PEP 20 – The Zen of Python @info:cursos:pue:python-pcpp1:m2
22 Resultats, Darrera modificació:
2.1 File processing - XML files @info:cursos:pue:python-pcpp1:m5
20 Resultats, Darrera modificació:
5.1 Metaprogramming @info:cursos:pue:python-pcpp1:m1
19 Resultats, Darrera modificació:
1.5 A simple GUI application @info:cursos:pue:python-pcpp1:m3
19 Resultats, Darrera modificació:
1.7 Visiting widgets’ properties @info:cursos:pue:python-pcpp1:m3
19 Resultats, Darrera modificació:
3.1 The CSV module in Python @info:cursos:pue:python-pcpp1:m5
19 Resultats, Darrera modificació:
1.3 JSON – our new friend @info:cursos:pue:python-pcpp1:m4
17 Resultats, Darrera modificació:
4.1 Shallow and deep copy operations @info:cursos:pue:python-pcpp1:m1
16 Resultats, Darrera modificació:
1.2 Let TkInter speak! @info:cursos:pue:python-pcpp1:m3
16 Resultats, Darrera modificació:
1.4 Coloring your widgets @info:cursos:pue:python-pcpp1:m3
14 Resultats, Darrera modificació:
1.6 Events and how to handle them @info:cursos:pue:python-pcpp1:m3
11 Resultats, Darrera modificació:
1.9 Looking at variables @info:cursos:pue:python-pcpp1:m3
11 Resultats, Darrera modificació:
2.5 Working with the Canvas @info:cursos:pue:python-pcpp1:m3
11 Resultats, Darrera modificació:
1.8 Interacting with widget methods @info:cursos:pue:python-pcpp1:m3
10 Resultats, Darrera modificació:
2.3 Extended function argument syntax @info:cursos:pue:python-pcpp1:m1
6 Resultats, Darrera modificació:
1.1 What is PEP? @info:cursos:pue:python-pcpp1:m2
4 Resultats, Darrera modificació: