sys.path

The sys.path variable is initialized from the directory containing the application, and in the list of directories specified by the environment variable PYTHONPATH, which uses the same syntax as the shell variable PATH, that is, a list of directory names.

If you have not set PYTHONPATH, or if the module file is not found, the search continues in an installation-dependent default path. To use the Adaptive Server Enterprise extension module for Python in an application, you must set either PYTHONPATH, or the Python variable sys.path to one of the following directory paths (these are the default directories where the different versions of the Adaptive Server Python extension module are installed):

Platform

Python Version

Default Installation Path

Windows

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

All other platforms

2.6, 2.7

$SYBASE/$SYBASE_OCS/python/python26_64r/lib

3.1

$SYBASE/$SYBASE_OCS/python/python31_64r/lib