Author dirlt
Recipients dirlt
Date 2008-12-13.08:47:37
SpamBayes Score 3.09584e-08
Marked as misclassified No
Message-id <>
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/ 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', '', '2.6.9-52bs', '#2 SMP Fri Jan 26
13:34:38 CST 2007', 'x86_64')

another is 
2.3.4 (#1, Dec 11 2007, 05:28:55) 
[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)]
('Linux', '', '2.6.9-52bs', '#2 SMP Fri Jan 26
13:34:38 CST 2007', 'x86_64')

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
Date User Action Args
2008-12-13 08:47:40dirltsetrecipients: + dirlt
2008-12-13 08:47:40dirltsetmessageid: <>
2008-12-13 08:47:38dirltlinkissue4654 messages
2008-12-13 08:47:37dirltcreate