The imports

Imports are like in the script version, except we've lost argparse, which is no longer needed, and we have added two lines:

# guiscrape.py
from tkinter import * from tkinter import ttk, filedialog, messagebox ...

The first line is quite common practice when dealing with tkinter, although in general it is bad practice to import using the * syntax. You can incur in name collisions and, if the module is too big, importing everything would be expensive.

After that, we import ttk, filedialog, and messagebox explicitly, following the conventional approach used with this library. ttk is the new set of styled widgets. They behave basically like the old ones, but are capable of drawing themselves correctly according to the style your OS is set on, which is nice.

The rest of the imports (omitted) is what we need in order to carry out the task you know well by now. Note that there is nothing we need to install with pip in this second part; we already have everything we need.

..................Content has been hidden....................

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