0

Firstly I have 2 systems, local and cloud.

So I have 2 files, sub_file_local.py and sub_file_cloud.py, both are mapped to different network directories, sub_file_local.py is inside C drive(My local system) and sub_file_cloud.py is inside cloud machine.

I have another file, main_file.py(In cloud) which I want to run inside my cloud system and should call sub_file_local.py and sub_file_cloud.py parallelly. Can this be done?

My local system is added as a network drive in cloud machine too.

  • possible duplicate of this post : https://stackoverflow.com/questions/28549641/run-multiple-python-scripts-concurrently – Shekhar Samanta Nov 25 '21 at 05:56
  • This question has two separate points. The first is if you can run the local script from the cloud environment. If the local files are in the network drive, this part should be okay, but you can check. The second point is if you can run two scripts parallelly. For this, you can take a look at the subprocess package in the standard library. – Kota Mori Nov 25 '21 at 05:58
  • @ShekharSamanta I want another python file (file_master.py) to run both the scripts parallelly and subprocess isn't working as it's mapped to different network drives. – Sudarshanajay Nov 25 '21 at 06:00
  • @Sudershanajay so you know how to start file_slave_1.py, the one inside your C drive, and your main issue here is starting file_slave_2.py, in your cloud environment? If that is the case, we need to know more about that cloud environment and what types of things go wrong trying to use it in order to help more. (Friendly fyi - the "master/slave" idiom within software/hardware design is falling out of favor in modern English because the terms originally described unpleasant human relationships. Not to turn this post into a political can of worms, just to bring your attention to that briefly.) – sinback Nov 25 '21 at 06:04
  • 1
    @sinback master/slave point noted. – Sudarshanajay Nov 25 '21 at 06:09
  • @sinback I can run both sub_file_local.py in local and sub_file_cloud.py in cloud, that is not an issue, but now I want main_file.py which is present in cloud to run these 2 files concurrently. – Sudarshanajay Nov 25 '21 at 06:10
  • @Sudarshanajay Still need more clarity on "subprocess isn't working". I hear so far that you can't use main_file.py start both sub_file_local.py and sub_file_cloud.py at the same time. But: Can you use the subprocess module to have main_file.py start only sub_file_local.py, yes or no? and, Can you use the subprocess module to have main_file.py start only sub_file_cloud.py, yes or no? I also wonder if there are serious concurrency requirements between the local & cloud files. Do they just need to both be running if the main one tells them to, or are you having trouble making them work together? – sinback Nov 25 '21 at 06:15

0 Answers0