May-21-2020, 07:48 PM
hi guys,
can you give me a simple example on how to use correctly the "filedialog.askopenfilename ()" and "filedialog.asksaveasfile ()" functions?
my GUI software should follow these steps:
1. the user takes a ".txt" file browsing on his local disk via a button widget called "browse" (the complete path will be displayed also in a entry widget near to the button).
2. the user clicks on another button widget called "export".
3. a part of my code, already written, processes the input file and return a list.
4. another part of my code, creates a new excel file and compiles it with all information contained in the list of the point 2. to do it I used the xlsxwriter library.
5. when the excel file has been written, a new window appears (it will help the user to save the excel file in his desired location)
can you give me a simple exaple to help me to reach my goal?
can you give me a simple example on how to use correctly the "filedialog.askopenfilename ()" and "filedialog.asksaveasfile ()" functions?
my GUI software should follow these steps:
1. the user takes a ".txt" file browsing on his local disk via a button widget called "browse" (the complete path will be displayed also in a entry widget near to the button).
2. the user clicks on another button widget called "export".
3. a part of my code, already written, processes the input file and return a list.
4. another part of my code, creates a new excel file and compiles it with all information contained in the list of the point 2. to do it I used the xlsxwriter library.
5. when the excel file has been written, a new window appears (it will help the user to save the excel file in his desired location)
can you give me a simple exaple to help me to reach my goal?