Skip to content

Commit b7390a6

Browse files
added help message to the diff util project
1 parent c1cfd98 commit b7390a6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

projects/Diff_Util/diff.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
from rich import print
55

66
if len(sys.argv) < 3:
7-
print("Error")
7+
print("Usage:")
8+
print("\tMust provide two file names as command-line arguments.")
9+
print("\tdiff.py <orignal_file> <changed_file>")
810
exit(1)
911

1012
orignal = sys.argv[1]
1113
changed = sys.argv[2]
1214

13-
orignal_contents = open(orignal, "r").readlines()
14-
changed_contents = open(changed, "r").readlines()
15+
orignal_contents = open(orignal, "r").readlines().close()
16+
changed_contents = open(changed, "r").readlines().close()
1517

1618
color = "green"
1719
symbol = f"[bold {color}][+]"

0 commit comments

Comments
 (0)