On 7/16/07, 陶祖洪 <[EMAIL PROTECTED]> wrote:
Yes, it just a demo path, not a real path, :-)
But when I use capital character, it work well, please see follow example:
yes of course, since \B isn't a recognized escape sequence (nor is \w)...
(case sensitivity you know...)
/S
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']
>>> sys.path.append("c:\windows\Bin")
>>> sys.path
['D:\\Python\\IronPython', 'D:\\Python\\IronPython\\Lib', 'c:\\bin',
'c:\\windows', 'c:\\windows\x08in', 'c:\\windows\\Bin']
>>>
------------------------------
*From:* Simon Dahlbacka [mailto:[EMAIL PROTECTED]
*Sent:* Monday, July 16, 2007 15:57
*To:* [EMAIL PROTECTED]; Discussion of IronPython
*Subject:* Re: [IronPython] Bug report
That's not a bug..
backslash is an escape character and \b happens to be the escape sequence
for the bell character.
You either need to escape the backslashes (with another backslash) or use
raw strings
e.g.
"c:\\windows\\bin"
r"c:\windows\bin"
/Simon
ps. who is adding a bin folder under c:\windows, that doesn't sound like
the greatest idea.. ? ..or was it just a "random" name for demo purposes?
On 7/16/07, 陶祖洪 <[EMAIL PROTECTED]> wrote:
>
> 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
>
>
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com