Select to view content in your preferred language

Intellisense in PythonWin

1524
4
02-17-2012 06:31 AM
Zeke
by
Honored Contributor
Sorry of maybe this should go under the Installation forum. Anyway, I just installed Pythonwin (from a download, not the installation disc, which some administrator has). None of the intellisense pops up. Is this correct? I seem to remember that it did pop up in an earlier install on a different machine. Thanks.
Oh, and I did add C:\Python26\ArcGIS10.0 to the PATH variable.
Well, now it does pop up, but not consistently. For example, if I type 'arcpy.', nothing pops up the first time. I then type 'arcpy.env'. From then on, 'env' will pop up, but no other properties. The same with functions like 'Select_analysis'; nothing the first time, but it will show up subsequently. The os properties pop up, but they're part of Python, not arcpy. What am I missing?
Tags (2)
0 Kudos
4 Replies
KimOllivier
Honored Contributor
To get intellisense to work in Pythonwin, you have to check out a licence first.

Check out a licence by going to the interactive window in Pythonwin (not the Python window in ArcMap) and type in

import arcpy


Then wait a few moments until you have a licence.
At 10 if you only want to check out a lower licence in a mixed enterprise environment then type in
import arcview
import arcpy


I do not know of a way of automating this each time you open Pythonwin, but maybe there is a way. Someone?
0 Kudos
MathewCoyle
Honored Contributor
You can look at pyscripter, it has intellisense enabled by default without the need for a license. I find it far superior to PythonWin for my purposes, but to each their own.
http://code.google.com/p/pyscripter/
0 Kudos
KimOllivier
Honored Contributor
Intellisense is available for python modules in Pythonwin by default, but not ArcGIS tools. Are you sure that you can get intellisense for arcpy.* functions?
0 Kudos
MathewCoyle
Honored Contributor
If you are asking about pyscripter and arcpy, yes it is by default. Any module imported in the script has intellisense enabled, without having to actually import the module via the built in interpreter. No license is checked out in the case of arcpy.

[ATTACH=CONFIG]12107[/ATTACH]
0 Kudos