Guest User

Untitled

a guest
Nov 17th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import os
  2. text = """sample one rn sample two rn sample three"""
  3. command = 'echo ' + text.strip() + '| clip'.
  4. os.system(command)
  5.  
  6. sample one
  7.  
  8. sample two
  9.  
  10. sample three
  11.  
  12. import clipboard
  13. clipboard.copy("line1nline2") # now the clipboard content will be string "line1nline2"
  14. clipboard.copy("line3") # add line3
  15. text = clipboard.paste() # text will have the content of clipboard
  16.  
  17. line = 'n'.join(line, new_line)
  18. clipboard.copy(line)
  19. text = clipboard.paste() # now all lines separated by newline will be on the clipboard.
Add Comment
Please, Sign In to add comment