How can tkinter open with file directory of specific folder (also containing .py script) on any system?
<p>In other words if I pass off the folder to someone containing a .txt and .py, and the script is run on their machine from this folder, how can I ensure the file dialog will open with this folder to select the .txt without knowing the absolute path? Referring to <code>initialdir=</code>??</p>

<pre><code>from tkinter import filedialog
from tkinter import *

root = Tk()
root.withdraw()
root.filename = filedialog.askopenfilename(initialdir='/python', title="Select file",
                                           filetypes=[("Text Files", "*.txt")])
print(root.filename)
</code></pre>