I'm unsure why this does not work.
main_window.child_window(title="File name:", control_type="edit").type_keys("filename.dat")
but this does
main_window["File name:"].type_keys(r"filename.dat", with_spaces=True)