File "/usr/local/lib/python3.2/distutils/archive_util.py", line 52, in make_tarball
tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress])
File "/usr/local/lib/python3.2/tarfile.py", line 1769, in open
stream = _Stream(name, filemode, comptype, fileobj, bufsize)
File "/usr/local/lib/python3.2/tarfile.py", line 421, in __init__
raise CompressionError("zlib module is not available")
tarfile.CompressionError: zlib module is not available
garrett@toshiba-laptop ~/Desktop/nester $
I'M getting the above error while trying to build a small module with the command "python3 setup.py sdist
nester.py
"""This is the "nester.py" module and it provides one function called
print_lol() which prints lists that may or may not include nested lists."""
def print_lol(the_list):
"""This function takes a positional argument called "the_list", which is any
Python list (of, possibly, nested lists). Each data itemin the provided list
is (recursibely) printed to the screen on it's own line."""
for each_item in the_list:
if isinstance(each_item, list):
print_lol(each_item)
else:
print(each_item)
movies = ["The Holy Grail", 1975, "Terry Jones & Terry Gilliam", 91,
["Graham Chapman",
["Michael Palin", "John Cleese", "Terry Gilliam", "Eric Idle", "Terry Jones"]]]
setup.py
from distutils.core import setup
setup(
name = 'nester',
version = '1.0.0',
py_modules = ['nester'],
author = 'hfpython',
author_email = 'hfpython@headfirstlabs.com',
url = 'http://www.headfirstlabs.com',
description = 'A simple printer of nested lists',
)