资源简介

教育部考试中心通知,自2018年9月起,在计算机二级考试加入了“Python语言程序设计”科目。Python3.5.2版本以上及IDLE。 安装方法(已经安装过Python的直接绕过第一二步): 第2步:python.org下载Python3.5.2原版 第2步:安装,一路Next 第3步:完成汉化。打开Python安装目录/lib,把旧的idlelib目录替换下载解压后的idlelib即可。

资源截图

代码片段和文件信息

“““About Dialog for IDLE

“““

import os
from sys import version
from tkinter import *
from idlelib import textView

class AboutDialog(Toplevel):
    “““Modal about dialog for idle

    “““
    def __init__(self parent title _htest=False):
        “““
        _htest - bool change box location when running htest
        “““
        Toplevel.__init__(self parent)
        self.configure(borderwidth=5)
        # place dialog below parent if running htest
        self.geometry(“+%d+%d“ % (
                        parent.winfo_rootx()+30
                        parent.winfo_rooty()+(30 if not _htest else 100)))
        self.bg = “#707070“
        self.fg = “#ffffff“
        self.CreateWidgets()
        self.resizable(height=FALSE width=FALSE)
        self.title(title)
        self.transient(parent)
        self.grab_set()
        self.protocol(“WM_DELETE_WINDOW“ self.Ok)
        self.parent = parent
        self.buttonOk.focus_set()
        self.bind(‘‘self.Ok) #dismiss dialog
        self.bind(‘‘self.Ok) #dismiss dialog
        self.wait_window()

    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:  idle-dev@python.org‘
                           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=

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       7037  2016-06-25 21:48  idlelib\aboutDialog.py

     文件       9424  2016-10-09 20:02  idlelib\AutoComplete.py

     文件      18155  2015-11-18 00:44  idlelib\AutoCompleteWindow.py

     文件       3499  2016-10-09 20:06  idlelib\AutoExpand.py

     文件       3163  2016-10-10 19:42  idlelib\Bindings.py

     文件       6106  2016-10-09 20:10  idlelib\CallTips.py

     文件       6195  2015-11-18 00:44  idlelib\CallTipWindow.py

     文件      57979  2016-06-12 07:32  idlelib\ChangeLog

     文件       7234  2016-10-09 21:15  idlelib\ClassBrowser.py

     文件       8533  2015-09-22 22:11  idlelib\CodeContext.py

     文件      10879  2016-06-12 07:32  idlelib\ColorDelegator.py

     文件       3064  2015-09-22 22:11  idlelib\config-extensions.def

     文件       2608  2015-11-18 00:44  idlelib\config-highlight.def

     文件       7991  2015-09-22 22:11  idlelib\config-keys.def

     文件       2641  2015-11-18 00:44  idlelib\config-main.def

     文件      66387  2016-10-07 20:16  idlelib\configDialog.py

     文件      32958  2016-06-12 07:32  idlelib\configHandler.py

     文件       6999  2016-10-09 19:48  idlelib\configHelpSourceEdit.py

     文件       4084  2016-10-08 21:01  idlelib\configSectionNameDialog.py

     文件       1903  2016-02-08 16:37  idlelib\CREDITS.txt

     文件      19337  2016-10-09 19:17  idlelib\Debugger.py

     文件       1076  2016-06-12 07:32  idlelib\Delegator.py

     文件       2047  2015-09-22 22:11  idlelib\dynOptionMenuWidget.py

     文件      67132  2016-10-09 21:11  idlelib\EditorWindow.py

     文件       3725  2015-09-22 22:11  idlelib\extend.txt

     文件       3944  2016-10-07 10:33  idlelib\FileList.py

     文件       7478  2016-10-10 19:59  idlelib\FormatParagraph.py

     文件       5296  2016-10-09 21:19  idlelib\GrepDialog.py

     文件      43223  2016-06-12 07:32  idlelib\help.html

     文件      11164  2016-06-12 07:32  idlelib\help.py

............此处省略98个文件信息

评论

共有 条评论