Advertisement
here2share

# clipboardpop.py ZZZ

Sep 30th, 2017
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. # clipboardpop.py ZZZ
  2.  
  3. from Tkinter import *
  4.  
  5. root = Tk()
  6.  
  7. outA='Title/Composer    Performer   Time'
  8. outB='AllMusic'
  9. def clipb():
  10.     global zzz
  11.     zzz = root.clipboard_get()
  12.     zzz = zzz[zzz.index(outA)+len(outA):]
  13.     zzz = zzz[:zzz.index(outB)].splitlines()
  14.     while len(zzz) > 3:
  15.         title, artist = zzz[2],zzz[4]
  16.         print artist+' - '+title
  17.         zzz=zzz[5:]
  18. #
  19.  
  20. Frame=LabelFrame(root,height=30,borderwidth=0,bg="aqua")
  21. Frame.pack(fill=X)
  22. Frame.pack_propagate(False)
  23.  
  24. cpb=Button(Frame,text="Clipboard",command=clipb)
  25. cpb.pack() # side=RIGHT
  26.  
  27. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement