+class VlcWirelessNetnsNs3Example(object):
+ def __init__(self):
+ usage = "usage: %prog -m movie -u user"
+ parser = OptionParser(usage=usage)
+ parser.add_option("-u", "--user", dest="user", help="Valid linux system user (not root).", type="str")
+ parser.add_option("-m", "--movie", dest="movie", help="Path to movie file to play", type="str")
+ (options, args) = parser.parse_args()
+ if not options.movie:
+ parser.error("Missing 'movie' option.")
+ if options.user == 'root':
+ parser.error("Missing or invalid 'user' option.")
+
+ self.user = options.user if options.user else os.getlogin()
+ self.movie = options.movie