From 6ad336b38fa0ea7dc76a24e08374ffd961864d1a Mon Sep 17 00:00:00 2001 From: derpycode Date: Mon, 12 Dec 2022 05:56:09 -0800 Subject: [PATCH] mostly a few comment additions --- run-cupcake | 3 +-- setup-cgenie | 3 --- tools/utils.py | 6 ++++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/run-cupcake b/run-cupcake index 28bcbccc..97e31910 100755 --- a/run-cupcake +++ b/run-cupcake @@ -4,5 +4,4 @@ if [ ! -f ~/.cgenierc ]; then exit 0 fi cgenie_root=`grep cgenie_root ~/.cgenierc | cut -d: -f2 | sed -e 's/^ *//'` -source $cgenie_root/tools/find_python -exec $PYTHON $cgenie_root/tools/run-cupcake.py $* +python3 tools/setup-cgenie.py $* diff --git a/setup-cgenie b/setup-cgenie index 2a72ec62..98ffa8f7 100755 --- a/setup-cgenie +++ b/setup-cgenie @@ -3,7 +3,4 @@ if [ -f ~/.cgenierc ]; then echo 'cTOASTER is already set up -- if you want to start over, remove ~/.cgenierc ($ rm ~/.cgenierc)' exit 0 fi -#source tools/find_python -#alias python='/usr/bin/python3' -#exec $python tools/setup-cgenie.py python3 tools/setup-cgenie.py diff --git a/tools/utils.py b/tools/utils.py index e04738de..039b1d5e 100755 --- a/tools/utils.py +++ b/tools/utils.py @@ -3,6 +3,8 @@ import re, hashlib, glob import subprocess as sp +# NOTE: The platform module in Python includes tools to see the platform's hardware, operating system , and interpreter version information where the program is running. + # Read cGENIE configuration. @@ -44,8 +46,8 @@ def exists(p): return os.path.exists(os.path.join(cgenie_root, 'platforms', p)) def discover(): - host = platform.node() - os = platform.system().upper() + host = platform.node() # platform.node() returns the computer's network name. + os = platform.system().upper() # Returns the system/OS name. The upper() method returns a string where all characters are in upper case. plat = platform.platform().split('-')[0].upper() if exists(host): return host if exists(os): return os