Python Tutorial for Geosoft GX Developer

Python is a powerful environment for creating scientific processing applications, and with Geosoft GX Developer, Python developers are able to create Python extensions that run from the Geosoft Desktop application or stand-alone Python applications that read, process and write Geosoft supported data. 

This course is intended to be an introduction to writing Python scripts with GX Developer, and our goal is to provide enough information that you will feel comfortable developing ever-more powerful applications that combine the features of the open Geosoft GX APIs with your own or other Python-oriented developments.

Audience

Developers with Python development experience who wish to work with a Geosoft environment.

What you will learn

  • How to install and configure GX Developer for Python.
  • How to create Python programs that read process and write Geosoft-supported files.
  • How to create an extension that runs from a Geosoft Desktop application.
  • How to work with a Geosoft project
  • How to work with spatial coordinate systems in a Geosoft environment
  • How to create and work with 2D and 3D graphics

What you will not learn

Geosoft GX Developer provides an API that can be called from Python, Geosoft's GXC language, CLI languages (C#, VB#, F#), and C/C++.  This course is focused on Python development only.  The on-line Geosoft GX Developer guide provides some reference information for other languages, though many of the concepts that we work through in the course may be of interest to developers in other languages.

This is an introductory course that touches on just enough parts of the GX API to get you started developing your own Python scripts.  The GX API is rich and deep, and all modules and functions are documented on-line.

Learning Python

If you have no Python experience you will need to learn a bit of Python before embarking on this course. One of the great strengths of Python is the wealth of information available to learn Python and a deep on-line support community. You will find that a Google search is your best assistant - just ask what you need to know and you will find the answer, for both simple and complex challenges.  In fact one of the skills you will develop is how to find and choose the best solution for the task at hand.

Here are some useful searches and links:

Google search "Learning Python"

Google search "Python Tutorial"

The Hitchhikers Guide to Python

Python Cookbook

Effective Python

For example, if you forget how to find the last occurrence of character in a string, just ask your assistant Google (always place the word "python" first):

"python find the last occurrence of character in a string"

MatLab and Python

Scientific development has been steadily increasing within the Python community with a growing trend of researchers switching from MatLab to Python.  MatLab users might appreciate the perspectives you can find with a Google search.  Notable (among many) are:

Tutorial Scripts

All examples in this tutorial are available in the tutorials folder of Geosoft gxpy project on Github.  Tutorials are version specific and you should choose the branch/tag that matches your installed Geosoft desktop version:

https://github.com/GeosoftInc/gxpy/tree/9.3/examples/tutorial