tagui.py
def unzip(file_to_unzip = None, unzip_location = None):
    """function to unzip zip file to specified location"""
    import zipfile

    if file_to_unzip is None or file_to_unzip == '':
        print('[TAGUI][ERROR] - filename missing for unzip()')
        return False
    elif not os.path.isfile(file_to_unzip):
        print('[TAGUI][ERROR] - file specified missing for unzip()')
        return False

    zip_file = zipfile.ZipFile(file_to_unzip, 'r')

    if unzip_location is None or unzip_location == '':
        zip_file.extractall()
    else:
        zip_file.extractall(unzip_location)

    zip_file.close()
    return True
function to unzip zip file to specified location
function to unzip zip file to specified location
function to unzip zip file to specified location
def unzip(file_to_unzip = None, unzip_location = None):
    import zipfile
    if file_to_unzip is None or file_to_unzip == '':
        print('[TAGUI][ERROR] - filename missing for unzip()')
        return False
    elif not os.path.isfile(file_to_unzip):
        print('[TAGUI][ERROR] - file specified missing for unzip()')
        return False
    zip_file = zipfile.ZipFile(file_to_unzip, 'r')
    if unzip_location is None or unzip_location == '':
        zip_file.extractall()
    else:
        zip_file.extractall(unzip_location)
    zip_file.close()
    return True
def unzip ( file_to_unzip = None , unzip_location = None ) : import zipfile if file_to_unzip is None or file_to_unzip == '' : print ( '[TAGUI][ERROR] - filename missing for unzip()' ) return False elif not os . path . isfile ( file_to_unzip ) : print ( '[TAGUI][ERROR] - file specified missing for unzip()' ) return False zip_file = zipfile . ZipFile ( file_to_unzip , 'r' ) if unzip_location is None or unzip_location == '' : zip_file . extractall ( ) else : zip_file . extractall ( unzip_location ) zip_file . close ( ) return True
function to unzip zip file to specified location
function to unzip zip file to specified location
"""function to unzip zip file to specified location"""
file_to_unzip
unzip_location