[gedit-latex] Replace relpath.py with os.path.relpath
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-latex] Replace relpath.py with os.path.relpath
- Date: Wed, 29 Jun 2011 00:12:27 +0000 (UTC)
commit f85243536c9e2d3c22409831546982d014fc8016
Author: John Stowers <john stowers gmail com>
Date: Wed Jun 29 11:32:24 2011 +1200
Replace relpath.py with os.path.relpath
latex/Makefile.am | 1 -
latex/base/__init__.py | 7 +---
latex/relpath.py | 104 ------------------------------------------------
3 files changed, 1 insertions(+), 111 deletions(-)
---
diff --git a/latex/Makefile.am b/latex/Makefile.am
index 1433faa..ea3baea 100644
--- a/latex/Makefile.am
+++ b/latex/Makefile.am
@@ -7,7 +7,6 @@ plugin_PYTHON = \
__init__.py \
issues.py \
outline.py \
- relpath.py \
util.py \
views.py
diff --git a/latex/base/__init__.py b/latex/base/__init__.py
index b18ea74..53daf9f 100644
--- a/latex/base/__init__.py
+++ b/latex/base/__init__.py
@@ -991,9 +991,6 @@ from os import remove
import os.path
from glob import glob
-from ..relpath import relpath
-
-
import re
import urllib
import urlparse
@@ -1266,9 +1263,7 @@ class File(object):
@param allow_up_level: allow up-level references (../../) or not
"""
if allow_up_level:
- # TODO: os.path.relpath from Python 2.6 does the job
-
- return relpath(base, self.path)
+ return os.path.relpath(self.path, base)
else:
# TODO: why do we need this?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]