I have a Python script which I want to execute using Python Add-In button class. Right now, I am using following:
class child(object):
"""Implementation for Toolbar_addin.button2 (Button)"""
def __init__(self):
self.enabled = True
self.checked = False
def onClick(self):
os.system('C:/temp/child.py')
but it returns nothing when I click Python Add-In button as part of sub-menu. Is it the right way to fire child scripts using button class?
Note: child script works perfectly as a stand alone script
import child
and then you can call any of the methods.sys.path.append("C:\\Temp")
thenimport child