Python Forum
Windows/linux shell emulation
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Windows/linux shell emulation
#1
hello. 
I'm looking for a way to run commands and execute programs on both windows and Linux system to make my servers more accessible than running multiple SSH clients. 
I am using 3 scripts. The first is the server code which sends and receives commands. 
the server receives a command in the form of "ID task command"
multiple clients will connect to the server and await a command to be sent to them. 
Finally the controller sends the commands with the I'D of the system needing to be controled. 

The part I need gel with is getting the output (or lack of) to the server without crashing or timing out. 

I understand I need to use sub process but I'm only sending strings to the client's and they are system specific commands with an arbertery number of args. 
example I could send "1 command ls -lh" to a Linux client. 
this breakes down to client 1 run command "ls -lh" which should return its output. 
however some commands won't return an output like running an eve on windows. 
is there a stable method to complete multi platform commands?
Reply


Messages In This Thread
Windows/linux shell emulation - by AceScottie - Nov-25-2017, 07:35 PM
RE: Windows/linux shell emulation - by wavic - Nov-25-2017, 09:02 PM
RE: Windows/linux shell emulation - by AceScottie - Nov-27-2017, 11:41 AM
RE: Windows/linux shell emulation - by wavic - Nov-27-2017, 01:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to compile a Python script for a Windows / Linux executable? netanelst 2 1,351 May-24-2022, 07:02 AM
Last Post: netanelst
  Resources for printing tabledata-Linux and Windows hammer 4 1,436 Apr-25-2022, 12:09 PM
Last Post: hammer
  batch file for running python scipt in Windows shell MaartenRo 2 1,907 Jan-21-2022, 02:36 PM
Last Post: MaartenRo
  multiprocessing difference between Linux and Windows direl 2 2,660 Oct-01-2020, 07:10 PM
Last Post: direl
  script works in windows but not in linux ovidius80 2 2,753 Apr-29-2020, 02:10 PM
Last Post: ovidius80
  How to use subprocess send commands to windows shell hlhp 3 4,456 Nov-26-2019, 04:40 AM
Last Post: LeanbridgeTech
  keyboad scanner routine(linux and windows) 1885 0 1,922 Oct-26-2019, 03:34 PM
Last Post: 1885
  Coloured text in the terminal works in Linux but not Windows Flexico 2 2,711 Aug-26-2019, 10:44 PM
Last Post: Flexico
  Python files made on linux don't work on windows sylas 2 3,273 Oct-10-2018, 05:34 AM
Last Post: sylas
  can import msvcrt and click on windows but not on Linux sylas 4 13,320 Aug-06-2018, 08:28 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

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