Python编辑器英⽂菜单的中⽂翻译及解释
Python编辑器,在Help菜单⾥到了“IDLE Help”(如图1所⽰),是Python的IDLE和Shell中的菜单说明
图1 IDLE Help
⼀、⽂件(File)菜单
主要是在Python⾥编程过程中对于⽂件的新建、打开、保存等操作。
File menu (Shell and Editor)⽂件菜单(Shell和编辑器)
New File新建⽂件
Create a new file editing window创建⼀个新的⽂件编辑窗⼝。
Open..打开…
Open an existing file with an Open dialog使⽤“打开"对话框打开现有⽂件。
Recent Files 最近的⽂件
Open a list of recent files. Click one to open it  打开最近使⽤的⽂件列表。单击⼀个打开它。
Open Module 打开模块.
Open an existing module (searches sys path) 打开现有模块(搜索sys.path)。
net use del
Class Browser类浏览器
Show functions, classes, and methods in the current Editor file in a tree structure. Inthe shell, open a module first 以树状结构显⽰当前编辑器⽂件中的函数、类和⽅法。在shel中,⾸先打开⼀个模块。
Path Browser 路径浏览器
Show sys.path directories,modules,functions, classes and methods in a treestructure 在树结构中显⽰sys.path⽬录、模块、函数、类和⽅法。
Save保存
Save the current window to the associated file, if there is one. Windows that have
been changed since being opened or last saved have a * before and after the windowtitle If there is n
o associated file,do Save As instead
constitute的翻译将当前窗⼝保存到关联的⽂件(如果有)。⾃打开或上次保存后已更改的窗⼝在窗⼝标题前后都有⼀个*号。如果没有关联的⽂件,请改为另存为。
Save As另存为
Save the current window with a Save As dialog The file saved becomes the newassociated file for the window.
⽤另存为对话框保存当前窗⼝。保存的⽂件将成为窗⼝的新关联⽂件。
Save Copy As..将副本另存为…
Save the current window to different file without changing the associated file将当前窗⼝保存到其他⽂件,⽽不更改关联的⽂件。
Print Window 打印窗⼝
Print the current window to the default printer将当前窗⼝打印到默认打印机。
Close 关闭
Close the current window (ask to save if unsaved) 关闭当前窗⼝(如果未保存则要求保存)。
Exit 退出
Close all windows and quit lDLE (ask to save unsaved windows) 关闭所有窗⼝并退出空闲状态(要求保存未保存的窗⼝)。
图2 File菜单
⼆、编辑(Edit)菜单
主要是编程过程中对代码的编辑操作,包括:撤消、重做、剪切、粘贴、复制、查、替换等功能。狄拉克delta函数
Edit menu (Shell and Editor) 编辑菜单(She和编辑器)
Undo  撤消
exploit networkUndo the last change to the current window A maxlmum of 1000 changes may beundone
撤消对当前窗⼝的最后更改。最多可以撤消1000个更改。
Redo重做
Redo the last undone change to the current window 重做对当前窗⼝的上次撤消更改。
Cut  切割
Copy selection into the system-wide clipboard,then delete the selection 将所选内容复制到系统范围的剪贴板中;然后删除所选内容。
Copy  复制
Copy selection into the system-wide clipboard将所选内容复制到系统范围的剪贴板中。
Paste 粘贴
Insert contents of the system-wide clipboard into the current window 将系统范围剪贴板的内容插⼊当前窗⼝。The clipboard functions are also available in context menus 剪贴板功能也可以在上下⽂菜单中使⽤。
Select Al 全选
Select the entire contents of the current window 选择当前窗⼝的全部内容。
<  查…
Open a search dialog with many options 打开包含许多选项的搜索对话框
Find Again  再⼀次
Repeat the last search, if there is one 如果有,重复上⼀次搜索。
Find Selection  查选定内容
Search for the currently selected string,if there is one 搜索当前选定的字符串(如果有)。
Find in Files 在⽂件中查…
Open a file search dialog.Put results ina new output window 打开⽂件搜索对话框。将结果放⼊新的输出窗⼝。Replace 替换…
Open a search-and-replace dialog打开“搜索和替换"对话框。
Go to Line 转到⾏
Move cursor to the line number requested and make that line visible 将光标移到请求的⾏号并使该⾏可见,
Show Completions  显⽰完成
Open a scrollable list allowing selection of keywords and attributes.See Completionsin the Editing and navigation section below,
打开⼀个可滚动列表,允许选择关键字和属性。请参阅下⾯编辑和导航部分中的完成部分。
Expand Word 展开字
Expand a prefix you have typed to match a full word in the same window, repeat to geta dillerent expansion
展开已键⼊的前缀以匹配同⼀窗⼝中的完整单词;重复可获得不同的展开⽅式。
Show call tip 显⽰呼叫提⽰
After an unclosed parenthesis for a function,opena small window with function.parameter hints.See Caliltips in the Editing and navigation section below
在函数的未闭合圆括号之后,打开⼀个带有函数参数提⽰的⼩窗⼝。请参见下⾯编辑和导航部分中的调⽤提⽰。Show surrounding parens 显⽰周围的parens
Highlight the surrounding parenthesis 突出显⽰周围的括号。
图3 Edit菜单
三、格式(Format)菜单
主要是对代码进⾏格式化操作,包括:缩进、注释、段落格式等功能。
Format menu (Editor window only) 格式菜单(仅限编辑器窗⼝)
lndent Region 缩进区域
Shift selected lines right by the indent width(default 4 spaces)  按缩进宽度右移选定⾏(默认为4个空格)。Dedent Region  Dedent 地区
Shift selected lines left by the indent width (defauft 4 spaces)  按缩进宽度向左移动选定⾏(默认为4个空格))。Comment Out Region 注释区域
lnsert # in front of selected lines在选定⾏前⾯插⼊。
Uncomment Region ⾮注释区域
Remove leading # or#ll from selected lines  从选定⾏中删除前导或。
Tabify Region 禁忌区
Turn leading stretches of spaces into tabs.(Note: We recommend using 4 spaceblocks to indent Python code.)将空格的前导部分变成制表符。(注意:我们建议使⽤4个空格块来缩进Python代码。)
Untabify Region 未分裂地区
Tun all tabs into the correct number of spaces 将所有制表符转换为正确的空格数。
Toggle Tabs 切换选项卡
Open a dialog to switch between indenting with spaces and tabs  打开⼀个对话框,在缩进空格和制表符之间切换。New indent Width 新缩进宽度
Open a dialog to change indent width. The accepted default by the Python communityis 4 spaces
打开对话框以更改缩进宽度。Python社区接受的默认值是4个空格。
Format Paragraph  设置段落格式
Reformat the current blank-line-delimited paragraph in comment block or multilinestring or selected line in a string. All lines in the paragraph will be formatted to lessthan N columns, where N defaults to 72.
重新格式化注释块或多⾏字符串或字符串中选定⾏中当前以空⾏分隔的段落。段落中的所有⾏的格式都将⼩于N列,其中N默认为72列。
Strip trailing whitespace 册除尾随空⽩
Remove trailing space and other whitespace characters after the last non-whitespace(character of a line by applying str.rstrip to each line,including lines within multiline  strings. Except for Shell windows, remove extra newlines at the end of the file.
通过对每⼀⾏(包括多⾏字符串中的⾏)应⽤str.rstrip,删除⾏的最后⼀个⾮空⽩字符之后的尾随空格和其他空⽩字符。除了Shell窗⼝之外,请删除⽂件末尾的额外换⾏符。
图4 Format菜单
四、运⾏(Run)菜单
主要是代码编写好之后,调试、运⾏操作。
Run menu (Editor window only) 运⾏菜单(仅限编辑器窗⼝)
Run Module 运⾏模块
Do Check Module. If no error, restart the shell to clean the environment, then executethe module: Output is displayed in the Shell window. Note that output requires use ofprint or write When execution is complete,the Shell retains focus and displays aprompt.At this point one may interactively explore the resultt of execution This issimilar to executing a file with python -i file at a command line.
检查模块。如果没有错误,请重新启动shell以清理环境,然后执⾏模块。输出将显⽰在Shell窗⼝中。请注意,输出需要使⽤打印或写⼊。执⾏完成后,Shell将保留焦点并显⽰提⽰。此时,可以交互地探索执⾏的结果。这类似于在命令⾏使⽤python-i⽂件执⾏⽂件。
< Customized 运⾏⾃定义
Same as Run Module, but run the module with customized settings. Command LineArguments extend sys.argv as if passed on a command line. The module can be runin the Shell without restarting
与运⾏模块相同,但使⽤⾃定义设置运⾏模块。命令⾏参数扩展sys. argv,就像在命令⾏上传递⼀样。模块可以在Shell中运⾏,⽽⽆需重新启动。
python入门教程编辑器
Check Module检查模块
Check the syntax of the module currently open in the Editor window.If the module hasnot been saved IDLE will either prompt the user to save or autosave,as selected inthe General tab of the ldle Settings dialog,If there is a syntax error, the approximatelocation is indicated in the Editor window
检查编辑器窗⼝中当前打开的模块的语法。如果模块尚未保存,则将提⽰⽤户保存或⾃动保存,如在“空闲设置"对话框的“常规"选项卡中所选。如果存在语法错误,则在编辑器窗⼝中指⽰近似位置。
Python Shell 蟒蛇壳
Open or wake up the Python Shell window 打开或唤醒Python Shell窗⼝。
图5 Run菜单
五、Shell菜单
注意这个菜单只有在Shell当中有,IDLE中是没有的。
Shell menu (Shell window only)    Shell菜单(仅限Shell窗⼝)
补码的补码如何计View Last Restart 查看上次重新启动
Scroll the shell window to the last Shell restart.将shell窗⼝滚动到最后⼀次shell重新启动。
Restart Shell  重新启动Shell
Restart the shell to clean the environment 重新启动shell以清理环境。
Previous History  以前的历史
Cycle through earlier commands in history which match the current entry 循环浏览历史记录中与当前条⽬匹配的早期命令。
Next History 下⼀个历史
Cycle through later commands in history which match the current entry 循环查看历史记录中与当前条⽬匹配的后续命令。
lnterrupt Execution  中断执⾏
Stop a running program 停⽌正在运⾏的程序。
图6 Shell菜单
六、调试(Debug)菜单
这个菜单也只存在于Shell当中,IDLE中是没有的。
Debug menu(Shell window only) 调试菜单(仅限Shell窗⼝)
Go to File/Line 转到⽂件/⾏
Look on the current line:with the cursor,and the line above for a filename and linenumber. If found,open the file if not already open, and show the line. Use this to viewsource lines referenced in an exception traceback and lines found by Find in Files.Also available in the context menu of the Shell window and Output windows.
看看当前⾏。使⽤光标,并在上⾯的⾏中输⼊⽂件名和⾏号。如果到,打开⽂件(如果尚未打开),并显⽰⾏。使⽤此选项可以查看异常回溯中引⽤的源⾏和⽂件中查到的⾏。也可以在Shell窗⼝和输出窗⼝的上下⽂菜单中使⽤。
Debugger (toggle) 调试器(切换)
When activated, code entered in the Shell or run from an Editor will run under thedebugger. In the Editor, breakpoints can be set with the context menu. This feature isstill incomplete and somewhat experimental.
激活后,在Shell中输⼊或从编辑器运⾏的代码将在调试器下运⾏。在编辑器中,可以使⽤上下⽂菜单设置断点。这个功能仍然不完整,有些实验性。
Stack Viewer 堆栈查看器

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。