eric6/Documentation/Source/eric6.MicroPython.MicroPythonCommandsInterface.html

changeset 7145
ceb3e8b242c1
child 7273
391d6b7b1eff
equal deleted inserted replaced
7143:9eb66bad154d 7145:ceb3e8b242c1
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.MicroPython.MicroPythonCommandsInterface</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.MicroPython.MicroPythonCommandsInterface</h1>
23 <p>
24 Module implementing some file system commands for MicroPython.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#MicroPythonCommandsInterface">MicroPythonCommandsInterface</a></td>
34 <td>Class implementing some file system commands for MicroPython.</td>
35 </tr>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="MicroPythonCommandsInterface" ID="MicroPythonCommandsInterface"></a>
43 <h2>MicroPythonCommandsInterface</h2>
44 <p>
45 Class implementing some file system commands for MicroPython.
46 </p><p>
47 Commands are provided to perform operations on the file system of a
48 connected MicroPython device. Supported commands are:
49 <ul>
50 <li>ls: directory listing</li>
51 <li>lls: directory listing with meta data</li>
52 <li>cd: change directory</li>
53 <li>pwd: get the current directory</li>
54 <li>put: copy a file to the connected device</li>
55 <li>get: get a file from the connected device</li>
56 <li>rm: remove a file from the connected device</li>
57 <li>rmrf: remove a file/directory recursively (like 'rm -rf' in bash)
58 <li>mkdir: create a new directory</li>
59 <li>rmdir: remove an empty directory</li>
60 </ul>
61 </p><p>
62 There are additional commands related to time and version.
63 <ul>
64 <li>version: get version info about MicroPython</li>
65 <li>getImplementation: get some implementation information</li>
66 <li>syncTime: synchronize the time of the connected device</li>
67 <li>showTime: show the current time of the connected device</li>
68 </ul>
69 </p><h3>Signals</h3>
70 <dl>
71 <dt>dataReceived(data)</dt>
72 <dd>
73 emitted to send data received via the serial
74 connection for further processing
75 </dd><dt>executeAsyncFinished()</dt>
76 <dd>
77 emitted to indicate the end of an
78 asynchronously executed list of commands (e.g. a script)
79 </dd>
80 </dl>
81 <h3>Derived from</h3>
82 QObject
83 <h3>Class Attributes</h3>
84 <table>
85 <tr><td>None</td></tr>
86 </table>
87 <h3>Class Methods</h3>
88 <table>
89 <tr><td>None</td></tr>
90 </table>
91 <h3>Methods</h3>
92 <table>
93 <tr>
94 <td><a href="#MicroPythonCommandsInterface.__init__">MicroPythonCommandsInterface</a></td>
95 <td>Constructor</td>
96 </tr><tr>
97 <td><a href="#MicroPythonCommandsInterface.__rawOff">__rawOff</a></td>
98 <td>Private method to switch 'raw' mode off.</td>
99 </tr><tr>
100 <td><a href="#MicroPythonCommandsInterface.__rawOn">__rawOn</a></td>
101 <td>Private method to switch the connected device to 'raw' mode.</td>
102 </tr><tr>
103 <td><a href="#MicroPythonCommandsInterface.__readSerial">__readSerial</a></td>
104 <td>Private slot to read all available serial data and emit it with the "dataReceived" signal for further processing.</td>
105 </tr><tr>
106 <td><a href="#MicroPythonCommandsInterface.__shortError">__shortError</a></td>
107 <td>Private method to create a shortened error message.</td>
108 </tr><tr>
109 <td><a href="#MicroPythonCommandsInterface.cd">cd</a></td>
110 <td>Public method to change the current directory on the connected device.</td>
111 </tr><tr>
112 <td><a href="#MicroPythonCommandsInterface.connectToDevice">connectToDevice</a></td>
113 <td>Public slot to start the manager.</td>
114 </tr><tr>
115 <td><a href="#MicroPythonCommandsInterface.disconnectFromDevice">disconnectFromDevice</a></td>
116 <td>Public slot to stop the thread.</td>
117 </tr><tr>
118 <td><a href="#MicroPythonCommandsInterface.execute">execute</a></td>
119 <td>Public method to send commands to the connected device and return the result.</td>
120 </tr><tr>
121 <td><a href="#MicroPythonCommandsInterface.executeAsync">executeAsync</a></td>
122 <td>Public method to execute a series of commands over a period of time without returning any result (asynchronous execution).</td>
123 </tr><tr>
124 <td><a href="#MicroPythonCommandsInterface.fileSystemInfo">fileSystemInfo</a></td>
125 <td>Public method to obtain information about the currently mounted file systems.</td>
126 </tr><tr>
127 <td><a href="#MicroPythonCommandsInterface.get">get</a></td>
128 <td>Public method to copy a file from the connected device.</td>
129 </tr><tr>
130 <td><a href="#MicroPythonCommandsInterface.getImplementation">getImplementation</a></td>
131 <td>Public method to get some implementation information of the connected device.</td>
132 </tr><tr>
133 <td><a href="#MicroPythonCommandsInterface.getTime">getTime</a></td>
134 <td>Public method to get the current time of the device.</td>
135 </tr><tr>
136 <td><a href="#MicroPythonCommandsInterface.handlePreferencesChanged">handlePreferencesChanged</a></td>
137 <td>Public slot to handle a change of the preferences.</td>
138 </tr><tr>
139 <td><a href="#MicroPythonCommandsInterface.isConnected">isConnected</a></td>
140 <td>Public method to get the connection status.</td>
141 </tr><tr>
142 <td><a href="#MicroPythonCommandsInterface.lls">lls</a></td>
143 <td>Public method to get a long directory listing of the connected device including meta data.</td>
144 </tr><tr>
145 <td><a href="#MicroPythonCommandsInterface.ls">ls</a></td>
146 <td>Public method to get a directory listing of the connected device.</td>
147 </tr><tr>
148 <td><a href="#MicroPythonCommandsInterface.mkdir">mkdir</a></td>
149 <td>Public method to create a new directory.</td>
150 </tr><tr>
151 <td><a href="#MicroPythonCommandsInterface.put">put</a></td>
152 <td>Public method to copy a local file to the connected device.</td>
153 </tr><tr>
154 <td><a href="#MicroPythonCommandsInterface.pwd">pwd</a></td>
155 <td>Public method to get the current directory of the connected device.</td>
156 </tr><tr>
157 <td><a href="#MicroPythonCommandsInterface.remainingTask">remainingTask</a></td>
158 <td></td>
159 </tr><tr>
160 <td><a href="#MicroPythonCommandsInterface.rm">rm</a></td>
161 <td>Public method to remove a file from the connected device.</td>
162 </tr><tr>
163 <td><a href="#MicroPythonCommandsInterface.rmdir">rmdir</a></td>
164 <td>Public method to remove a directory.</td>
165 </tr><tr>
166 <td><a href="#MicroPythonCommandsInterface.rmrf">rmrf</a></td>
167 <td>Public method to remove a file or directory recursively.</td>
168 </tr><tr>
169 <td><a href="#MicroPythonCommandsInterface.syncTime">syncTime</a></td>
170 <td>Public method to set the time of the connected device to the local computer's time.</td>
171 </tr><tr>
172 <td><a href="#MicroPythonCommandsInterface.version">version</a></td>
173 <td>Public method to get the MicroPython version information of the connected device.</td>
174 </tr><tr>
175 <td><a href="#MicroPythonCommandsInterface.write">write</a></td>
176 <td>Public method to write data to the connected device.</td>
177 </tr>
178 </table>
179 <h3>Static Methods</h3>
180 <table>
181 <tr><td>None</td></tr>
182 </table>
183 <a NAME="MicroPythonCommandsInterface.__init__" ID="MicroPythonCommandsInterface.__init__"></a>
184 <h4>MicroPythonCommandsInterface (Constructor)</h4>
185 <b>MicroPythonCommandsInterface</b>(<i>parent=None</i>)
186 <p>
187 Constructor
188 </p><dl>
189 <dt><i>parent</i> (QObject)</dt>
190 <dd>
191 reference to the parent object
192 </dd>
193 </dl><a NAME="MicroPythonCommandsInterface.__rawOff" ID="MicroPythonCommandsInterface.__rawOff"></a>
194 <h4>MicroPythonCommandsInterface.__rawOff</h4>
195 <b>__rawOff</b>(<i></i>)
196 <p>
197 Private method to switch 'raw' mode off.
198 </p><a NAME="MicroPythonCommandsInterface.__rawOn" ID="MicroPythonCommandsInterface.__rawOn"></a>
199 <h4>MicroPythonCommandsInterface.__rawOn</h4>
200 <b>__rawOn</b>(<i></i>)
201 <p>
202 Private method to switch the connected device to 'raw' mode.
203 </p><p>
204 Note: switching to raw mode is done with synchronous writes.
205 </p><dl>
206 <dt>Returns:</dt>
207 <dd>
208 flag indicating success
209 @rtype bool
210 </dd>
211 </dl><a NAME="MicroPythonCommandsInterface.__readSerial" ID="MicroPythonCommandsInterface.__readSerial"></a>
212 <h4>MicroPythonCommandsInterface.__readSerial</h4>
213 <b>__readSerial</b>(<i></i>)
214 <p>
215 Private slot to read all available serial data and emit it with the
216 "dataReceived" signal for further processing.
217 </p><a NAME="MicroPythonCommandsInterface.__shortError" ID="MicroPythonCommandsInterface.__shortError"></a>
218 <h4>MicroPythonCommandsInterface.__shortError</h4>
219 <b>__shortError</b>(<i>error</i>)
220 <p>
221 Private method to create a shortened error message.
222 </p><dl>
223 <dt><i>error</i> (bytes)</dt>
224 <dd>
225 verbose error message
226 </dd>
227 </dl><dl>
228 <dt>Returns:</dt>
229 <dd>
230 shortened error message
231 </dd>
232 </dl><dl>
233 <dt>Return Type:</dt>
234 <dd>
235 str
236 </dd>
237 </dl><a NAME="MicroPythonCommandsInterface.cd" ID="MicroPythonCommandsInterface.cd"></a>
238 <h4>MicroPythonCommandsInterface.cd</h4>
239 <b>cd</b>(<i>dirname</i>)
240 <p>
241 Public method to change the current directory on the connected device.
242 </p><dl>
243 <dt><i>dirname</i> (str)</dt>
244 <dd>
245 directory to change to
246 </dd>
247 </dl><dl>
248 <dt>Raises <b>IOError</b>:</dt>
249 <dd>
250 raised to indicate an issue with the device
251 </dd>
252 </dl><a NAME="MicroPythonCommandsInterface.connectToDevice" ID="MicroPythonCommandsInterface.connectToDevice"></a>
253 <h4>MicroPythonCommandsInterface.connectToDevice</h4>
254 <b>connectToDevice</b>(<i>port</i>)
255 <p>
256 Public slot to start the manager.
257 </p><dl>
258 <dt><i>port</i> (str)</dt>
259 <dd>
260 name of the port to be used
261 </dd>
262 </dl><dl>
263 <dt>Returns:</dt>
264 <dd>
265 flag indicating success
266 </dd>
267 </dl><dl>
268 <dt>Return Type:</dt>
269 <dd>
270 bool
271 </dd>
272 </dl><a NAME="MicroPythonCommandsInterface.disconnectFromDevice" ID="MicroPythonCommandsInterface.disconnectFromDevice"></a>
273 <h4>MicroPythonCommandsInterface.disconnectFromDevice</h4>
274 <b>disconnectFromDevice</b>(<i></i>)
275 <p>
276 Public slot to stop the thread.
277 </p><a NAME="MicroPythonCommandsInterface.execute" ID="MicroPythonCommandsInterface.execute"></a>
278 <h4>MicroPythonCommandsInterface.execute</h4>
279 <b>execute</b>(<i>commands</i>)
280 <p>
281 Public method to send commands to the connected device and return the
282 result.
283 </p><p>
284 If no serial connection is available, empty results will be returned.
285 </p><dl>
286 <dt><i>commands</i> (str)</dt>
287 <dd>
288 list of commands to be executed
289 </dd>
290 </dl><dl>
291 <dt>Returns:</dt>
292 <dd>
293 tuple containing stdout and stderr output of the device
294 </dd>
295 </dl><dl>
296 <dt>Return Type:</dt>
297 <dd>
298 tuple of (bytes, bytes)
299 </dd>
300 </dl><a NAME="MicroPythonCommandsInterface.executeAsync" ID="MicroPythonCommandsInterface.executeAsync"></a>
301 <h4>MicroPythonCommandsInterface.executeAsync</h4>
302 <b>executeAsync</b>(<i>commandsList</i>)
303 <p>
304 Public method to execute a series of commands over a period of time
305 without returning any result (asynchronous execution).
306 </p><dl>
307 <dt><i>commandsList</i> (list of bytes)</dt>
308 <dd>
309 list of commands to be execute on the device
310 </dd>
311 </dl><a NAME="MicroPythonCommandsInterface.fileSystemInfo" ID="MicroPythonCommandsInterface.fileSystemInfo"></a>
312 <h4>MicroPythonCommandsInterface.fileSystemInfo</h4>
313 <b>fileSystemInfo</b>(<i></i>)
314 <p>
315 Public method to obtain information about the currently mounted file
316 systems.
317 </p><dl>
318 <dt>Returns:</dt>
319 <dd>
320 tuple of tuples containing the file system name, the total
321 size, the used size and the free size
322 </dd>
323 </dl><dl>
324 <dt>Return Type:</dt>
325 <dd>
326 tuple of tuples of (str, int, int, int)
327 </dd>
328 </dl><dl>
329 <dt>Raises <b>IOError</b>:</dt>
330 <dd>
331 raised to indicate an issue with the device
332 </dd>
333 </dl><a NAME="MicroPythonCommandsInterface.get" ID="MicroPythonCommandsInterface.get"></a>
334 <h4>MicroPythonCommandsInterface.get</h4>
335 <b>get</b>(<i>deviceFileName, hostFileName=None</i>)
336 <p>
337 Public method to copy a file from the connected device.
338 </p><dl>
339 <dt><i>deviceFileName</i> (str)</dt>
340 <dd>
341 name of the file to copy
342 </dd><dt><i>hostFileName</i> (str)</dt>
343 <dd>
344 name of the file to copy to
345 </dd>
346 </dl><dl>
347 <dt>Returns:</dt>
348 <dd>
349 flag indicating success
350 </dd>
351 </dl><dl>
352 <dt>Return Type:</dt>
353 <dd>
354 bool
355 </dd>
356 </dl><dl>
357 <dt>Raises <b>IOError</b>:</dt>
358 <dd>
359 raised to indicate an issue with the device
360 </dd>
361 </dl><a NAME="MicroPythonCommandsInterface.getImplementation" ID="MicroPythonCommandsInterface.getImplementation"></a>
362 <h4>MicroPythonCommandsInterface.getImplementation</h4>
363 <b>getImplementation</b>(<i></i>)
364 <p>
365 Public method to get some implementation information of the connected
366 device.
367 </p><dl>
368 <dt>Returns:</dt>
369 <dd>
370 dictionary containing the implementation information
371 </dd>
372 </dl><dl>
373 <dt>Return Type:</dt>
374 <dd>
375 dict
376 </dd>
377 </dl><dl>
378 <dt>Raises <b>IOError</b>:</dt>
379 <dd>
380 raised to indicate an issue with the device
381 </dd>
382 </dl><a NAME="MicroPythonCommandsInterface.getTime" ID="MicroPythonCommandsInterface.getTime"></a>
383 <h4>MicroPythonCommandsInterface.getTime</h4>
384 <b>getTime</b>(<i></i>)
385 <p>
386 Public method to get the current time of the device.
387 </p><dl>
388 <dt>Returns:</dt>
389 <dd>
390 time of the device
391 </dd>
392 </dl><dl>
393 <dt>Return Type:</dt>
394 <dd>
395 str
396 </dd>
397 </dl><dl>
398 <dt>Raises <b>IOError</b>:</dt>
399 <dd>
400 raised to indicate an issue with the device
401 </dd>
402 </dl><a NAME="MicroPythonCommandsInterface.handlePreferencesChanged" ID="MicroPythonCommandsInterface.handlePreferencesChanged"></a>
403 <h4>MicroPythonCommandsInterface.handlePreferencesChanged</h4>
404 <b>handlePreferencesChanged</b>(<i></i>)
405 <p>
406 Public slot to handle a change of the preferences.
407 </p><a NAME="MicroPythonCommandsInterface.isConnected" ID="MicroPythonCommandsInterface.isConnected"></a>
408 <h4>MicroPythonCommandsInterface.isConnected</h4>
409 <b>isConnected</b>(<i></i>)
410 <p>
411 Public method to get the connection status.
412 </p><dl>
413 <dt>Returns:</dt>
414 <dd>
415 flag indicating the connection status
416 </dd>
417 </dl><dl>
418 <dt>Return Type:</dt>
419 <dd>
420 bool
421 </dd>
422 </dl><a NAME="MicroPythonCommandsInterface.lls" ID="MicroPythonCommandsInterface.lls"></a>
423 <h4>MicroPythonCommandsInterface.lls</h4>
424 <b>lls</b>(<i>dirname="", fullstat=False, showHidden=False</i>)
425 <p>
426 Public method to get a long directory listing of the connected device
427 including meta data.
428 </p><dl>
429 <dt><i>dirname</i> (str)</dt>
430 <dd>
431 name of the directory to be listed
432 </dd><dt><i>fullstat</i> (bool)</dt>
433 <dd>
434 flag indicating to return the full stat() tuple
435 </dd><dt><i>showHidden</i> (bool)</dt>
436 <dd>
437 flag indicating to show hidden files as well
438 </dd>
439 </dl><dl>
440 <dt>Returns:</dt>
441 <dd>
442 list containing the directory listing with tuple entries of
443 the name and and a tuple of mode, size and time (if fullstat is
444 false) or the complete stat() tuple. 'None' is returned in case the
445 directory doesn't exist.
446 </dd>
447 </dl><dl>
448 <dt>Return Type:</dt>
449 <dd>
450 tuple of (str, tuple)
451 </dd>
452 </dl><dl>
453 <dt>Raises <b>IOError</b>:</dt>
454 <dd>
455 raised to indicate an issue with the device
456 </dd>
457 </dl><a NAME="MicroPythonCommandsInterface.ls" ID="MicroPythonCommandsInterface.ls"></a>
458 <h4>MicroPythonCommandsInterface.ls</h4>
459 <b>ls</b>(<i>dirname=""</i>)
460 <p>
461 Public method to get a directory listing of the connected device.
462 </p><dl>
463 <dt><i>dirname</i> (str)</dt>
464 <dd>
465 name of the directory to be listed
466 </dd>
467 </dl><dl>
468 <dt>Returns:</dt>
469 <dd>
470 tuple containg the directory listing
471 </dd>
472 </dl><dl>
473 <dt>Return Type:</dt>
474 <dd>
475 tuple of str
476 </dd>
477 </dl><dl>
478 <dt>Raises <b>IOError</b>:</dt>
479 <dd>
480 raised to indicate an issue with the device
481 </dd>
482 </dl><a NAME="MicroPythonCommandsInterface.mkdir" ID="MicroPythonCommandsInterface.mkdir"></a>
483 <h4>MicroPythonCommandsInterface.mkdir</h4>
484 <b>mkdir</b>(<i>dirname</i>)
485 <p>
486 Public method to create a new directory.
487 </p><dl>
488 <dt><i>dirname</i> (str)</dt>
489 <dd>
490 name of the directory to create
491 </dd>
492 </dl><dl>
493 <dt>Raises <b>IOError</b>:</dt>
494 <dd>
495 raised to indicate an issue with the device
496 </dd>
497 </dl><a NAME="MicroPythonCommandsInterface.put" ID="MicroPythonCommandsInterface.put"></a>
498 <h4>MicroPythonCommandsInterface.put</h4>
499 <b>put</b>(<i>hostFileName, deviceFileName=None</i>)
500 <p>
501 Public method to copy a local file to the connected device.
502 </p><dl>
503 <dt><i>hostFileName</i> (str)</dt>
504 <dd>
505 name of the file to be copied
506 </dd><dt><i>deviceFileName</i> (str)</dt>
507 <dd>
508 name of the file to copy to
509 </dd>
510 </dl><dl>
511 <dt>Returns:</dt>
512 <dd>
513 flag indicating success
514 </dd>
515 </dl><dl>
516 <dt>Return Type:</dt>
517 <dd>
518 bool
519 </dd>
520 </dl><dl>
521 <dt>Raises <b>IOError</b>:</dt>
522 <dd>
523 raised to indicate an issue with the device
524 </dd>
525 </dl><a NAME="MicroPythonCommandsInterface.pwd" ID="MicroPythonCommandsInterface.pwd"></a>
526 <h4>MicroPythonCommandsInterface.pwd</h4>
527 <b>pwd</b>(<i></i>)
528 <p>
529 Public method to get the current directory of the connected device.
530 </p><dl>
531 <dt>Returns:</dt>
532 <dd>
533 current directory
534 </dd>
535 </dl><dl>
536 <dt>Return Type:</dt>
537 <dd>
538 str
539 </dd>
540 </dl><dl>
541 <dt>Raises <b>IOError</b>:</dt>
542 <dd>
543 raised to indicate an issue with the device
544 </dd>
545 </dl><a NAME="MicroPythonCommandsInterface.remainingTask" ID="MicroPythonCommandsInterface.remainingTask"></a>
546 <h4>MicroPythonCommandsInterface.remainingTask</h4>
547 <b>remainingTask</b>(<i></i>)
548 <a NAME="MicroPythonCommandsInterface.rm" ID="MicroPythonCommandsInterface.rm"></a>
549 <h4>MicroPythonCommandsInterface.rm</h4>
550 <b>rm</b>(<i>filename</i>)
551 <p>
552 Public method to remove a file from the connected device.
553 </p><dl>
554 <dt><i>filename</i> (str)</dt>
555 <dd>
556 name of the file to be removed
557 </dd>
558 </dl><dl>
559 <dt>Raises <b>IOError</b>:</dt>
560 <dd>
561 raised to indicate an issue with the device
562 </dd>
563 </dl><a NAME="MicroPythonCommandsInterface.rmdir" ID="MicroPythonCommandsInterface.rmdir"></a>
564 <h4>MicroPythonCommandsInterface.rmdir</h4>
565 <b>rmdir</b>(<i>dirname</i>)
566 <p>
567 Public method to remove a directory.
568 </p><dl>
569 <dt><i>dirname</i> (str)</dt>
570 <dd>
571 name of the directory to be removed
572 </dd>
573 </dl><dl>
574 <dt>Raises <b>IOError</b>:</dt>
575 <dd>
576 raised to indicate an issue with the device
577 </dd>
578 </dl><a NAME="MicroPythonCommandsInterface.rmrf" ID="MicroPythonCommandsInterface.rmrf"></a>
579 <h4>MicroPythonCommandsInterface.rmrf</h4>
580 <b>rmrf</b>(<i>name, recursive=False, force=False</i>)
581 <p>
582 Public method to remove a file or directory recursively.
583 </p><dl>
584 <dt><i>name</i> (str)</dt>
585 <dd>
586 of the file or directory to remove
587 </dd><dt><i>recursive</i> (bool)</dt>
588 <dd>
589 flag indicating a recursive deletion
590 </dd><dt><i>force</i> (bool)</dt>
591 <dd>
592 flag indicating to ignore errors
593 </dd>
594 </dl><dl>
595 <dt>Returns:</dt>
596 <dd>
597 flag indicating success
598 </dd>
599 </dl><dl>
600 <dt>Return Type:</dt>
601 <dd>
602 bool
603 </dd>
604 </dl><dl>
605 <dt>Raises <b>IOError</b>:</dt>
606 <dd>
607 raised to indicate an issue with the device
608 </dd>
609 </dl><a NAME="MicroPythonCommandsInterface.syncTime" ID="MicroPythonCommandsInterface.syncTime"></a>
610 <h4>MicroPythonCommandsInterface.syncTime</h4>
611 <b>syncTime</b>(<i></i>)
612 <p>
613 Public method to set the time of the connected device to the local
614 computer's time.
615 </p><dl>
616 <dt>Raises <b>IOError</b>:</dt>
617 <dd>
618 raised to indicate an issue with the device
619 </dd>
620 </dl><a NAME="MicroPythonCommandsInterface.version" ID="MicroPythonCommandsInterface.version"></a>
621 <h4>MicroPythonCommandsInterface.version</h4>
622 <b>version</b>(<i></i>)
623 <p>
624 Public method to get the MicroPython version information of the
625 connected device.
626 </p><dl>
627 <dt>Returns:</dt>
628 <dd>
629 dictionary containing the version information
630 </dd>
631 </dl><dl>
632 <dt>Return Type:</dt>
633 <dd>
634 dict
635 </dd>
636 </dl><dl>
637 <dt>Raises <b>IOError</b>:</dt>
638 <dd>
639 raised to indicate an issue with the device
640 </dd>
641 </dl><a NAME="MicroPythonCommandsInterface.write" ID="MicroPythonCommandsInterface.write"></a>
642 <h4>MicroPythonCommandsInterface.write</h4>
643 <b>write</b>(<i>data</i>)
644 <p>
645 Public method to write data to the connected device.
646 </p><dl>
647 <dt><i>data</i> (bytes or bytearray)</dt>
648 <dd>
649 data to be written
650 </dd>
651 </dl>
652 <div align="right"><a href="#top">Up</a></div>
653 <hr />
654 </body></html>

eric ide

mercurial