2012年1月23日月曜日

Python Help Page

python help page

10 Easy Ways to Tame Python Scripting in ArcGIS

Python, or even scripting in general, can seem like a scary thing to those who have no background in computer languages. Even though it might seem difficult, there are many times where automating common workflows can be very helpful in speeding up the monotonous parts of GIS that we all have to do.

These 10 tips are some basic ways to learn Python and get you more comfortable using scripts. I myself had no background in scripting or programming before working at Esri. I have used all of these tips to gain the confidence and practice I needed to help support customers. And I still use them today!


Python for Bioinformatics (Chapman & Hall/CRC Mathematical & Computational Biology)
Learn more
Sebastian Bassi
  1. Understand the basics of Python's syntax rules.
    It's always helpful to get to know the language before you use it. See these links for more information on the Python language and syntax.
  • Use Esri training resources.
    Sometimes there is nothing better than taking a course. Whether it's self-paced or instructor led, it is good to see practical examples of how to use scripts in ArcGIS.
  • Links to all these courses and more can be found on the Esri Training site. (Click 'Find Training' and search for 'Python'.)
  • Visit Esri Web Help, Python Site Package, and tool samples.
    The online web-help offers many pages on Python, from classes and methods (in the ArcPy site package section) to samples of how a tool can be run from a script. This is a great place to start looking for how specific tools should be called up. Check out these links for a taste of Python in the web-help.
  • Read the Geoprocessing Blog.
    CherryPy Essentials: Rapid Python Web Application Development: Design, develop, test, and deploy your Python web applications easily
    Learn more
    Sylvain Hellegouarch

    Check out the official Geoprocessing Blog for posts from the Esri Geoprocessing Development team, including tips on using Models and Python scripts. Samples are included on some of the posts as well.
  • Visit the Python and Map Automation forums.
    Discuss issues and problems with other ArcGIS Python users.
  • Reference the Model and Script Tool Gallery.
    Check out what others have made, find the custom tool of your dreams, or upload your own python script tools and documentation at the Model and Script Tool Gallery.
  • Use the Python Window or an IDE (Integrated Development Environment).
    Python scripts are basically text files with a .py extension. You could write your script in notepad, but why do that when you can use an interface that will give you some extra writing help.

    IDE's are interfaces that help in script writing. Two common IDEs are IDLE and PythonWin. IDLE is automatically installed when you installed ArcGIS Desktop.
    PythonWin is available on our Desktop DVD or download to be separately installed.

    The Python Window, new at ArcGIS Desktop 10.0, allows you to use and test code within an open ArcGIS session. This is helpful when you want to see an end process say in ArcMap.

  • Create a model and export it to Python.
    This is a great place to start practicing syntax and parameter use. Build your model and then export it to python. Take a look at what is going on then modify the script to fit your needs.
  • Create a Python tool for someone else.
    Not sure what to write a script for? Ask someone for a workflow they want to automate then write a script. After the script is ready you can import it into a Geoprocessing tool for easy use.
  • Apply error handling methods within your script
    Using additional code to your script can help extract useful messages from failing codes. Tracebacks will allow you to take a look at where in the script exceptions are raised.

    These are our most popular posts: python help page

    EXTREMELY ... aggressive spotted python :/ - Aussie Pythons ...

    i am aproching the date of the first handleing of my spotted python, any help or advice would be apriciated of how to get her out or handle her. she is just over a year old and is a verty docile snake, or she seems docile at the ... read more

    Asking for Help/How to run python from HTML - PythonInfo Wiki

    I have no problem coding the python bit but how do I execute python script via HTML without going to a new page? Also does the python script have to be on the same PC as the website is hosted on, IE will it have to be on my ... read more

    [Announce] GTK + Python+GTK for Harmattan - Page 2 - maemo.org ...

    Hint: Change topic title and put in the title that you want help. something like [Announce/WIP] GTK + Python+GTK for Harmattan. Need help! ... Help us keep this wiki updated:N9(50) Tips and Tricks If you feel I have helped you ... read more

    Support Services Blog : 10 Easy Ways to Tame Python Scripting in ...

    Visit Esri Web Help, Python Site Package, and tool samples. The online web-help offers many pages on Python, from classes and methods (in the ArcPy site package section) to samples of how a tool can be run from a script. read more

    Related Posts



  • 0 コメント:

    コメントを投稿