#!/usr/bin/env python
import os, sys, subprocess, time
while True:
print subprocess.call("xsel", shell=True);
time.sleep(1);
Takes an entry from the clipboard and prints it, every 1 second.
Result:
copied0
entry0
from0
clipboard0
I do not know why it returns the final 0, but it apparently stops me from using string strip (int has not strip), hence the 0 makes the string an integer?
How can one strip final 0 off the python string in the result above?
I m a BASH scripter converting to python.