Feature Requests item #1625576, was opened at 2007-01-01 07:19 Message generated for change (Comment added) made by diekhans You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1625576&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 Private: No Submitted By: Mark Diekhans (diekhans) Assigned to: Nobody/Anonymous (nobody) Summary: add ability to specify name to os.fdopen Initial Comment: Please add an optional argument to os.fdopen() to specify the name field in the resulting file object. This would allow for a more useful name than: <open file '<fdopen>'...> ---------------------------------------------------------------------- >Comment By: Mark Diekhans (diekhans) Date: 2007-03-09 04:58 Message: Logged In: YES user_id=66101 Originator: YES thanks collin; that was suppose to be a feature request! <fdopen \d+> doesn't really help. For end user message, a file name is very use, the fact that it is opened by fdopen is not. If one is debugging a program and knows the file name, one can usually figure out where it is opened, the file number, or for that matter that fdopen was used is less useful. The particular case that prompted this request was the need use os.open to get non-blocking mode and then pass the result to fdopen. However this now loses the file name, replacing it with something not useful. thanks. ---------------------------------------------------------------------- Comment By: Collin Winter (collinwinter) Date: 2007-03-09 01:02 Message: Logged In: YES user_id=1344176 Originator: NO Changing this to a "feature request", since it's certainly not a bug. I can see both sides of this; on the one hand, <fdopen> isn't the most descriptive string and doesn't give you an idea where it came from; on the other hand, you lose the distinction between files opened by filename and those by file descriptor. If the purpose is to distinguish between fdopen()'d files, what if fdopen() was changed so that the filename matched <fdopen \d+>, where \d+ is the file descriptor passed to fdopen()? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1625576&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com