Skip to content

Instantly share code, notes, and snippets.

@prail
Created April 9, 2023 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prail/012435bac4d20ba19256f5b1207f6856 to your computer and use it in GitHub Desktop.
Save prail/012435bac4d20ba19256f5b1207f6856 to your computer and use it in GitHub Desktop.
Generates banner comments for CS227 programs
#!/usr/bin/python3
from sys import argv,exit
if len(argv) != 2: exit(1)
MAX_WIDTH = 72
print('/'+'*'*(MAX_WIDTH - 2)+'/\n/*{}*/'.format(argv[1].center(MAX_WIDTH-4))+'\n/'+'*'*(MAX_WIDTH - 2)+'/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment