Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Printing data
#1
I'm new at python. I know the code to print a text file to the printer but how do you print a variable or text within your program? Thank you.

The following code prints a text file called "hello.txt"

import os

os.startfile("hello.txt", "print")
But how do you print just a word or variable from within the program?
Reply


Messages In This Thread
Printing data - by scratchmyhead - Nov-03-2019, 02:36 PM
RE: Printing data - by klllmmm - Nov-03-2019, 02:52 PM
RE: Printing data - by scratchmyhead - Nov-03-2019, 03:06 PM
RE: Printing data - by micseydel - Nov-08-2019, 10:39 PM
RE: Printing data - by jefsummers - Nov-08-2019, 11:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Extracting and printing data ajitnayak1987 0 1,433 Jul-28-2021, 09:30 AM
Last Post: ajitnayak1987
  printing selected item with Sqlite data whacky7 13 5,100 Jan-26-2020, 01:25 AM
Last Post: whacky7

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020