Skip to content

Commit b4dfc60

Browse files
committed
Add missing import and fix typo
1 parent 2cea106 commit b4dfc60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ch17-graphical-user-interfaces/6-challenge.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Solution to challenge
33

44
import tkinter as tk
5+
from tkinter import filedialog
56
import random
67

78

@@ -151,7 +152,7 @@ def make_poem():
151152
# function to save the poem displayed in the output box into a text file
152153
def save_file():
153154
type_list = [("Text files", "*.txt")]
154-
file_name = tk.filedialog.asksaveasfilename(
155+
file_name = filedialog.asksaveasfilename(
155156
filetypes=type_list, defaultextension="*.txt"
156157
)
157158
print(file_name)

0 commit comments

Comments
 (0)