no

Cerca

Heus ací els resultats de la cerca.

Python Professional Course Series: GUI Programming @info:cursos:pue:python-pcpp1:m3
12 Resultats, Darrera modificació:
e, not saying a word about movies or animations. No photographs, no selfies, no avatars, no animated banners and finally, no colors. How do you like it? Take a look at the two cla
5.1 Metaprogramming @info:cursos:pue:python-pcpp1:m1
9 Resultats, Darrera modificació:
the type of the metaclass ''type'' is ''type'' – no, that is not a typo. {{ :info:cursos:pue:python-... 's values. In ''My_Class1'', by design, there is no ''greetings'' function, so when the class is cons... created by a group of volunteers who worked with no clear “clean coding” rules; * the system suffer... ion_time = time.time() return obj class Uno(metaclass=MetaClassInstantation): pass class
2.3 A small lexicon of widgets - Part 3 @info:cursos:pue:python-pcpp1:m3
9 Resultats, Darrera modificació:
g") def are_you_sure(): if messagebox.askyesno("", "Are you sure you want to quit the App?"): ... g") def are_you_sure(): if messagebox.askyesno("", "Are you sure you want to quit the App?"): ... g") def are_you_sure(): if messagebox.askyesno("", "Are you sure you want to quit the App?"): ... g") def are_you_sure(): if messagebox.askyesno("", "Are you sure you want to quit the App?"):
2.4 Shaping the main window and conversing with the user @info:cursos:pue:python-pcpp1:m3
9 Resultats, Darrera modificació:
**title**. The title is defaultly set to ''Tk'', no matter what your application is named, or even if... essagebox def really(): if messagebox.askyesno("?", "Wilt thou be gone?"): window.destro... the user or to ask any simple question (e.g., yes/no), you don’t need to create your own means – you c... rgument with identifiers like CANCEL, IGNORE, OK, NO, RETRY, and YES; * **icon** – sets the non-de
1.3 JSON – our new friend @info:cursos:pue:python-pcpp1:m4
8 Resultats, Darrera modificació:
you want me to learn Java? Or even JavaScript?” No, we don't. Fortunately, the notation we want to t... * it uses **UTF-8 coded text** – this means that no machine/platform-dependent formats are used; it a... ** to those of Python. In general, you may expect no surprises when you use regular decimal integers, ... n in Python as None – it may be used to represent no value, or a value without any meaning. It is cal
2.7 Encapsulation @info:cursos:pue:python-pcpp1:m1
7 Resultats, Darrera modificació:
ccount(self,account): raise AccountError("No es pot modificar un número de compte!") ... f.__balance != 0: raise AccountError("No es pot esborrar un compte amb saldo diferent de 0... if money < 0: raise AccountError("No es pot deixar el compte en negatiu") if (... f.__balance != 0: raise AccountError("No es pot esborrar un compte amb saldo diferent de 0
2.1 PEP 20 – The Zen of Python @info:cursos:pue:python-pcpp1:m2
7 Resultats, Darrera modificació:
and responsible code development. There should be no exceptions that allow us to break the principles governing best coding practices. No special cases such as time pressure or complexity... e source of an error and debugging the program as no explicit error message is displayed in the consol... work under great time pressure and feel they have no time for testing. An important thing to keep in
1.2 Let TkInter speak! @info:cursos:pue:python-pcpp1:m3
7 Resultats, Darrera modificació:
port tkinter as tk</code> Okay, we know there’s no accounting for taste, but it’s definitely worth a... *Tk()**. In its most commonly used form, it needs no arguments. The object returned by the method is *... sing the application to quit. Currently, there is no other way than to make use of some of the OS's de... k you? Of course we can. Does it change anything? No, it doesn't. Of course, the view of the button ch
1.2 How to use sockets in Python @info:cursos:pue:python-pcpp1:m4
7 Resultats, Darrera modificació:
will be referenced by a variable named ''sock''. No, it's not about the clothes. Really. == Connecti... why 80? Can I put something else instead of this? No, you can’t. 80 is a well-known service number for... hispered directly into the server's ear: "We have no more to say to you. We don't want to hear from yo... has entered a non-existent or malformed address (no matter whether it’s expressed as a domain name or
1.6 Making life easier with the requests module @info:cursos:pue:python-pcpp1:m4
7 Resultats, Darrera modificació:
from the data stream, hence it is just a string. No conversions are applied. The code produces the f... d server are aware of the fact that the contents (no matter which part sent them) contain a JSON messa... precisely specify its demands; if the client has no demands and initiates ''GET'' without resource id... l know the way. * ''DELETE'' – this name leaves no doubt: it is used to order the server to remove a
3.1 PEP 8 – Introduction @info:cursos:pue:python-pcpp1:m2
6 Resultats, Darrera modificació:
ode and make it PEP 8 compliant.) * If there is no good reason for making the code PEP 8 compliant, ... servative in this matter, and requires you to use no more than 79 characters per line (72 for comments... nnot) use implicit relative imports, as these are no longer present in Python 3. You should also avoid... a string") strings. They’re the same, and there’s no special recommendation in PEP telling you which s
4.1 PEP 257 – Docstring Conventions @info:cursos:pue:python-pcpp1:m2
6 Resultats, Darrera modificació:
g the hash sign (#). They should be rather brief (no more than 72 characters per line), begin with a c... n. Look at the following examples: <code python># No type information added: def hello(name): retu... your code is executed. * Since type hints have no effect on the source code, this means that they have no impact on performance times (characters are ignor
1.6 Events and how to handle them @info:cursos:pue:python-pcpp1:m3
5 Resultats, Darrera modificació:
the switch if OFF, clicking the second button has no effect. Moreover, the second button’s title chang... = not switch def rhyme(dummy): global word_no, words word_no += 1 label.config(text=words[word_no % len(words)]) switch = True words = ["Old", "McDonald", "
2.2 Inheritance and polymorphism — Inheritance as a pillar of OOP @info:cursos:pue:python-pcpp1:m1
4 Resultats, Darrera modificació:
le inheritance vs. multiple inheritance There are no obstacles to using multiple inheritance in Python... .melt() except AttributeError: print('No melt() method') </code> <code ; output> Wax can be used to form a tool Cheese can be eaten No melt() method </code> Both the Wax and Cheese classes own melt() methods, but there is no relation between the two. Thanks to duck typing,
1.1 Classes, Instances, Attributes, Methods — introduction @info:cursos:pue:python-pcpp1:m1
3 Resultats, Darrera modificació:
ta with the code. If you run the code, there are no visible effects. The class has been defined, but there is no code making use of it — that’s why you see no effects. === instance An instance is one particular ph
2.6 Abstract classes @info:cursos:pue:python-pcpp1:m1
3 Resultats, Darrera modificació:
1.7 Four magic letters: CRUD @info:cursos:pue:python-pcpp1:m4
3 Resultats, Darrera modificació:
2.5 Different faces of Python methods @info:cursos:pue:python-pcpp1:m1
2 Resultats, Darrera modificació:
1.8 Interacting with widget methods @info:cursos:pue:python-pcpp1:m3
2 Resultats, Darrera modificació:
1.1 SQLite @info:cursos:pue:python-pcpp1:m5
2 Resultats, Darrera modificació:
2.1 Python core syntax @info:cursos:pue:python-pcpp1:m1
1 Resultats, Darrera modificació:
2.3 Extended function argument syntax @info:cursos:pue:python-pcpp1:m1
1 Resultats, Darrera modificació:
2.4 Decorators @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.4 Coloring your widgets @info:cursos:pue:python-pcpp1:m3
1 Resultats, Darrera modificació:
1.5 A simple GUI application @info:cursos:pue:python-pcpp1:m3
1 Resultats, Darrera modificació:
1.4 Talking to JSON in Python @info:cursos:pue:python-pcpp1:m4
1 Resultats, Darrera modificació:
2.1 File processing - XML files @info:cursos:pue:python-pcpp1:m5
1 Resultats, Darrera modificació:
4.1 Logging in Python @info:cursos:pue:python-pcpp1:m5
1 Resultats, Darrera modificació: