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
043baf9b
Commit
043baf9b
authored
Jun 20, 2000
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced OpenResFile calls with FSpOpenResFile calls (which are carbon-compatible).
parent
8e23b268
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
21 additions
and
21 deletions
+21
-21
Mac/Lib/cfmfile.py
Mac/Lib/cfmfile.py
+2
-2
Mac/Lib/test/tlist_dialog.py
Mac/Lib/test/tlist_dialog.py
+1
-1
Mac/Tools/CGI/BuildCGIApplet.py
Mac/Tools/CGI/BuildCGIApplet.py
+1
-1
Mac/Tools/IDE/BuildIDE.py
Mac/Tools/IDE/BuildIDE.py
+2
-2
Mac/Tools/IDE/PyEdit.py
Mac/Tools/IDE/PyEdit.py
+3
-3
Mac/Tools/macfreeze/macfreezegui.py
Mac/Tools/macfreeze/macfreezegui.py
+1
-1
Mac/Tools/macfreeze/macgen_bin.py
Mac/Tools/macfreeze/macgen_bin.py
+3
-3
Mac/Tools/twit/mactwit_app.py
Mac/Tools/twit/mactwit_app.py
+1
-1
Mac/Tools/twit/mactwit_browser.py
Mac/Tools/twit/mactwit_browser.py
+1
-1
Mac/scripts/BuildApplication.py
Mac/scripts/BuildApplication.py
+1
-1
Mac/scripts/EditPythonPrefs.py
Mac/scripts/EditPythonPrefs.py
+1
-1
Mac/scripts/MkDistr_ui.py
Mac/scripts/MkDistr_ui.py
+2
-2
Mac/scripts/RunLibScript.py
Mac/scripts/RunLibScript.py
+1
-1
Mac/scripts/fullbuild.py
Mac/scripts/fullbuild.py
+1
-1
No files found.
Mac/Lib/cfmfile.py
View file @
043baf9b
...
...
@@ -34,7 +34,7 @@ def mergecfmfiles(srclist, dst, architecture = 'fat'):
dst
=
dst
.
as_pathname
()
dstfile
=
open
(
dst
,
"wb"
)
rf
=
Res
.
OpenResFile
(
dst
)
rf
=
Res
.
FSpOpenResFile
(
dst
,
3
)
try
:
dstcfrg
=
CfrgResource
()
for
src
in
srclist
:
...
...
@@ -64,7 +64,7 @@ class CfrgResource:
self
.
path
=
path
if
path
is
not
None
and
os
.
path
.
exists
(
path
):
currentresref
=
Res
.
CurResFile
()
resref
=
Res
.
OpenResFile
(
path
)
resref
=
Res
.
FSpOpenResFile
(
path
,
1
)
Res
.
UseResFile
(
resref
)
try
:
try
:
...
...
Mac/Lib/test/tlist_dialog.py
View file @
043baf9b
...
...
@@ -71,7 +71,7 @@ def dodialog(items):
def
test
():
import
os
,
sys
Res
.
OpenResFile
(
'tlist_dialog.rsrc'
)
Res
.
FSpOpenResFile
(
'tlist_dialog.rsrc'
,
1
)
dodialog
(
os
.
listdir
(
':'
))
sys
.
exit
(
1
)
...
...
Mac/Tools/CGI/BuildCGIApplet.py
View file @
043baf9b
...
...
@@ -64,7 +64,7 @@ def mkcgifilename(filename):
def
buildone
(
template
,
wrapper
,
src
,
dst
):
buildtools
.
process
(
template
,
wrapper
,
dst
,
1
)
# write source as a PYC resource into dst
ref
=
Res
.
OpenResFile
(
dst
)
ref
=
Res
.
FSpOpenResFile
(
dst
,
1
)
try
:
Res
.
UseResFile
(
ref
)
py_resource
.
frompyfile
(
src
,
"CGI_MAIN"
,
preload
=
1
)
...
...
Mac/Tools/IDE/BuildIDE.py
View file @
043baf9b
...
...
@@ -19,7 +19,7 @@ dstfilename = os.path.join(sys.exec_prefix, "Python IDE")
buildtools
.
process
(
template
,
mainfilename
,
dstfilename
,
1
)
targetref
=
Res
.
OpenResFile
(
dstfilename
)
targetref
=
Res
.
FSpOpenResFile
(
dstfilename
,
3
)
Res
.
UseResFile
(
targetref
)
files
=
os
.
listdir
(
ide_home
)
...
...
@@ -36,6 +36,6 @@ for name in files:
ispackage
=
0
)
# add W resources
wresref
=
Res
.
OpenResFile
(
os
.
path
.
join
(
ide_home
,
"Widgets.rsrc"
)
)
wresref
=
Res
.
FSpOpenResFile
(
os
.
path
.
join
(
ide_home
,
"Widgets.rsrc"
),
1
)
buildtools
.
copyres
(
wresref
,
targetref
,
[],
0
)
Mac/Tools/IDE/PyEdit.py
View file @
043baf9b
...
...
@@ -114,7 +114,7 @@ class Editor(W.Window):
def
readwindowsettings
(
self
):
try
:
resref
=
Res
.
OpenResFile
(
self
.
path
)
resref
=
Res
.
FSpOpenResFile
(
self
.
path
,
1
)
except
Res
.
Error
:
return
try
:
...
...
@@ -127,10 +127,10 @@ class Editor(W.Window):
def
writewindowsettings
(
self
):
try
:
resref
=
Res
.
OpenResFile
(
self
.
path
)
resref
=
Res
.
FSpOpenResFile
(
self
.
path
,
3
)
except
Res
.
Error
:
Res
.
CreateResFile
(
self
.
path
)
resref
=
Res
.
OpenResFile
(
self
.
path
)
resref
=
Res
.
FSpOpenResFile
(
self
.
path
,
3
)
try
:
data
=
Res
.
Resource
(
marshal
.
dumps
(
self
.
settings
))
Res
.
UseResFile
(
resref
)
...
...
Mac/Tools/macfreeze/macfreezegui.py
View file @
043baf9b
...
...
@@ -60,7 +60,7 @@ def dialog(script=None):
d
=
None
if
d
==
None
:
try
:
Res
.
OpenResFile
(
'macfreeze.rsrc'
)
Res
.
FSpOpenResFile
(
'macfreeze.rsrc'
,
1
)
except
Res
.
Error
:
d
=
None
else
:
...
...
Mac/Tools/macfreeze/macgen_bin.py
View file @
043baf9b
...
...
@@ -39,7 +39,7 @@ def generate(input, output, module_dict=None, architecture='fat', debug=0):
print
'Adding "__main__"'
buildtools
.
process
(
applettemplatepath
,
input
,
output
,
0
)
outputref
=
Res
.
OpenResFile
(
output
)
outputref
=
Res
.
FSpOpenResFile
(
output
,
3
)
try
:
Res
.
UseResFile
(
outputref
)
...
...
@@ -171,10 +171,10 @@ def makefilenames(name):
def
copyres
(
input
,
output
,
*
args
,
**
kwargs
):
openedin
=
openedout
=
0
if
type
(
input
)
==
types
.
StringType
:
input
=
Res
.
OpenResFile
(
input
)
input
=
Res
.
FSpOpenResFile
(
input
,
1
)
openedin
=
1
if
type
(
output
)
==
types
.
StringType
:
output
=
Res
.
OpenResFile
(
output
)
output
=
Res
.
FSpOpenResFile
(
output
,
3
)
openedout
=
1
try
:
apply
(
buildtools
.
copyres
,
(
input
,
output
)
+
args
,
kwargs
)
...
...
Mac/Tools/twit/mactwit_app.py
View file @
043baf9b
...
...
@@ -260,7 +260,7 @@ def Initialize():
dummy
=
Res
.
GetResource
(
'DLOG'
,
ID_MODULES
)
except
Res
.
Error
:
try
:
Res
.
OpenResFile
(
"Twit.rsrc"
)
Res
.
FSpOpenResFile
(
"Twit.rsrc"
,
1
)
except
Res
.
Error
,
arg
:
EasyDialogs
.
Message
(
"Cannot open Twit.rsrc: "
+
arg
[
1
])
sys
.
exit
(
1
)
...
...
Mac/Tools/twit/mactwit_browser.py
View file @
043baf9b
...
...
@@ -61,7 +61,7 @@ def Initialize():
ourparentdir
=
os
.
path
.
split
(
openresfile
.
func_code
.
co_filename
)[
0
]
os
.
chdir
(
ourparentdir
)
try
:
Res
.
OpenResFile
(
"mactwit_browse.rsrc"
)
Res
.
FSpOpenResFile
(
"mactwit_browse.rsrc"
,
1
)
except
Res
.
Error
,
arg
:
EasyDialogs
.
Message
(
"Cannot open mactwit_browse.rsrc: "
+
arg
[
1
])
sys
.
exit
(
1
)
...
...
Mac/scripts/BuildApplication.py
View file @
043baf9b
...
...
@@ -38,7 +38,7 @@ GEN68K_BUTTON = 6
try
:
Res
.
GetResource
(
'DITL'
,
DLG_ID
)
except
Res
.
Error
:
Res
.
OpenResFile
(
"BuildApplication.rsrc"
)
Res
.
FSpOpenResFile
(
"BuildApplication.rsrc"
,
1
)
else
:
pass
# we're an applet
...
...
Mac/scripts/EditPythonPrefs.py
View file @
043baf9b
...
...
@@ -170,7 +170,7 @@ def edit_applet(name):
def
main
():
try
:
h
=
OpenResFile
(
'EditPythonPrefs.rsrc'
)
h
=
FSpOpenResFile
(
'EditPythonPrefs.rsrc'
,
1
)
except
Res
.
Error
:
pass
# Assume we already have acces to our own resource
...
...
Mac/scripts/MkDistr_ui.py
View file @
043baf9b
...
...
@@ -321,7 +321,7 @@ def GetType():
def
InitUI
():
"""Initialize stuff needed by UI (a resource file)"""
Res
.
OpenResFile
(
'MkDistr.rsrc'
)
Res
.
FSpOpenResFile
(
'MkDistr.rsrc'
,
1
)
class
_testerhelp
:
def
__init__
(
self
,
which
):
...
...
@@ -340,7 +340,7 @@ class _testerhelp:
class
_test
:
def
__init__
(
self
):
import
sys
Res
.
OpenResFile
(
'MkDistr.rsrc'
)
Res
.
FSpOpenResFile
(
'MkDistr.rsrc'
,
1
)
self
.
inc
=
_testerhelp
(
'include'
)
self
.
exc
=
_testerhelp
(
'exclude'
)
self
.
ui
=
MkDistrUI
(
self
)
...
...
Mac/scripts/RunLibScript.py
View file @
043baf9b
...
...
@@ -85,7 +85,7 @@ def main():
curdir
=
os
.
getcwd
()
import
Res
try
:
Res
.
OpenResFile
(
'RunLibScript.rsrc'
)
Res
.
FSpOpenResFile
(
'RunLibScript.rsrc'
,
1
)
except
:
pass
# Assume we're an applet already
name
,
argv
,
stdin
,
stdout
,
wdir
,
pause
=
interact
()
...
...
Mac/scripts/fullbuild.py
View file @
043baf9b
...
...
@@ -270,7 +270,7 @@ def incbuildno(filename):
def
main
():
try
:
h
=
Res
.
OpenResFile
(
'fullbuild.rsrc'
)
h
=
Res
.
FSpOpenResFile
(
'fullbuild.rsrc'
,
1
)
except
Res
.
Error
:
pass
# Assume we already have acces to our own resource
...
...
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