Python Forum
Print the file using the associated application on Linux
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print the file using the associated application on Linux
#2
man lpr

$ lpr <options> file

So with subprocess is going to be subprocess.call(['lpr', '-one-option', '-second-option', 'file_path/file'])
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
RE: Print the file using the associated application on Linux - by wavic - Oct-15-2017, 07:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pass arguments from bat file to pyhon script from application absolut 2 1,434 Jan-13-2025, 11:05 AM
Last Post: DeaD_EyE
  Can a windows file be 'remapped' in Linux ? jehoshua 3 1,049 Dec-07-2024, 03:33 AM
Last Post: jehoshua
  [SOLVED] [Linux] Write file and change owner? Winfried 6 1,809 Oct-17-2024, 01:15 AM
Last Post: Winfried
  Cannot get cmd to print Python file Schauster 11 3,569 May-16-2024, 04:40 PM
Last Post: xMaxrayx
  create exe file for linux? korenron 2 1,884 Mar-22-2023, 01:42 PM
Last Post: korenron
  Saving the print result in a text file Calli 8 4,500 Sep-25-2022, 06:38 PM
Last Post: snippsat
  failing to print not matched lines from second file tester_V 14 9,417 Apr-05-2022, 11:56 AM
Last Post: codinglearner
  Print to a New Line when Appending File DaveG 0 1,757 Mar-30-2022, 04:14 AM
Last Post: DaveG
Sad Want to Save Print output in csv file Rasedul 5 16,062 Jan-11-2022, 07:04 PM
Last Post: snippsat
  Convert legacy print file to XLSX file davidm 1 2,625 Oct-17-2021, 05:08 AM
Last Post: davidm

Forum Jump:

User Panel Messages

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