mirror of
https://github.com/python/cpython.git
synced 2025-07-22 10:45:22 +00:00
Use the new macresource module to open the accompanying resource file (if needed).
This commit is contained in:
parent
a5d7da528b
commit
3c06b9a7d4
13 changed files with 37 additions and 102 deletions
|
@ -15,6 +15,7 @@ import os
|
|||
import sys
|
||||
from Carbon import Res # For Res.Error
|
||||
import pythonprefs
|
||||
import macresource
|
||||
import EasyDialogs
|
||||
try:
|
||||
from Carbon import Help
|
||||
|
@ -195,10 +196,7 @@ def edit_applet(name):
|
|||
handler.save(result)
|
||||
|
||||
def main():
|
||||
try:
|
||||
h = FSpOpenResFile('EditPythonPrefs.rsrc', 1)
|
||||
except Res.Error:
|
||||
pass # Assume we already have acces to our own resource
|
||||
macresource.need('DLOG', DIALOG_ID, 'EditPythonPrefs.rsrc')
|
||||
|
||||
MacOS.SchedParams(1, 0)
|
||||
if len(sys.argv) <= 1:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue