get indigo directory, latest version installed

Posted on
Tue Mar 25, 2014 10:35 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

get indigo directory, latest version installed

This python code gets the path to the latest installed version of indigo and its version number

Code: Select all
import os
# find the latest indigo version number and path to indigo directories
found=False
for indi in range(5,100):  # we are optimistic for the future of indigo, starting with V5
   if os.path.isdir("/Library/Application Support/Perceptive Automation/Indigo "+str(indi)):
      found = True
      continue
   if found: break

#### and here the result for the Version number::
indigoVersion= indi-1

### and the path to indigo:
indigoPath = "/Library/Application Support/Perceptive Automation/Indigo "+str(indigoVersion)+"/"


Karl

Posted on
Tue Mar 25, 2014 10:53 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: get indigo directory, latest version installed

Hi Karl,

Here is the easier way (if you are calling from a plugin or Indigo python script):

Code: Select all
indigo.server.version
indigo.server.getInstallFolderPath()

:-)

Image

Posted on
Tue Mar 25, 2014 10:54 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: get indigo directory, latest version installed

thx

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests