I want to pass the string stored in the txt file as an argument to python code using the sys.argv command. This is code called script.py
import sys
seq = sys.argv[1]
print seq
and this is the line stored in the seq.txt file: AAABBBCC
Now when i run
python script.py seq.txt
I get
seq.txt
as a conclusion. How can I get it to print a line in the seq.txt file.
Ssank source
share