[Nick Coghlan] > ... > Are there any objections to changing this module so that only > getstatus() is marked as Unix specific? -0. It works on Unix. On Windows you have to distinguish among command.com systems (95/98/ME), cmd.exe systems (NT/2K/XP), and systems where the user installed their own COMSPEC shell. The command.com systems can't redirect stderr, and always return a status of 0 (command.com's own exit code, which has nothing to do with the exit code of the command being run). "It should work" on cmd.exe systems. Can't say anything definitive about use-my-own-shell systems. IOW, telling the truth would complicate the docs, and the result wouldn't be portable across Windows boxes anyway. So I'd rather leave commands.py in peace, short, simple, obvious, but limited to Unix. It's not a suitable basis for a *good* solution to x-platform command-line work (Tcl's "exec" subsystem is an example of a good solution, but it's a lot of work).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4