Ozri 2014

Python across the platform: an insider’s guide to the top Python libraries


Solving real-world problems with existing solutions

With so many great presentations at Ozri it’s hard to choose which one to go to. In case you missed our session, here are the key messages.

Python is a “batteries included” language. The Python Standard Library (which you get when installing Python) has nearly 300 packages which help you get the job done. The modules vary in functionality, ranging from running code in parallel with the multiprocessing library to making your terminal beep with winsound.

There is already a library for this. Before starting a new Python project have a browse of the Python Package Index repository PyPi. The Python community has contributed nearly 50,000 packages that solve real-world problems. Perhaps you’ll find what you were about to write and save yourself weeks, or perhaps you won’t, in which case consider this the perfect opportunity to contribute back to the community.

Read, learn, tinker. To write great scripts it’s not enough to know the Python syntax – you have to know what libraries are available to you. Also, it is not enough to simply copy and paste code and hope that it all works. Reading other people’s libraries will not only help you understand why your script doesn’t work, but it will also teach you good Python idioms and how to structure your code.

The best way to explore the code is to import the library into your Python interpreter and have a play with it – use the dir and help commands to look at what the module offers, then read the source code (hint: you can use the inspect module).

The highlight of our presentation was Todd demonstrating how to put some key libraries to work. With just a few lines of code he brought ArcGIS for Server into the world of DevOps: automation, monitoring and reporting.

Slides and source code can be found using this link.

Todd J & Stoyan S

4 thoughts on “Python across the platform: an insider’s guide to the top Python libraries

  1. Peter

    Python is an effective tool for editing 3d data as well, I use it everyday as embedded rhinoscript syntax in Rhino and Grasshopper for generative and parametric 3d design. although I’m a newbie into python, some folks are doing awesome stuff in blender with it.

    Reply

Got something to say?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s