eiverson_AQ

Stand-alone scripting and licensing question

Discussion created by eiverson_AQ on Mar 30, 2012
Latest reply on Apr 2, 2012 by mzcoyle
Is there a means to determine, when running a Python script in something like PythonWin or PyScripter, if the user already has an ArcGIS desktop license checked out and to use that license?  We have a number of floating ArcView and ArcInfo licenses, but the problem is when a user has ArcView Desktop product already open, the script will automatically snag an available ArcInfo license, leaving two licenses in use by the same user though only one is required.

I know adding "import arcview" before "import arcpy" at the beginning of the script will fix this, but then anyone running an ArcInfo Desktop application will snag an ArcView license and the problem is the same: two different concurrent licenses in use by the same user.

I want to be able to search for whichever license the user has already claimed from the concurrent license manager and to run the script using ONLY that claimed license (and any extensions it needs to check out along the way that aren't already checked out).  And all this needs to happen BEFORE importing the arcpy module, apparently. 

Thoughts?  Suggestions?  I'm stumped on how to do this before importing arcpy, since all the license checking tools seem to come along with that module and once it's imported, the 2nd licence gets grabbed.

Outcomes