The python package pyceda allows python programs to use CEDA. Currently python 2 is supported, but not python 3.
Python needs to be installed on your development machine.
On a Windows development machine install the latest version of Python 2.7 x64 (download from https://www.python.org/downloads/)
Ensure pip, setuptools, and wheel are up to date with the following commands:
python -m pip install --upgrade pip
python -m pip install --user --upgrade setuptools wheel
python -m pip install --user --upgrade twine
On an Ubuntu Linux development machine you can install python with the following commands in a bash terminal:
sudo apt install python
sudo apt-get install libpython2.7-dev
sudo apt install python-pip
python -m pip install --upgrade pip
python -m pip install --user --upgrade setuptools wheel
python -m pip install --user --upgrade twine
Wheels are the new standard of Python distribution and are intended to replace eggs.
You can download the pyceda wheel file (e.g. pyceda-0.10.23-cp27-cp27m-win_amd64.whl) from the downloads page.
On an Windows machine the python wheel file pyceda-0.10.23-cp27-cp27m-win_amd64.whl can be installed with the following command
python -m pip install --upgrade --no-deps --force-reinstall pyceda-0.10.23-cp27-cp27m-win_amd64.whl
Note well that we are using the same filename for the debug version of the pyceda package, so be careful to install the appropriate one.
On an Ubuntu machine use the following to install the release version:
wget http://cedanet.com.au/ceda/downloads/files/0.10.23/pyceda-0.10.23-cp27-cp27mu-linux_x86_64.whl
sudo python -m pip install --upgrade --no-deps --force-reinstall pyceda-0.10.23-cp27-cp27mu-linux_x86_64.whl
and the following to install the debug version:
wget http://cedanet.com.au/ceda/downloads/files/0.10.23/debug/pyceda-0.10.23-cp27-cp27mu-linux_x86_64.whl
sudo python -m pip install --upgrade --no-deps --force-reinstall pyceda-0.10.23-cp27-cp27mu-linux_x86_64.whl
As a simple check that the pyceda package has been installed correctly, do the following
Run the Python Interpreter by running the command 'python' in a terminal:
Python 2.7.14rc1 (v2.7.14rc1:c707893, Aug 27 2017, 00:09:00) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Import the pyceda module
>>> import pyceda
Display the root namespace
>>> dir(pyceda.rootnamespace)
The output should resemble this:
['FindChildNameSpace', 'FindElement', 'FindElementWithRelativePath', 'GetChildNameSpaceIterator', 'GetElementIterator', 'GetName', 'Int64', 'PyObject', 'UInt64', 'ceda']
Type an end-of-file character (Control-D on Unix, Control-Z on Windows) then enter to exit the Python Interpreter.