How do I import a file type .1.tar.gz into Python?
Question: I am attempting to complete a computational project were I can duplicate
sentiment analysis, and find a correlation to parts of speech usage in a data
set saved in a tar.gz file. The file is currently saved in my user directory
on my University server. Access to the directory is not a problem. The problem
that I have is importing the file into Python so that I may run the Counter
script. I am very new to the NTLK platform. Can someone please explain how to
overcome this obstacle?


Answer: [`tar`](http://unixhelp.ed.ac.uk/CGI/man-cgi?tar) is an archiving tool. You're
file is a gzipped tar archive. You'll have to unpack that file:

    
    
    tar -xvzf file.1.tar.gz
    

After which you can easily manipulate the unpacked files in python with
regular file operations. You can also use certain python modules for unpacking
the archive but I don't see any extra value in that.

