zoukankan      html  css  js  c++  java
  • 【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外包
  • 相关阅读:
    Django中MySQL读写分离技术
    BBS+Blog项目开发
    数据算法 --hadoop/spark数据处理技巧 --(5.移动平均 6. 数据挖掘之购物篮分析MBA)
    数据算法 --hadoop/spark数据处理技巧 --(3.左外连接 4.反转排序)
    数据算法 --hadoop/spark数据处理技巧 --(1.二次排序问题 2. TopN问题)
    mysql ---- Host '' is not allowed to connect to this MySQL server
    win 8.0.12
    Transformer 和 Transformer-XL——从基础框架理解BERT与XLNet
    Transformer 详解
    XLNet:运行机制及和Bert的异同比较
  • 原文地址:https://www.cnblogs.com/SoaringLee/p/10532556.html
Copyright © 2011-2022 走看看