Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve: More Cleaner Code WITH Output Helper Functions (low priority) #8

Open
42sol-eu opened this issue Oct 22, 2020 · 1 comment

Comments

@42sol-eu
Copy link
Contributor

add helper functions to change this

sys.stderr.write(
            "\n" + BOLD + "Usage:" + END + "\n\nmdpre < inputfile > outputfile\n\n"
        )

if wantVerbose is True:
        sys.stderr.write("Writing to Textbundle " + realpath + "\n\n")

to

log( bold( "Usage:") + "\n\nmdpre < inputfile > outputfile\n\n" )

# remove if blocks from verbose checking by creating a new log_detail method
log_detail("Writing to Textbundle " + realpath + "\n\n")

# this would be bold ;-)
def bold( p_text ):
    return BOLD + p_text + END
@42sol-eu 42sol-eu changed the title Improve: Output Helper Functions (low priority) Improve: More Cleaner Code WITH Output Helper Functions (low priority) Oct 22, 2020
@MartinPacker
Copy link
Owner

Looks like we have a few sys.stderr.write() incantations left. Leaving open so this can be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants