# askAndDestroy.py
# Purpose: Get a directory from the user and suppress the root Tk window.
# Usage: No script arguments required

import tkinter, tkinter.filedialog
# Get a tk object.
fatherWilliam = tkinter.Tk()

# Hide the tk window.
fatherWilliam.withdraw()

inputDir = tkinter.filedialog.askopenfilename(parent=fatherWilliam)

# Destroy the tk window.
fatherWilliam.destroy()