From 766da0745f04e0c9eeb69070c45e1883dbc71286 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Wobst?= Date: Thu, 7 Jul 2011 20:37:49 +0000 Subject: [PATCH] fix line ending problem on MS Windows (text mode not available consistenly for os.popen and subprocess) git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@3179 069f4177-920e-0410-937b-c2a4a81bcd90 --- CHANGES | 2 ++ pyx/filelocator.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 97e86b9e..bf47a319 100644 --- a/CHANGES +++ b/CHANGES @@ -102,6 +102,8 @@ TODO: - allow Type1 font usage without TeX and without AFM font metric - epsfile module: - fix raise condition while generating bitmap for PDF inclusion + - filelocator module: + - fix text mode line ending issue for MS Windows - added the mpost (MetaPost) module: - create smooth paths from a series of points (TODO: documentation) diff --git a/pyx/filelocator.py b/pyx/filelocator.py index 530227eb..69bec5c8 100644 --- a/pyx/filelocator.py +++ b/pyx/filelocator.py @@ -200,7 +200,7 @@ class kpsewhich: break else: return [] - full_filename = full_filenames.split("\n")[0] + full_filename = full_filenames.split("\n")[0].rstrip("\r") def _opener(): try: return builtinopen(full_filename, mode) @@ -223,7 +223,7 @@ class locate: break else: return [] - full_filename = full_filenames.split("\n")[0] + full_filename = full_filenames.split("\n")[0].rstrip("\r") def _opener(): try: return builtinopen(full_filenames, mode) -- 2.11.4.GIT