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
54f3bdbf
Commit
54f3bdbf
authored
Mar 08, 2001
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect that the preference file may be incorrect, and offer to remove it. This isn't finished yet.
parent
4c52203b
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
Mac/scripts/ConfigurePython.py
Mac/scripts/ConfigurePython.py
+16
-1
Mac/scripts/ConfigurePython.rsrc
Mac/scripts/ConfigurePython.rsrc
+1
-1
No files found.
Mac/scripts/ConfigurePython.py
View file @
54f3bdbf
...
...
@@ -25,6 +25,11 @@ ALERT_NONBOOT=517
ALERT_NONBOOT_COPY
=
1
ALERT_NONBOOT_ALIAS
=
2
ALERT_NOTPYTHONFOLDER
=
518
ALERT_NOTPYTHONFOLDER_REMOVE_QUIT
=
1
ALERT_NOTPYTHONFOLDER_QUIT
=
2
ALERT_NOTPYTHONFOLDER_CONTINUE
=
3
APPLET_LIST
=
[
(
":Mac:scripts:EditPythonPrefs.py"
,
"EditPythonPrefs"
,
None
),
(
":Mac:scripts:BuildApplet.py"
,
"BuildApplet"
,
None
),
...
...
@@ -41,7 +46,7 @@ def getextensiondirfile(fname):
import
macfs
import
MACFS
try
:
vrefnum
,
dirid
=
macfs
.
FindFolder
(
MACFS
.
kOnSystemDisk
,
MACFS
.
k
Extension
FolderType
,
0
)
vrefnum
,
dirid
=
macfs
.
FindFolder
(
MACFS
.
kOnSystemDisk
,
MACFS
.
k
SharedLibraries
FolderType
,
0
)
fss
=
macfs
.
FSSpec
((
vrefnum
,
dirid
,
fname
))
except
macfs
.
error
:
return
None
...
...
@@ -112,7 +117,17 @@ def main():
except
Res
.
Error
:
verbose
=
1
print
"Not running as applet: verbose on"
oldcwd
=
os
.
getcwd
()
os
.
chdir
(
sys
.
prefix
)
newcwd
=
os
.
getcwd
()
if
oldcwd
!=
newcwd
:
import
Dlg
rv
=
Dlg
.
CautionAlert
(
ALERT_NOTPYTHONFOLDER
,
None
)
if
rv
==
ALERT_NOTPYTHONFOLDER_REMOVE_QUIT
:
print
"TBD: Should remove preferences file"
sys
.
exit
(
0
)
elif
rv
==
ALERT_NOTPYTHONFOLDER_QUIT
:
sys
.
exit
(
0
)
sys
.
path
.
append
(
'::Mac:Lib'
)
import
macostools
...
...
Mac/scripts/ConfigurePython.rsrc
View file @
54f3bdbf
This diff is collapsed.
Click to expand it.
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