-6

I have a python script which convert a text file to another format. I want to do this way: python convert.py filename .

How could I do it?

1 Answers1

0

What you want to do is take command line arguments: http://www.diveintopython.net/scripts_and_streams/command_line_arguments.html

Those docs should help you out, but if you google that phrase and python you'll find plenty of examples!

Ryan O'Donnell
  • 617
  • 6
  • 14