There was an error while loading. Please reload this page.
1 parent 2cea106 commit b4dfc60Copy full SHA for b4dfc60
ch17-graphical-user-interfaces/6-challenge.py
@@ -2,6 +2,7 @@
2
# Solution to challenge
3
4
import tkinter as tk
5
+from tkinter import filedialog
6
import random
7
8
@@ -151,7 +152,7 @@ def make_poem():
151
152
# function to save the poem displayed in the output box into a text file
153
def save_file():
154
type_list = [("Text files", "*.txt")]
- file_name = tk.filedialog.asksaveasfilename(
155
+ file_name = filedialog.asksaveasfilename(
156
filetypes=type_list, defaultextension="*.txt"
157
)
158
print(file_name)
0 commit comments