I have set up a script that creates files to be run by one of my CNC machines. In order to load the file we scan them with a barcode reader. As it stands, after generating the file my program sends the file name to the clip board. I then paste the file into excel and change the font to 3of9 and the font size to 20.
Is there anyway i can get python to send the text to my clip board in the correct font and at the correct size?
This is the function i made to copy the text.
def copy2clip(txt):
cmd = 'echo ' + txt.strip() + '|clip'
return subprocess.check_call(cmd, shell=True)
Here is the actual copy operation as it stands now.
if item == 1:
f.write('SIDE#5{\n$=left/face 6\n')
copy2clip('*%11' + str(filename) + ' P*')
else:
f.write('SIDE#5{\n$=right/face 4\n')
copy2clip('*%11'+str(filename) + ' W*')