mirror of
https://github.com/python/cpython.git
synced 2024-11-24 08:52:25 +01:00
3bbb617ca4
doubleclicks a .py, .pyw or .pyc file. It runs the file by invoking the relevant interpreter (either the command line Python in a terminal window or a Python.app for GUI-based scripts). Interpreter to use and the options to pass are settable through preferences. If PythonLauncher wasn't running it does its thing for one script and exits. If it was manually started before a dialog is presented where the user can set the options to use, etc. To be done: - option-drag/doubleclick should always open the interactive dialog - Terminal-window isn't done yet - Should be reimplemented in Python, but pyobjc isn't part of the core. - Various menu entries should be disabled.
40 lines
881 B
Objective-C
Executable File
40 lines
881 B
Objective-C
Executable File
//
|
|
// MyDocument.h
|
|
// PythonLauncher
|
|
//
|
|
// Created by Jack Jansen on Fri Jul 19 2002.
|
|
// Copyright (c) 2002 __MyCompanyName__. All rights reserved.
|
|
//
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
#import "FileSettings.h"
|
|
|
|
@interface MyDocument : NSDocument <FileSettingsSource>
|
|
{
|
|
IBOutlet NSTextField *interpreter;
|
|
IBOutlet NSButton *debug;
|
|
IBOutlet NSButton *verbose;
|
|
IBOutlet NSButton *inspect;
|
|
IBOutlet NSButton *optimize;
|
|
IBOutlet NSButton *nosite;
|
|
IBOutlet NSButton *tabs;
|
|
IBOutlet NSTextField *others;
|
|
IBOutlet NSButton *with_terminal;
|
|
IBOutlet NSTextField *commandline;
|
|
|
|
NSString *script;
|
|
NSString *filetype;
|
|
FileSettings *settings;
|
|
}
|
|
|
|
- (IBAction)do_run:(id)sender;
|
|
- (IBAction)do_cancel:(id)sender;
|
|
- (IBAction)do_reset:(id)sender;
|
|
- (IBAction)do_apply:(id)sender;
|
|
|
|
- (void)controlTextDidChange:(NSNotification *)aNotification;
|
|
|
|
@end
|