Message77719
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 |
|
Date |
User |
Action |
Args |
2008-12-13 08:47:40 | dirlt | set | recipients:
+ dirlt |
2008-12-13 08:47:40 | dirlt | set | messageid: <1229158060.01.0.633699238594.issue4654@psf.upfronthosting.co.za> |
2008-12-13 08:47:38 | dirlt | link | issue4654 messages |
2008-12-13 08:47:37 | dirlt | create | |
|