diff --git a/advanced-iterators.html b/advanced-iterators.html index 1d68866..a20cdcc 100755 --- a/advanced-iterators.html +++ b/advanced-iterators.html @@ -626,6 +626,8 @@ NameError: name '__import__' is not defined
itertools module
+itertools — Iterator functions for efficient looping
os module
+os — Portable access to operating system specific features
os.path module
+os.path — Platform-independent manipulation of file names
+glob — Filename pattern matching
time module
+time — Functions for manipulating clock time
.py file, you should put it in the root directory along with your “read me” file and your setup script. But httplib2 is not a single .py file; it’s a multi-file module. But that’s OK! Just put the httplib2 directory in the root directory, so you have an __init__.py file within an httplib2/ directory within the httplib2/ root directory. That’s not a problem; in fact, it will simplify your packaging process.
-The chardet directory looks slightly different. Like httplib2, it’s a multi-file module, so there’s a chardet/ directory within the chardet/ root directory. In addition to the README.txt file, chardet has HTML-formatted documentation in the docs/ directory. The docs/ directory contains several .html files and an images/ subdirectory, which contains several .png and .gif files. (This will be important later.) Also, in keeping with the convention for (L)GPL-licensed software, it has a separate file called COPYING.txt which contains the complete text of the LGPL.
+
The chardet directory looks slightly different. Like httplib2, it’s a multi-file module, so there’s a chardet/ directory within the chardet/ root directory. In addition to the README.txt file, chardet has HTML-formatted documentation in the docs/ directory. The docs/ directory contains several .html and .css files and an images/ subdirectory, which contains several .png and .gif files. (This will be important later.) Also, in keeping with the convention for (L)GPL-licensed software, it has a separate file called COPYING.txt which contains the complete text of the LGPL.
chardet/
@@ -283,11 +283,11 @@ Topic :: Software Development :: Libraries :: Python Modules
This is the entire manifest file for the chardet project:
-
include COPYING.txt ①
-recursive-include docs *.html *.png *.gif ②
+include COPYING.txt ①
+recursive-include docs *.html *.css *.png *.gif ②
COPYING.txt file from the project’s root directory.
-recursive-include command takes a directory name and one or more filenames. The filenames aren’t limited to specific files; they can include wildcards. This line means “See that docs/ directory in the project’s root directory? Look in there (recursively) for .html, .png, and .gif files. I want all of them in my release package.”
+recursive-include command takes a directory name and one or more filenames. The filenames aren’t limited to specific files; they can include wildcards. This line means “See that docs/ directory in the project’s root directory? Look in there (recursively) for .html, .css, .png, and .gif files. I want all of them in my release package.”
All manifest commands preserve the directory structure that you set up in your project directory. That recursive-include command is not going to put a bunch of .html and .png files in the root directory of the release package. It’s going to maintain the existing docs/ directory structure, but only include those files inside that directory that match the given wildcards. (I didn’t mention it earlier, but the chardet documentation is actually written in XML and converted to HTML by a separate script. I don’t want to include the XML files in the release package, just the HTML and the images.)
@@ -320,6 +320,7 @@ warning: check: missing required meta-data: version
Distutils supports building multiple types of release packages. At a minimum, you should build a “source distribution” that contains your source code, your Distutils setup script, your “read me” file, and whatever additional files you want to include. To build a source distribution, pass the sdist command to your Distutils setup script.
+FIXME again
c:\Users\pilgrim\chardet> c:\python31\python.exe setup.py sdist
running sdist
running check
diff --git a/serializing.html b/serializing.html
index 7362556..9f4f3d6 100644
--- a/serializing.html
+++ b/serializing.html
@@ -26,8 +26,15 @@ body{counter-reset:h1 13}
Further Reading
+
+☞Many articles about the pickle module make references to cPickle. In Python 2, there were two implementations of the pickle module, one written in pure Python and another written in C (but still callable from Python). In Python 3, these two modules have been consolidated, so you should always just import pickle. You may find these articles useful, but you should ignore the now-obsolete information about cPickle.
+
+