-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
import getAppliPath
appli_local=os.path.realpath(os.path.dirname(__file__))
-APPLI=getAppliPath.relpath(appli_local,os.path.realpath(os.getenv('HOME')))
+APPLI=getAppliPath.relpath(appli_local,os.path.realpath(os.path.expanduser("~")))
usage="""%(prog)s [options]
Typical use is:
#local machine, use cp
if appliPath[0]!='/':
#relative path
- appliPath=os.path.join(os.getenv("HOME"),appliPath)
+ appliPath=os.path.join(os.path.expanduser("~"),appliPath)
if appliPath == appli_local:
return
if hostname == "localhost" or hostname == get_hostname() and userName == getUserName():
#user local resource
if appliPath[0]!='/':
- appliPath=os.path.join(os.getenv("HOME"),appliPath)
+ appliPath=os.path.join(os.path.expanduser("~"),appliPath)
if appliPath == appli_local:
#main local resource: get catalogs in share/salome/resources
catalogs_list=glob.glob(os.path.join(appliPath,"share","salome","resources","*","*Catalog.xml"))