Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 23 lines (18 sloc) 0.665 kb
47ee9ca @todesschaf Program to run stoneridge python from system python
todesschaf authored
1 #!/usr/bin/env python
2 # This Source Code Form is subject to the terms of the Mozilla Public License,
3 # v. 2.0. If a copy of the MPL was not distributed with this file, You can
4 # obtain one at http://mozilla.org/MPL/2.0/.
5
6 import copy
7 import os
8 import subprocess
9 import sys
10
11 mypath = os.path.abspath(__file__)
12 mydir = os.path.split(mypath)[0]
13 srhome = os.path.join(mydir, '..')
14 srhome = os.path.abspath(srhome)
15 srbin = os.path.join(srhome, 'bin')
16 srpython = os.path.join(srbin, 'python')
17 srpypath = [mydir, os.path.join(mydir, 'wpr')]
18
19 env = copy.copy(os.environ)
20 env['PYTHONPATH'] = ':'.join(srpypath)
21
22 sys.exit(subprocess.call([srpython] + sys.argv[1:], env=env))
Something went wrong with that request. Please try again.