Created
April 30, 2017 13:13
-
-
Save jstimpfle/275ca20ce93ca30a9a55bf6ace627ab7 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/python3 | |
# This is useful for editing multi-line C macros | |
import sys | |
lines = [line.rstrip(' \\\n').rstrip() for line in sys.stdin] | |
maxlen = max(len(line) for line in lines) | |
for line in lines: | |
print(line + ' '*(2 + maxlen - len(line)) + '\\') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment