Publishing Python Code
Distributing projects
The Python Package Index (aka "PyPI" -- formerly known as the "Cheese Shop") is the preferred hub for publishing Python packages and modules. Python's standard library supports code uploads to PyPI through its distutils module.
See the PyPI tutorial on this site or the official instructions on Packaging and Distributing Projects published by the Python Packaging Authorities.
As an author of a project published on PyPI you may also be interested in these links:
PyPi Ranking lists projects on PyPI ranked by downloads, giving an indication of popularity.
Top 400 Python Projects in Github is another list of popular projects/modules.
Sharing code snippets
The Python section of the ActiveState Code Recipes is a popular place to publish small useful snippets of code.
Alternatively, you may add such snippets to this Wiki and link to them from the Code page.
Your operating system distribution may have software collections. Searching for Python software can yield numerous packaged libraries and applications. For example:
Python packages in Debian stable (see also the Debian package search page)
Python packages in Ubuntu 8.04 LTS (see also the Ubuntu package search page)
Outdated / inactive hosting sites for Python code
Useless Python was a site for indiscriminate publishing of all bits of Python code you didn't think were worth publishing. Now inactive and web address (www.uselesspython.com) used to place ads.
Vaults of Parnassus - a former link store for Python modules. You had to host files elsewhere, but this was one of the oldest and largest lists of available Python code. Now non-existent.
PyCode - an older site where you could share modules. Site (www.pycode.com) now used for unrelated blogging.