============================= Modules and Top-level Methods ============================= Modules ======= .. toctree:: :maxdepth: 2 :hidden: dbus evdev event file hwinfo log lua misc os spawn udev xorg .. list-table:: :header-rows: 0 * - :doc:`dbus ` - D-Bus * - :doc:`evdev ` - evdev * - :doc:`event ` - Core events * - :doc:`file ` - File events * - :doc:`hwinfo ` - hwinfo * - :doc:`log ` - Logging * - :doc:`lua ` - Lua scripting * - :doc:`misc ` - misc * - :doc:`os ` - OS environment * - :doc:`roots ` - Get roots * - :doc:`spawn ` - Spawn child processes * - :doc:`udev ` - udev * - :doc:`xorg ` - Xorg Methods ======= .. list-table:: :header-rows: 0 * - :lua:meth:`chdir(dir) ` - Change working directory * - :lua:meth:`exec(argv) ` - Execute another binary * - :lua:meth:`exit(exit_code) ` - Exit deai * - :lua:meth:`load_plugin(file) ` - Load a single plugin * - :lua:meth:`load_plugin_from_dir(path) ` - Load plugins from a directory * - :lua:meth:`quit() ` - Exit deai * - :lua:meth:`register_module(name, module) ` - Register a module .. lua:method:: chdir(dir) -> integer :rtype: integer :type dir: string :param dir: Change working directory .. lua:method:: exec(argv) -> integer :rtype: integer :type argv: [string] :param argv: Execute another binary This call replaces the current process by running another binary. One use case for this is to restart deai. .. lua:method:: exit(exit_code) -> void :rtype: void :type exit_code: integer :param exit_code: Exit deai Instruct deai to exit. deai won't exit immediately when the function is called, it will exit next time the control returns to the mainloop. (e.g. after your script finished running). .. lua:method:: load_plugin(file) -> void :rtype: void :type file: string :param file: Load a single plugin .. lua:method:: load_plugin_from_dir(path) -> integer :rtype: integer :type path: string :param path: Load plugins from a directory .. lua:method:: quit() -> void :rtype: void Exit deai Equivalent to :code:`exit(0)` .. lua:method:: register_module(name, module) -> integer :rtype: integer :type name: string :param name: :type module: :lua:mod:`module ` :param module: Register a module