homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dirlt
Recipients dirlt
Date 2008年12月13日.08:47:37
SpamBayes Score 3.0958354e-08
Marked as misclassified No
Message-id <1229158060.01.0.633699238594.issue4654@psf.upfronthosting.co.za>
In-reply-to
Content
I found the problem when i install a small tool which I wrote on the
each machine in the company.the problem is simplified as follows:
there are three files
1./home/share/temp/a a regular file
2./home/share/a.lnk which is symbolic link to the /home/share/temp/a
3./home/share/temp/test.py whose contents are
#!/usr/bin/env python 
 
import os
import sys
print sys.version
print os.uname()
print os.path.realpath("/home/share/temp/../a.lnk")
print os.path.abspath("/home/share/temp/../a.lnk")
and I ran the python script on two different machines,but the version 
of python interpreters are the same,and both of them are 64 bits machine,
but the result of os.path.realpath is different,one is
--------------------------------------------------------
2.3.4 (#1, Feb 2 2005, 11:44:13) 
[GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)]
('Linux', 'tc-com-test00.tc.baidu.com', '2.6.9-52bs', '#2 SMP Fri Jan 26
13:34:38 CST 2007', 'x86_64')
/home/share/a.lnk 
/home/share/a.lnk
another is 
-----------------------------------------------------------
2.3.4 (#1, Dec 11 2007, 05:28:55) 
[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)]
('Linux', 'tc-ecom-dev00.tc.baidu.com', '2.6.9-52bs', '#2 SMP Fri Jan 26
13:34:38 CST 2007', 'x86_64')
/home/share/temp/temp/a
/home/share/a.lnk
But obviously the first one os.path.realpath(...) should be 
/home/share/temp/a instead of /home/share/a.lnk
and the second on os.path.realpath(...) should also be
/home/share/temp/a instaed of /home/share/temp/temp/a
History
Date User Action Args
2008年12月13日 08:47:40dirltsetrecipients: + dirlt
2008年12月13日 08:47:40dirltsetmessageid: <1229158060.01.0.633699238594.issue4654@psf.upfronthosting.co.za>
2008年12月13日 08:47:38dirltlinkissue4654 messages
2008年12月13日 08:47:37dirltcreate

AltStyle によって変換されたページ (->オリジナル) /