Skip to content

Instantly share code, notes, and snippets.

@devpruthvi
Created August 18, 2015 14:29
Show Gist options
  • Save devpruthvi/5769ecf85fcda69faaec to your computer and use it in GitHub Desktop.
Save devpruthvi/5769ecf85fcda69faaec to your computer and use it in GitHub Desktop.
import pyfiglet
import sys,random
f,t = '',''
ts = list(pyfiglet.FigletFont.getFonts())
if sys.argv[-1] in ts:
t = sys.argv[-1]
f = sys.argv[1:-1]
else:
t = random.choice(ts)
f = sys.argv[1:]
pyfiglet.print_figlet(' '.join(f),str(t))
print(t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment