#!/usr/bin/env python
-#-*- coding:utf-8 -*-
+# -*- coding:utf-8 -*-
# Copyright (C) 2010-2018 CEA/DEN
#
# sys.stderr.write("INFO : initializeTest needs '%s' in sys.path:\n%s\n" % (satdir, PP.pformat(sys.path)))
if satdir not in sys.path:
- # get path to salomeTools sources FIRST as prepend
- # Make the src & commands package accessible from all test code
- sys.path.insert(0, satdir)
- sys.stderr.write("""\
+ # get path to salomeTools sources FIRST as prepend
+ # Make the src & commands package accessible from all test code
+ sys.path.insert(0, satdir)
+ sys.stderr.write(
+ """\
WARNING : sys.path not set for salomeTools, fixed for you:
sys.path prepend '%s'
- sys.path:\n%s\n""" % (satdir, PP.pformat(sys.path)))
- # os.environ PATH is not set...
- # supposedly useful only for subprocess launch from sat
- # see https://docs.python.org/2/library/os.html
- # On some platforms, including FreeBSD and Mac OS X,
- # setting environ may cause memory leaks.
- # sys.stderr.write("os.environ PATH:\n%s\n" % PP.pformat(os.environ["PATH"].split(":")))
- sys.stderr.write("INFO : to fix this message type:\n 'export PYTHONPATH=%s:${PYTHONPATH}'\n" % satdir)
-
-
+ sys.path:\n%s\n"""
+ % (satdir, PP.pformat(sys.path))
+ )
+ # os.environ PATH is not set...
+ # supposedly useful only for subprocess launch from sat
+ # see https://docs.python.org/2/library/os.html
+ # On some platforms, including FreeBSD and Mac OS X,
+ # setting environ may cause memory leaks.
+ # sys.stderr.write("os.environ PATH:\n%s\n" % PP.pformat(os.environ["PATH"].split(":")))
+ sys.stderr.write(
+ "INFO : to fix this message type:\n 'export PYTHONPATH=%s:${PYTHONPATH}'\n"
+ % satdir
+ )