|
From: <bc...@wo...> - 2001-11-02 15:39:25
|
[Kevin & Phil] >class ShellExec: > unixTemplate = 'sh -c "%s"' > ntTemplate = 'cmd /c %s' > dosTemplate = 'command /c %s' # from http://www.easydos.com/command.html > winceTemplate = dosTemplate # just guessing here > defaultTemplate = unixTemplate > # the keys for these templates taken from > # http://www.tolstoy.com/samizdat/sysprops.html > templates = { > "Windows 95": dosTemplate, # does this catch 98, ME? > "Windows 98": dosTemplate, # guessing > "Windows ME": dosTemplate, # guessing > "Windows NT": ntTemplate, > "Windows NT 4.0": ntTemplate, > "WindowsNT": ntTemplate, > "Windows 2000": ntTemplate, > "Windows CE": winceTemplate, # I do wince when I contemplate CE > "Windows XP": ntTemplate # guessing > } A gracefull "do nothing" is needed for clasic macs. It must also be posible to override the os.name property in the registry file; something like python.os=Windows and then there should some generic entries like "Windows": ntTemplate, "Unix": unixTemplate, "Mac": None, Then we need to decide how to enable this. A registry entry like python.environment=Shell should be the default and other values could be "None" which is what we have today and maybe "Properties" which could fill the environment with just $HOME and $USER and $PATH. regards, finn |