Comments (10)
It can be modified outside of a Console object, which makes knowing how to "reset" it next to impossible.
In my project I'm not modifying the cursor at all. I've only used status
, Live
tables, and progress bars. I'd expect for using things the correct way it surely can manage its cursor itself.
from rich.
Thank you for your issue. Give us a little time to review it.
PS. You might want to check the FAQ if you haven't done so already.
This is an automated reply, generated by FAQtory
from rich.
For reference, here's how I handled this in my own library: https://github.com/nineteendo/ansio/blob/125577e28362ed5395c3dafed38df763fa88b8c2/ansio/__init__.py
from rich.
is there any updates to this?
from rich.
Nope, this is one of the reasons why I don't use rich.
from rich.
The cursor state is something managed by the terminal. It can be modified outside of a Console object, which makes knowing how to "reset" it next to impossible. Additionally, to detect the cursor state, you would need to capture stdin, which Rich doesn't do as it would break the many project that do capture stdin.
If you want control over the cursor state, put it in a try / finally, or a context manager.
from rich.
I hope we solved your problem.
If you like using Rich, you might also enjoy Textual
from rich.
to detect the cursor state, you would need to capture stdin
Can I detect that without using ansi escape codes? My library will always show the cursor on exit if you chose to hide it.
from rich.
Don't call input when any of these objects are running. Input will block and write to the terminal at the same time as Rich, and there is no way for Rich to detect this.
If you want a UI where you can get user input and update the screen, look in to a TUI framework like Textual.
from rich.
When status
, Live
tables, or progress bars are shown there is no input being captured. In the case of status
and the progress bars its being used for long waiting tasks to show that something is happening than just a blank terminal
from rich.
Related Issues (20)
- Margins in text lines in Jupyter HTML template HOT 2
- [BUG] Traceback can't handle to show locals when dataclass fails on __post_init__ and it's not initialized HOT 1
- [REQUEST] Progress.tasks should return a Dict instead of a List HOT 1
- [REQUEST] Rich Should Accept Highlights as re.compiled re.Patterns and Use them Internally HOT 4
- [BUG] Natively inserted ANSI escape sequence characters break alignment of `Panel()` HOT 4
- [BUG] Cannot access `console` after importing rich HOT 2
- [REQUEST] Print out variable names (along with content) for `console.log()` HOT 1
- [BUG] HOT 3
- [REQUEST] Add a table level "overflow" setting that is used as a default for the columns. HOT 1
- [BUG] Test failures with Python 3.13.0b1: test_pretty.py and dataclass repr HOT 1
- [REQUEST] Colored User Input HOT 1
- How to create multiline description for progress bar HOT 3
- [BUG] Strange behaviour of Prompt.ask HOT 3
- [Bug? Docs?] It's not obvious from the docs how to disable highlighting when using `RichHandler` HOT 2
- [REQUEST] Rich progress bar changes color based on the number steps/files elapsed. HOT 3
- [BUG] Using Beaupy module within a live console HOT 1
- [REQUEST] Add an environment variable to disable all progress bars HOT 3
- Output printing multiple times HOT 1
- [REQUEST] timeout in Prompt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rich.