[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] applications/HLA_Tutorial dtest_HLA_Tutorial.py
From: |
certi-cvs |
Subject: |
[certi-cvs] applications/HLA_Tutorial dtest_HLA_Tutorial.py |
Date: |
Mon, 05 May 2008 09:43:07 +0000 |
CVSROOT: /sources/certi
Module name: applications
Changes by: Eric NOULARD <erk> 08/05/05 09:43:07
Modified files:
HLA_Tutorial : dtest_HLA_Tutorial.py
Log message:
simplify dtest script (runnable with no arg)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/applications/HLA_Tutorial/dtest_HLA_Tutorial.py?cvsroot=certi&r1=1.2&r2=1.3
Patches:
Index: dtest_HLA_Tutorial.py
===================================================================
RCS file: /sources/certi/applications/HLA_Tutorial/dtest_HLA_Tutorial.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- dtest_HLA_Tutorial.py 26 Apr 2008 12:14:36 -0000 1.2
+++ dtest_HLA_Tutorial.py 5 May 2008 09:43:07 -0000 1.3
@@ -14,7 +14,7 @@
def usage():
print "Usage : "
- print "%s [--certi_home=<path>]" % sys.argv[0]
+ print "%s [--help] [--certi_home=<path>]" % sys.argv[0]
print "\t --rtig=<user>@[<host>]:<rtig_path>"
print "\t --controller=<user>@[<host>]:<controllerFederate_path>"
print "\t --process=<user>@[<host>]:<processFederate_path>"
@@ -37,19 +37,21 @@
#------------------------------------------------------------- Getting
parameters ----------------------------------
try:
- opts, args = getopt.getopt(sys.argv[1:],"c:r:p:C",["certi_home=","rtig=",
"process=","controller="])
+ opts, args =
getopt.getopt(sys.argv[1:],"hc:r:p:C",["help","certi_home=","rtig=",
"process=","controller="])
except getopt.GetoptError, err:
print >> sys.stderr, "opt = %s, msg = %s" % (err.opt,err.msg)
usage()
sys.exit(2)
-if len(opts) < 3:
- usage()
- sys.exit(2)
-
certi_home_defined=False
+rtig_param = getUserHostPath("rtig")
+controller_param = getUserHostPath("controllerFederate")
+process_param = getUserHostPath("processFederate")
for o, a in opts:
+ if o in ("--help"):
+ usage()
+ sys.exit(2)
if o in ("--rtig"):
rtig_param = getUserHostPath(a)
if o in ("--controller"):
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] applications/HLA_Tutorial dtest_HLA_Tutorial.py,
certi-cvs <=