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

iMath redstone-cold at 163.com
Sun Jan 6 03:11:47 EST 2013


在 2013年1月6日星期日UTC+8下午3时06分10秒,Chris Rebert写道:
> 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?
True
> 
> 
> 
> Cheers,
> 
> Chris




More information about the Python-list mailing list