Message 1 of 9
What's a good way to run an external script from within a python script add-in?

Not applicable
05-17-2020
01:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Right now I have a simple python fusion add-in script that by itself works fine, but when I try to get it to trigger an external script to run I'm running into problems. I have tried calling both
os.system("python scriptpath")
and
exec(open(scriptpath).read())
but in both cases the add-in will fail to trigger these scripts. I've verified through textboxes that the add-in reaches both these commands and gets past them without crashing, but fails to actually trigger the external script. I have also tried moving the script from its original location to one within the Fusion Scripts directory, but that doesn't change the outcome. I'm a newbie to Fusion add-ins so any help would be appreciated.