os.path.realpath(path) bug on win7 ?

Chris Rebert clp2 at rebertia.com
Sun Jan 6 02:06:10 EST 2013


On Sat, Jan 5, 2013 at 10:55 PM, iMath <2281570025 at qq.com> wrote:
>
> os.path.realpath(path)  bug on win7 ?
>
> Temp.link is a Symbolic link
> Its target location is C:\test\test1
> But
> >>> os.path.realpath(r'C:\Users\SAMSUNG\Temp.link\test2')
> 'C:\\Users\\SAMSUNG\\Temp.link\\test2'
>
> I thought the return value should be ' C:\\test\\test1\\test2'
>
> Is it a bug ? anyone can clear it to me ?

What does os.path.islink('C:/Users/SAMSUNG/Temp.link') report?

Cheers,
Chris



More information about the Python-list mailing list