Bugfix for subprocess call in python3
This commit is contained in:
1 parent
f143bb0005
commit
ca1d88ba46
4 files changed
+14
-8
No files matched your search
+1
-1
@@ -27,7 +27,7 @@ copyright = '2020, Adiv Paradise'
|
||||
author = 'Adiv Paradise'
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = '3.0.0a3'
|
||||
release = '3.0.0a4'
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
@@ -75,8 +75,8 @@ which produce a folder containing one file per variable. The file you specify sh
|
||||
determine the desired output format. So, for example, to create an archive consisting of a folder full
|
||||
of CSV files for the raw output file ``MOST.00127``, one would use ``MOST.00127.csv``. The surface
|
||||
temperature variable, ``ts``, would then be found in ``MOST.00127/MOST.00127_ts.csv``.
|
||||
**This same combined-format fictional filestring can be passed to **
|
||||
:py:func:`gcmt.load() <exoplasim.gcmt.load>`**.** The object returned by that function will access the
|
||||
**This same combined-format fictional filestring can be passed to**
|
||||
:py:func:`gcmt.load(). <exoplasim.gcmt.load>` The object returned by that function will access the
|
||||
data in the archive just as if it were a bound archive, such as a tarball, netCDF file, or HDF5 file.
|
||||
|
||||
A T21 model output with 10 vertical levels, 12 output times, all supported variables in grid
|
||||
|
||||
+10
-4
@@ -498,8 +498,11 @@ class Model(object):
|
||||
|
||||
#Run ExoPlaSim
|
||||
try:
|
||||
if float(sys.version[:3])>=3.5:
|
||||
subprocess.run([self._exec+self.executable],check=True)
|
||||
if float(sys.version[:3])>=3.5 and float(sys.version[:3])<3.7:
|
||||
subprocess.run([self._exec+self.executable],shell=True,check=True)
|
||||
elif float(sys.version[:3])>=3.7:
|
||||
subprocess.run([self._exec+self.executable],shell=True,check=True,
|
||||
capture_output=True)
|
||||
else:
|
||||
stat = os.system(self._exec+self.executable)
|
||||
if stat!=0:
|
||||
@@ -770,8 +773,11 @@ class Model(object):
|
||||
|
||||
#Run ExoPlaSim
|
||||
try:
|
||||
if float(sys.version[:3])>=3.5:
|
||||
subprocess.run([self._exec+self.executable],check=True)
|
||||
if float(sys.version[:3])>=3.5 and float(sys.version[:3])<3.7:
|
||||
subprocess.run([self._exec+self.executable],shell=True,check=True)
|
||||
elif float(sys.version[:3])>=3.7:
|
||||
subprocess.run([self._exec+self.executable],shell=True,check=True,
|
||||
capture_output=True)
|
||||
else:
|
||||
stat = os.system(self._exec+self.executable)
|
||||
if stat!=0:
|
||||
|
||||
Reference in new issue
Block a user