125 @type str |
125 @type str |
126 """ |
126 """ |
127 pythonScript = script.split("\n") |
127 pythonScript = script.split("\n") |
128 self.sendCommands(pythonScript) |
128 self.sendCommands(pythonScript) |
129 |
129 |
130 # TODO: not yet implemented |
|
131 def canStartFileManager(self): |
130 def canStartFileManager(self): |
132 """ |
131 """ |
133 Public method to determine, if a File Manager can be started. |
132 Public method to determine, if a File Manager can be started. |
134 |
133 |
135 @return tuple containing a flag indicating it is safe to start a |
134 @return tuple containing a flag indicating it is safe to start a |
136 File Manager and a reason why it cannot. |
135 File Manager and a reason why it cannot. |
137 @rtype tuple of (bool, str) |
136 @rtype tuple of (bool, str) |
138 """ |
137 """ |
139 return False, self.tr("File Manager is not supported by this device.") |
138 if self.__replActive or self.__plotterActive: |
|
139 return False, self.tr("The file manager and the REPL/plotter use" |
|
140 " the same USB serial connection. Only one" |
|
141 " can be active at any time. Disconnect the" |
|
142 " REPL/plotter and try again.") |
|
143 else: |
|
144 return True, "" |
140 |
145 |
141 # TODO: not yet implemented |
|
142 def setFileManager(self, on): |
146 def setFileManager(self, on): |
143 """ |
147 """ |
144 Public method to set the File Manager status and dependent status. |
148 Public method to set the File Manager status and dependent status. |
145 |
149 |
146 @param on flag indicating the active status |
150 @param on flag indicating the active status |
147 @type bool |
151 @type bool |
148 """ |
152 """ |
149 pass |
153 self.__fileManagerActive = on |
|
154 self.microPython.setActionButtons( |
|
155 run=not on, repl=not on, chart=HAS_QTCHART and not on) |
150 |
156 |
151 @pyqtSlot() |
157 @pyqtSlot() |
152 def handleDataFlood(self): |
158 def handleDataFlood(self): |
153 """ |
159 """ |
154 Public slot handling a data floof from the device. |
160 Public slot handling a data floof from the device. |