Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "The delete() method takes two arguments that indicate the range of the characters that should be deleted."

A block of code is set as follows:

from tkinter import * 
 
root = Tk() 
btn = Button(root, text="Click me!") 
btn.config(command=lambda: print("Hello, Tkinter!"))
btn.pack(padx=120, pady=30)
root.title("My Tkinter app")
root.mainloop()

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

def show_caption(self, event):
caption = tk.Label(self, ...)
caption.place(in_=event.widget, x=event.x, y=event.y)
# ...

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "The first will be labeled Choose file."

Warnings or important notes appear like this.
Tips and tricks appear like this.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset