import arcinfo/SetProduct

569
2
04-15-2013 05:11 PM
MatthewBrown1
Occasional Contributor
Hi,

I often use:

import arcinfo
import arcpy


in my Python IDE (see http://resources.arcgis.com/en/help/main/10.1/index.html#/SetProduct/018v00000009000000/) to save mucking about switching licenses and firing up new sessions of ArcGIS Desktop, but would like to force the return of a floating ARC/INFO license without closing down my Python IDE.

I've tired importing the module as part of a function and this affects the scope of the imports but still hangs on to an ARC/INFO license.

It would be great if there was something like:

arcpy.CheckInProduct("ArcInfo")


Any ideas?

Thanks,

Matt
Tags (2)
0 Kudos
2 Replies
Luke_Pinner
MVP Regular Contributor
I don't think there's any way of releasing the license without restarting the IDE's python process.

That said... I use an IDE called PyScripter which has a remote debugger. This means it can be restarted (or crashed...) without restarting (or crashing...) the entire IDE.  To restart the remote python process and release a license after running an ArcPy script, right click the python interpreter section of the IDE and select Python Engine->Reinitialize Python Engine. See attached screenshot. Or hit Ctrl+F2.

[ATTACH=CONFIG]23535[/ATTACH]
0 Kudos
MatthewBrown1
Occasional Contributor
Thanks for the tip! Works well.

PyScripter looks pretty good.
0 Kudos