Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Python ascii art for banners in command line programs

command line python ascii ascii art banners text images

  • Please log in to reply
No replies to this topic

#1 timesleep8

timesleep8

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 15 September 2015 - 11:16 AM

location for converting images to ascii art ( http://www.text-imag...vert/ascii.html ) <------tip invert image if you plan on using a black background with light colored text and for default size cmd programs use a character width of 80 or less :)

location for educational resources ( http://programming-a...l.yolasite.com/ )

a quick way to add code to your ascii art is to go to ( http://textmechanic....ix-to-Text.html ) and add print " as a prefix

and " as a suffix this will save you tons of time and it makes it alot more fun because all you ahve to add to your code is raw_input(" ") for a basic ascii art image or you can add import time time.sleep(4) if you want to use your ascii art as a banner for a program and your banner will appear for the number of seconds provided after time.sleep(here) i have also experimented with making moving asci art by stacking code with decimals of seconds as the amount of time to sleep for the amount of time you want one frame to appear.

 

Example code below

 

print"+oooo+/:-`  `-osysohmmdhyssyysysooo+oo/+oosooooooooo+o+sossdh/`            "
print"/++oo+/-.` `:shhho/ydhhhhyyysssooooooooooo+oooo++++o+++ooossdh/``          "
print"///++/:-```-ymhhhyhmdddhhyyyssssoo+++osoooooo+s+o++++++++ooosyh/.`         "
print"::::/:-.``.smmhddddhyyyoo++++++++++++yy++sso+oooo+++/+///ooossyy.```       "
print"----:--``-+hmhhddhysooo+/++o+o////++shhooyhsooosoo+///////+ossyy/.``       "
print"------..:ohdhyhyo++o/---.---/oo///oyddssyhys+/osoo+///:://+ooyhho-````     "
print"---:--:+sshhyys+//+:--.---...-++/+ohmdmmmmds//+sso////:::/+/osys+/-..``    "
print"-:::-:+yyyyhyyo///:.....--`...-+++ydmNNdyso/::/+sso//::://::---.``..--```  "
print"::/:-:shyyhhhy+:/:.`...````....+osdmdyo++/:://+/+ys+:.---.`....```...-`````"
print"://:-+yhyyyyso+::/-.`........`-ohddy+/:::::/+ooo+oyo+--:.```````..-:--`````"
print"//::+hhhyysso+/:-///.``...```-/sddyo/-.....``.:/++yos+//````````-:://.`````"
print"++/sdhssyyso+//:::://:--...-:+hhys:.`..../....`.:/osoo:```...````---.``````"
print"yhhddho+oso+/:::--:/+//+ooyhyhdhs:``....```....`-:/+oo-`--//:-:...`.```````"
print"hmNdhyo+/+++/:---:+syhdhhdmNmNmd+-.``...```....--//+/:.-.`````.-.``.```..``"
print"mmdhssoo/:////:--:sddmdhddmmmmmh/-::.``.....``-:+/+o/-.```  ```-.````......"
print"ddhyyyso+//++/:-.-yhhhysoshdhddy:.-:/-``````.::/+/+:.````   ```-:-`````...."
print"dhhyhhyysooo+/--.-ooo::/osssyyyo+///:::::::////::-..````  `````.-.```````.."
print"ddddhdhhyyhhs/:---:/.`.-:/+//oo/+ssyo/+-:::-----.```````````````.-.````````"
print"dddddhysshdho+:-----.````..`.:--:/+/-..-..-..````````````````.``.-.````````"
print"dddyo//+hmdyo+/--..-..``````.........``````````` ``````...--...``..````````"
raw_input("Press Enter to Esc")

 

 

 

 

Example code for use as a banner in a command line python tool below

 

print"+oooo+/:-`  `-osysohmmdhyssyysysooo+oo/+oosooooooooo+o+sossdh/`            "
print"/++oo+/-.` `:shhho/ydhhhhyyysssooooooooooo+oooo++++o+++ooossdh/``          "
print"///++/:-```-ymhhhyhmdddhhyyyssssoo+++osoooooo+s+o++++++++ooosyh/.`         "
print"::::/:-.``.smmhddddhyyyoo++++++++++++yy++sso+oooo+++/+///ooossyy.```       "
print"----:--``-+hmhhddhysooo+/++o+o////++shhooyhsooosoo+///////+ossyy/.``       "
print"------..:ohdhyhyo++o/---.---/oo///oyddssyhys+/osoo+///:://+ooyhho-````     "
print"---:--:+sshhyys+//+:--.---...-++/+ohmdmmmmds//+sso////:::/+/osys+/-..``    "
print"-:::-:+yyyyhyyo///:.....--`...-+++ydmNNdyso/::/+sso//::://::---.``..--```  "
print"::/:-:shyyhhhy+:/:.`...````....+osdmdyo++/:://+/+ys+:.---.`....```...-`````"
print"://:-+yhyyyyso+::/-.`........`-ohddy+/:::::/+ooo+oyo+--:.```````..-:--`````"
print"//::+hhhyysso+/:-///.``...```-/sddyo/-.....``.:/++yos+//````````-:://.`````"
print"++/sdhssyyso+//:::://:--...-:+hhys:.`..../....`.:/osoo:```...````---.``````"
print"yhhddho+oso+/:::--:/+//+ooyhyhdhs:``....```....`-:/+oo-`--//:-:...`.```````"
print"hmNdhyo+/+++/:---:+syhdhhdmNmNmd+-.``...```....--//+/:.-.`````.-.``.```..``"
print"mmdhssoo/:////:--:sddmdhddmmmmmh/-::.``.....``-:+/+o/-.```  ```-.````......"
print"ddhyyyso+//++/:-.-yhhhysoshdhddy:.-:/-``````.::/+/+:.````   ```-:-`````...."
print"dhhyhhyysooo+/--.-ooo::/osssyyyo+///:::::::////::-..````  `````.-.```````.."
print"ddddhdhhyyhhs/:---:/.`.-:/+//oo/+ssyo/+-:::-----.```````````````.-.````````"
print"dddddhysshdho+:-----.````..`.:--:/+/-..-..-..````````````````.``.-.````````"
print"dddyo//+hmdyo+/--..-..``````.........``````````` ``````...--...``..````````"
import time

time.sleep(3)

 


  • 0





Also tagged with one or more of these keywords: command line, python, ascii, ascii art banners, text images