[Python编程(第4版)].(Programming.Python.4th.Edition).Mark.Lutz.文字版
Wed Apr 07 09:32:32 2010 spam Wed Apr 07 09:32:34 2010 spam Wed Apr 07 09:32:36 2010 spam The net effect is that -u still works ...
A Simple Python File Server It’s time for something realistic. Let’s conclude this chapter by putting some of the socket ideas w ...
sock.send((filename + '\n').encode()) # send remote name with dir: bytes dropdir = os.path.split(filename)[1] # filename at end ...
The client function sends the server a file’s name and stores all the bytes it gets back in a local file of the same name. The ...
[client window: requested file downloaded in a thread on server] C:\...\Internet\Sockets> python getfile.py –mode client -hos ...
corresponding getfile command line and runs it with the os.system call we studied in Part II. Example 12-18. PP4E\Internet\Socke ...
Figure 12-2. getfilegui-1 verification pop up Using grids and function calls The first user-interface script (Example 12-18) use ...
box.columnconfigure(1, weight=1) Button(text='Submit', command=onSubmit).grid(row=rownum, column=0, columnspan=2) box.title('get ...
for label in labels: row = Frame(rows) row.pack(fill=X) Label(row, text=label, width=labelsize).pack(side=LEFT) entry = Entry(ro ...
like. Figure 12-5 shows the input form constructed in response to the following console interaction. Field names could be accept ...
to do: use threads, show download status and getfile prints; """ from form import Form from tkinter import Tk, mainloop from tki ...
first change to the local directory typed into the form so that the fetched file is stored there (getfile stores in the current ...
FTP tools, instead of the getfile module. But instead of spilling all the beans here, I’ll just say, “Read on.” Using Serial Por ...
...
CHAPTER 13 Client-Side Scripting “Socket to Me!” The preceding chapter introduced Internet fundamentals and explored sockets—the ...
In the next chapter, we’ll look at a complete client-side program example before moving on to explore scripts designed to be run ...
opens a remote file with Python. More specifically, this Python script does the following: Downloads an image file (by default) ...
To open a connection to a remote (or local) FTP server, create an instance of the ftplib.FTP object, passing in the string name ...
as we saw in Chapter 4, this happens automatically on Windows when writing files opened in w text mode. We also want to avoid Un ...
We can use such a higher-level interface to download anything with an address on the Web—files published by FTP sites (using URL ...
«
40
41
42
43
44
45
46
47
48
49
»
Free download pdf