Running Sample Script for Python

After installation, run the sample script for the SAP Adaptive Server extension module for Python.

  1. Locate Python samples in %SYBASE%\%SYBASE_OCS%\samples\python directory.
  2. Verify that SAP Adaptive Server is up and running.
  3. Ensure that the PYTHONPATH environment variable or the Python variable sys.path is set to one of the following directories (these are the default directories where the different versions of the Adaptive Server Python extension module are installed):
    PYTHONPATH Settings

    Python Version

    Default Installation Path

    2.6

    $SYBASE\$SYBASE_OCS\python\python26_64\dll

    2.7

    $SYBASE\$SYBASE_OCS\python\python27_64\dll

    3.1

    $SYBASE\$SYBASE_OCS\python\python31_64\dll

  4. Run the sample:
    python test.py

See the Adaptive Server Enterprise extension module for Python Programmers Guide.