arcpy.da intellisense in PyScripter

3875
8
Jump to solution
05-07-2012 07:18 AM
BKuiper
Occasional Contributor III
Hi,

arcpy.da intellisense doesn't seem to be working in PyScripter. I'm running 10.1 Prerelease.

Anybody has an idea on how to fix this?

Thank you!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DavidWynne
Esri Contributor
Hi Bjorn.

Short answer: execute 'import arcpy' from the Python Interpreter window and the arcpy.da dropdown's will appear.

Background:
The overriding goal for the data access module was speed.  As I'm sure you're aware the older cursor model wasn't nearly as fast.  As part of that, arcpy.da doesn't have the Python wrappers that provide the dropdown's that you see in most of arcpy.  Essentially, it was a trade-off between speed and IDE-friendliness, and in this case the criterion dictated speed trump.

-Dave

View solution in original post

0 Kudos
8 Replies
MathewCoyle
Frequent Contributor
Not sure what arcpy.da is. What extension does it require?
Edit: Nevermind, Data Access Module, new with 10.1.

Is it available in the python window in ArcGIS?
Did you upgrade this machine from 10 to 10.1? Did you uninstall the previous version of Python prior to installed the new Python?
0 Kudos
BKuiper
Occasional Contributor III
Indeed, the ArcPy DataAccess Module, part of 10.1. Yes my machine was upgraded from 10.0 to 10.1 BETA to 10.1 Prerelease, but I removed all the previous installed folders, including the Python folder.

The intellisense works in ArcCatalog but not in PyScripter.

Thanks for your time and help
0 Kudos
MathewCoyle
Frequent Contributor
In pyscripter, go to Tools > Python Path... do the folders show up as 10.0 or 10.1?

For my system, the critical one is this "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy"

If it is still referencing 10.0, just browse to the arcpy folder in your ArcGIS 10.1 install directory and add that path.

You will then have to restart pyscripter.
0 Kudos
BKuiper
Occasional Contributor III
Hi, that seems to be all set Ok, but it is still not working. Is there a way to determine what ArcCatalog uses for its Python window ?

(see attachment)
0 Kudos
MathewCoyle
Frequent Contributor
As far as I know, ArcGIS uses more built in functions for their intellisense, not directly referencing the python libraries that are being called. arcpy.env.workspace for example. Not sure if they compiled the da module in the same manner that wouldn't be available to external editors.
0 Kudos
BKuiper
Occasional Contributor III
I will just assume that this is a bug/not yet supported in 10.1 Prerelease.
0 Kudos
DavidWynne
Esri Contributor
Hi Bjorn.

Short answer: execute 'import arcpy' from the Python Interpreter window and the arcpy.da dropdown's will appear.

Background:
The overriding goal for the data access module was speed.  As I'm sure you're aware the older cursor model wasn't nearly as fast.  As part of that, arcpy.da doesn't have the Python wrappers that provide the dropdown's that you see in most of arcpy.  Essentially, it was a trade-off between speed and IDE-friendliness, and in this case the criterion dictated speed trump.

-Dave
0 Kudos
BKuiper
Occasional Contributor III
Alright, that works. thanks for your explanation.
0 Kudos