Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5f28e8fb
Commit
5f28e8fb
authored
Jan 21, 2002
by
Steven M. Gava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extension config reading by configDialog and
beginning of configuration saving
parent
7bb1c9a1
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
173 additions
and
134 deletions
+173
-134
Lib/idlelib/config-main.def
Lib/idlelib/config-main.def
+5
-5
Lib/idlelib/configDialog.py
Lib/idlelib/configDialog.py
+163
-125
Lib/idlelib/configHandler.py
Lib/idlelib/configHandler.py
+5
-4
No files found.
Lib/idlelib/config-main.def
View file @
5f28e8fb
...
...
@@ -27,12 +27,13 @@
# from the default file.
[General]
run-in-separate-process= 1
help-browser= ""
editor-on-startup= 1
#run-in-separate-process= 1
#help-browser= ""
[HelpFiles]
idle="IDLE _Help",""
python="_Python Documentation",""
#
idle="IDLE _Help",""
#
python="_Python Documentation",""
#additional help sources
1=
2=
...
...
@@ -46,7 +47,6 @@ python="_Python Documentation",""
10=
[EditorWindow]
editor-on-startup= 0
width= 80
height= 30
font= courier
...
...
Lib/idlelib/configDialog.py
View file @
5f28e8fb
This diff is collapsed.
Click to expand it.
Lib/idlelib/configHandler.py
View file @
5f28e8fb
...
...
@@ -23,7 +23,7 @@ class IdleConfParser(ConfigParser):
self
.
file
=
cfgFile
ConfigParser
.
__init__
(
self
,
defaults
=
cfgDefaults
)
def
Get
(
self
,
section
,
option
,
type
=
None
):
#,default=None)
def
Get
(
self
,
section
,
option
,
type
=
None
):
"""
Get an option value for given section/option or return default.
If type is specified, return as type.
...
...
@@ -143,9 +143,9 @@ class IdleConf:
Get a list of sections from either the user or default config for
the given config type.
configSet must be either 'user' or 'default'
configType must be one of ('extensions','highlight','keys')
configType must be one of ('
main','
extensions','highlight','keys')
"""
if
not
(
configType
in
(
'extensions'
,
'highlight'
,
'keys'
)):
if
not
(
configType
in
(
'
main'
,
'
extensions'
,
'highlight'
,
'keys'
)):
raise
'Invalid configType specified'
if
configSet
==
'user'
:
cfgParser
=
self
.
userCfg
[
configType
]
...
...
@@ -224,7 +224,8 @@ class IdleConf:
if
activeOnly
:
activeExtns
=
[]
for
extn
in
extns
:
if
self
.
GetOption
(
'extensions'
,
extn
,
'enable'
,
default
=
1
,
type
=
'bool'
):
if
self
.
GetOption
(
'extensions'
,
extn
,
'enable'
,
default
=
1
,
type
=
'bool'
):
#the extension is enabled
activeExtns
.
append
(
extn
)
return
activeExtns
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment