Gilles Peskine | 45d350b | 2020-12-10 23:11:59 +0100 | [diff] [blame] | 1 | """Add our Python library directory to the module search path. |
| 2 | |
| 3 | Usage: |
| 4 | |
| 5 | import scripts_path # pylint: disable=unused-import |
| 6 | """ |
| 7 | |
| 8 | # Copyright The Mbed TLS Contributors |
| 9 | # SPDX-License-Identifier: Apache-2.0 |
| 10 | # |
| 11 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 12 | # not use this file except in compliance with the License. |
| 13 | # You may obtain a copy of the License at |
| 14 | # |
| 15 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 16 | # |
| 17 | # Unless required by applicable law or agreed to in writing, software |
| 18 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 19 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 20 | # See the License for the specific language governing permissions and |
| 21 | # limitations under the License. |
| 22 | |
| 23 | import os |
| 24 | import sys |
| 25 | |
| 26 | sys.path.append(os.path.join(os.path.dirname(__file__), |
| 27 | os.path.pardir, os.path.pardir, |
| 28 | 'scripts')) |