question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[REQUEST] support multiple chars for rule printing

See original GitHub issue

Have you checked the issues for a similar suggestions? Yes

How would you improve Rich?

Currently for rule.py it only allows the character to have 1 cell length, it would better if it could allow more, like

>>> console.print(Rule("hello", character="-+"))
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ hello -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

What problem does it solved for you?

I was just thinking it would improve it and it looks like an ASCII rule, which is cool (like this program)


If this is accepted, I would like to work on it, because I have already tried it out ”locally” (https://repl.it/@hedythedev/rich#rich/rule.py) and it works well

console.print(Rule(text, character="-/-"))

BDB784D3-8BA2-4978-9791-6860EEFE0384

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
willmcgugancommented, Aug 4, 2020

The Rule should extend to the full width available, which may mean you need an extra character on the right hand side. To use your example:

|1234512 hello 12345123|
1reaction
willmcgugancommented, Aug 4, 2020

Btw when you say works for me, do you mean the code in repl.it?

Just meant its a good idea in general.

Also would chars work better? Because characters is a bit long

It is, but I dislike abbreviations. I’d rather type it in full than recall how it was abbreviated…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Print multiple char variables in one line? - java - Stack Overflow
Save this question. Show activity on this post. So I was just wondering if there was a way to print out multiple char...
Read more >
Best practices for configuring Windows Print Servers - PaperCut
PaperCut will work with long printer names, but according to Microsoft the Printer Share Name should be shorter than 32 characters.
Read more >
RFC 2911: Internet Printing Protocol/1.1: Model and Semantics
A Job optionally supports multiple documents. IPP 1.1 semantics allow end-users and operators to query printer capabilities, submit print jobs, ...
Read more >
Your Guide to the Python print() Function
In this step-by-step tutorial, you'll learn about the print() function in Python and discover some of its lesser-known features.
Read more >
2.2. A Simple C Program: Printing a Line of Text - InformIT
This program illustrates several important C features. ... The characters normally print exactly as they appear between the double quotes in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found