pythonw exe executablenot python exe (in factpyw files are simply registered to be opened by pythonwon linuxthe pyw doesn' hurtbut it isn' necessarythere is no notion of streams pop up on unix-like machines on the other handif your gui scripts might run on windows in the futureadding an extra "wat the end of their names now might save porting effort later in this bookpy filenames are still sometimes used to pop up console windows for viewing printed messages on windows tkinter coding alternatives as you might expectthere are variety of ways to code the gui example for instanceif you want to make all your tkinter imports more explicit in your scriptgrab the whole module and prefix all of its names with the module' nameas in example - example - pp \gui\intro\gui py--import versus from import tkinter widget tkinter label(nonetext='hello gui world!'widget pack(widget mainloop(that will probably get tedious in realistic examplesthough--tkinter exports dozens of widget classes and constants that show up all over python gui scripts in factit is usually easier to use to import everything from the tkinter module by name in one shot this is demonstrated in example - example - pp \gui\intro\gui py--rootssidespack in place from tkinter import root tk(label(roottext='hello gui world!'pack(side=toproot mainloop(the tkinter module goes out of its way to export only what we really needso it' one of the few for which the import form is relatively safe to apply |the top constant in the pack call herefor instanceis one of those many names exported by the tkinter module it' simply variable name (top="top"preassigned in constantsa module automatically loaded by tkinter when widgets are packedwe can specify which side of their parent they should be attached to--topbottomleftor right if no side option is sent to pack (as in prior examples) widget is attached to its parent' top by default in generallarger tkinter guis can be constructed as sets of rectanglesattached to the appropriate sides of other|if you study the main tkinter file in the python source library (currentlylib\tkinter\__init__ py)you'll notice that top-level module names not meant for export start with single underscore python never copies over such names when module is accessed with the form of the from statement the constants module is today constants py in the same module package directorythough this can change (and hasover time graphical user interfaces