Last active
October 11, 2017 20:26
-
-
Save nathanielatom/422d024d9cab5c67668c60f96ded3590 to your computer and use it in GitHub Desktop.
A (near) one-line cross-platform GUI-less message box
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
import webbrowser | |
import base64 | |
def browser_msg(message): | |
webbrowser.open("data:{mime_type};base64,{data}".format(mime_type='text/html', data=base64.b64encode(message.encode()).decode())) | |
browser_msg("Hello world") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment