[Python-checkins] CVS: python/dist/src/Doc/tools mkhowto,1.25,1.26

Fred L. Drake fdrake@users.sourceforge.net
Tue, 29 May 2001 09:10:09 -0700


Update of /cvsroot/python/python/dist/src/Doc/tools
In directory usw-pr-cvs1:/tmp/cvs-serv26052/tools

Modified Files:
	mkhowto 
Log Message:

Hack to make this play nicer with *old* versions of Python: os.path.abspath()
was not available in Python 1.5.1.  (Yes, a user actually tried to use this
with that version of Python!)


Index: mkhowto
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** mkhowto	2001/05/09 04:03:16	1.25
--- mkhowto	2001/05/29 16:10:07	1.26
***************
*** 47,50 ****
--- 47,60 ----
  
  
+ if not hasattr(os.path, "abspath"):
+     def abspath(path):
+         """Return an absolute path."""
+         if not os.path.isabs(path):
+             path = os.path.join(os.getcwd(), path)
+         return os.path.normpath(path)
+ 
+     os.path.abspath = abspath
+ 
+ 
  MYDIR = os.path.abspath(sys.path[0])
  TOPDIR = os.path.dirname(MYDIR)