I have written a Python3 script to download a Drupal tarball. I do this using:
Drupal_latest_url = 'http://ftp.drupal.org/files/projects/drupal-8.0.0-beta11.tar.gz'
filename, headers = urllib.request.urlretrieve(Drupal_latest_url)
shutil.unpack_archive(filename, '/tmp', 'gztar')
My problem is that I then want to move the contents of the directory from the tarball (drupal-8.0.0-beta11/*) to a new folder.
How do I get the name of that directory, so how do I get "drupal-8.0.0-beta11" into a variable?