Tag: python

  • Python and Visual Studio

    I posted this a while back on twitter but someone asked me about it this morning and I thought I’d share it here on the blog.  The Visual Studio Blog has and article out on Why write Python in Visual Studio? which is worth reading for everyone writing Python on Windows.

    Recently, Visual Studio 2015 was released with support for Python. Python Tools for Visual Studio (PTVS) are available to help throughout Visual Studio in all the places you’d expect, from editing and IntelliSense, to debugging, profiling, and publishing to Azure. You can find all the details and some video walkthroughs, documentation, and other resources on visualstudio.com, and the post announcing Python Tools 2.1 and Python Tools 2.2 beta.

    The post is a great read into the choices the Visual Studio team made on how to integrate IntelliSense with Python.  Honestly when VS 2015 came out I’ve started using it for all Python development on Windows and when I switch over to my Mac I really miss the features.  GIS users have embraced Python and having a real IDE to help them is a huge plus.  In the past I’ve avoided IDEs where I didn’t need them but with Python projects getting larger and more important, it really makes sense to organize them better.

  • JavaScript instead of Python

    As a long time Mac user I’ve used AppleScript to automate many work flows. Now AppleScript is pretty powerful but it unique (Well I’ve always thought it was like HyperTalk but that’s pretty unique too).

    Well Apple is looking at allowing JavaScript to be used for automation instead of AppleScript with the next version of Mac OS X Yosemite.  So I mused on Twitter this morning:

    Now let’s be honest, GIS and Python have a huge love affair going right now.  But I really think despite all of JavaScript’s “issues” (as everyone continues to point out it has floating point error issues) there are some great workarounds.   JavaScript being used both on the server and front end of applications seems so simple and logical that Python becomes almost niche like FORTRAN was in the 1990s.

    I’m not sure I would tell anyone in GIS not to learn Python because it is critically important to day and most likely will be for years.  Just that you should be putting as much time into JavaScript at Python and be ready for the jump really soon.  You’ll be talking about Python in a couple years like I do about Perl.

  • Using ArcWeb Services with Perl and Python

    Yesterday we saw Andrea post about using ArcWeb Services with PHP and now today we have two great posts about using ArcWeb with Perl and Python. First Andrea Rosso again has a great article with code on using Perl to fetch ArcWeb images. I’ve never really worked with Perl other than messing around with Movable Type (the CMS that I use with this blog), but the code is pretty strait forward and my hosting company already has the Perl SOAP modules installed. Andrea was nice enough to post the whole code so make sure you take a look at the bottom of his post.

    If that wasn’t exciting enough, Sean Gillies posted today about using Python with ArcWeb. Seans example also includes the code so you can start playing around with Python and ArcWeb. Sean ran into a little trouble getting his Public ArcWeb Services activated, but in the end he was able to work it out and returned an image.

    Sure, these great code examples won’t make you forget that one has to use SOAP, but at least you can get better acquainted with how the requests work so when REST arrives with AWS 2005 you’ll be ready to go.

  • 2 Year Old Python Programmer

    Python icon

    I think my 2 year old son Connor really likes Python. He can’t get enough of the snake icon. Come to think of it, he may also like any of the O’Reilly books while we are at the bookstore. He’d rather look at the Python books, than Thomas the Tank Engine.

    That’s my boy!

  • Scripting in Python

    When I first learned that ArcGIS 8 Desktop wasn’t going to support either Avenue or AML, I was very unhappy. As anyone who had done analysis with ArcInfo can attest, I had quite a library of AML scripts to accomplish almost anything. With ArcGIS 8 Desktop, I couldn’t use any of them. The thought I guess was to use Visual Basic or C++, but writing scripts with either of those two languages was like using a sledgehammer to kill a fly, I just stayed with ArcInfo Workstation and the good old AML. Avenue wasn’t supported either (I guess the boat has sailed on Open Source Avenue huh?), but as long as I could still use AML, I was fine. Well fine until we started using Personal Geodatabases. I couldn’t do a thing with those and the number of coverages we were maintaining really dropped as most people have standardized on Shapefiles or the aforementioned Geodatabase.

    Well with ArcGIS 9, we finally have a real scripting language again and even one that has made me stop writing AML scripts. I’ve really gotten into scripting with Python and it really has saved me quite a bit of work over having to try and do the same tasks with AML and converting Shapefiles and Geodatabases with ArcCatalog. With Python support came some great Python supporters and many of them have written some good articles to get started. A great resource is an article written by Howard Butler for ArcUser (don’t forget to check out Howard’s blog also!). Beyond that, all you have to do is head down to your local Barnes and Noble to find just about any Python book to get you started. Unlike AML or Avenue, Python is really easy to get started with and the community support available is much greater than ESRI ever had with Avenue or AML or even those of us who used SML and PC/ARCINFO. 😉

  • More Python Goodness

    Link: OSGIS Hacks Workshop Materials

    Materials from our “Open Source Python GIS Hacks” workshop are now available for download.

    I’ve been meaning to post about this for a couple days but Howard Butler has posted materials from his and Sean Gillies workshop at the Open Source GIS Conference. There is a ton of good material in there so if you want to see how Python works in the “real world”, now is your chance.