News for hackers. Stuff that matters.
Re:Ask HN: Tools you have made for yourself? by roveo on Saturday June 12, 2021 @07:49PM (#27488448)
Nice! It could probably benefit from passing the file as an argument:

  import sys

  file = sys.argv[1]
instead of call to input()

You could probably do:

  if len(sys.argv) > 1:
      file = sys.argv[1]
  else:
      file = input(...)
Re:Ask HN: Tools you have made for yourself? by mikub on Sunday June 13, 2021 @12:31AM (#27489757)
Oh wow, that's a nice improvement. Thank you.