def pythonify(text):
 lines = text.split('\n')
 lines[0] = ('>>> ' + lines[0])
 return ('\n... '.join(lines) + '\n')

def pythonify ( text ) : lines = text . split ( '\n' ) lines [ 0 ] = ( '>>> ' + lines [ 0 ] ) return ( '\n... ' . join ( lines ) + '\n' )
make some text appear as though it was typed in at a python prompt .