I noticed using filedialog.askdirectory() creates two blank lines when it opens file explorer (see picture below). I've been looking into this for weeks and I can't figure out why this is happening. Is there a way to prevent these blank lines from being created?
#!/usr/bin/python3
import tkinter
from tkinter import filedialog
export_file_path = ""
#Export path for output file
def export_path():
global export_file_path
print("Before askdirectory() is called")
is_empty = filedialog.askdirectory()
print("After askdirectory() is called")
if is_empty != '':
export_file_path = is_empty.replace('/', '\\')
export_path()
print(export_file_path)
input('PAUSE')