plotedge script: warn for numpy, matplotlib

This commit is contained in:
Philippe Teuwen 2020-02-21 16:10:18 +01:00
parent 2177211b7a
commit af7fb17607

View file

@ -6,9 +6,19 @@
# at your option, any later version. See the LICENSE.txt file for the text of # at your option, any later version. See the LICENSE.txt file for the text of
# the license. # the license.
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
import numpy
import matplotlib.pyplot as plt
import sys import sys
try:
import numpy
except ModuleNotFoundError:
print("Please install numpy module first.")
sys.exit(1)
try:
import matplotlib.pyplot as plt
except ModuleNotFoundError:
print("Please install matplotlib module first.")
sys.exit(1)
if len(sys.argv) != 2: if len(sys.argv) != 2:
print("Usage: %s <basename>" % sys.argv[0]) print("Usage: %s <basename>" % sys.argv[0])