the program' filename to subprocess popen((on windowsright-click the application' start menu item and select properties to view the application' filename on macosctrl-click the application and select show package contents to find the path to the executable file the popen(function will then immediately return keep in mind that the launched program is not run in the same thread as your python program on windows computerenter the following into the interactive shellimport subprocess subprocess popen(' :\\windows\\system \\calc exe'on ubuntu linuxyou would enter the followingimport subprocess subprocess popen('/snap/bin/gnome-calculator'on macosthe process is slightly different see "opening files with default applicationson page the return value is popen objectwhich has two useful methodspoll(and wait(you can think of the poll(method as asking your driver "are we there yet?over and over until you arrive the poll(method will return none if the process is still running at the time poll(is called if the program has terminatedit will return the process' integer exit code an exit code is used to indicate whether the process terminated without errors (an exit code of or whether an error caused the process to terminate ( nonzero exit code--generally but it may vary depending on the programthe wait(method is like waiting until the driver has arrived at your destination the wait(method will block until the launched process has terminated this is helpful if you want your program to pause until the user finishes with the other program the return value of wait(is the process' integer exit code on windowsenter the following into the interactive shell note that the wait(call will block until you quit the launched ms paint program import subprocess paintproc subprocess popen(' :\\windows\\system \\mspaint exe' paintproc poll(=none true paintproc wait(doesn' return until ms paint closes paintproc poll( keeping timescheduling tasksand launching programs