If I have a python code that currently works with static files but I wish to change it in a way that would allow it to accept dynamic files as well, how can I do so?
Like this is my code in python:
row = run('cat '+'/Users/minks/Documents/X-test.txt'+" | wc -l").split()[0] print("Test row size:") print(row) matrix_tmp_test = np.zeros((int(row),col), dtype=np.int64) print("Test matrix size:") print(matrix_tmp_test.size) Now if that file X_test.txt is dynamic and needs to be provided by command line instead, how can I do so via command line such that it goes and fit into the statement? There are other file calls in the python script as well so how can I ensure the dynamic file goes and fits into the above statement only?