I'd like to be able to set the users license level using arcpy (ArcGIS Pro). This was possible by using import arcedit/arcinfo/arcview in the python 2 implementation of arcpy. It's extremely useful, particularly when managing limited concurrent licences.
Pro's licensing is handled differently than ArcMap's which is why you probably found the arcpy CheckProduct method but no SetProduct (it is in the geoprocessor module ... gp.setProduct )
Licenses and extensions access in Python—ArcGIS Pro | Documentation
I doubt that esri will roll back the changes.
on a side note, the import arcinfo, arceditor etc are located in this folder
C:\...Your Install Folder ...\Resources\ArcPy
which also contains the arcpy folder which is imported when you .... import arcpy
You might want to have a look and see which verison of arcgisscripting is instantiated if you imported one of those
Unlike ArcMap the Pro license is by user and not by machine.
If you set user A to basic and user B to standard and you run your stand alone python under user B it should work.
If you run your script inside Pro (as GP tool or in python window) it will use Pro license but this is just like ArcMap.
Have fun
Thanks for the info.
I understand that licensing is by user. So what you're saying is that using import <license level> for a script tool run within Pro will work then?
import <license level> does not work at all for arcpy 3.x
The only way to control license level for stand alone script is to run it under a user that have the needed license setting
Which is exactly what I want to avoid. We have users that technically have access to a higher license level but we want to control the way they check it out - only check out a standard or advanced license for certain script tools and then back to basic on completion without relying on the user to do it for us.
Moving to Python Ideas forum.