mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Implemented starting Python in a terminal window. The implementation isn't
optimal, especially if Terminal wasn't running yet, but it works.
This commit is contained in:
parent
33876f514a
commit
b7276cdf71
5 changed files with 177 additions and 6 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
#import "MyDocument.h"
|
||||
#import "MyAppDelegate.h"
|
||||
#import "doscript.h"
|
||||
|
||||
@implementation MyDocument
|
||||
|
||||
|
@ -71,12 +72,12 @@
|
|||
const char *cmdline;
|
||||
int sts;
|
||||
|
||||
if ([settings with_terminal]) {
|
||||
NSLog(@"Terminal not implemented yet\n");
|
||||
return NO;
|
||||
cmdline = [[settings commandLineForScript: script] cString];
|
||||
if ([settings with_terminal]) {
|
||||
sts = doscript(cmdline);
|
||||
} else {
|
||||
sts = system(cmdline);
|
||||
}
|
||||
cmdline = [[settings commandLineForScript: script] cString];
|
||||
sts = system(cmdline);
|
||||
if (sts) {
|
||||
NSLog(@"Exit status: %d\n", sts);
|
||||
return NO;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue