I have written a driver code to take file path from user and use that file path in my functions. Driver code is as below;
import sys
if __name__ == '__main__':
if len(sys.argv) != 2:
print("Usage: %s input_file" % sys.argv[0])
sys.exit()
file_path = sys.argv[1]
connection, color, numOf_Nodes,links = read_problem(file_path)
print(links)
graph_coloring(connection, color, 0, numOf_Nodes)
But when I run this code I got following error:
Usage: C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py input_file
An exception has occurred, use %tb to see the full traceback.
SystemExit
Shouldn't it ask for a file path from user? I am new to use a driver code therefore I might skip to write some parts for the driver code to work.
Any help?