mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Move the action of loading the configuration to the IdleConf module
rather than the idle.py script. This has advantages and disadvantages; the biggest advantage being that we can more easily have an alternative main program.
This commit is contained in:
parent
8451ebb435
commit
6cb7a21934
2 changed files with 1 additions and 8 deletions
|
|
@ -110,3 +110,4 @@ def load(dir):
|
||||||
os.path.join(homedir, ".idle")))
|
os.path.join(homedir, ".idle")))
|
||||||
|
|
||||||
idleconf = IdleConfParser()
|
idleconf = IdleConfParser()
|
||||||
|
load(os.path.dirname(__file__))
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,4 @@
|
||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import IdleConf
|
|
||||||
|
|
||||||
idle_dir = os.path.dirname(IdleConf.__file__)
|
|
||||||
IdleConf.load(idle_dir)
|
|
||||||
|
|
||||||
# defer importing Pyshell until IdleConf is loaded
|
|
||||||
import PyShell
|
import PyShell
|
||||||
PyShell.main()
|
PyShell.main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue