Cerca

Heus ací els resultats de la cerca.

Python Professional Course Series: GUI Programming @info:cursos:pue:python-pcpp1:m3
26 Resultats, Darrera modificació:
e it to display a GUI and to communicate with the user. They communicate bidirectionally. GUI stands for Graphical User Interface. In this three-word acronym, the User seems to be the most obvious part. The word Interface n... n fact, it is clear too – it’s a tool used by the user to command a device and to receive its responses.
2.4 Shaping the main window and conversing with the user @info:cursos:pue:python-pcpp1:m3
11 Resultats, Darrera modificació:
4 Shaping the main window and conversing with the user The main window is a very specific construct, as ... ger values. Their meaning is: * ''True'' – the user can change this dimension; * ''False'' – the user can’t change this dimension. Setting both argument... dow’s close operation (which can be caused by the user clicking the window’s closing button), you can us
4.1 PEP 257 – Docstring Conventions @info:cursos:pue:python-pcpp1:m2
10 Resultats, Darrera modificació:
ility of the code, and explaining the code to the user in a meaningful way. The user here means both other programmers and you (e.g. when you go back to your ... .: <code python>def fun(val): return val * 2 user_value = int(input("Enter the value: ")) # fun(user_value) # user_value = user_value + "foo" print(fun(
2.1 PEP 20 – The Zen of Python @info:cursos:pue:python-pcpp1:m2
9 Resultats, Darrera modificació:
o start refactoring your code. Flat code is more user-friendly, and becomes much **easier to maintain**... legant – these all contribute to how readable and user-friendly your code is. Remember: the readability... iply_number_by_two) </code> What happens when the user enters ''3.5'' or ''two'' as the input? Well, Pyt... t-in exceptions, and a great toolset for creating user-defined exception handling systems. The Zen of P
5.1 The configparser module @info:cursos:pue:python-pcpp1:m5
9 Resultats, Darrera modificació:
host # This is a comment. [mariadb] name = hello user = user password = password [redis] port = 6379 db = 0</code> Our configuration file contains the ''DE... ']['name']) print('Username:', config['mariadb']['user']) print('Password:', config['mariadb']['password... ection: Host: localhost Database: hello Username: user Password: password redis section: Host: localhos
1.6 Making life easier with the requests module @info:cursos:pue:python-pcpp1:m4
8 Resultats, Darrera modificació:
the OS you use. So... * ...if you're a Windows user, point your browser to https://nodejs.org/en/down... the Windows® start menu; * ...if you're a macOS user, go to the address https://nodejs.org/en/download... he installer do the job; * ...if you're a Linux user, you have to go to the address https://nodejs.org... our OS console and... * ...if you're a Windows user, run the **CMD.EXE** program (as an ordinary user
1.2 Let TkInter speak! @info:cursos:pue:python-pcpp1:m3
6 Resultats, Darrera modificació:
Of course, closing the window without asking the user if they are really sure that this is exactly what... ionship with them. We definitely want to ask the user before we permanently remove their window from si... ask questions, display messages, and to receive a user's reply. The dialog box is an example of a **mod... ll be **displayed inside the window** to make the user aware of the incoming issue; * the ''askquest
2.3 A small lexicon of widgets - Part 3 @info:cursos:pue:python-pcpp1:m3
6 Resultats, Darrera modificació:
s also able to **edit** the text according to the user’s actions. Using an ''Entry'' is necessary when you are going to ask the user for any textual information: name, password, emai... g with the **trace callback** (tracer) to force a user to enter **only digits** – all other characters w... p() </code> Try to modify the code to allow the user to enter not more than five digits. The last par
1.2 How to use sockets in Python @info:cursos:pue:python-pcpp1:m4
5 Resultats, Darrera modificació:
code python> import socket </code> === Obtaining user input We also need **the name of the HTTP server*... to connect to. In fact, it's not our problem. The user knows it better. Let's ask him or her: <code pyth... server do you want to connect to? ") </code> The user input may can take two different forms: * it c... 's response? If everything went successfully (the user entered a valid address, the Internet worked as e
3.1 PEP 8 – Introduction @info:cursos:pue:python-pcpp1:m2
4 Resultats, Darrera modificació:
te the average of three numbers obtained from the user. Then # multiply the result by 4.17, and ass... sary, e.g.: <code python ❌> # Bad: a = 'Adam' # User's first name. </code> <code python ✔> # Good: user_first_name = 'Adam' </code> == Documentation strin... for "magic" objects and attributes that reside in user-controlled namespaces, e.g., %%__init__%%,%% __im
1.7 Four magic letters: CRUD @info:cursos:pue:python-pcpp1:m4
3 Resultats, Darrera modificació:
rating servers; but the interface provided to the user (you) will always look the same. We can say that... al interface**. The interface itself enables the user to perform a basic set of operations – they are e... of items; * Line 20: we’re going to present the user with a charming table with a header... * Line 2
2.9 Inheriting properties from built-in classes @info:cursos:pue:python-pcpp1:m1
2 Resultats, Darrera modificació:
but first let's analyze it: * line 03: ask the user to enter the IBAN (the number can contain spaces,... sed in Norway) * line 08: if it is shorter, the user is informed; * line 09: moreover, the IBAN cann
1.6 Events and how to handle them @info:cursos:pue:python-pcpp1:m3
2 Resultats, Darrera modificació:
onsible for preparing the proper reactions to the user’s actions. Now it’s time to show you some detail... y happens when the event has been induced (by the user or by another factor). * **Q**: How are the eve
2.1 A small lexicon of widgets - Part 1 @info:cursos:pue:python-pcpp1:m3
2 Resultats, Darrera modificació:
not; thus, it is a handy tool to represent yes/no user choices. Let's start with its properties: {{:in... d), it’s a good tool to represent //one of many// user choices. Assigning the same observable variable t
1.1 SQLite @info:cursos:pue:python-pcpp1:m5
2 Resultats, Darrera modificació:
. SQLite is actually a C library which allows the user to read and write data directly to a file. You're... that will get the task name and priority from the user instead of using hardcoded values. Will we be abl
2.4 Decorators @info:cursos:pue:python-pcpp1:m1
1 Resultats, Darrera modificació:
1.5 A simple GUI application @info:cursos:pue:python-pcpp1:m3
1 Resultats, Darrera modificació:
1.7 Visiting widgets’ properties @info:cursos:pue:python-pcpp1:m3
1 Resultats, Darrera modificació: