Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # b_fun_text_art.py
- py = '''\
- #### # # ##### # # ### # #
- # # # # # # # # # ## #
- # # # # ##### # # # # #
- #### # # # # # # # # #
- # # # # # # # # ##
- # # # # # ### # #
- '''
- ttt = py.replace('#', '_/').replace(' ', ' ').splitlines()
- print '\n'.join(ttt)
- print
- banner = ''
- for i, s in enumerate(ttt):
- banner += (' '*(len(ttt)-i)+s)+'\n'
- print banner
- a,b = ('(((','()')
- ttt = py.replace('#', a).replace(' ', ' ').replace('( ', b).splitlines()
- banner = ''
- for i, l in enumerate(ttt):
- banner += (' '*(len(ttt)-i)*2+l)[3:-1]+'\n'
- print banner
- ttt = py.replace(' ', '__').replace('#', '$$').replace('__$', '| $').splitlines()
- for i in range(len(ttt)-1,0,-1):
- sss = ''
- for j, s in enumerate(ttt[i]):
- t = ttt[i-1]
- if s == '|' and t[j] != '|':
- sss += '*'
- else:
- sss += s
- ttt[i] = sss
- sss = ''
- ttt.append('')
- i = -1
- for j, s in enumerate(ttt[i-1]):
- if s == '|':
- sss += ':'
- elif (ttt[i-1]+'--')[j+2] in '$.':
- sss += ' '
- else:
- sss += '_'
- L = len(max(ttt, key=len))
- ttt[i] = sss
- ttt = ['__'+(z+' '*20+'_'*5)[:L+2] for z in ttt]
- ttt[i] = ttt[i].replace(' _', ' ')
- ttt[i] = ttt[i].replace('_ ', '__')
- ttt[i] = ttt[i][:-2]
- ttt[0] = ttt[0].replace('|', ' ')
- ttt = '\n'.join(ttt)
- ttt = ttt.replace('._', '_.')
- ttt = ttt.replace('*', ' ')
- ttt = ttt.replace('_$', '_$')
- ttt = ttt.replace('__\n', '\n')
- print ttt
Add Comment
Please, Sign In to add comment