From 6b440f84cace12c2e314dbc6f0e1be25b90e4906 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Matox?= Date: Fri, 8 Oct 2004 09:19:54 +0000 Subject: [PATCH] Replace os.getenv(x) by os.environ[x] for compatibility with old python versions. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9063 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/ChangeLog | 7 +++++++ lib/scripts/legacy_lyxpreview2ppm.py | 2 +- lib/scripts/lyxpreview2bitmap.py | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 7caa317d44..a806be014a 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,10 @@ +2004-10-08 José Matos + + * scripts/legacy_lyxpreview2ppm.py (legacy_conversion): + * scripts/lyxpreview2bitmap.py (main): + replace os.getenv(x) by os.environ[x] for compatibility with old + python versions. + 2004-10-01 Angus Leeming * scripts/convertDefault.sh: protect shell variables with quotes. diff --git a/lib/scripts/legacy_lyxpreview2ppm.py b/lib/scripts/legacy_lyxpreview2ppm.py index 992af3f76e..cc716e8206 100644 --- a/lib/scripts/legacy_lyxpreview2ppm.py +++ b/lib/scripts/legacy_lyxpreview2ppm.py @@ -225,7 +225,7 @@ def legacy_conversion(argv): bg_color = argv[5] # External programs used by the script. - path = string.split(os.getenv("PATH"), os.pathsep) + path = string.split(os.environ["PATH"], os.pathsep) latex = find_exe_or_terminate(["pplatex", "latex2e", "latex"], path) dvips = find_exe_or_terminate(["dvips"], path) gs = find_exe_or_terminate(["gswin32", "gs"], path) diff --git a/lib/scripts/lyxpreview2bitmap.py b/lib/scripts/lyxpreview2bitmap.py index 7be31537bf..3268beca76 100755 --- a/lib/scripts/lyxpreview2bitmap.py +++ b/lib/scripts/lyxpreview2bitmap.py @@ -133,7 +133,7 @@ def main(argv): bg_color = make_texcolor(argv[5]) # External programs used by the script. - path = string.split(os.getenv("PATH"), os.pathsep) + path = string.split(os.environ["PATH"], os.pathsep) latex = find_exe_or_terminate(["pplatex", "latex2e", "latex"], path) # This can go once dvipng becomes widespread. -- 2.39.2