1063 if err: |
1063 if err: |
1064 if b"NotImplementedError" in err: |
1064 if b"NotImplementedError" in err: |
1065 return "<unsupported> <unsupported>" |
1065 return "<unsupported> <unsupported>" |
1066 raise OSError(self.__shortError(err)) |
1066 raise OSError(self.__shortError(err)) |
1067 return out.decode("utf-8").strip() |
1067 return out.decode("utf-8").strip() |
|
1068 |
|
1069 def getModules(self): |
|
1070 """ |
|
1071 Public method to show a list of modules built into the firmware. |
|
1072 |
|
1073 @return list of builtin modules |
|
1074 @rtype list of str |
|
1075 @exception OSError raised to indicate an issue with the device |
|
1076 """ |
|
1077 commands = ["help('modules')"] |
|
1078 out, err = self.execute(commands) |
|
1079 if err: |
|
1080 raise OSError(self.__shortError(err)) |
|
1081 |
|
1082 modules = [] |
|
1083 for line in out.decode("utf-8").splitlines()[:-1]: |
|
1084 modules.extend(line.split()) |
|
1085 return modules |