File tree 1 file changed +10
-5
lines changed 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -32,24 +32,29 @@ def Close(self):
32
32
33
33
34
34
# ------------------------------------------------------
35
- # Start this script like: python D:\python\DIAdem_Start .py --DataPlugin_Name="TDM " --data_file="Example.tdm "
35
+ # Start this script like: python diadem_load .py --DataPlugin_Name="CSV " --data_file="Example.csv "
36
36
# ------------------------------------------------------
37
37
def main ():
38
38
import optparse
39
39
# get the parameter from argument list or work with some defaults for testing
40
40
parser = optparse .OptionParser ()
41
41
parser .add_option ("--DataPlugin_Name" ,
42
- help = "plugin name" ,
43
- dest = "DP_Name" , default = "Touchstone_Complex" )
42
+ help = "DataPlugin name" ,
43
+ dest = "DP_Name" )
44
44
45
45
parser .add_option ("--data_file" ,
46
46
help = "Data file to load with the DataPlugin" ,
47
- dest = "DataFileName" , default = "d: \\ python \\ monopole_2port_Z_MA.s2p" )
47
+ dest = "DataFileName" )
48
48
49
49
# ------------------------------------------------------
50
50
(opts , args ) = parser .parse_args ()
51
+
52
+ if opts .DP_Name == None or opts .DataFileName == None :
53
+ parser .print_help ()
54
+ return
55
+
51
56
print ("----- Start to Load Data with \" " + opts .DP_Name +
52
- "\" DataPlugin and the file \" " + opts .DataFileName + "\" --------" )
57
+ "\" DataPlugin and the file \" " + opts .DataFileName + "\" --------" )
53
58
54
59
# ------------------------------------------------------
55
60
dd = RunDIAdem ()
You can’t perform that action at this time.
0 commit comments