I don't believe it is a bug. Notice that when you appended C:\\bin, you used double back-slash "\\", but when appending the C:\Windows\Bin you only used single backslash. Python standard then says:
Unlike Standard C, all unrecognized escape sequences are left in the string unchanged, i.e., the backslash is left in the string. Therefore, the firs backslash "\w" is left in the string, but the 2nd one (\b) is replaced because it is a valid escape sequence (backspace). You can use either r"C:\windows\bin" or "C:\\windows\\bin" to achieve what you need. Martin From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ??? Sent: Monday, July 16, 2007 12:38 AM To: Dino Viehland; 'Discussion of IronPython' Subject: [IronPython] Bug report Hi Dino, I met a IronPython bug, does this bug has been reported? IronPython 1.1 (1.1) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import sys >>> sys.path.append("c:\\bin") >>> sys.path ['D:\\Python\\IronPython', 'D:\\Python\\IronPython\\Lib', 'c:\\bin'] >>> sys.path.append("c:\windows") >>> sys.path ['D:\\Python\\IronPython', 'D:\\Python\\IronPython\\Lib', 'c:\\bin', 'c:\\windows'] >>> sys.path.append("c:\windows\bin") >>> sys.path ['D:\\Python\\IronPython', 'D:\\Python\\IronPython\\Lib', 'c:\\bin', 'c:\\windows', 'c:\\windows\x08in'] >>> Andy.Tao
_______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
