I don't even know what infile > outfile means. How am I supposed to use it?
Question: I don't know how to use Python, and I'm trying to use a script on a document.
I have no idea how to tell it do this!

If I just run the script, this is the message I get:

    
    
    Use: C:\Python27\hun2html.py infile > outfile
    
    Traceback (most recent call last):
      File "C:\Python27\hun2html.py", line 75, in <module>
        sys.exit(1)
    SystemExit: 1
    

I'm not sure what info is relevant to anyone who knows about this stuff, but
this is the most relevant part of the code, I believe:

    
    
    if __name__ == '__main__':
        import sys
        if not sys.argv[1:]:
            print "Use: %s infile > outfile" % sys.argv[0]
            sys.exit(1)
        contents = open(sys.argv[1]).read()
        print hun2html(contents)
    

It's supposed to change the formatting in a document. If anyone can make sense
of this stupid question, I would really appreciate some help!


Answer: It means that you should write the path to the file you want to use for input
where infile is and the path to the file you want to store the output where
outfile is. For example,

    
    
    C:\Python27\hun2html.py C:\input.txt > C:\output.txt
    

Note that the input file is being passed as a parameter (accessed in the code
by `sys.argv[1]` ) and the output is being piped, meaning that the Python
prints it to standard output, but because you put the `>` character it will be
redirected to the file you indicate. If you left off the `> outfile` you would
see the output displayed on your terminal.

