Cerca

Heus ací els resultats de la cerca.

1.4 Talking to JSON in Python
23 Resultats, Darrera modificació:
'. Note: the ''’s'' at the end of the function's name means string. There is a very similar function with the name deprived of this suffix which **writes the JSON s... > import json class Who: def __init__(self, name, age): self.name = name self.age = age some_man = Who('John Doe', 42) print(json.dump
1.2 How to use sockets in Python
16 Resultats, Darrera modificació:
ode> === Obtaining user input We also need **the name of the HTTP server** we're going to connect to. I... two different forms: * it can be **the domain name of the server** (like //www.pythoninstitute.org /... e server to send a particular document of a given name is called GET (it's rather self-explanatory, isn'... ethod requires: * a line containing the method name (i.e., ''GET'') followed by the name of the resou
1.5 What is XML and why do we prefer to use JSON?
13 Resultats, Darrera modificació:
story short, the DOCTYPE line contains: * the **name** of the XML document being defined (cars_for_sal... ded about it is its URI (which may be just a file name recognizable by the target server); * the **URI... tags look nearly identical, but the closing tag's name starts with /. Tags can be easily identified as t... tores the textual representation of the element's name – we use it to print the root element's name; *
1.3 JSON – our new friend
7 Resultats, Darrera modificació:
s you can see, there’s a little riddle inside the name. It may be a bit disturbing, too, and some sudden... Python) by two specific identifiers (the literal name tokens): **true** and **false**: <code ruby> true... only acceptable form. There is one more literal name token in JSON, whose meaning is similar to the on... 2.78 } </code> The property specification is a ''name:value'' pair with a colon as a separator where th
1.6 Making life easier with the requests module
7 Resultats, Darrera modificació:
load and run the Windows installer (a file with a name that looks like ''node-vxx.yy.z-x86.msi'') from t... tool for installing and updating components. Its name is the same under all the platforms covered, so w... n-server --watch cars.json</code> Note: the file name you put after ''–-watch'' should be specified abs... formed as an IP address or fully qualified domain name (FQDN), but it doesn’t matter for ''get()'' – its
1.7 Four magic letters: CRUD
6 Resultats, Darrera modificació:
in the collection must have the property of this name – this is how the server identifies each item and... r'' assumes that the data collection inherits its name from the source data file name. As we named the file cars, the server will publish the data as cars, too. You have to use the name in the URI unless you want to get the default (ro
1.1 Python Professional Course Series: RESTful APIs
3 Resultats, Darrera modificació:
ramming languages. It was named BSD sockets - the name was borrowed from Berkeley Software Distribution, the name of a Unix-class operating system, where the socke... k A protocol stack is **a multilayer** (hence the name)** set of cooperating protocols providing a unifi
2.1 Python Professional Course Series: Lab & Assessment
3 Resultats, Darrera modificació:
(obligatory) the address (IP or qualified domain name) of the server to be diagnosed (the diagnosis wil... ber of arguments, as argv[0] stores your script's name; this means that the first argument is at argv[1]... Assuming that the tool is placed in a source file name sitechecker.py, here are some real-use cases: {{