Skip to content

Commit

Permalink
use sys.executable as python interpreter name instead of hard-coded "…
Browse files Browse the repository at this point in the history
…python"

This would be useful when gen_benchmark_data.py or gen_test_data.py is
invoked using "python2" or "python3" but "python" refers to different
version.
  • Loading branch information
msakai committed Jun 21, 2018
1 parent 4a7511f commit 5e7f7ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gen_benchmark_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def call( cmd ):
ret = p.wait()
print('')

pyexe = 'python'
pyexe = sys.executable

# Generate input data
call(pyexe + ' test/script/make_random_data.py 1 3 224 224 --output data/random_input_1_3_224_224.txt')
Expand Down
3 changes: 2 additions & 1 deletion gen_test_data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import subprocess


Expand All @@ -11,7 +12,7 @@ def call(cmd):
print('')


pyexe = 'python'
pyexe = sys.executable

# Generate input data
call(
Expand Down

0 comments on commit 5e7f7ce

Please sign in to comment.