Line 1: |
Line 1: |
− | {{Template: Networking_rutos_manual_fw_disclosure | + | {{Template: Networking_device_manual_fw_disclosure |
− | | fw_version ={{Template: Networking_rutos_manual_latest_fw | + | | series = {{{series}}} |
| + | | name = {{{name}}} |
| + | | fw_version ={{Template: Networking_device_manual_latest_fw |
| | series = {{{series}}} | | | series = {{{series}}} |
| | name = {{{name}}} | | | name = {{{name}}} |
| }} | | }} |
| }} | | }} |
− | | + | __TOC__ |
| ==Summary== | | ==Summary== |
| | | |
| <b>Python</b> is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. | | <b>Python</b> is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. |
| | | |
| + | Teltonika <b>Python3</b> package uses Python version <b>3.9.7</b>. The list of all modules included in the package can be found bellow. |
| ---- | | ---- |
| | | |
− | This manual page provides an overview of Python functionality in {{{name}}} devices. | + | This manual page provides an overview of Python3 functionality in {{{name}}} devices. |
− | | |
− | <b>Note:</b> Python is additional software that can be installed from the <b>Services → [[{{{name}}} Package Manager|Package Manager]]</b> page.
| |
| | | |
− | <b>Python3</b> package has Python version 3.9 and these modules: | + | <b>Note:</b> Python is additional software that can be installed from the <b>System → [[{{{name}}} Package Manager|Package Manager]]</b> page. |
− | <ul> | |
− | <li>cgitb</li>
| |
− | <li>email</li>
| |
− | <li>codecs</li>
| |
− | <li>distutils</li>
| |
− | <li>cgi</li>
| |
− | <li>asyncio</li>
| |
− | <li>pydoc</li>
| |
− | <li>ncurses (curses)</li>
| |
− | <li>decimal</li>
| |
− | <li>unittest</li>
| |
− | <li>xml</li>
| |
− | <li>readline</li>
| |
− | <li>openssl (ssl)</li>
| |
− | <li>urllib</li>
| |
− | <li>multiprocessing</li>
| |
− | <li>logging</li>
| |
− | <li>sqlite3</li>
| |
− | </ul>
| |
| | | |
| <span style="color:#d33">'''Disclaimer: before installing Python3 package make sure that the target device has a sufficient amount of free storage space!!!'''</span> | | <span style="color:#d33">'''Disclaimer: before installing Python3 package make sure that the target device has a sufficient amount of free storage space!!!'''</span> |
| | | |
− | ==Python Usage== | + | ==Python3 Usage== |
| | | |
| After installing the package a new command will become available in [[Command_Line_Interfaces_RutOS|CLI (Command-line interface)]] which enables the device to invoke Python scripts or program files and allows access to the Python interpreter interface. | | After installing the package a new command will become available in [[Command_Line_Interfaces_RutOS|CLI (Command-line interface)]] which enables the device to invoke Python scripts or program files and allows access to the Python interpreter interface. |
Line 111: |
Line 93: |
| root@Teltonika-RUTXXX:~# | | root@Teltonika-RUTXXX:~# |
| </pre> | | </pre> |
| + | |
| + | ==Python3 Modules== |
| + | <table class="nd-othertables"> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">abc</td> |
| + | <td style="width: 200px; font-weight: normal;">codeop</td> |
| + | <td style="width: 200px; font-weight: normal;">fcntl</td> |
| + | <td style="width: 200px; font-weight: normal;">io</td> |
| + | <td style="width: 200px; font-weight: normal;">pathlib</td> |
| + | <td style="width: 200px; font-weight: normal;">resource</td> |
| + | <td style="width: 200px; font-weight: normal;">struct</td> |
| + | <td style="width: 200px; font-weight: normal;">unicodedata</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">aifc</td> |
| + | <td style="width: 200px; font-weight: normal;">collections</td> |
| + | <td style="width: 200px; font-weight: normal;">filecmp</td> |
| + | <td style="width: 200px; font-weight: normal;">ipaddress</td> |
| + | <td style="width: 200px; font-weight: normal;">pdb</td> |
| + | <td style="width: 200px; font-weight: normal;">rlcompleter</td> |
| + | <td style="width: 200px; font-weight: normal;">subprocess</td> |
| + | <td style="width: 200px; font-weight: normal;">unittest</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">antigravity</td> |
| + | <td style="width: 200px; font-weight: normal;">colorsys</td> |
| + | <td style="width: 200px; font-weight: normal;">fileinput</td> |
| + | <td style="width: 200px; font-weight: normal;">itertools</td> |
| + | <td style="width: 200px; font-weight: normal;">pickle</td> |
| + | <td style="width: 200px; font-weight: normal;">runpy</td> |
| + | <td style="width: 200px; font-weight: normal;">sunau</td> |
| + | <td style="width: 200px; font-weight: normal;">urllib</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">argparse</td> |
| + | <td style="width: 200px; font-weight: normal;">compileall</td> |
| + | <td style="width: 200px; font-weight: normal;">fnmatch</td> |
| + | <td style="width: 200px; font-weight: normal;">json</td> |
| + | <td style="width: 200px; font-weight: normal;">pickletools</td> |
| + | <td style="width: 200px; font-weight: normal;">sched</td> |
| + | <td style="width: 200px; font-weight: normal;">symbol</td> |
| + | <td style="width: 200px; font-weight: normal;">uu</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">array</td> |
| + | <td style="width: 200px; font-weight: normal;">concurrent</td> |
| + | <td style="width: 200px; font-weight: normal;">formatter</td> |
| + | <td style="width: 200px; font-weight: normal;">keyword</td> |
| + | <td style="width: 200px; font-weight: normal;">pipes</td> |
| + | <td style="width: 200px; font-weight: normal;">secrets</td> |
| + | <td style="width: 200px; font-weight: normal;">symtable</td> |
| + | <td style="width: 200px; font-weight: normal;">uuid</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">ast</td> |
| + | <td style="width: 200px; font-weight: normal;">configparser</td> |
| + | <td style="width: 200px; font-weight: normal;">fractions</td> |
| + | <td style="width: 200px; font-weight: normal;">linecache</td> |
| + | <td style="width: 200px; font-weight: normal;">pkgutil</td> |
| + | <td style="width: 200px; font-weight: normal;">select</td> |
| + | <td style="width: 200px; font-weight: normal;">sys</td> |
| + | <td style="width: 200px; font-weight: normal;">venv</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">asynchat</td> |
| + | <td style="width: 200px; font-weight: normal;">contextlib</td> |
| + | <td style="width: 200px; font-weight: normal;">ftplib</td> |
| + | <td style="width: 200px; font-weight: normal;">locale</td> |
| + | <td style="width: 200px; font-weight: normal;">platform</td> |
| + | <td style="width: 200px; font-weight: normal;">selectors</td> |
| + | <td style="width: 200px; font-weight: normal;">sysconfig</td> |
| + | <td style="width: 200px; font-weight: normal;">warnings</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">asyncio</td> |
| + | <td style="width: 200px; font-weight: normal;">contextvars</td> |
| + | <td style="width: 200px; font-weight: normal;">functools</td> |
| + | <td style="width: 200px; font-weight: normal;">logging</td> |
| + | <td style="width: 200px; font-weight: normal;">plistlib</td> |
| + | <td style="width: 200px; font-weight: normal;">shelve</td> |
| + | <td style="width: 200px; font-weight: normal;">syslog</td> |
| + | <td style="width: 200px; font-weight: normal;">wave</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">asyncore</td> |
| + | <td style="width: 200px; font-weight: normal;">copy</td> |
| + | <td style="width: 200px; font-weight: normal;">gc</td> |
| + | <td style="width: 200px; font-weight: normal;">mailbox</td> |
| + | <td style="width: 200px; font-weight: normal;">poplib</td> |
| + | <td style="width: 200px; font-weight: normal;">shlex</td> |
| + | <td style="width: 200px; font-weight: normal;">tabnanny</td> |
| + | <td style="width: 200px; font-weight: normal;">weakref</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">atexit</td> |
| + | <td style="width: 200px; font-weight: normal;">copyreg</td> |
| + | <td style="width: 200px; font-weight: normal;">genericpath</td> |
| + | <td style="width: 200px; font-weight: normal;">mailcap</td> |
| + | <td style="width: 200px; font-weight: normal;">posix</td> |
| + | <td style="width: 200px; font-weight: normal;">shutil</td> |
| + | <td style="width: 200px; font-weight: normal;">tarfile</td> |
| + | <td style="width: 200px; font-weight: normal;">wsgiref</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">audioop</td> |
| + | <td style="width: 200px; font-weight: normal;">crypt</td> |
| + | <td style="width: 200px; font-weight: normal;">getopt</td> |
| + | <td style="width: 200px; font-weight: normal;">marshal</td> |
| + | <td style="width: 200px; font-weight: normal;">posixpath</td> |
| + | <td style="width: 200px; font-weight: normal;">signal</td> |
| + | <td style="width: 200px; font-weight: normal;">telnetlib</td> |
| + | <td style="width: 200px; font-weight: normal;">xdrlib</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">base64</td> |
| + | <td style="width: 200px; font-weight: normal;">csv</td> |
| + | <td style="width: 200px; font-weight: normal;">getpass</td> |
| + | <td style="width: 200px; font-weight: normal;">math</td> |
| + | <td style="width: 200px; font-weight: normal;">pprint</td> |
| + | <td style="width: 200px; font-weight: normal;">site</td> |
| + | <td style="width: 200px; font-weight: normal;">tempfile</td> |
| + | <td style="width: 200px; font-weight: normal;">xml</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">bdb</td> |
| + | <td style="width: 200px; font-weight: normal;">ctypes</td> |
| + | <td style="width: 200px; font-weight: normal;">gettext</td> |
| + | <td style="width: 200px; font-weight: normal;">mimetypes</td> |
| + | <td style="width: 200px; font-weight: normal;">profile</td> |
| + | <td style="width: 200px; font-weight: normal;">smtpd</td> |
| + | <td style="width: 200px; font-weight: normal;">termios</td> |
| + | <td style="width: 200px; font-weight: normal;">xmlrpc</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">binascii</td> |
| + | <td style="width: 200px; font-weight: normal;">curses</td> |
| + | <td style="width: 200px; font-weight: normal;">glob</td> |
| + | <td style="width: 200px; font-weight: normal;">mmap</td> |
| + | <td style="width: 200px; font-weight: normal;">pstats</td> |
| + | <td style="width: 200px; font-weight: normal;">smtplib</td> |
| + | <td style="width: 200px; font-weight: normal;">textwrap</td> |
| + | <td style="width: 200px; font-weight: normal;">xxlimited</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">binhex</td> |
| + | <td style="width: 200px; font-weight: normal;">dataclasses</td> |
| + | <td style="width: 200px; font-weight: normal;">graphlib</td> |
| + | <td style="width: 200px; font-weight: normal;">modulefinder</td> |
| + | <td style="width: 200px; font-weight: normal;">pty</td> |
| + | <td style="width: 200px; font-weight: normal;">sndhdr</td> |
| + | <td style="width: 200px; font-weight: normal;">this</td> |
| + | <td style="width: 200px; font-weight: normal;">xxsubtype</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">bisect</td> |
| + | <td style="width: 200px; font-weight: normal;">datetime</td> |
| + | <td style="width: 200px; font-weight: normal;">grp</td> |
| + | <td style="width: 200px; font-weight: normal;">multiprocessing</td> |
| + | <td style="width: 200px; font-weight: normal;">pwd</td> |
| + | <td style="width: 200px; font-weight: normal;">socket</td> |
| + | <td style="width: 200px; font-weight: normal;">threading</td> |
| + | <td style="width: 200px; font-weight: normal;">zipapp</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">builtins</td> |
| + | <td style="width: 200px; font-weight: normal;">dbm</td> |
| + | <td style="width: 200px; font-weight: normal;">gzip</td> |
| + | <td style="width: 200px; font-weight: normal;">netrc</td> |
| + | <td style="width: 200px; font-weight: normal;">py_compile</td> |
| + | <td style="width: 200px; font-weight: normal;">socketserver</td> |
| + | <td style="width: 200px; font-weight: normal;">time</td> |
| + | <td style="width: 200px; font-weight: normal;">zipfile</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">bz2</td> |
| + | <td style="width: 200px; font-weight: normal;">decimal</td> |
| + | <td style="width: 200px; font-weight: normal;">hashlib</td> |
| + | <td style="width: 200px; font-weight: normal;">nntplib</td> |
| + | <td style="width: 200px; font-weight: normal;">pyclbr</td> |
| + | <td style="width: 200px; font-weight: normal;">spwd</td> |
| + | <td style="width: 200px; font-weight: normal;">timeit</td> |
| + | <td style="width: 200px; font-weight: normal;">zipimport</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">cProfile</td> |
| + | <td style="width: 200px; font-weight: normal;">difflib</td> |
| + | <td style="width: 200px; font-weight: normal;">heapq</td> |
| + | <td style="width: 200px; font-weight: normal;">ntpath</td> |
| + | <td style="width: 200px; font-weight: normal;">pydoc</td> |
| + | <td style="width: 200px; font-weight: normal;">sqlite3</td> |
| + | <td style="width: 200px; font-weight: normal;">token</td> |
| + | <td style="width: 200px; font-weight: normal;">zlib</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">calendar</td> |
| + | <td style="width: 200px; font-weight: normal;">dis</td> |
| + | <td style="width: 200px; font-weight: normal;">hmac</td> |
| + | <td style="width: 200px; font-weight: normal;">nturl2path</td> |
| + | <td style="width: 200px; font-weight: normal;">pydoc_data</td> |
| + | <td style="width: 200px; font-weight: normal;">sre_compile</td> |
| + | <td style="width: 200px; font-weight: normal;">tokenize</td> |
| + | <td style="width: 200px; font-weight: normal;">zoneinfo</td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">cgi</td> |
| + | <td style="width: 200px; font-weight: normal;">distutils</td> |
| + | <td style="width: 200px; font-weight: normal;">html</td> |
| + | <td style="width: 200px; font-weight: normal;">numbers</td> |
| + | <td style="width: 200px; font-weight: normal;">pyexpat</td> |
| + | <td style="width: 200px; font-weight: normal;">sre_constants</td> |
| + | <td style="width: 200px; font-weight: normal;">trace</td> |
| + | <td style="width: 200px; font-weight: normal;"></td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">cgitb</td> |
| + | <td style="width: 200px; font-weight: normal;">doctest</td> |
| + | <td style="width: 200px; font-weight: normal;">http</td> |
| + | <td style="width: 200px; font-weight: normal;">opcode</td> |
| + | <td style="width: 200px; font-weight: normal;">queue</td> |
| + | <td style="width: 200px; font-weight: normal;">sre_parse</td> |
| + | <td style="width: 200px; font-weight: normal;">traceback</td> |
| + | <td style="width: 200px; font-weight: normal;"></td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">chunk</td> |
| + | <td style="width: 200px; font-weight: normal;">email</td> |
| + | <td style="width: 200px; font-weight: normal;">imaplib</td> |
| + | <td style="width: 200px; font-weight: normal;">operator</td> |
| + | <td style="width: 200px; font-weight: normal;">quopri</td> |
| + | <td style="width: 200px; font-weight: normal;">ssl</td> |
| + | <td style="width: 200px; font-weight: normal;">tracemalloc</td> |
| + | <td style="width: 200px; font-weight: normal;"></td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">cmath</td> |
| + | <td style="width: 200px; font-weight: normal;">encodings</td> |
| + | <td style="width: 200px; font-weight: normal;">imghdr</td> |
| + | <td style="width: 200px; font-weight: normal;">optparse</td> |
| + | <td style="width: 200px; font-weight: normal;">random</td> |
| + | <td style="width: 200px; font-weight: normal;">stat</td> |
| + | <td style="width: 200px; font-weight: normal;">tty</td> |
| + | <td style="width: 200px; font-weight: normal;"></td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">cmd</td> |
| + | <td style="width: 200px; font-weight: normal;">enum</td> |
| + | <td style="width: 200px; font-weight: normal;">imp</td> |
| + | <td style="width: 200px; font-weight: normal;">os</td> |
| + | <td style="width: 200px; font-weight: normal;">re</td> |
| + | <td style="width: 200px; font-weight: normal;">statistics</td> |
| + | <td style="width: 200px; font-weight: normal;">turtle</td> |
| + | <td style="width: 200px; font-weight: normal;"></td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">code</td> |
| + | <td style="width: 200px; font-weight: normal;">errno</td> |
| + | <td style="width: 200px; font-weight: normal;">importlib</td> |
| + | <td style="width: 200px; font-weight: normal;">ossaudiodev</td> |
| + | <td style="width: 200px; font-weight: normal;">readline</td> |
| + | <td style="width: 200px; font-weight: normal;">string</td> |
| + | <td style="width: 200px; font-weight: normal;">types</td> |
| + | <td style="width: 200px; font-weight: normal;"></td> |
| + | </tr> |
| + | <tr> |
| + | <td style="width: 200px; font-weight: normal;">codecs</td> |
| + | <td style="width: 200px; font-weight: normal;">faulthandler</td> |
| + | <td style="width: 200px; font-weight: normal;">inspect</td> |
| + | <td style="width: 200px; font-weight: normal;">parser</td> |
| + | <td style="width: 200px; font-weight: normal;">reprlib</td> |
| + | <td style="width: 200px; font-weight: normal;">stringprep</td> |
| + | <td style="width: 200px; font-weight: normal;">typing</td> |
| + | <td style="width: 200px; font-weight: normal;"></td> |
| + | </tr> |
| + | </table> |
| + | |
| | | |
| [[Category:{{{name}}} Services section]] | | [[Category:{{{name}}} Services section]] |