forward slashes are okay here ""def run(selfcmdline)os spawnv(os p_detachpypath(pyfilecmdline)class top_level(launchmode)""run in new windowsame process tbdrequires gui class info too ""def run(selfcmdline)assert false'sorry mode not yet implementedpick "bestlauncher for this platform may need to specialize the choice elsewhere if sys platform[: ='win'portablelauncher spawn elseportablelauncher fork class quietportablelauncher(portablelauncher)def announce(selftext)pass def selftest()file 'echo pyinput('default mode 'launcher portablelauncher(filefilelauncher(input('system mode 'system(filefile)(if sys platform[: ='win'input('dos start mode 'startargs(filefile)(no block blocks no block if __name__ ='__main__'selftest(near the end of the filethe module picks default class based on the sys platform attributeportablelauncher is set to class that uses spawnv on windows and one that uses the fork/exec combination elsewherein recent pythonswe could probably just use the spawnv scheme on most platformsbut the alternatives in this module are used in additional contexts if you import this module and always use its portable launcher attributeyou can forget many of the platform-specific details enumerated in this to run python programsimply import the portablelauncher classmake an instance by passing label and command line (without leading "pythonword)and then call parallel system tools