Apr-26-2022, 12:20 PM
I can not send a string variable to the printer because it keeps looking for a file. I have printed the string variable out on the terminal window and it is formatted and looks the way i want it but need a hard copy.
I am using the variable to temporarily store lines of text with new line '\n':
self.txt_print_var=self.txt_print_var+t+'\n'
To try and print:
os.system('lpr self.txt_print_var')
lpr: Error - unable to access "self.txt_print_var" - No such file or directory
Is there a way to print variable or am I going to have to create a file to get it to work
I am using the variable to temporarily store lines of text with new line '\n':
self.txt_print_var=self.txt_print_var+t+'\n'
To try and print:
os.system('lpr self.txt_print_var')
lpr: Error - unable to access "self.txt_print_var" - No such file or directory
Is there a way to print variable or am I going to have to create a file to get it to work