how to open the save file dialog box in python without using tkinter

Viewed 866

I am trying to create vi editor kind of app using python, that takes input from command line and, provides option to save the typed text .So I need to use the save dialog box without using tkinter. How can I write python script that makes the call to windows save file dialog api

1 Answers

You can use pywin32

import win32ui

dlg = win32ui.CreateFileDialog(0)
dlg.SetOFNInitialDir(r'C:\Users\jezequiel\Desktop')
dlg.DoModal()

print(dlg.GetPathName())
Related