This repository was archived by the owner on Oct 5, 2020. It is now read-only.
lovely printer#3
Merged
Merged
Conversation
Contributor
|
I love this one so much. |
Contributor
|
oh cool! i'm interested to see what else could be done with this idea, actually. the code is beautiful too. if you want, you can make a separate file in the PR where all of the code is made weird and esoteric (to fit with the rest of the repo :D) |
Contributor
Author
|
Yeah, I was thinking of a one-liner implementation that uses a class for the context manager. Something like (inspired by David Beazley's flail) Should be doable, and very diabolical. Not sure if I'll have time to get around to it, but also happy to accept contributions :P |
Contributor
Author
|
probably won't get around to changes I want. Feel free to just merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Love is in the air. Is it in your Python, too?
TODO:
__main__that accepts input from stdinFrom the README:
Lovely Printer
The idea here is simple: You have a program that prints things. Now you can have a program that prints things in the shape of a heart!
Usage
The main usage is via context manager that temporarily overrides the builtin
print.That is, you should be able to use this with any existing program that uses
print! How lovely!Suppose you have your normal boring program
Make it lovely like so
Then you should see the output something like