summaryrefslogtreecommitdiff
path: root/Mac/Python/macmain.c
AgeCommit message (Collapse)AuthorLines
2003-02-25Removed debug output. Fixes #635570Jack Jansen-4/+0
2002-10-29Added a few printfs in case of unexpected situations during application startup.Jack Jansen-0/+2
2002-02-24bqackport of 1.73:Jack Jansen-2/+8
In MachoPython, don't simulate argc/argv unless we have argc=1 and argv[1] starts with "-psn_". This means the drag-and-drop continues to work as expected, but we can now also do /Applications/Python.app/Contents/MacOS/python script.py from the command line, which is a lot easier with debugging. Pressing <option> at this point also has the expected effect of opening the options dialog!
2001-10-31Moved macfsn hackery from macmain.c to macfsmodule.c so it loadsJust van Rossum-29/+0
on demand instead of at startup.
2001-10-30Mod by Donovan Preston to allow MacPython to live in a Python.app bundle and ↵Jack Jansen-30/+58
understand the __main__.py convention used there for applets. This gives us applets that work on both OS9 and OSX! (Although "applet" may not be the correct word for something that is going to be multimegabyte:-). But: the code is currently disabled, as it requires CodeWarrior 7 and I'm still using 6.
2001-09-11Mods by Donovan Preston (with changes by me to make them "go with the flow")Jack Jansen-14/+90
that will detect an __main__.py or __rawmain__.py in the application bundle. This file is then exectued as the main script. We now have applets in MachO Python!!! The difference between __main__ and __rawmain__ is that the former gets a complete simulated argv (so you can drop files on the applet and the script sees them in sys.argv) while the latter skips the argv simulation and the <option>key dialog. This keeps the AppleEvent that started the app intact, as well as the funny "-psn_xxxx" argv[1] argument, so the script can do with these what it wants.
2001-09-11Failing to import macfsn is not a fatal error.Jack Jansen-1/+2
2001-09-05Changes to make these work under OSX as the main program for aJack Jansen-39/+74
fullblown drag and drop application. To my surprise it is starting to work already: Python actually executes a script dropped on it. To be done: - Make sure this still works in MacPython - Don't lose argv[0] in the process - Applet support
2001-09-01Added preferences/startup options for division warningJack Jansen-6/+37
and accepting unix-style newlines on input. Also (finally) added a startup option to get -vv behaviour. Moved __convert_to_newlines to main.c because that's easier with the newline option.
2001-08-03Merging appropriate 2.1.1 fixes back into the main trunk.Jack Jansen-0/+5
2001-07-04Set the default 8-bit encoding based on the system script and language.unknown-0/+2
2001-04-25- Raise console window on input. Fixes Carbon hang.Jack Jansen-1/+11
- Better handling of menu bar save/restore. - Override abort() so it honours the "keep console window" flag.
2001-02-17More changes to attempt to get the menubar back on exit. Without success:-(Jack Jansen-0/+4
2001-02-11Bit the bullet and added a private GUSISIOUX for Python. This makes the ↵Jack Jansen-12/+30
delayconsole and keepopen code neater. Also tells Sioux to behave better with events, and handles cmd-. during print better. The pythonpreferences have also changed due to this.
2001-01-16Trigger keep-console-open on GUSISIOUX_STATE_UNKNOWN. Better than the ↵Jack Jansen-3/+3
previous complicated expression.
2001-01-11When compiling for GUSI and Carbon disable te "keep open on unseen output", ↵Jack Jansen-2/+2
for the time being.
2001-01-09If we're not using GUSI the "keep open on unseen output" becomes the same as ↵Jack Jansen-0/+6
"always keep open".
2000-10-19Added PyMac_OutputSeen(), which acknowledges all current output in the stdio ↵Jack Jansen-0/+9
window, i.e. it acts like input has been read insofar as the keep-console-open option is interested.
2000-10-12Made options global (as PyMac_options) so macosmodule can access it.Jack Jansen-16/+16
2000-09-22Keepconsole is now a 4-way option: never/errorexit/unseen output/always. ↵Jack Jansen-11/+44
Default is "unseen output". Upped the Popt version number.
2000-09-08Use same short banner message as unix/win Python.Jack Jansen-3/+7
2000-08-25Removed debug output.Jack Jansen-3/+0
2000-07-24Added more prototypes.Jack Jansen-0/+3
2000-07-18MacPython on MacOSX DP4 gets started in the wrong directory. The workaround ↵Jack Jansen-1/+16
(ifdeffed by USE_ARGV0_CHDIR) is to do a chdir() to the folder part of our executable name.
2000-07-14Test for TARGET_API_MAC_CARBON with #if in stead of #ifdef.Jack Jansen-2/+2
2000-07-11ANSIfication step 2: make sure all needed prototypes are available, and all ↵Jack Jansen-3/+2
needed header files included.
2000-07-11ANSIfication step 1: get rid of Py_PROTO and Py_FPROTO.Jack Jansen-2/+2
2000-06-04Removed THINK_C support.Jack Jansen-11/+0
2000-06-02Removed (within an #ifdef) Carbon-incompatabilities:Jack Jansen-0/+6
- Don't call all the toolbox init routines. - No balloon help, so removed help code from the initial dialog.
2000-05-05Removed string-exception preference, added tabcheck and NavService ↵Jack Jansen-3/+33
preference, upped version number.
2000-04-07Started on GUSI2 and threading support.Jack Jansen-3/+5
1999-12-07First bits and pieces of appearance support: an init routine, a global flag ↵Jack Jansen-0/+20
PyMac_AppearanceCompliant (exported thru MacOS). If USE_APPEARANCE is off the code is disabled (but the variables are still there, set to 0).
1999-09-30Bigger buffer size for C profiler (if profiling is enabled).Jack Jansen-1/+1
1998-07-31Initialize the program name before adding shared library resources (Just).Jack Jansen-0/+1
1997-10-07Implemented nositepython and oldexceptions flagsJack Jansen-0/+2
1997-09-09Added old-exception and no-site-python options and balloon helpJack Jansen-3/+12
1997-09-08sys.prefix and sys.exec_prefix are now set correctly.Jack Jansen-2/+2
1997-08-08Adapted for 1.5a3: Py_SupressPrintingFlag is gone, andJack Jansen-21/+9
Py_SetProgramName replaces Py_GetProgramName
1997-06-12- Restore SIOUX menubar just before exiting, if the console window is keptJack Jansen-0/+2
open (so the user can quit with cmd-Q, print, etc) - Removed a few unused routines
1997-06-03Removed old scheduler parameterizing calls and replaced with somethingJack Jansen-2/+9
a bit easier to use and understand
1997-05-23- Added Py_GetProgramFullPathJack Jansen-7/+8
- Added PyMac_StopGUSISpin and have it called at exit time (fixes crash when exiting with sockets open) - Added PLstr... funcs needed by gusi: those provided by StdCLib are broken under cfm68k
1997-05-07Workaround for bug in MSL and CWGUSI interaction that stopped theJack Jansen-0/+7
"don't close window on exit" feature to work.
1997-04-08Changed the few old routine names still used to the new onesJack Jansen-4/+4
Started working on MSL support
1997-02-24- Changed GestaltEqu.h to Gestalt.hJack Jansen-1/+0
- Changed FragLoader.h to CodeFragments.h - Removed Desk.h
1997-01-31Added/updated copyright noticesJack Jansen-1/+1
(and the &*^$%@ resource files got binhexed again, sigh)
1997-01-15Added PyMac_Initialize() routine, to be used by embedding programs (inJack Jansen-8/+29
stead of standard Py_Initialize(), which it calls).
1997-01-07Added profiler initialization/finalization code (if __profile__ is defined)Jack Jansen-1/+12
1996-09-09Py_GetProgramName turns out not to be obsolete (used by _tkinter).Jack Jansen-8/+0
1996-09-07- Put all options in a structJack Jansen-136/+162
- Unified initialization code for interpreter and applet - Implemented new options to skip AE-processing for argc/argv and for disabling interactive option setting
1996-09-06- Rationalized override preferences support, by rememberingJack Jansen-1/+5
application resource fork RefNum and looking there only - Added support for loading gusi prefs from Preferences file (needs modified GUSI, but Matthias promised he'd incorporate the fixes in the next release)