Python Programming for Raspberry Pi, Sams Teach Yourself in 24 Hours
Pi images. (Supposedly, it takes about 4×17 raspberries to make a full-sized raspberry pie.) The game uses a dictionary to creat ...
Q. I enjoyed this hour. How else can I improve my Python game script writing skills? A. For further challenges, take a look at h ...
Part V: Business Programming HOUR 20 Using the Network HOUR 21 Using Databases in Your Programming HOUR 22 Web Programming ...
Hour 20. Using the Network What You’ll Learn in This Hour: The Python network modules How to interact with email and web servers ...
TABLE 20.1 Python Networking Modules Each network module has its own documentation on how to use it within your Python programs, ...
Sometimes the hardest part of using email in your Python programs is understanding just how the email system works in Linux. Kno ...
out, both of these packages combine the MTA and MDA functions into one software application, providing a full email server for y ...
TABLE 20.2 The SMTP Class Methods To send an email message, you should follow these steps: Instantiate an SMTP class object, us ...
function, you must provide the user ID and password that you use to connect to your email server using your normal email client. ...
Click here to view code image 1: #!/usr/bin/python3 2: from tkinter import * 3: import smtplib 4: 5: class Application(Frame): 6 ...
59: smtpserver.sendmail(sender, tolist, message) 60: smtpserver.quit() 61: self.body.delete('1.0', END) 62: self.body.insert(END ...
Working with Web Servers These days, just about everyone gets information from the Internet. The World Wide Web (WWW) has become ...
quite a chore. If you find the data you want and try to use a positional method of extracting the content (such as looking for t ...
Using the etree Methods to Parse HTML The etree methods break an HTML document down into the individual HTML elements. If you’re ...
In this example, the current temperature value is surrounded by an HTML element that’s assigned to a specific CSS class to cust ...
Open the script2002.py file with an editor and enter the code shown here: Click here to view code image 1: #!/usr/bin/python3 2 ...
Linking Programs Using Socket Programming Besides connecting to other servers, Python also allows you to create your own servers ...
same time, they’ll deadlock, and nothing will happen. Likewise, if they both attempt to send a message at the same time, nothing ...
Click here to view code image import socket server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = '' port = 5150 ser ...
Create the script2003.py program in the folder for this hour. Open the script2003.py file with a text editor and enter the code ...
«
14
15
16
17
18
19
20
21
22
23
»
Free download pdf