Python practice (1), python practice
This is exactly the casePythonTutorial-On Liao Xuefeng's official website
Download Python2.7 for windows and link http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi. Everything is ready. Python go!
Practical python Learning
Look at the python gray hat book. In addition, you can use python to write a new set of projects that you like. For example, you can use python to quickly implement various cloud computing projects.
Simple python: what is the problem with an instance?
Use your own python zip Library: zlib or zipfile
The last one is more advanced and advanced. For more information, see this blog.
Blog.chinaunix.net/u1/39578/showart_356627.html
==================================
Import zipfile, OS
Z = zipfile. ZipFile (filename, 'w') # note that the second parameter here is w, and the filename here is the name of the compressed package.
# Suppose you want to add all the files named testdir to the compressed package (only the files in the first-level subdirectory are added here ):
If OS. path. isdir (testdir ):
For d in OS. listdir (testdir ):
Z. write (testdir + OS. sep + d)
# Close () is required!
Z. close ()
Reference: blog.chinaunix.net/u1/39578/showart_356627.html