Utilities¶
Utility functions for Nicotine+ plugins
This module contains utility functions that can be used by Nicotine+ plugins. These functions are not specific to any plugin and can be used by any plugin.
Example
from npc.utils import startfile, reload_plugin
# Open a file
startfile("path/to/music.mp3")
# Reload a Plugin
reload_plugin("MyPlugin", "AnotherPlugin", handler)
- npc.startfile(file)¶
Open a file with the platform’s default application
- npc.reload_plugin(name, plugin_id, handler)¶
Reload a plugin
Changed in version 0.4.1: Changed
plugin_nametoplugin_idas it is more accurate