GUI - Import/Export - Python

<< Click to Display Table of Contents >>

Navigation:  PipeLay > Software Introduction > GUI Basics > GUI - Import/Export Functionality >

GUI - Import/Export - Python

Previous page Next page

Python is an interpreted, object-oriented, high-level programming language with a simple, easy to learn syntax and can be downloaded from here:

 https://www.python.org/downloads/

The additional packages used in the example script (openpyxl) can be obtained from PyPI – the Python Package Index:

 https://pypi.python.org/pypi

It is recommended to use pip to install the required packages. Python 2.7.9 and later (on the python2 series), and Python 3.4 and later include pip by default. Alternatively, to install pip, Ctrl+Click on the following link: get-pip.py, then Right-Click and Save-as to your Python directory. Then run the following (which may require administrator access):

get-pip

To use Python from the command line you may need to add the path to Environment Variables. To do this:

Hold ÿ and press the Pause key.

Click Advanced System Settings.

Click Environment Variables.

Append ;C:\Python27;C:\Python27\Scripts to the Path variable.

Restart Command Prompt.

To install a package from PyPI you will require an internet connection. Simply type the following command:

 pip install PackageName

For example, to install the openpyxl package used in the script above type the following:

pip_install

Full pip documentation can be found here:

 https://pip.pypa.io/en/latest/