An extension program to curses that offers option menus, message boxes, file dialogs and more
Project description
Curses Plus
Extension library to curses
How To Install
Use pip3 install cursesplus
on Linux or py -m pip install cursesplus
on Windows
SPECIAL INSTRUCTIONS FOR WINDOWS
For Windows you need to also install windows-curses
or related program
to provide the basic curses functionality
What's New?
Patch 2.11.4
-
transitions.random_blocks speed now actually does something
-
Write some docs
Patch 2.11.3
-
Fix bug in filedialog in empty directory
-
Add optional flag: allowcancel
-
This controls if you are allowed to cancel
-
Cancel by pressing C (or SHIFT C in openfilesdialog)
Version 2.11
-
Add checkboxlist
-
Choose one or more options from the list
-
Add banned characters in cursesinput .
-
Fix blinking in textview
Documentation
transitions.py
transitions contains many transitions to add animations to your program
_old(stdscr,func_to_call=None,args=(),type=0)
This is the old transitions function found in cursesplus prior to like 2.8 or something. It has since been replaced by horizontal_bars() and random_blocks()
-
stdscr
is a curses window object -
func_to_call
is a function. If it is set to none, no function is called -
args
is a tuple. The tuple will be passed to the function as arguments -
type
is an int. It may be 0 or 1. If it is 0, there are horizontal bars. If it is 1, it is random blocks
__exec(func,args)
NOTE: THIS IS AN INTERNAL FUNCTION, IT IS NOT MEANT TO BE USED BY THE COMMON USER
This executes func(args)
horizontal_bars(stdscr,func_to_call=None,args=(),speed=1)
This is a replacement function to old's type zero. It fills the screen from the top down with horizontal white bars. It then replaces them with black bars in the same configuration.
-
stdscr
is a curses window object -
func_to_call
is a function. If it is set to none, no function is called -
args
is a tuple. The tuple will be passed to the function as arguments -
speed
is an int. A higher value increases the animation speed. A lower value (0 - 1) makes it slower. If you set speed to 0, the program will crash.
random_blocks(stdscr,func_to_call=None,args=(),speed=1)
This is a replacement for old's type one transition. It fills random characters of the screen with blocks until the whole screen is covered, then it removes it in the same fashion.
-
stdscr
is a curses window object -
func_to_call
is a function. If it is set to none, no function is called -
args
is a tuple. The tuple will be passed to the function as arguments -
speed
is an int. A higher value increases the animation speed. A lower value (0 - 1) makes it slower. If you set speed to 0, the program will crash.
vertical_bars(stdscr,func_to_call=None,args=(),speed=1)
This is an all new transition. It functions like horizontal bars except they are vertical and go left to right.
-
stdscr
is a curses window object -
func_to_call
is a function. If it is set to none, no function is called -
args
is a tuple. The tuple will be passed to the function as arguments -
speed
is an int. A higher value increases the animation speed. A lower value (0 - 1) makes it slower. If you set speed to 0, the program will crash.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cursesplus-2.11.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecae7511f2c0aca1170713739d94f70bbd955be32f8388ab0f544668ccd4580d |
|
MD5 | 099483849fbd6268b62ef4878dbd42cf |
|
BLAKE2b-256 | 4bc8df509fedc93c3604d8fe17606d98f1df2a5a35577b9ab29a1d7903c76234 |