From d6d9a9dab6bcd800ef9213509824f5bf52248daf Mon Sep 17 00:00:00 2001 From: Gilles DAVID Date: Wed, 24 May 2017 10:06:13 +0200 Subject: [PATCH] Python 3 porting --- bin/geom_setenv.py | 5 ++--- doc/salome/examples/testme.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/geom_setenv.py b/bin/geom_setenv.py index 7cc471620..45a90d794 100644 --- a/bin/geom_setenv.py +++ b/bin/geom_setenv.py @@ -1,5 +1,4 @@ -#! /usr/bin/env python -# -*- coding: iso-8859-1 -*- +#! /usr/bin/env python3 # Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or @@ -58,7 +57,7 @@ def set_env( args ): plugin_list.append("AdvancedGEOM") # find additional plugins - for env_var in list(os.environ.keys()): + for env_var in os.environ: value = os.environ[env_var] if env_var[-9:] == "_ROOT_DIR" and value: plugin_root = value diff --git a/doc/salome/examples/testme.py b/doc/salome/examples/testme.py index 6e3903fbc..342c496fe 100755 --- a/doc/salome/examples/testme.py +++ b/doc/salome/examples/testme.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or @@ -17,7 +18,6 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -#!/usr/bin/env python import unittest, sys, os -- 2.39.2