src/eric7/Documentation/Source/eric7.MicroPython.Devices.MicrobitDevices.html

branch
eric7
changeset 9765
6378da868bb0
parent 9756
9854647c8c5c
child 9766
f0e22f3a5878
equal deleted inserted replaced
9764:57496966803c 9765:6378da868bb0
102 <tr> 102 <tr>
103 <td><a href="#MicrobitDevice.__showFirmwareVersions">__showFirmwareVersions</a></td> 103 <td><a href="#MicrobitDevice.__showFirmwareVersions">__showFirmwareVersions</a></td>
104 <td>Private slot to show the firmware version of the connected device and the available firmware version.</td> 104 <td>Private slot to show the firmware version of the connected device and the available firmware version.</td>
105 </tr> 105 </tr>
106 <tr> 106 <tr>
107 <td><a href="#MicrobitDevice._getSetTimeCode">_getSetTimeCode</a></td>
108 <td>Protected method to get the device code to set the time.</td>
109 </tr>
110 <tr>
107 <td><a href="#MicrobitDevice.addDeviceMenuEntries">addDeviceMenuEntries</a></td> 111 <td><a href="#MicrobitDevice.addDeviceMenuEntries">addDeviceMenuEntries</a></td>
108 <td>Public method to add device specific entries to the given menu.</td> 112 <td>Public method to add device specific entries to the given menu.</td>
109 </tr> 113 </tr>
110 <tr> 114 <tr>
111 <td><a href="#MicrobitDevice.canRunScript">canRunScript</a></td> 115 <td><a href="#MicrobitDevice.canRunScript">canRunScript</a></td>
144 <td>Public method to check, if the device has its own flash menu entry.</td> 148 <td>Public method to check, if the device has its own flash menu entry.</td>
145 </tr> 149 </tr>
146 <tr> 150 <tr>
147 <td><a href="#MicrobitDevice.hasTimeCommands">hasTimeCommands</a></td> 151 <td><a href="#MicrobitDevice.hasTimeCommands">hasTimeCommands</a></td>
148 <td>Public method to check, if the device supports time commands.</td> 152 <td>Public method to check, if the device supports time commands.</td>
153 </tr>
154 <tr>
155 <td><a href="#MicrobitDevice.lls">lls</a></td>
156 <td>Public method to get a long directory listing of the connected device including meta data.</td>
157 </tr>
158 <tr>
159 <td><a href="#MicrobitDevice.ls">ls</a></td>
160 <td>Public method to get a directory listing of the connected device.</td>
161 </tr>
162 <tr>
163 <td><a href="#MicrobitDevice.pwd">pwd</a></td>
164 <td>Public method to get the current directory of the connected device.</td>
149 </tr> 165 </tr>
150 <tr> 166 <tr>
151 <td><a href="#MicrobitDevice.runScript">runScript</a></td> 167 <td><a href="#MicrobitDevice.runScript">runScript</a></td>
152 <td>Public method to run the given Python script.</td> 168 <td>Public method to run the given Python script.</td>
153 </tr> 169 </tr>
317 333
318 <p> 334 <p>
319 Private slot to show the firmware version of the connected device and the 335 Private slot to show the firmware version of the connected device and the
320 available firmware version. 336 available firmware version.
321 </p> 337 </p>
338 <a NAME="MicrobitDevice._getSetTimeCode" ID="MicrobitDevice._getSetTimeCode"></a>
339 <h4>MicrobitDevice._getSetTimeCode</h4>
340 <b>_getSetTimeCode</b>(<i></i>)
341
342 <p>
343 Protected method to get the device code to set the time.
344 </p>
345 <p>
346 Note: This method must be implemented in the various device specific
347 subclasses.
348 </p>
349 <dl>
350 <dt>Return:</dt>
351 <dd>
352 code to be executed on the connected device to set the time
353 </dd>
354 </dl>
355 <dl>
356 <dt>Return Type:</dt>
357 <dd>
358 str
359 </dd>
360 </dl>
322 <a NAME="MicrobitDevice.addDeviceMenuEntries" ID="MicrobitDevice.addDeviceMenuEntries"></a> 361 <a NAME="MicrobitDevice.addDeviceMenuEntries" ID="MicrobitDevice.addDeviceMenuEntries"></a>
323 <h4>MicrobitDevice.addDeviceMenuEntries</h4> 362 <h4>MicrobitDevice.addDeviceMenuEntries</h4>
324 <b>addDeviceMenuEntries</b>(<i>menu</i>) 363 <b>addDeviceMenuEntries</b>(<i>menu</i>)
325 364
326 <p> 365 <p>
528 </dl> 567 </dl>
529 <dl> 568 <dl>
530 <dt>Return Type:</dt> 569 <dt>Return Type:</dt>
531 <dd> 570 <dd>
532 bool 571 bool
572 </dd>
573 </dl>
574 <a NAME="MicrobitDevice.lls" ID="MicrobitDevice.lls"></a>
575 <h4>MicrobitDevice.lls</h4>
576 <b>lls</b>(<i>dirname="", fullstat=False, showHidden=False</i>)
577
578 <p>
579 Public method to get a long directory listing of the connected device
580 including meta data.
581 </p>
582 <dl>
583
584 <dt><i>dirname</i> (str)</dt>
585 <dd>
586 name of the directory to be listed
587 </dd>
588 <dt><i>fullstat</i> (bool)</dt>
589 <dd>
590 flag indicating to return the full stat() tuple
591 </dd>
592 <dt><i>showHidden</i> (bool)</dt>
593 <dd>
594 flag indicating to show hidden files as well
595 </dd>
596 </dl>
597 <dl>
598 <dt>Return:</dt>
599 <dd>
600 list containing the directory listing with tuple entries of
601 the name and and a tuple of mode, size and time (if fullstat is
602 false) or the complete stat() tuple. 'None' is returned in case the
603 directory doesn't exist.
604 </dd>
605 </dl>
606 <dl>
607 <dt>Return Type:</dt>
608 <dd>
609 tuple of (str, tuple)
610 </dd>
611 </dl>
612 <dl>
613
614 <dt>Raises <b>OSError</b>:</dt>
615 <dd>
616 raised to indicate an issue with the device
617 </dd>
618 </dl>
619 <a NAME="MicrobitDevice.ls" ID="MicrobitDevice.ls"></a>
620 <h4>MicrobitDevice.ls</h4>
621 <b>ls</b>(<i>dirname=""</i>)
622
623 <p>
624 Public method to get a directory listing of the connected device.
625 </p>
626 <dl>
627
628 <dt><i>dirname</i> (str)</dt>
629 <dd>
630 name of the directory to be listed
631 </dd>
632 </dl>
633 <dl>
634 <dt>Return:</dt>
635 <dd>
636 tuple containg the directory listing
637 </dd>
638 </dl>
639 <dl>
640 <dt>Return Type:</dt>
641 <dd>
642 tuple of str
643 </dd>
644 </dl>
645 <dl>
646
647 <dt>Raises <b>OSError</b>:</dt>
648 <dd>
649 raised to indicate an issue with the device
650 </dd>
651 </dl>
652 <a NAME="MicrobitDevice.pwd" ID="MicrobitDevice.pwd"></a>
653 <h4>MicrobitDevice.pwd</h4>
654 <b>pwd</b>(<i></i>)
655
656 <p>
657 Public method to get the current directory of the connected device.
658 </p>
659 <dl>
660 <dt>Return:</dt>
661 <dd>
662 current directory
663 </dd>
664 </dl>
665 <dl>
666 <dt>Return Type:</dt>
667 <dd>
668 str
533 </dd> 669 </dd>
534 </dl> 670 </dl>
535 <a NAME="MicrobitDevice.runScript" ID="MicrobitDevice.runScript"></a> 671 <a NAME="MicrobitDevice.runScript" ID="MicrobitDevice.runScript"></a>
536 <h4>MicrobitDevice.runScript</h4> 672 <h4>MicrobitDevice.runScript</h4>
537 <b>runScript</b>(<i>script</i>) 673 <b>runScript</b>(<i>script</i>)

eric ide

mercurial