GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — mimetypes CLI writes error messages to stdout instead of stderr · Issue #149682 · python/cpython Closed DescriptionDescriptionThe
However, the actual implementation writes all output — including error messages — to stdout via a single # Lib/mimetypes.py if __name__ == '__main__': import sys results = _main() print("\n".join(results)) # errors and normal output mixed into stdout sys.exit(any(result.startswith("error: ") for result in results)) Verified behavior: Error messages go to stdout, stderr is empty — contradicting the docs. Additional issue: stale docs exampleThe documentation example shows: But The example error message format also doesn't match the actual output ( Proposed fixRoute error messages to stderr in the if __name__ == '__main__': import sys results = _main() has_error = False for result in results: if result.startswith("error: "): print(result, file=sys.stderr) has_error = True else: print(result) sys.exit(has_error) And update the docs example to use a genuinely unrecognized extension. Linked PRsActivity
MetadataMetadataAssigneesLabelsNo labels ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |