title: How to get file names from command-line parameters in Python
body: <p>I've got the following code:</p>
  
  <pre><code>with open("test.txt", "r") as test, open("table.txt", "w") as table:
      reader = csv.reader(test, delimiter="\t")
      writer = csv.writer(table, delimiter="\t")
      for row in reader:
          if all(field not in keywords for field in row):
              writer.writerow(row)
  </code></pre>
  
  <p>How am I able to convert it to a .py file which let you define table.txt and test when you run it. So that one have to write:</p>
  
  <pre><code>Script.py test.txt output.txt
  </code></pre>