Goten Xiao added the comment: Whoops, add: import tarfile to the top of test.py. __________________________________ Tracker <report at bugs.python.org> <http://bugs.python.org/issue2251> __________________________________