@@ -416,25 +416,84 @@ Classes
416416~~~~~~~
417417
418418.. autoclass :: flipperzero.UART
419- :members: read, readline, readlines, write, flush
419+ :members: read, readline, readlines, write, flush, close, __enter__, __exit__, __del__
420+
421+ Logging
422+ -------
423+
424+ Log messages to the Flipper's own logging backend.
425+ Check out the `Flipper Zero docs <https://docs.flipper.net/development/cli#_yZ2E >`_ on how to reveal them in the CLI.
426+ Be aware, that you can't change Flipper's global log level from within your script.
427+ Change the `corresponding settings <https://docs.flipper.net/basics/settings#d5TAt >`_ instead or use the **log ** command in the CLI with the desired log level as the first argument.
428+
429+ Levels
430+ ~~~~~~
431+
432+ .. autodata :: logging.TRACE
433+ .. autodata :: logging.DEBUG
434+ .. autodata :: logging.INFO
435+ .. autodata :: logging.WARN
436+ .. autodata :: logging.ERROR
437+ .. autodata :: logging.NONE
438+ .. autodata :: logging.level
439+
440+ Functions
441+ ~~~~~~~~~
442+
443+ .. autofunction :: logging.setLevel
444+ .. autofunction :: logging.getEffectiveLevel
445+ .. autofunction :: logging.trace
446+ .. autofunction :: logging.debug
447+ .. autofunction :: logging.info
448+ .. autofunction :: logging.warn
449+ .. autofunction :: logging.error
450+ .. autofunction :: logging.log
451+
452+ I/O
453+ ---
454+
455+ Constants
456+ ~~~~~~~~~
457+
458+ .. autodata :: io.SEEK_SET
459+ .. autodata :: io.SEEK_CUR
460+ .. autodata :: io.SEEK_END
461+
462+ Functions
463+ ~~~~~~~~~
464+
465+ .. autofunction :: io.open
466+
467+ Classes
468+ ~~~~~~~
469+
470+ .. autoclass :: io.BinaryFileIO
471+ :members: name, read, readline, readlines, readable, writable, write, flush, seek, tell, close, __enter__, __exit__, __del__
472+
473+ .. autoclass :: io.TextFileIO
474+ :members: name, read, readline, readlines, readable, writable, write, flush, seek, tell, close, __enter__, __exit__, __del__
420475
421476Built-In
422477--------
423478
424479The functions in this section are `not ` part of the ``flipperzero `` module.
425480They're members of the global namespace instead.
426481
427- .. py :function :: print (* objects, sep= ' ' , end= ' \n ' , file = None , flush = False ) -> None
482+ .. py :function :: print (* objects, sep= ' ' , end= ' \n ' ) -> None
428483
429484 The standard Python `print <https://docs.python.org/3/library/functions.html#print >`_ function.
485+ Where the output of this function will be redirected depends on how the script is invoked:
486+
487+ * When invoked from the UI, the output will be sent to the Flipper's log buffer.
488+ Check out the `Flipper Zero docs <https://docs.flipper.net/development/cli#_yZ2E >`_ on how to view them in the CLI interface.
489+ * In the REPL, the output will be sent to the standard output buffer.
490+ * When invoked by the **py ** command, the output will be sent to the standard output buffer.
430491
431492 :param objects: The objects to print (mostly a single string).
432493 :param sep: The separator to use between the objects.
433494 :param end: The line terminator character to use.
434495
435496 .. versionadded :: 1.0.0
497+ .. versionchanged :: 1.5.0
436498
437- .. attention ::
438-
439- This function prints to the internal log buffer.
440- Check out the `Flipper Zero docs <https://docs.flipper.net/development/cli#_yZ2E >`_ on how to reveal them in the CLI interface.
499+ Output redirection, based on script invocation.
0 commit comments