EricChiang/memplot — pull request #4 by sukritkalra (2014-06-01 21:30:12+00:00)
Title: Added error checking.

Checked if the subprocess called returned an error (non zero returncode) or there was an error in calling the process (OSError).

Earlier, calling a command such as `python file_does_not_exist.py` returned a graph such as:

![image3](https://cloud.githubusercontent.com/assets/4013287/3142469/478813a6-e9c0-11e3-8dea-aa31cb36ce65.png)

Now, the program gracefully terminates:

`python: can't open file 'file_does_not_exist.py': [Errno 2] No such file or directory`

Similarly, if an unknown command was passed to `memplot` earlier, it used to raise an `OSError` to the user. Running something like `memplot "command_does_not_exist"` would raise a huge wall of errors to the user.

This now gracefully terminates with the error message `[Errno 2] No such file or directory`