MCPcopy Index your code
hub / github.com/dothinking/PyAddin / update

Method update

pyaddin/main.py:45–61  ·  view source on GitHub ↗

Update add-in file (name.xlam) based on ribbon UI file (CustomUI.xml) under working path. Args: name (str) : the name of add-in to update (without the suffix ``.xlam``). quiet (bool): perform the process in the background if True.

(name:str, quiet:bool=True)

Source from the content-addressed store, hash-verified

43
44 @staticmethod
45 def update(name:str, quiet:bool=True):
46 '''Update add-in file (name.xlam) based on ribbon UI file (CustomUI.xml) under working path.
47
48 Args:
49 name (str) : the name of add-in to update (without the suffix ``.xlam``).
50 quiet (bool): perform the process in the background if True.
51 '''
52 filename = os.path.join(os.getcwd(), f'{name}.xlam')
53 addin = Addin(xlam_file=filename, visible=not quiet)
54
55 try:
56 addin.update()
57 except Exception as e:
58 logging.error(e)
59 addin.close()
60 else:
61 if quiet: addin.close()
62
63
64def main():

Callers

nothing calls this directly

Calls 3

updateMethod · 0.95
closeMethod · 0.95
AddinClass · 0.85

Tested by

no test coverage detected