Fixed issues with -w
authorGary Furnish <gfurnish@gfurnish.net>
Sat, 26 Apr 2008 21:55:38 +0000 (15:55 -0600)
committerGary Furnish <gfurnish@gfurnish.net>
Sat, 26 Apr 2008 21:55:38 +0000 (15:55 -0600)
Cython/Compiler/Nodes.py

index 54c58b0f65b2a9607d2473f4ab78531f1a029eda..522b50c0c7f2929fd208f419ed2634a6211f96e8 100644 (file)
@@ -18,7 +18,7 @@ import ControlFlow
 
 from DebugFlags import debug_disposal_code
 
-absolute_path_length = len(os.path.abspath('.')) 
+absolute_path_length = 0
 
 def relative_position(pos):
     """
@@ -36,6 +36,9 @@ def relative_position(pos):
 
     AUTHOR: William Stein
     """
+    global absolute_path_length
+    if absolute_path_length==0:
+        absolute_path_length = len(os.path.abspath(os.getcwd())) 
     return (pos[0][absolute_path_length+1:], pos[1])
 
 def embed_position(pos, docstring):