Пример #1
0
def cleanup_temp_dir(directory):
    """Exit and delete a temporary directory for executing PHYLIP"""

    os.chdir("..")
    assert "/" not in directory
    assert os.path.isdir(directory)
    util.deldir(directory)
Пример #2
0
def cleanup_temp_dir(directory):
    """Exit and delete a temporary directory for executing PHYLIP"""

    os.chdir("..")
    assert "/" not in directory
    assert os.path.isdir(directory)
    util.deldir(directory)
Пример #3
0
def save_temp_dir(directory, newname):
    """Exit and save a temporary directory for executing PHYLIP"""

    os.chdir("..")
    assert "/" not in directory
    assert os.path.isdir(directory)

    if os.path.exists(newname):
        util.deldir(newname)

    os.rename(directory, newname)
Пример #4
0
def save_temp_dir(directory, newname):
    """Exit and save a temporary directory for executing PHYLIP"""

    os.chdir("..")
    assert "/" not in directory
    assert os.path.isdir(directory)
    
    if os.path.exists(newname):
        util.deldir(newname)
    
    os.rename(directory, newname)