ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /proc/self/root/usr/share/Modules/init/ |
import os, re, subprocess if not os.environ.has_key('MODULEPATH'): f = open(os.environ['MODULESHOME'] + "/init/.modulespath", "r") path = [] for line in f.readlines(): line = re.sub("#.*$", '', line) if line is not '': path.append(line) os.environ['MODULEPATH'] = ':'.join(path) if not os.environ.has_key('LOADEDMODULES'): os.environ['LOADEDMODULES'] = '' def module(*args): if type(args[0]) == type([]): args = args[0] else: args = list(args) (output, error) = subprocess.Popen(['/usr/bin/modulecmd', 'python'] + args, stdout=subprocess.PIPE).communicate() exec output