This python code assumes input name as test_input[digit].txt and it gives output file with name test_output[digit].txt You can change that parts.
This code takes match, mismatch and gap scores from user. It creates score and movement matrix. Returns the output file which gives the local alignment with indicator. A sample input and output is added.