When doing Python programming it is a nice convention to insert the if statement `if __name__ == "__main__":` before any main code that does actual functionalities to ensure the code will be executed only as a script rather than as an imported module. Hence attach the missing judgement to show_delta.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -125,4 +125,5 @@ def main(): · 124 unmodified lines | ||
| 125 | 125 | for line in lines: |
| 126 | 126 | print (convert_line(line, base_time),) |
| 127 | 127 | |
| 128 | −main() | |
| 128 | +if __name__ == "__main__": | |
| 129 | + main() | |