You can use subprocess
module.
subprocess
is a newer way to spawn processes rather than using os.spawn*()
or os.system()
.
In your case:
import subprocess
subprocess.Popen(["ds9"])
This should run ds9 in background.
See the documentation here.