Cerca
Heus ací els resultats de la cerca.
Resultats de text complet:
- 1.5 What is XML and why do we prefer to use JSON?
- n't it? Of course, a comment, like any other XML element, can be spread over more than one line. XML ... for_sale> </code> The XML document consists of **elements**. Each element is marked by a **pair of tags**: an **opening** tag and a **closing** tag. Both... osed inside **<** and** >**. This means that the element named ''CuriousTag'' starts where the follow
- 1.7 Four magic letters: CRUD
- r to perform a basic set of operations – they are elementary, but complex enough to build complex serv... equestException: print("Communication error") else: if reply.status_code == requests.codes.ok: print(reply.text) else: print("Server error") </code> * lin... 0/cars") except: print("Communication error") else: if reply.status_code == requests.codes.ok:
- 1.4 Talking to JSON in Python
- expect anything more: <code python> import json electron = 1.602176620898E10−19 print(json.dumps(electron)) </code> The code outputs: <code ; output> 16... isinstance(w, Who): return w.__dict__ else: raise TypeError(w.__class__.__name__ +... ce(w, Who): return w.__dict__ else: return super().default(self, z)
- 1.2 How to use sockets in Python
- where the two values are passed to the method as elements of a tuple. This is why you see two pairs o... mains. You may ask - why 80? Can I put something else instead of this? No, you can’t. 80 is a well-kn... sonable. We'll do it in the simplest (but a very elegant) way - we'll just print it out using the bui... . Not here, anyhow. We'll to dive into something else - what happens if something goes wrong. The Int
- 1.1 Python Professional Course Series: RESTful APIs
- Now imagine that the object is stored somewhere else, not on your computer, but on a server located ... we want to tell you about have nothing to do with electricity - we're not going to plug anything into ... e protocol stack in a way where the most basic, **elementary services are located at the bottom of the
- 1.6 Making life easier with the requests module
- Sorry, Mr. Impatient, you didn\'t get your data') else: print('Here is your data, my Master!') </c... nectionError: print('Nobody\'s home, sorry!') else: print('Everything fine!') </code> Thi... tions.InvalidURL: print('Recipient unknown!') else: print('Everything fine!') </code> Dis
- 1.3 JSON – our new friend
- ay content and uses commas to separate an array's elements – just like here: <code ruby> [1, 2, 3] </c... thon", pi: 3.141592653589, parsec: 3.0857E16, electron: −1.6021766208E−19 friend: "JSON", off: t
- 2.1 Python Professional Course Series: Lab & Assessment
- rt number is invalid - exiting.") exit(2) else: port = 80 try: sock.connect((addr, po