i have to call the main function based on the number of arguments passed. When i call the script the functions are not working.
Sample Code:
def func1():
somecode
def func2():
somecode
def func3():
somecode
def main():
if len(sys.argv) == "5":
func1()
func3()
elif len(sys.argv) == "8":
func2()
func3()
if __name__ == '__main__':
main()
In your code you are comparing
len(sys.argv)
with a string:changing to
should do the trick