Esempio n. 1
0
 def CreateWidgets(self):
     self['borderwidth'] = 0
     release = version[:version.index(' ')]
     '''
     logofn = os.path.join(os.path.abspath(os.path.dirname(__file__)),
                           "Icons", "gencal_48.gif")
     '''
     logofn = resource_path('Icons/gencal_48.gif')
     self.picture = PhotoImage(master=self._root(), file=logofn)
     self.frameBg = frameBg = Frame(self, bg=self.bg, borderwidth=0)
     frameBg.grid(sticky='nsew')
     labelTitle = Label(frameBg,
                        text='Gencal ' + G.Version,
                        fg=self.fg,
                        bg=self.bg,
                        font=('courier', 24, 'bold'))
     labelTitle.grid(row=0, column=1, sticky=W, padx=10, pady=[10, 0])
     labelPicture = Label(frameBg, image=self.picture, bg=self.bg)
     labelPicture.grid(row=0,
                       column=0,
                       sticky=NE,
                       rowspan=2,
                       padx=10,
                       pady=10)
     byline = "Generate Calabration Gcode"
     labelDesc = Label(frameBg,
                       text=byline,
                       justify=LEFT,
                       fg=self.fg,
                       bg=self.bg)
     labelDesc.grid(row=1,
                    column=1,
                    sticky=W,
                    columnspan=3,
                    padx=10,
                    pady=[0, 20])
     # labelEmail = Label(frameBg, text='email:  [email protected]',
     #                    justify=LEFT, fg=self.fg, bg=self.bg)
     # labelEmail.grid(row=6, column=1, columnspan=2,
     #                 sticky=W, padx=10, pady=0)
     # labelWWW = Label(frameBg, text='https://docs.python.org/' +
     #                  version[:3] + '/library/idle.html',
     #                  justify=LEFT, fg=self.fg, bg=self.bg)
     #labelWWW.grid(row=7, column=1, columnspan=2, sticky=W, padx=10, pady=0)
     tkVer = self.tk.call('info', 'patchlevel')
     labelVersion = Label(frameBg,
                          text='Python ' + release + '     (with Tk ' +
                          tkVer + ')',
                          fg=self.fg,
                          bg=self.bg)
     labelVersion.grid(row=4, column=1, sticky=W, padx=10, pady=[0, 5])
     self.morelink = Label(frameBg,
                           text='More...',
                           fg='blue',
                           bg=self.bg,
                           cursor='hand2')
     self.morelink.grid(column=0, columnspan=3, pady=10, padx=10, sticky=E)
     self.morelink.bind('<1>', self.showMore)
Esempio n. 2
0
    def __init__(self, parent):
        Toplevel.__init__(self, parent)
        self.configure(borderwidth=0)
        self.transient(parent)
        self.geometry("+%d+%d" % (
                        parent.winfo_rootx()+30,
                        parent.winfo_rooty()+30))
        from tkinter import Frame, Label
        from sys import version
        from tiborcim.contrib.uflash import get_version as uflash_version
        from tiborcim.tibc import get_version as tibc_version

        self.bg = "#bbbbbb"
        self.fg = "#000000"
        
        release = version[:version.index(' ')]
        logofn = ICON_PNG
        self.picture = PhotoImage(master=self._root(), file=logofn, width=64, height=64)
        self.frameBg = frameBg = Frame(self, bg=self.bg, borderwidth=0)
        frameBg.grid(sticky='nsew')
        label_title = Label(frameBg, text='Cim', fg=self.fg, bg=self.bg,
                           font=('courier', 24, 'bold'))
        label_title.grid(row=0, column=1, sticky="w", padx=10, pady=[10,0])
        label_icon = Label(frameBg, image=self.picture, bg=self.bg)
        label_icon.grid(row=0, column=0, sticky="ne", rowspan=2,
                          padx=10, pady=10)
        byline = "Tiborcim Editor - Tkinter"
        label_info = Label(frameBg, text=byline, justify="left",
                          fg=self.fg, bg=self.bg)
        label_info.grid(row=1, column=1, sticky="w", columnspan=3, padx=10,
                       pady=[0,20])
        label_website = Label(frameBg, text='https://github.com/ZanderBrown/Tiborcim',
                         justify="left", fg=self.fg, bg=self.bg)
        label_website.grid(row=7, column=1, columnspan=2, sticky="w", padx=10, pady=0)
        tiborcim_version = 'Tiborcim ' + tibc_version() + ' (with uFlash ' + uflash_version() + ')' + ' on Python ' + release
        label_version = Label(frameBg, text=tiborcim_version,
                             fg=self.fg, bg=self.bg)
        label_version.grid(row=4, column=1, sticky="w", padx=10, pady=[0,5])

        self.resizable(height="false", width="false")
        self.title('About')
        self.protocol("WM_DELETE_WINDOW", self.close)
        self.parent = parent
        self.bind('<Escape>', self.close)
Esempio n. 3
0
 def CreateWidgets(self):
     self['borderwidth'] = 0
     release = version[:version.index(' ')]
     logofn = os.path.join(os.path.abspath(os.path.dirname(__file__)),
                           "Icons", "idle_48.gif")
     self.picture = PhotoImage(master=self._root(), file=logofn)
     self.frameBg = frameBg = Frame(self, bg=self.bg, borderwidth=0)
     frameBg.grid(sticky='nsew')
     labelTitle = Label(frameBg, text='IDLE', fg=self.fg, bg=self.bg,
                        font=('courier', 24, 'bold'))
     labelTitle.grid(row=0, column=1, sticky=W, padx=10, pady=[10,0])
     labelPicture = Label(frameBg, image=self.picture, bg=self.bg)
     labelPicture.grid(row=0, column=0, sticky=NE, rowspan=2,
                       padx=10, pady=10)
     byline = "Python's Integrated DeveLopment Environment"
     labelDesc = Label(frameBg, text=byline, justify=LEFT,
                       fg=self.fg, bg=self.bg)
     labelDesc.grid(row=1, column=1, sticky=W, columnspan=3, padx=10,
                    pady=[0,20])
     labelEmail = Label(frameBg, text='email:  [email protected]',
                        justify=LEFT, fg=self.fg, bg=self.bg)
     labelEmail.grid(row=6, column=1, columnspan=2,
                     sticky=W, padx=10, pady=0)
     labelWWW = Label(frameBg, text='https://docs.python.org/' +
                      version[:3] + '/library/idle.html',
                      justify=LEFT, fg=self.fg, bg=self.bg)
     labelWWW.grid(row=7, column=1, columnspan=2, sticky=W, padx=10, pady=0)
     tkVer = self.tk.call('info', 'patchlevel')
     labelVersion = Label(frameBg, text='Python ' +
                          release + '     (with Tk '+tkVer+')',
                          fg=self.fg, bg=self.bg)
     labelVersion.grid(row=4, column=1, sticky=W, padx=10, pady=[0,5])
     self.morelink = Label(frameBg, text='More...', fg='blue', bg=self.bg,
                           cursor=self.link_cursor)
     self.morelink.grid(column=0, columnspan=3, pady=10, padx=10, sticky=E)
     self.morelink.bind('<1>', self.showMore)
Esempio n. 4
0
"""
The separate Idle version was eliminated years ago;
idlelib.idlever is no longer used by Idle
and will be removed in 3.6 or later.  Use
    from sys import version
    IDLE_VERSION = version[:version.index(' ')]
"""
# Kept for now only for possible existing extension use
import warnings as w

w.warn(__doc__, DeprecationWarning, stacklevel=2)
from sys import version

IDLE_VERSION = version[: version.index(" ")]
Esempio n. 5
0
 def CreateWidgets(self):
     release = version[:version.index(' ')]
     frameMain = Frame(self, borderwidth=2, relief=SUNKEN)
     frameButtons = Frame(self)
     frameButtons.pack(side=BOTTOM, fill=X)
     frameMain.pack(side=TOP, expand=TRUE, fill=BOTH)
     self.buttonOk = Button(frameButtons, text='Close',
                            command=self.Ok)
     self.buttonOk.pack(padx=5, pady=5)
     #self.picture = Image('photo', data=self.pictureData)
     frameBg = Frame(frameMain, bg=self.bg)
     frameBg.pack(expand=TRUE, fill=BOTH)
     labelTitle = Label(frameBg, text='IDLE', fg=self.fg, bg=self.bg,
                        font=('courier', 24, 'bold'))
     labelTitle.grid(row=0, column=0, sticky=W, padx=10, pady=10)
     #labelPicture = Label(frameBg, text='[picture]')
     #image=self.picture, bg=self.bg)
     #labelPicture.grid(row=1, column=1, sticky=W, rowspan=2,
     #                  padx=0, pady=3)
     byline = "Python's Integrated DeveLopment Environment" + 5*'\n'
     labelDesc = Label(frameBg, text=byline, justify=LEFT,
                       fg=self.fg, bg=self.bg)
     labelDesc.grid(row=2, column=0, sticky=W, columnspan=3, padx=10, pady=5)
     labelEmail = Label(frameBg, text='email:  [email protected]',
                        justify=LEFT, fg=self.fg, bg=self.bg)
     labelEmail.grid(row=6, column=0, columnspan=2,
                     sticky=W, padx=10, pady=0)
     labelWWW = Label(frameBg, text='https://docs.python.org/' +
                      version[:3] + '/library/idle.html',
                      justify=LEFT, fg=self.fg, bg=self.bg)
     labelWWW.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=0)
     Frame(frameBg, borderwidth=1, relief=SUNKEN,
           height=2, bg=self.bg).grid(row=8, column=0, sticky=EW,
                                      columnspan=3, padx=5, pady=5)
     labelPythonVer = Label(frameBg, text='Python version:  ' +
                            release, fg=self.fg, bg=self.bg)
     labelPythonVer.grid(row=9, column=0, sticky=W, padx=10, pady=0)
     tkVer = self.tk.call('info', 'patchlevel')
     labelTkVer = Label(frameBg, text='Tk version:  '+
                        tkVer, fg=self.fg, bg=self.bg)
     labelTkVer.grid(row=9, column=1, sticky=W, padx=2, pady=0)
     py_button_f = Frame(frameBg, bg=self.bg)
     py_button_f.grid(row=10, column=0, columnspan=2, sticky=NSEW)
     buttonLicense = Button(py_button_f, text='License', width=8,
                            highlightbackground=self.bg,
                            command=self.ShowLicense)
     buttonLicense.pack(side=LEFT, padx=10, pady=10)
     buttonCopyright = Button(py_button_f, text='Copyright', width=8,
                              highlightbackground=self.bg,
                              command=self.ShowCopyright)
     buttonCopyright.pack(side=LEFT, padx=10, pady=10)
     buttonCredits = Button(py_button_f, text='Credits', width=8,
                            highlightbackground=self.bg,
                            command=self.ShowPythonCredits)
     buttonCredits.pack(side=LEFT, padx=10, pady=10)
     Frame(frameBg, borderwidth=1, relief=SUNKEN,
           height=2, bg=self.bg).grid(row=11, column=0, sticky=EW,
                                      columnspan=3, padx=5, pady=5)
     idle_v = Label(frameBg, text='IDLE version:   ' + release,
                    fg=self.fg, bg=self.bg)
     idle_v.grid(row=12, column=0, sticky=W, padx=10, pady=0)
     idle_button_f = Frame(frameBg, bg=self.bg)
     idle_button_f.grid(row=13, column=0, columnspan=3, sticky=NSEW)
     idle_about_b = Button(idle_button_f, text='README', width=8,
                             highlightbackground=self.bg,
                             command=self.ShowIDLEAbout)
     idle_about_b.pack(side=LEFT, padx=10, pady=10)
     idle_news_b = Button(idle_button_f, text='NEWS', width=8,
                             highlightbackground=self.bg,
                             command=self.ShowIDLENEWS)
     idle_news_b.pack(side=LEFT, padx=10, pady=10)
     idle_credits_b = Button(idle_button_f, text='Credits', width=8,
                             highlightbackground=self.bg,
                             command=self.ShowIDLECredits)
     idle_credits_b.pack(side=LEFT, padx=10, pady=10)
Esempio n. 6
0
"""Unused by Idle: there is no separate Idle version anymore.
Kept only for possible existing extension use."""
from sys import version
IDLE_VERSION = version[:version.index(' ')]
Esempio n. 7
0
    def create_widgets(self):
        release = version[:version.index(' ')]
        frame = Frame(self, borderwidth=2, relief=SUNKEN)
        frame_buttons = Frame(self)
        frame_buttons.pack(side=BOTTOM, fill=X)
        frame.pack(side=TOP, expand=True, fill=BOTH)
        self.button_ok = Button(frame_buttons, text='Close', command=self.ok)
        self.button_ok.pack(padx=5, pady=5)

        frame_background = Frame(frame, bg=self.bg)
        frame_background.pack(expand=True, fill=BOTH)

        header = Label(frame_background,
                       text='IDLE',
                       fg=self.fg,
                       bg=self.bg,
                       font=('courier', 24, 'bold'))
        header.grid(row=0, column=0, sticky=E, padx=10, pady=10)

        tk_patchlevel = self.tk.call('info', 'patchlevel')
        ext = '.png' if tk_patchlevel >= '8.6' else '.gif'
        icon = os.path.join(os.path.abspath(os.path.dirname(__file__)),
                            'Icons', f'idle_48{ext}')
        self.icon_image = PhotoImage(master=self._root(), file=icon)
        logo = Label(frame_background, image=self.icon_image, bg=self.bg)
        logo.grid(row=0, column=0, sticky=W, rowspan=2, padx=10, pady=10)

        byline_text = "Python's Integrated DeveLopment Environment" + 5 * '\n'
        byline = Label(frame_background,
                       text=byline_text,
                       justify=LEFT,
                       fg=self.fg,
                       bg=self.bg)
        byline.grid(row=2, column=0, sticky=W, columnspan=3, padx=10, pady=5)
        email = Label(frame_background,
                      text='email:  [email protected]',
                      justify=LEFT,
                      fg=self.fg,
                      bg=self.bg)
        email.grid(row=6, column=0, columnspan=2, sticky=W, padx=10, pady=0)
        docs = Label(frame_background,
                     text='https://docs.python.org/' + version[:3] +
                     '/library/idle.html',
                     justify=LEFT,
                     fg=self.fg,
                     bg=self.bg)
        docs.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=0)

        Frame(frame_background,
              borderwidth=1,
              relief=SUNKEN,
              height=2,
              bg=self.bg).grid(row=8,
                               column=0,
                               sticky=EW,
                               columnspan=3,
                               padx=5,
                               pady=5)

        pyver = Label(frame_background,
                      text='Python version:  ' + release,
                      fg=self.fg,
                      bg=self.bg)
        pyver.grid(row=9, column=0, sticky=W, padx=10, pady=0)
        tkver = Label(frame_background,
                      text='Tk version:  ' + tk_patchlevel,
                      fg=self.fg,
                      bg=self.bg)
        tkver.grid(row=9, column=1, sticky=W, padx=2, pady=0)
        py_buttons = Frame(frame_background, bg=self.bg)
        py_buttons.grid(row=10, column=0, columnspan=2, sticky=NSEW)
        self.py_license = Button(py_buttons,
                                 text='License',
                                 width=8,
                                 highlightbackground=self.bg,
                                 command=self.show_py_license)
        self.py_license.pack(side=LEFT, padx=10, pady=10)
        self.py_copyright = Button(py_buttons,
                                   text='Copyright',
                                   width=8,
                                   highlightbackground=self.bg,
                                   command=self.show_py_copyright)
        self.py_copyright.pack(side=LEFT, padx=10, pady=10)
        self.py_credits = Button(py_buttons,
                                 text='Credits',
                                 width=8,
                                 highlightbackground=self.bg,
                                 command=self.show_py_credits)
        self.py_credits.pack(side=LEFT, padx=10, pady=10)

        Frame(frame_background,
              borderwidth=1,
              relief=SUNKEN,
              height=2,
              bg=self.bg).grid(row=11,
                               column=0,
                               sticky=EW,
                               columnspan=3,
                               padx=5,
                               pady=5)

        idlever = Label(frame_background,
                        text='IDLE version:   ' + release,
                        fg=self.fg,
                        bg=self.bg)
        idlever.grid(row=12, column=0, sticky=W, padx=10, pady=0)
        idle_buttons = Frame(frame_background, bg=self.bg)
        idle_buttons.grid(row=13, column=0, columnspan=3, sticky=NSEW)
        self.readme = Button(idle_buttons,
                             text='README',
                             width=8,
                             highlightbackground=self.bg,
                             command=self.show_readme)
        self.readme.pack(side=LEFT, padx=10, pady=10)
        self.idle_news = Button(idle_buttons,
                                text='NEWS',
                                width=8,
                                highlightbackground=self.bg,
                                command=self.show_idle_news)
        self.idle_news.pack(side=LEFT, padx=10, pady=10)
        self.idle_credits = Button(idle_buttons,
                                   text='Credits',
                                   width=8,
                                   highlightbackground=self.bg,
                                   command=self.show_idle_credits)
        self.idle_credits.pack(side=LEFT, padx=10, pady=10)
Esempio n. 8
0
    def create_widgets(self):
        release = version[:version.index(' ')]
        frame = Frame(self, borderwidth=2, relief=SUNKEN)
        frame_buttons = Frame(self)
        frame_buttons.pack(side=BOTTOM, fill=X)
        frame.pack(side=TOP, expand=True, fill=BOTH)
        self.button_ok = Button(frame_buttons, text='Close',
                                command=self.ok)
        self.button_ok.pack(padx=5, pady=5)

        frame_background = Frame(frame, bg=self.bg)
        frame_background.pack(expand=True, fill=BOTH)

        header = Label(frame_background, text='IDLE', fg=self.fg,
                       bg=self.bg, font=('courier', 24, 'bold'))
        header.grid(row=0, column=0, sticky=W, padx=10, pady=10)
        byline_text = "Python's Integrated DeveLopment Environment" + 5*'\n'
        byline = Label(frame_background, text=byline_text, justify=LEFT,
                       fg=self.fg, bg=self.bg)
        byline.grid(row=2, column=0, sticky=W, columnspan=3, padx=10, pady=5)
        email = Label(frame_background, text='email:  [email protected]',
                      justify=LEFT, fg=self.fg, bg=self.bg)
        email.grid(row=6, column=0, columnspan=2, sticky=W, padx=10, pady=0)
        docs = Label(frame_background, text='https://docs.python.org/' +
                     version[:3] + '/library/idle.html',
                     justify=LEFT, fg=self.fg, bg=self.bg)
        docs.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=0)

        Frame(frame_background, borderwidth=1, relief=SUNKEN,
              height=2, bg=self.bg).grid(row=8, column=0, sticky=EW,
                                         columnspan=3, padx=5, pady=5)

        pyver = Label(frame_background, text='Python version:  ' + release,
                      fg=self.fg, bg=self.bg)
        pyver.grid(row=9, column=0, sticky=W, padx=10, pady=0)
        tk_patchlevel = self.tk.call('info', 'patchlevel')
        tkver = Label(frame_background, text='Tk version:  ' + tk_patchlevel,
                      fg=self.fg, bg=self.bg)
        tkver.grid(row=9, column=1, sticky=W, padx=2, pady=0)
        py_buttons = Frame(frame_background, bg=self.bg)
        py_buttons.grid(row=10, column=0, columnspan=2, sticky=NSEW)
        self.py_license = Button(py_buttons, text='License', width=8,
                                 highlightbackground=self.bg,
                                 command=self.show_py_license)
        self.py_license.pack(side=LEFT, padx=10, pady=10)
        self.py_copyright = Button(py_buttons, text='Copyright', width=8,
                                   highlightbackground=self.bg,
                                   command=self.show_py_copyright)
        self.py_copyright.pack(side=LEFT, padx=10, pady=10)
        self.py_credits = Button(py_buttons, text='Credits', width=8,
                                 highlightbackground=self.bg,
                                 command=self.show_py_credits)
        self.py_credits.pack(side=LEFT, padx=10, pady=10)

        Frame(frame_background, borderwidth=1, relief=SUNKEN,
              height=2, bg=self.bg).grid(row=11, column=0, sticky=EW,
                                         columnspan=3, padx=5, pady=5)

        idlever = Label(frame_background, text='IDLE version:   ' + release,
                        fg=self.fg, bg=self.bg)
        idlever.grid(row=12, column=0, sticky=W, padx=10, pady=0)
        idle_buttons = Frame(frame_background, bg=self.bg)
        idle_buttons.grid(row=13, column=0, columnspan=3, sticky=NSEW)
        self.readme = Button(idle_buttons, text='README', width=8,
                             highlightbackground=self.bg,
                             command=self.show_readme)
        self.readme.pack(side=LEFT, padx=10, pady=10)
        self.idle_news = Button(idle_buttons, text='NEWS', width=8,
                                highlightbackground=self.bg,
                                command=self.show_idle_news)
        self.idle_news.pack(side=LEFT, padx=10, pady=10)
        self.idle_credits = Button(idle_buttons, text='Credits', width=8,
                                   highlightbackground=self.bg,
                                   command=self.show_idle_credits)
        self.idle_credits.pack(side=LEFT, padx=10, pady=10)