Python Forum
Sound Approach for Running a Shell Command?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sound Approach for Running a Shell Command?
#1
Hello,

I'm trying to use a python script to set an At job in the shell, and I am wanting to make sure my approach is sound. My understanding is that I need to:

1. Import os to my script and use that to set call the At input buffer.
2. Then, I am thinking I use sys.out to send a formatted string to the buffer, such as 'echo "foo"'.
3. Use sys.out to send ^D to close the buffer.

Is this the correct approach? Many thanks for any advice!

-- Matt
Reply


Messages In This Thread
Sound Approach for Running a Shell Command? - by matt_the_hall - Dec-08-2020, 08:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Advice needed on how to approach this problem... sawtooth500 1 303 Apr-06-2024, 01:55 PM
Last Post: snippsat
  Open a dos shell for ssh command martinmistere 6 1,809 Jun-07-2022, 12:24 PM
Last Post: martinmistere
  batch file for running python scipt in Windows shell MaartenRo 2 1,937 Jan-21-2022, 02:36 PM
Last Post: MaartenRo
  Need feedback on my approach for python dashboard for Asana pashtett 0 1,346 Nov-24-2020, 11:51 AM
Last Post: pashtett
  Running Python in Command Prompt Anwar 3 3,124 Nov-15-2020, 03:15 PM
Last Post: snippsat
  Error when running mktorrent subprocess command pythonnewbie138 4 3,910 Sep-16-2020, 01:55 AM
Last Post: pythonnewbie138
  Error: How to to close and restart your shell after running 'conda init' angelica 3 10,322 May-27-2020, 10:00 AM
Last Post: snippsat
  Approach to creating Audit table pynewbie 4 3,894 Feb-24-2020, 06:12 PM
Last Post: pynewbie
  Running linux command line apps... dbrdh 0 1,678 Jan-30-2020, 01:14 PM
Last Post: dbrdh
  list approach due nested order 3Pinter 6 2,883 Oct-07-2019, 01:49 PM
Last Post: 3Pinter

Forum Jump:

User Panel Messages

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