Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Obtaining GX Developer

GX Developer provides API support for Python, .NET, C/C++ and the Geosoft GXC language.  To work with the GX API you only need to have a Geosoft ID and 

Insert excerpt
_registration
_registration
nopaneltrue
.

Registered developers also have access to the GX Developer forum in the My Geosoft portal.

It is also necessary to obtain and install the Oasis montaj base platform on developer and end user systems. While the majority of the API will work for any Geosoft ID, some functionality depends on you or your end-user's license or subscription. Generally, applications that need to read or write to Geosoft supported data do not require an end-user subscription.

Info
iconfalse
titleOn this page

Table of Contents
indent15px

Python for GX Developer

Once the Oasis montaj base platform is installed, to configure your system to work with Python requires installation of a Python distribution, the Python packages that your application requires, and then installing the Geosoft Python packages.

Refer to Python Installation and Configuration, which provides a tutorial-style set of instructions to configure a Python environment.

Frequently Asked Questions

Python version 2.7 or 3? The Geosoft distribution packages support Python version 3.5 (and later).  Python 2.7 (released in 2010) was the end of development for Python 2.x, and for this reason we have chosen not to support Python 2.7 (or earlier). If you are new to Python, you should start with Python 3.  If you have legacy Python 2 code that you want to run with a Geosoft environment you may need to make modifications to the code to work with Python 3. See https://docs.python.org/2/howto/pyporting.html for information on what may be required to port Python 2 code to Python 3.

Which Python distribution? There are many distributions of Python, but Geosoft uses and recommends the Anaconda distribution (https://www.continuum.io/downloads) as this includes all the packages that are required to work with Geosoft code together with the most important and widely used packages that make up what is considered complete for a scientific application. 

Which IDE? At Geosoft we use and recommend the PyCharm IDE (http://www.jetbrains.com/pycharm/), which has both a no-cost "Community Edition" intended for education and personal use, and a very reasonably priced "Professional Edition" for professional use. Note that most complete Python distributions also include IPython. Although not strictly an IDE, IPython does provide an environment for rapid algorithm development, experimentation and documentation and can be very effective for research projects.

Modifying the Geosoft Python Modules

As a developer with advanced Python knowledge and familiarity with git and github you may wish to clone (or fork) and modify Geosoft's Python modules. The following describes the development process for modifying your own cloned version of the Geosoft package. Refer to Python Installation and Configuration for simply installing and using the Geosoft packages.

Geosoft maintains the source code for the most current Python module on github:

...

You should clone (or fork) the repositories to a location on your system (step 1 below).  If you are unfamiliar with github, see https://help.github.com/.

The following will checkout the gxpy project from Github and set it up for active development with your Python distribution:

...

Open a command shell and go the folder where you want to locate the Geosoft Python files. From here we will clone the Geosoft repositories, which will create sub-folders "gxpy" and "gxpy-examples".  These are on the current development branch and stability is not assured, and may depend on a later desktop installation than in available.

Code Block
git clone https://github.com/GeosoftInc/gxpy

If you want a specific stable branch, after cloning the repository checkout the desired branch:

Code Block
git checkout 9.4

...

Setup module for development in your Python environment:

Code Block
cd gxpy
python setup.py develop

...

Reference by Language

GX Developer for Python

.NET Development

C/C++ Development

Geosoft GX (GXC) Language