Mercurial > code > home > repos > light9
comparison bin/run_local.py @ 2030:aeafe7d0b033
have bin/* run via pdm's python config
author | drewp@bigasterisk.com |
---|---|
date | Thu, 07 Apr 2022 01:07:54 -0700 |
parents | 7088d60fde7e |
children | 53dd7eb024c9 |
comparison
equal
deleted
inserted
replaced
2029:decbbd709f94 | 2030:aeafe7d0b033 |
---|---|
2 | 2 |
3 # this should be turned off when the programs are installed | 3 # this should be turned off when the programs are installed |
4 | 4 |
5 import sys, os, socket | 5 import sys, os, socket |
6 | 6 |
7 from twisted.python.failure import Failure | |
7 | 8 |
8 def fixSysPath(): | 9 # to support 'import light9' until I rearrange things better: |
9 root = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), | 10 sys.path.append('.') |
10 '..')) + '/' | |
11 sys.path = [ | |
12 root, | |
13 root + 'env/lib/python3.7', | |
14 root + 'env/lib/python3.7/plat-x86_64-linux-gnu', | |
15 root + 'env/lib/python3.7/lib-tk', | |
16 root + 'env/lib/python3.7/lib-old', | |
17 root + 'env/lib/python3.7/lib-dynload', | |
18 '/usr/lib/python3/dist-packages/', | |
19 '/usr/lib/python3.7', | |
20 # '/usr/lib/python3.7/plat-x86_64-linux-gnu', | |
21 # '/usr/lib/python3.7/lib-tk', | |
22 # root + 'env/local/lib/python3.7/site-packages', | |
23 # root + 'env/local/lib/python3.7/site-packages/gtk-2.0', | |
24 root + 'env/lib/python3.7/site-packages', | |
25 # root + 'env/lib/python3.7/site-packages/gtk-2.0', | |
26 ] | |
27 | |
28 | |
29 fixSysPath() | |
30 | |
31 from twisted.python.failure import Failure | |
32 | 11 |
33 try: | 12 try: |
34 import tkinter | 13 import tkinter |
35 except ImportError: | 14 except ImportError: |
36 pass | 15 pass |