Python Os module behaves differently on windows and linux when calling a batch and shell script

I am writing a python script to automate workflow and for that I need to pass a properties file and call .sh and .bat scripts in linux and python respectively. On linux the python waits for shell script to finish running and on windows it simply calls and returns the value and lets the script run in background

Hi Bhavansh Gupta,

Thank you for your message, but this category is for people involved in
writing the core Python interpreter and standard library, not a help
desk for users wanting help with their code.

You will probably get more help if you post it to the Users category,
which is the first item shown in the list here:

Can you help us to help people in the future? Is there something we can
do to make it more obvious that the Core Dev category is not for end
user questions about programming Python? What could we have done to help
you choose the right category?

When you do repost to the Users category, I know that they will ask you
for a minimum example of code that shows the behaviour you are asking
about. See here:

for examples of how to get a minimum example. You may also need a
tiny version of your bat script as well.

Linux is an operating system (platform) and Python is a platform-independent language. It will help others help you if you can be more clear about the problem. I suspect that the question is a Windows question independent of Python but the question is not clear.