Re: PythonWin -vs- Idle

Discussion in 'Python' started by Steve Holden, Feb 27, 2009.

  1. Steve Holden

    Steve Holden Guest

    Chris Rebert wrote:
    > On Thu, Feb 26, 2009 at 2:23 PM, Gary Schells <> wrote:
    >> Hello,
    >> Python newbie here. I am working with Python and geoprocessing in ArcGIS.
    >> I'm taking a training course online and the exercise I'm working on makes
    >> mention of using PythonWin instead of Idle.
    >>
    >> I am using version 2.5 and have not been able to locate PythonWin. The
    >> download just includes Idle for the environment. Can anyone point me in the
    >> right direction to download the PythonWin piece of this puzzle?

    >
    > Seems to be included in http://sourceforge.net/projects/pywin32/
    >

    And it's well worth getting, since it's the recommended programming
    environment for ArcGIS. IIRC it uses the COM server capabilities to
    achieve some of the required magic.

    regards
    Steve
    --
    Steve Holden +1 571 484 6266 +1 800 494 3119
    Holden Web LLC http://www.holdenweb.com/
     
    Steve Holden, Feb 27, 2009
    #1
    1. Advertising

  2. On 27 Feb, 01:40, Steve Holden <> wrote:
    > Chris Rebert wrote:
    > > On Thu, Feb 26, 2009 at 2:23 PM, Gary Schells <> wrote:
    > >> Hello,
    > >> Python newbie here.  I am working with Python and geoprocessing in ArcGIS.
    > >> I'm taking a training course online and the exercise I'm working on makes
    > >> mention of using PythonWin instead of Idle.

    >
    > >> I am using version 2.5 and have not been able to locate PythonWin.  The
    > >> download just includes Idle for the environment.  Can anyone point me in the
    > >> right direction to download the PythonWin piece of this puzzle?

    >
    > > Seems to be included inhttp://sourceforge.net/projects/pywin32/

    >
    > And it's well worth getting, since it's the recommended programming
    > environment for ArcGIS. IIRC it uses the COM server capabilities to
    > achieve some of the required magic.


    It's the recommended programming environment in ESRI's geoprocessing
    classes.
    The only stuff that is specific to PythonWin is the debugging, (which
    you can
    do in IDLE too, just in a slightly different way).

    Personally I do most of my python hacking in emacs, both when my code
    calls
    arcgisscripting and otherwise. Sometimes I use IDLE, since in emacs
    (and PythonWin)
    I miss the ability to restart the interpreter process to get a clean
    environment.

    There is one thing I use the pywin32 library for, and that is a little
    hack to
    get around the issue that each version of ArcGIS is bound to a
    specific python version:

    try:
    import arcgisscripting
    except ImportError:
    import win32com.client
    class arcgisscripting(object):
    @staticmethod
    def create():
    return win32com.client.Dispatch
    ('esriGeoprocessing.GpDispatch.1')

    With this little code snippet in a utility module, I can use python
    2.6 with ArcGIS, and I can test my scritps with python 2.4, to ensure
    that they run in ArcGIS 9.2 environments.

    /Niklas Norrthon
     
    Niklas Norrthon, Feb 27, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. stephan
    Replies:
    0
    Views:
    449
    stephan
    Jul 30, 2003
  2. Pete Jereb
    Replies:
    1
    Views:
    376
    Nick Vargish
    Oct 2, 2003
  3. Tuure Laurinolli

    IDLE; Pythonwin and windows network drives

    Tuure Laurinolli, Jul 1, 2004, in forum: Python
    Replies:
    3
    Views:
    393
    David Fraser
    Jul 1, 2004
  4. Tim Rice
    Replies:
    1
    Views:
    454
    Tom B.
    Aug 28, 2004
  5. Chris Munchenberg

    wxTheClipboard problem, IDLE vs PythonWin

    Chris Munchenberg, Oct 7, 2004, in forum: Python
    Replies:
    0
    Views:
    343
    Chris Munchenberg
    Oct 7, 2004
Loading...

Share This Page