Kurt B. Kaiser | 1521fda | 2009-05-06 03:38:31 +0000 | [diff] [blame] | 1 | import os.path |
| 2 | import sys |
| 3 | |
Terry Jan Reedy | 1813aa1 | 2016-09-30 02:53:44 -0400 | [diff] [blame^] | 4 | # Enable running IDLE with idlelib in a non-standard location. |
| 5 | # This was once used to run development versions of IDLE. |
| 6 | # Because PEP 434 declared idle.py a public interface, |
| 7 | # removal should require deprecation. |
Kurt B. Kaiser | 1521fda | 2009-05-06 03:38:31 +0000 | [diff] [blame] | 8 | idlelib_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
Terry Jan Reedy | 1813aa1 | 2016-09-30 02:53:44 -0400 | [diff] [blame^] | 9 | if idlelib_dir not in sys.path: |
| 10 | sys.path.insert(0, idlelib_dir) |
Kurt B. Kaiser | 1521fda | 2009-05-06 03:38:31 +0000 | [diff] [blame] | 11 | |
Terry Jan Reedy | 1813aa1 | 2016-09-30 02:53:44 -0400 | [diff] [blame^] | 12 | from idlelib.PyShell import main # This is subject to change |
| 13 | main() |