python zipfile basename
<p>I have some homework that I am trying to complete. I don't want the answer. I'm just having trouble in starting. The work I have tried is not working at all... Can someone please just provide a push in the right direction. I am trying to learn but after trying and trying I need some help.</p>

<p>I know I can you <code>os.path.basename()</code> to get the basename and then add it to the file name but I can't get it together.</p>

<p>Here is the assignment</p>

<p>In this project, write a function that takes a directory path and creates an archive of the directory only. For example, if the same path were used as in the example <code>("c:\\xxxx\\Archives\\archive_me")</code>, the zipfile would contain <code>archive_me\\groucho</code>, <code>archive_me\\harpo</code> and <code>archive_me\\chico</code>.</p>

<p>The base directory (<code>archive_me</code> in the example above) is the final element of the input, and all paths recorded in the zipfile should start with the base directory.</p>

<p>If the directory contains sub-directories, the sub-directory names and any files in the sub-directories should not be included. (Hint: You can use <code>isfile()</code> to determine if a filename represents a regular file and not a directory.)</p>

<p>Thanks again any direction would be great.</p>
