Simple python code takes command line argument for file location and tokenizes text
You have a few redundant and unnecessary calls in there.


Calling open(sys.argv[1]) right before with open(sys.argv[1]) as inputfile: does not do anything.
The with statement already takes care of closing the file. So you don't need the inputfile.close
If with did not close your file, it would not be closed, because you actually need to call that method (so inputfile.close())
You should never have a bare except. This catches more than you want, including, for example, the user pressing Ctrl+C. Always use as specific an exception as possible. Here you probably want to except the file missing, so use either IOError (Python 2.x) or FileNotFoundError (Python 3.x)


You should also have a look at Python's official style-guide, PEP8. It recommends surrounding operators with spaces, so if len(sys.argv) == 2:.

If you want this script to do something more, you should start to split the responsibilities into functions. Here you could have something like this:

import sys

def parse_lines(file_name):
    """Parse the lines of file_names into comma-separated lists"""
    with open(file_name) as inputfile:
        for line in inputfile:
            yield ",".join(line.split())

if __name__ == "__main__":
    # Open file passed by terminal
    if len(sys.argv) == 2:
        try:
            for line in parse_lines(sys.argv[1]):
                print(line)
        except FileNotFoundError:
            print(f"File {sys.argv[1]} not found")
            sys.exit(-1)


Here I put the parsing into a function, which is actually a generator. It yields the parsed lines one by one. I also added a docstring describing the function.

I also made your error handling code more specific. Your code actually makes debugging your program harder, because the program returning -1 (regardless of the error encountered) is  a lot less clear than Python creating a stacktrace. If you do catch errors, you should handle them (and give the user feedback if necessary). This uses Python 3.6's new f-strings.