mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
mac changes:
- Assume files of types 'PYC ' and 'APPL' are compiled python code - For mwerks, show status line when program has terminated while keeping window open.
This commit is contained in:
parent
7467ce3eea
commit
bd06e96217
1 changed files with 8 additions and 0 deletions
|
@ -230,7 +230,13 @@ run_script(fp, filename)
|
||||||
return -1;
|
return -1;
|
||||||
d = getmoduledict(m);
|
d = getmoduledict(m);
|
||||||
ext = filename + strlen(filename) - 4;
|
ext = filename + strlen(filename) - 4;
|
||||||
|
#ifdef macintosh
|
||||||
|
/* On a mac, we also assume a pyc file for types 'PYC ' and 'APPL' */
|
||||||
|
if ( strcmp(ext, ".pyc") == 0 || getfiletype(filename) == 'PYC ' ||
|
||||||
|
getfiletype(filename) == 'APPL' ) {
|
||||||
|
#else
|
||||||
if ( strcmp(ext, ".pyc") == 0 ) {
|
if ( strcmp(ext, ".pyc") == 0 ) {
|
||||||
|
#endif /* macintosh */
|
||||||
/* Try to run a pyc file. First, re-open in binary */
|
/* Try to run a pyc file. First, re-open in binary */
|
||||||
/* Don't close, done in main: fclose(fp); */
|
/* Don't close, done in main: fclose(fp); */
|
||||||
if( (fp = fopen(filename, "rb")) == NULL ) {
|
if( (fp = fopen(filename, "rb")) == NULL ) {
|
||||||
|
@ -667,6 +673,8 @@ goaway(sts)
|
||||||
#ifdef __MWERKS__
|
#ifdef __MWERKS__
|
||||||
if (sts == 0)
|
if (sts == 0)
|
||||||
SIOUXSettings.autocloseonquit = 1;
|
SIOUXSettings.autocloseonquit = 1;
|
||||||
|
else
|
||||||
|
SIOUXSettings.showstatusline = 1;
|
||||||
#endif
|
#endif
|
||||||
exit(sts);
|
exit(sts);
|
||||||
#endif /* WITH_THREAD */
|
#endif /* WITH_THREAD */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue