28 lines
1.1 KiB
Diff
28 lines
1.1 KiB
Diff
diff -up modules-3.2.10/doc/module.1.in.py3 modules-3.2.10/doc/module.1.in
|
|
--- modules-3.2.10/doc/module.1.in.py3 2015-01-28 09:55:01.172781681 -0700
|
|
+++ modules-3.2.10/doc/module.1.in 2015-01-28 09:55:51.045510021 -0700
|
|
@@ -107,11 +107,8 @@ And the python
|
|
.I module
|
|
command is defined with:
|
|
|
|
- import os;
|
|
- if os.environ.has_key('PYTHONPATH'):
|
|
- os.environ['PYTHONPATH'] +=':'+os.environ['MODULESHOME']+"/init";
|
|
- else:
|
|
- os.environ['PYTHONPATH'] = os.environ['MODULESHOME']+"/init";
|
|
+ import os, sys;
|
|
+ sys.path.insert(0, '@INITPATH@')
|
|
|
|
from python import module;
|
|
|
|
diff -up modules-3.2.10/init/python.py.in.py3 modules-3.2.10/init/python.py.in
|
|
--- modules-3.2.10/init/python.py.in.py3 2015-01-28 09:55:01.173781675 -0700
|
|
+++ modules-3.2.10/init/python.py.in 2015-01-28 09:56:08.570414569 -0700
|
|
@@ -27,5 +27,5 @@ def module(*args):
|
|
@VERSIONING@ (output, error) = subprocess.Popen(['@BASEPREFIX@/Modules/%s/bin/modulecmd' % os.environ['MODULE_VERSION'], 'python'] +
|
|
@NOTVERSIONING@ (output, error) = subprocess.Popen(['@bindir@/modulecmd', 'python'] +
|
|
args, stdout=subprocess.PIPE).communicate()
|
|
- exec output
|
|
+ exec(output)
|
|
|