Skip to main content

idle-term

This library provides some terminal features for IDLE's shell. Some features are:

  • "\b" and "\r" characters will be processed so progressbars which show information like progress percentage will finally work
  • print_fancy function can be used to print with color, font and style
  • clear function can be used to clear all outputs

Warning: The library isn't compatible with environments other than IDLE. Not even with the default shell of the system.

Installation

pip install idle-term

then you can import with

import idle_term

Escape Characters

Once you import the library, you don't have to do anything else and can immediately start using escape characters "\b", "\r", "\a" in your print and idle_term.print_fancy calls. These are the only escape characters supported. For things like colored output, use print_fancy.

Api Reference

function idle_term.print_fancy(*objects, sep = " ", end = "\n", **kwargs)

An alternative for the built in print function for printing with color, font and style. objects, sep and end parameters are for the same purpose as of the builtin print function.

kwargs will be passed to tag_config method of the tkinter.Text widget of IDLE's shell. You can find documentation about this method here. Parameters background and foreground accept a color value. You can find documentation about colors here. List of all predefined color names are here. A subset of those names can also be found in some 3rd party websites like this which also show the actual colors. If you want to use the font parameter, you must pass a tuple, tkinter.font.Font objects are not supported. You can get the list of all available font families by executing this code:

import tkinter.font
print(tkinter.font.families(tkinter.Tk()))

function idle_term.clear()

Clear the screen

function idle_term.paint_line(background = "", bgstipple = "")

Paint a line with the specified background color and stipple. Both parameters will be passed to tag_config method of the tkinter.Text widget of IDLE's shell. Read the second paragraph of the documentation of idle_term.print_fancy for more information about this method. If your program exits without printing anything else after calling this function, the painted line will be erased. In order to prevent this, you may print a space (" ") before exiting.

Metadata

Release files for idle-term 1.0.0.post3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for idle-term 1.0.0.post3
File Size Uploaded
idle_term-1.0.0.post3.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for idle-term 1.0.0.post3
File Interpreter ABI Platform
idle_term-1.0.0.post3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 8.9 kB

Release files / idle_term-1.0.0.post3.tar.gz

Download URL idle_term-1.0.0.post3.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f0e83254359f21d866405c7a99d0084e4d40bb822acfa770a55c758b454c8cf2
BLAKE2b-256 checksum
How to use checksums
eef33d5fa7d269c0d210fdfe591d70b1114dfb2b25d6615a28e04628fcb72c7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Release files / idle_term-1.0.0.post3-py2.py3-none-any.whl

Download URL idle_term-1.0.0.post3-py2.py3-none-any.whl
Size 4.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ccc5ec4fa3ac756779940350e5d462b9b2b95b9ffb67f5f96023c74de250700b
BLAKE2b-256 checksum
How to use checksums
ec43e4115e321b77b1705b02af7d8371e056ae356d41bc97cf968bd5a37c0621
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

1.0.0.post3 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page