0

Question Answered Working Now.

2 Answers2

0
import pyperclip
with open(file, 'r') as f:
    for x in f:
        pyperclip.copy(convertto_RLE(f.readline().rstrip('\n')))
Ishan Joshi
  • 487
  • 3
  • 7
  • 1
    I would recommend that you add some explanatory text to your answer, or you risk having it deleted as 'low quality' (even though it may be a correct answer)! – Adrian Mole Sep 28 '19 at 12:30
0

you can use pbcopy on unix system

import os

f = open(file, "r")
for x in file:
    ln = convertto_RLE(f.readline().rstrip('\n'))
    os.system("echo '%s' | pbcopy" % ln)
    print(ln)

Dev Khadka
  • 5,142
  • 4
  • 19
  • 33