gdnative_python/docs/io.rst

21 lines
781 B
ReStructuredText
Raw Normal View History

IO model
========
Python is supposed to interact with outside world (i.e. everything
outside the interpretor) through numerous ways:
- ``open`` and ``input`` builtin functions.
- ``os`` module (e.g. ``os.open`` function)
- ``stdout``, ``stderr`` and ``stdin`` files descriptors
- ``__import__`` & co
- ``ctypes`` & micropython's ``ffi`` libraries
- ...
However those functions are no longer relevant when python is embedded
2023-06-02 11:31:19 +02:00
into Pandemonium. They can even be dangerous when opening a Pandemonium application to
modding given a 3rd party python code has suddently full access to the computer !
2023-06-02 11:31:19 +02:00
Hence, those functions needs to be adapted to Pandemonium:
- ``ctype``, ``ffi`` and ``open`` disabled
2023-06-02 11:31:19 +02:00
- ``stdout``, ``stderr`` and ``stdin`` redirected to Pandemonium editor's console