Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Tk_remove_line_numbers.py
- import tempfile
- import webbrowser
- notepad=tempfile.mktemp(".txt", "_pytemp_")
- chk=['exec','open','eval']
- if any(X in zzz for X in chk):
- print "!!!!! CAUTION !!!!"
- zzz=zzz.replace('tkinter','Tkinter')
- zzz=zzz.replace(' ',' ')
- ccc=1
- ppp=[]
- for z in zzz.splitlines():
- s=str(ccc)
- if s in z:
- z=z[z.index(s)+len(s)+1:]
- ppp.append(z)
- ccc+=1
- temp=open(notepad, 'w')
- zzz='\n'.join(ppp)
- temp.write(zzz)
- temp.close()
- webbrowser.open(notepad)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement