Identical to WebPypeClient.execute(), except this function accepts a
        file path or file type instead of a dictionary.

def execute_from_file(self, url, file_var):
        '''
        Identical to WebPypeClient.execute(), except this function accepts a
        file path or file type instead of a dictionary.

        '''
        if isinstance(file_var, file):
            f = file_var
        elif isinstance(file_var, str):
            try:
                f = open(file_var)
            except IOError, e:
                raise e
        else:
            raise TypeError("This function only accepts a 'file' type  or file path")

        inputs = json.loads(f.read())
        resp = self.execute(url, inputs)
        return resp