What is the best way to study python?

2053
13
09-17-2019 05:34 AM
RPGIS
by
Occasional Contributor III

Hi,

I know this is a very simple question, but I know some python to understand some of the basics and I was wondering what would be the best possible solution, or direction, for studying python. I still struggle with small scripts from time to time, with very small number of them actually working the way I intended. So I just wanted to see if anyone has any suggestions on how to go about this.

The other thing is I came across other sites and other sources of python examples that I would eventually like to be at or close to the level of a novice python developer. Eventually I would like to expand on that even further, but as of now I can handle small scripts here and there and so I am starting out low and slow.

Here are somethings that I came across that I would like to know more about and be able to understand and utilize.

Any of the Esri breakdowns for tools and such

10. API Reference — Python 2.7.16 documentation

tkinter — Python interface to Tcl/Tk — Python 3.7.4 documentation 

Python Gui examples/scripts

13 Replies
HenryLindemann
Esri Contributor

So Before you even go into the Arcpy or ArcGIS Modules build up a base understanding of python

ArcGIS Desktop is using Python 2.7 

ArcGIS Pro is using Python 3.x

I came across this excellent course in Udemy it is well worth your time for learning python.

https://www.udemy.com/share/1000dOAkQddFhXRnQ=/ 

A Great Resource for ArcGIS module is the ArcGIS API for Python | ArcGIS for Developers  site t because this module is becoming more and more relevant and is definitely the future of Python GIS in my opinion.

for tools in ArcGIS pro have a look at this.

https://pro.arcgis.com/en/pro-app/tool-reference

and for ArcMAP

https://desktop.arcgis.com/en/arcmap/latest/tools

And Keep in mind python 2.7 is retiring 

Python 2.7 Countdown 

0 Kudos
RPGIS
by
Occasional Contributor III

Thanks Henry,

I will definitely take a look at those when I get the chance. I am still practicing python at work to see if I can script tools simple and straight forward enough that I can fill in the gaps where I find them. I will keep creating and modifying the scripts to see if the way that they were typed could be simplified so it will take less processing time. I really appreciate the pointers on where to learn and what to learn when it comes to python. I would also like to get good enough to where I can utilize the python library that Esri has built into python, things ranging from dialogue boxes to sending and receiving emails. Eventually I would like to automate as much as I humanly can, especially for tasks that consists of redundancy.

-Robert

0 Kudos
DanPatterson_Retired
MVP Emeritus

/blogs/dan_patterson/2019/05/24/the-py-links-ii 

Robert, things pythonic of note are posted in my blog.

Skip python 2, stick with 3.  Get familiar with more than 1 python IDE.

I use Spyder (mostly) for my main work but I have used Pycharm and Pyscripter in the past.  I routinely use Jupyter Console, Jupyter Notebook and/or Lab.  A good IDE will help immensely to shorten your learning curve.

Have fun.  and PS … don't limit yourself to learning just one language

0 Kudos
RPGIS
by
Occasional Contributor III

Thanks Dan,

I don't plan on sticking to just one language. I know some other languages that , not sure if they are script or code languages, are still useful. The other type of languages that I also use is html/css. I do want to learn  java/javascript because I would like to be able to create custom tools for the arcgis online environment. I believe I can still accomplish that with python, but it still wouldn't hurt to simply know other languages, especially when it comes to security.

I have yet to try jupyter notebook, and I don't know if the script process is similar or if it varies a good bit. I have heard of pycharm but never actually used it, and I don't know if it behaves the same way as the python gui for arc. I am slowly getting comfortable enough that I can create simple tools here and there, but I plan on challenging myself more by creating more complex scripts and tools.

Also, when it comes to scripting (either for arcigs ,pro, or any other applications) is it best to keep the scripts short, simple, and variable, or is it better to create large somewhat and complex scripts the may only provide a single use or slightly variable use. That is the other thing that I am not quite sure about is I thought that the more variable a tool is, the easier it is to utilize it for other various purposes.

but there is so much more to learn, and I am always open for trying something new (especially challenging things) because that broadens horizons more. I greatly appreciate the feedback and I will keep learning and practicing while incorporating new things along the way.

-Robert

0 Kudos