import keyword
from Tkinter import *
from Delegator import Delegator
-from IdleConf import IdleConf
+from IdleConf import idleconf
#$ event <<toggle-auto-coloring>>
#$ win <Control-slash>
apply(self.tag_configure, (tag,), cnf)
self.tag_raise('sel')
- cconf = IdleConf.getsection('Colors')
+ cconf = idleconf.getsection('Colors')
tagdefs = {
"COMMENT": cconf.getcolor("comment"),
return exts
def reload(self):
- global IdleConf
- IdleConf = IdleConfParser()
+ global idleconf
+ idleconf = IdleConfParser()
load(_dir) # _dir is a global holding the last directory loaded
class SectionConfigParser:
homedir = os.environ['HOME']
except KeyError:
homedir = os.getcwd()
-
- for file in (os.path.join(dir, "config.txt"),
- genplatfile,
- platfile,
- os.path.join(homedir, ".idle"),
- ):
- try:
- f = open(file)
- except IOError:
- continue
- IdleConf.readfp(f)
- f.close()
-
-IdleConf = IdleConfParser()
+
+ idleconf.read((os.path.join(dir, "config.txt"), genplatfile, platfile,
+ os.path.join(homedir, ".idle")))
+
+idleconf = IdleConfParser()
+
import PyParse
from AutoIndent import AutoIndent, index2line
-from IdleConf import IdleConf
+from IdleConf import idleconf
class ParenMatch:
"""Highlight matching parentheses
windows_keydefs = {}
unix_keydefs = {}
- iconf = IdleConf.getsection('ParenMatch')
- STYLE = iconf.get('style')
+ iconf = idleconf.getsection('ParenMatch')
+ STYLE = iconf.getdef('style', 'default')
FLASH_DELAY = iconf.getint('flash-delay')
HILITE_CONFIG = iconf.getcolor('hilite')
BELL = iconf.getboolean('bell')
from FileList import FileList
from ColorDelegator import ColorDelegator
from OutputWindow import OutputWindow
-from IdleConf import IdleConf
+from IdleConf import idleconf
import idlever
# We need to patch linecache.checkcache, because we don't want it
ColorDelegator.recolorize_main(self)
tagdefs = ColorDelegator.tagdefs.copy()
- cconf = IdleConf.getsection('Colors')
+ cconf = idleconf.getsection('Colors')
tagdefs.update({
"stdin": cconf.getcolor("stdin"),
# enable option with the value 0.
[EditorWindow]
-width: 80
-height: 24
+width= 80
+height= 24
# fonts defined in config-[win/unix].txt
[Colors]
-normal-foreground: black
-normal-background: white
-# These color types are not explicitly defined: sync, todo, stdin
-keyword-foreground: #ff7700
-comment-foreground: #dd0000
-string-foreground: #00aa00
-definition-foreground: #0000ff
-hilite-foreground: #000068
-hilite-background: #006868
-break-foreground: #ff7777
-hit-foreground: #ffffff
-hit-background: #000000
-stdout-foreground: blue
-stderr-foreground: red
-console-foreground: #770000
-error-background: #ff7777
-cursor-background: black
+normal-foreground= black
+normal-background= white
+# These color types are not explicitly defined= sync, todo, stdin
+keyword-foreground= #ff7700
+comment-foreground= #dd0000
+string-foreground= #00aa00
+definition-foreground= #0000ff
+hilite-foreground= #000068
+hilite-background= #006868
+break-foreground= #ff7777
+hit-foreground= #ffffff
+hit-background= #000000
+stdout-foreground= blue
+stderr-foreground= red
+console-foreground= #770000
+error-background= #ff7777
+cursor-background= black
[SearchBinding]
[CallTips]
[ParenMatch]
-enable: 0 ; ParenMatch conflicts with CallTips
-style: expression
-flash-delay: 500
-bell: 1
-hilite-foreground: black
-hilite-background: #43cd80 ; SeaGreen3
+enable= 0
+style= expression
+flash-delay= 500
+bell= 1
+hilite-foreground= black
+hilite-background= #43cd80