• 【PE/Python】python IDLE添加行号显示


       
        转载自:http://blog.csdn.net/listener51/article/details/79052155


           1、下载LineNumber.py

    http://idlex.sourceforge.net/extensions.html

    https://sourceforge.net/projects/idlex/?source=typ_redirect

    IDleX----IDLE Extensions for Python

    Features

    • Terminal-like behavior for Shell. Cursor stays in prompt and up/down arrow keys cycle the command history.
    • Persistent history of Shell commands across sessions.
    • Paste and run multiple lines in the shell.
    • Non-blocking interactive GUI development for Tkinter, GTK, Qt, Qt4, PySide, wxPython
    • Matplotlib support for interactive figures when using the subprocess.
    • Clear Shell Window without restarting Shell.
    • Capture large output and display it as an expandable button.
    • Tabbed editor windows with drag'n'drop reordering.
    • Improved code navigation with Code Browser.
    • Line numbers for the editor.
    • Find and Replace as a toolbar with incremental searching.
    • Intelligent Paste from Shell. (remove >>> prompts)
    • Highlight tabs ( ) in editor to help fix tab/space issues.
    • Integrated reindent.py support.
    • Horizontal scroll bar for the editor.
    • Export contents with syntax highlighting as HTML.
    • Cython editing and execution support.
    • Execute highlighted code or a single line from the editor with F9.
    • SubCodes, similar to MATLAB cell mode and IPython/Sagemath cells, for quick code prototyping without restarting the shell.
    • Run parts of a script separated by "##" markers in the editor with Ctrl+Return.
    • Stop a running script with Ctrl+C from the Editor.
    • Documentation Viewer to view help() and doc strings in a separate window.
    • Simple interface for enabling/disabling extensions.
    • Right-click context menu with Cut, Copy, and Paste.

    2、配置方法

    (1)先下载LineNumber.py文件。然后将文件放在python安装目录下的idlelib目录下

    (2)然后再用文本编辑器打开idlelib目录下的config-extensions.def文件。将如下配置参数写入文件:

    [LineNumbers]

    enable=1

    enable_editor=1

    enable_shell=0

    visible=1

    再保存此文件,重新打开idle即可。

    本文为博主原创文章,未经博主允许不得转载。若允许转载,请注明来源https://www.cnblogs.com/SoaringLee/,否则保留追究法律责任的权利!另外,本人提供付费咨询服务并长期承接各类毕设以及外包项目。联系QQ:2963033731。加Q备注:CSDN外包
  • 相关阅读:
    七七四十九劫,九九八十一难
    Android中用layer-list编写阴影效果
    Android 高手进阶之自定义View,自定义属性(带进度的圆形进度条)
    Effective C++ 24,25
    windows系统port监听
    线程同步辅助类——Exchanger
    C/C++中constkeyword
    【COCOS2DX-游戏开发之三三】TMX边界控制与小窗体内预览TMX
    IDFA的值什么时候会发生改变
    hadoop(六)
  • 原文地址:https://www.cnblogs.com/SoaringLee/p/10532556.html
Copyright © 2020-2023  润新知