<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def FromFile(cls, inpath):
 """Load a CommandFile from a path. Args: inpath (str):
 The path to the file to load Returns: CommandFile: The decoded CommandFile object. """


        with open(inpath, "r") as infile:
            indata = infile.read()

        return cls.FromString(indata)