This page provides important information for users of the Ice for Python distribution.
On this page:
Ice for Python is available as a collection of Python packages on the Python Package Index. Each package provides the following:
slice2py
)The binary distributions for Linux also include Python packages. |
Install Ice for Python using the pip source distribution. The following command will build and install the source package.:
pip install zeroc-ice |
On Linux this command will build and install the source package. On macOS and Windows it installs a pre-built wheel for the following configurations:
The installation process automatically adds the Ice modules to Python's package directory and adds the Slice-to-Python compiler (slice2py
) to a directory that's likely already in your executable search path. To verify that Ice is installed, execute these commands:
python >>> import Ice >>> Ice.getSliceDir() |
The output of getSliceDir
shows where the Slice files have been installed.
The Ice manual provides a complete description of the Python mapping, including the options for generating Python code from Slice definitions.
Sample programs are provided in a separate GitHub repository. You can browse this repository to see build and usage instructions for all supported programming languages. Simply clone this repository:
git clone -b 3.7 https://github.com/zeroc-ice/ice-demos.git cd ice-demos |