Feature Requests item #798520, was opened at 2003-09-01 14:34 Message generated for change (Comment added) made by birkenfeld You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=798520&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: None Status: Open Resolution: None Priority: 5 Submitted By: Andrew Gaul (gaul) Assigned to: Nobody/Anonymous (nobody) Summary: os.popen with invalid mode differs on Windows and POSIX Initial Comment: On Windows, os.popen with an invalid mode throw a ValueError and on POSIX systems it throws an OSError. Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.popen('dir', '') Traceback (most recent call last): File "<stdin>", line 1, in ? ValueError: popen() arg 2 must be 'r' or 'w' Python 2.3 (#167, Sep 1 2003, 06:38:18) [GCC 3.0.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.popen('ls', '') Traceback (most recent call last): File "<stdin>", line 1, in ? OSError: [Errno 22] Invalid argument Additionally, the ValueError message is incorrect; arg 2 can be 'r', 'rb', 'rt', 'w', 'wb', or 'wt'. ---------------------------------------------------------------------- >Comment By: Reinhold Birkenfeld (birkenfeld) Date: 2005-06-05 19:26 Message: Logged In: YES user_id=1188172 Should the exceptions be synchronized? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=798520&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com