Basically to ease maintenance and reduce issues, I make soft links for relevant folders and files (bot.py, core/ and plugins/util/) in a different folder and then use ./bot.py to run it. This way I can have several different bots running different plugins, and update them all executing a single git pull on the original clean source folder.
sys.path[0] apparently refers to real file rather than link file, so it was accessing the original plugins folder. With this change it will use the path relative to the name as executed by Python. It's exactly the same if you're using a folder of skybot per bot.
Basically to ease maintenance and reduce issues, I make soft links for relevant folders and files (
bot.py
,core/
andplugins/util/
) in a different folder and then use./bot.py
to run it. This way I can have several different bots running different plugins, and update them all executing a singlegit pull
on the original clean source folder.sys.path[0]
apparently refers to real file rather than link file, so it was accessing the original plugins folder. With this change it will use the path relative to the name as executed by Python. It's exactly the same if you're using a folder of skybot per bot.