Bugs item #1745533, was opened at 2007-06-29 14:05 Message generated for change (Comment added) made by atagar You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1745533&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: Documentation Group: Python 2.4 Status: Closed Resolution: Invalid Priority: 5 Private: No Submitted By: Damian (atagar) Assigned to: Nobody/Anonymous (nobody) Summary: Filename providing cross platform capability Initial Comment: The help section for the open method should note that a Unix style filename work in a cross platform fashion (like Java). After scouring several resources including two O'Reilly texts on Python, a dozen web pages, all reliant help pages, I finally got my answer from a mailing list. -Damian ---------------------------------------------------------------------- >Comment By: Damian (atagar) Date: 2007-06-30 14:48 Message: Logged In: YES user_id=1613266 Originator: YES No, I'm talking about the documentation when entering help(file) or help(open). The filename parameter works in a cross platform fashion when given a Unix path. For instance, file = open("/path/to/content.xml", "r") # Cross platform file = open("\\path\\to\\content.xml", "r") # Win32 only This seemed to be an undocumented yet important detail (unless I'm mistaken it means its advantageous to always use the former method when coding paths). However, looking around some more I think this is largely a misunderstanding on my part in terms of where the cross platform capability came from (Windows accepting a forward slash rather than the open method translating the path for the current OS). Sorry about the confusion. ---------------------------------------------------------------------- Comment By: Damian (atagar) Date: 2007-06-30 14:38 Message: Logged In: YES user_id=1613266 Originator: YES No, I'm talking about the documentation when entering help(file) or help(open). The filename parameter works in a cross platform fashion when given a Unix path. For instance, file = open("/path/to/content.xml", "r") # Cross platform file = open("\\path\\to\\content.xml", "r") # Win32 only This seemed to be an undocumented yet important detail (unless I'm mistaken it means its advantageous to always use the former method when coding paths). However, looking around some more I think this is largely a misunderstanding on my part in terms of where the cross platform capability came from (Windows accepting a forward slash rather than the open method translating the path for the current OS). Sorry about the confusion. ---------------------------------------------------------------------- Comment By: O.R.Senthil Kumaran (orsenthil) Date: 2007-06-30 05:24 Message: Logged In: YES user_id=942711 Originator: NO I am not getting as what you are indicating Damian. You mean to say use '/' forward slashes in all documentation as they can work cross platform? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1745533&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com