Commit Graph

400 Commits

Author SHA1 Message Date
Jack Jansen 3e6c80bf5e Hmm, in some cases we don't seem to get our scriptname in argv[0].
Cater for that by working from sys.executable.
2002-08-02 15:31:25 +00:00
Jack Jansen ba1c13db4f Final step in making applets first-class citizens: if the applet wants
argv emulation (i.e. if the end user drops files and folders on the
applets these will show up in sys.argv) BuildApplet will add the required
code to the applet bundle, in __rawmain__.pyc.

This code is compiled from appletrawmain.py, it creates sys.argv, cleans
up most of the mess and executes either __main__.py or __main__.pyc.
2002-08-02 14:57:43 +00:00
Jack Jansen a9454e21a7 Oops, the -psn stuff is in argv[1], of course. 2002-08-02 14:54:46 +00:00
Jack Jansen 94416e55d3 Got rid of a couple of OS9-isms. 2002-08-02 14:04:42 +00:00
Jack Jansen 2eb4b18f94 - Slightly better error message in case of syntax errors in the script.
- The applet .rsrc file should be called python.rsrc, it is not based on the
  applet name.
2002-08-02 14:04:15 +00:00
Jack Jansen 6e1986ba9c - Remove -psn-xxxx argument added by the Finder.
- "Open Document" appleevent is "odoc", not "open".
2002-08-02 12:56:21 +00:00
Jack Jansen f4f6d4859d Construct a sys.argv from the initial AppleEvent sent by the finder
during startup of a program. This module will replace the C code in
macgetargv.c so we can get rid of the special macmain.c for OSX
Python.app.
2002-08-02 11:12:15 +00:00
Jack Jansen d05e18139f Slightly better error message in case of missing resources. 2002-08-02 11:03:19 +00:00
Jack Jansen c7554e28ee Added a __contains__ method. 2002-07-26 11:32:03 +00:00
Jeremy Hylton 938ace69a0 staticforward bites the dust.
The staticforward define was needed to support certain broken C
compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the
static keyword when it was used with a forward declaration of a static
initialized structure.  Standard C allows the forward declaration with
static, and we've decided to stop catering to broken C compilers.  (In
fact, we expect that the compilers are all fixed eight years later.)

I'm leaving staticforward and statichere defined in object.h as
static.  This is only for backwards compatibility with C extensions
that might still use it.

XXX I haven't updated the documentation.
2002-07-17 16:30:39 +00:00
Jack Jansen 440a36f3ab In plugin projects use (by default) the new mwerks_shcarbon_pch
header file in stead of mwerks_carbonplugin_config.h.
2002-06-26 20:36:12 +00:00
Jack Jansen bc5e145341 Close the project after generating it, so we don't keep a gazillion project
files open when we're rebuilding them all.
2002-06-26 20:35:18 +00:00
Jack Jansen 09c7343273 Turns out GetArgv() options can be 4-tuples too, with the last value being the default (or something like that). Cater for this.
Also put in a safeguard against very long help strings.
2002-06-26 15:14:48 +00:00
Jack Jansen 5d0990494e Open the source file in universal newline mode. 2002-06-20 20:42:07 +00:00
Jack Jansen 388fbf3d4a - Better commandline interface to BuildApplet, complete with options,
verbose output to the console, etc.
- Allow Cocoa applets to be built with BuildApplet.

No full testing has been done yet to ensure OS9 operation hasn't suffered.
2002-06-09 22:08:52 +00:00
Jack Jansen b66e1a3dd2 Allow the shared library initialization routine to be overridden with an initialize=xxx argument.
Should fix #492465.
2002-05-23 22:34:18 +00:00
Jack Jansen a43b2c4e30 Regenerated from new Universal Headers. 2002-05-22 15:08:58 +00:00
Jack Jansen ead4c80ac2 Fixed a mistake on my part when regenerating: removed a bogus import of Applscript_Suite.
Bugfix candidate (I'll move it over myself).
2002-05-07 20:16:20 +00:00
Jack Jansen 65300f17c3 Regenerated.
Bugfix candidate.
2002-04-24 09:13:24 +00:00
Jack Jansen 95df3fd159 Second part of fix for #493826: regenerated suite modules so errn exists but == 0 doesn't signal an error.
Bugfix candidate.
2002-04-23 21:08:54 +00:00
Jack Jansen 7aace7a2dc Regenerated to include Internet Config error strings.
Bugfix candidate.
2002-04-22 11:45:46 +00:00
Jack Jansen 68c7e26dc9 Get rid of backward compatibility modules. Do this fairly early in the 2.3 cycle so we don't shoot ourselves in the foot later. 2002-04-11 21:03:37 +00:00
Jack Jansen e7f776af3d Suite to talk to the OSX Terminal application. 2002-03-30 23:46:16 +00:00
Jack Jansen ad5dcafac4 Got rid of obsolete way to get at various toolbox types. 2002-03-30 23:44:58 +00:00
Jack Jansen 9aa8fd0b7d Handle .icns and .plist files for applets.
Also, for now (until we learn to parse .plist files) we make a special case
for the IDE, setting the creator to "Pide".
2002-03-29 23:44:37 +00:00
Jack Jansen b2e33fe285 Implemented buildtools for MachoPython .app bundles. The API is compatible
enough that IDE and BuildApplet can create applets, yeah!
2002-03-29 21:21:28 +00:00
Jack Jansen 32f782c03c Don't attempt to create a dummy fsspec if the user cancelled out, just
return None.

For now, if the user asks for TEXT files files without type are also
accepted. But it is time to phase out StandardGetFile and friends, really.
2002-03-29 21:19:37 +00:00
Jack Jansen d21c9f48fa Re-raise the Res.Error if the file doesn't exist. 2002-03-29 21:17:57 +00:00
Jack Jansen 5053b70da0 If the file has no resource fork first check to see whether it's a
datafork-based resource file before trying to decode it as AppleSingle.
2002-03-29 14:29:35 +00:00
Jack Jansen 695b33b02a Removed debug. 2002-03-29 14:28:09 +00:00
Jack Jansen 562baabb61 Added an open_pathname() method which opens a resource file by pathname,
possibly converting from AppleSingle.
2002-03-21 22:38:32 +00:00
Just van Rossum a2168eceb0 mkalias() now also works for folders. Fixes bug #515830. 2002-03-10 19:28:02 +00:00
Jack Jansen 5bb8f78d97 Added support for unicode strings (utxt). 2002-02-05 21:24:47 +00:00
Just van Rossum 4014401c6c Added minimal support for floating windows. 2002-02-04 12:52:44 +00:00
Jack Jansen c8febecd3c Rename the routine to start the target running _start(), with a compatibility
routine start() calling it.

Some suites declare an event start(), which obscures this method, which
causes the class initializer to fail when called with start=1.

Based on bug report and fix suggestion by Jacob Kaplan-Moss.
2002-01-23 22:46:30 +00:00
Jack Jansen 368875c2d3 Regenerated to take advantage of new _builtinSuites package. 2002-01-22 23:22:32 +00:00
Jack Jansen d50c66b1e5 A "magic" suite that is the base suite for StdSuites. This solves a problem with the required events open/openapp/reopen/print/quit officially being part of Required but being defined (by Apple) in Standard.
Most of the code and ideas contributed by Michael j. Barber.
2002-01-22 23:20:12 +00:00
Jack Jansen eafff4c248 Get rid of fsspec type initializer, it wasn't used anyway. 2002-01-21 23:02:03 +00:00
Jack Jansen a4adacbd7e Changes by Donovan Preston (and a few minor ones by me) to make IDE run under
MachoPython. Mainly making sure we don't call routines that don't exist.
2002-01-21 23:01:24 +00:00
Jack Jansen 32d1a3b1c9 Fixed to work under MachoPython, doing the expected unpacking for applesingle files. The IDE still doesn't work, though, because it uses :-style pathnames. 2002-01-13 23:18:00 +00:00
Jack Jansen a22a7b7a06 UH 3.4 checkin that I had forgotten about. 2002-01-04 16:01:23 +00:00
Jack Jansen 3bac5ca11a Some of the new routines are carbon-only. 2002-01-04 16:00:27 +00:00
Jack Jansen 75401a0214 Updated for CW7 2001-12-14 22:53:16 +00:00
Jack Jansen 81feb6c201 Add default values for options in the class init routine, not in the convenience wrapper function: distutils uses the class directly. Fixes bug #492665. 2001-12-14 14:31:15 +00:00
Just van Rossum c97eefc3c9 first checkin for CoreGraphics 2001-12-13 13:15:28 +00:00
Just van Rossum d9c9b57e29 Don't barf when an AppleEvent was not handled. It's ok to ignore. 2001-12-13 12:57:11 +00:00
Just van Rossum e0b9fdca0d Updated for Universal Headers 3.4. 2001-12-12 22:40:27 +00:00
Just van Rossum 485d92e127 Support files for CarbonEvents 2001-12-12 22:39:52 +00:00
Jack Jansen 52306a780b The new menu initialization code would also add the SIOUX menus if a (frozen) Python program had installed its own menubar previously. We now guard against this, with a bit of a hack: FrameWork uses the same Menu ID as Sioux, and the init code checks that the text in the menu is "About SIOUX" before replacing it. 2001-12-10 16:08:14 +00:00
Guido van Rossum 146483964e Patch supplied by Burton Radons for his own SF bug #487390: Modifying
type.__module__ behavior.

This adds the module name and a dot in front of the type name in every
type object initializer, except for built-in types (and those that
already had this).  Note that it touches lots of Mac modules -- I have
no way to test these but the changes look right.  Apologies if they're
not.  This also touches the weakref docs, which contains a sample type
object initializer.  It also touches the mmap test output, because the
mmap type's repr is included in that output.  It touches object.h to
put the correct description in a comment.
2001-12-08 18:02:58 +00:00