print does not work as expected
See original GitHub issueIn branch 2.0. I run the example of docstring
from __future__ import unicode_literals
from prompt_toolkit import print
from prompt_toolkit.styles import Style
style = Style.from_dict({
'hello': '#ff0066',
'world': '#884444 italic',
})
fragments = [
('class:hello', 'Hello'),
('class:world', 'World'),
]
print(fragments, style=style)
output
[('class:hello', 'Hello'), ('class:world', 'World')]
But when I commented the two lines, it work
66 # Merges values.
67 def to_text(val):
68 # if isinstance(val, list):
69 # return to_formatted_text('{0}'.format(val))
70 return to_formatted_text(val, auto_convert=True)
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Prolog print statement does not work as expected
Save this question. Show activity on this post. I was trying to define a functor and print each individual items of list in...
Read more >13 Common Printer Problems and How to Fix Them
Sometimes your printer isn't the reason your jobs aren't printing. A stuck print job can logjam your queue, which prevents jobs from being ......
Read more >webContents.print silent option not working as expected #14072
The print task should be sent without showing the system dialog, and it should print the html content. ... it is not doing...
Read more >Troubleshooting - Epson
Printer stops printing unexpectedly. Head cleaning, ink charging, or ink drying is in progress. Check to see if the Pause light is flashing....
Read more >window.print() function is not working as expected - CodeProject
As we can see in the code, the print() is being called after the call to open method. But in my browser IE11,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @benhoff, Sorry for the late reply. Right now, if you pass
raw=True
topatch_stdout
, then it should work: https://github.com/jonathanslenders/python-prompt-toolkit/blob/master/prompt_toolkit/patch_stdout.py#L35edit: I guess we can probably come up with a cleaner solution in the future.
@jonathanslenders No worries, I got pulled off onto something else. Is there a good way to find out if this gets added/merged? Changelog? Documentation?
I’ll probably pull back onto using this in a couple of months so it’s no worries, just trying to figure out the best way to re-engage.