Commit Graph

2338 Commits

Author SHA1 Message Date
Jack Jansen 0a3d6060d5 Only show the UI for selecting options if the ALT key was depressed while
dragging or double-clicking the script.
2002-08-01 15:07:00 +00:00
Jack Jansen cce7e34aeb - Install into /Applications/Python in stead of into /Applications.
- Build PythonLauncher.app and PythonIDE.app as well as Python.app.
2002-07-31 14:46:04 +00:00
Jack Jansen 40e2e51a7e Install into /Applications/Python in stead of into /Applications. 2002-07-31 14:45:08 +00:00
Jack Jansen b7276cdf71 Implemented starting Python in a terminal window. The implementation isn't
optimal, especially if Terminal wasn't running yet, but it works.
2002-07-31 13:15:59 +00:00
Jack Jansen 3bbb617ca4 First stab at the launcher application. This will be run when the user
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.
2002-07-29 21:36:35 +00:00
Jack Jansen c7554e28ee Added a __contains__ method. 2002-07-26 11:32:03 +00:00
Jack Jansen 603e76e882 Fixed potential refcount problems with interned strings, adapted comments, added a bit more trace output if verbose > 1. 2002-07-22 12:35:22 +00:00
Jack Jansen 66e794d743 Finally found out why te cf project sometimes worked and someimes didn't. Fixed it. 2002-07-22 12:32:31 +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
Just van Rossum 979c53757b fixed wrong classic MacOS pathname assumption 2002-07-12 16:50:32 +00:00
Just van Rossum 2ad9419c8f minor fixes, removed obsolete warning 2002-07-12 12:06:17 +00:00
Jack Jansen c361f94e1c Got rid of symlink target, and in stead have "make dontinstallmacsubtree"
which uses a .pth file to add the Mac/Lib from your source tree to sys.path.

Also put the Python version number in a variable.Killed by signal 2.
2002-07-08 13:34:23 +00:00
Jack Jansen 77d0717fb3 Define WITH_PYMALLOC as 1 2002-07-08 10:05:23 +00:00
Jack Jansen 059ed83cc3 - Got rid if WITH_CYCLE_GC
- Cleaned up Python banner string, so the normal build for MacPython 2.3
  will have a short banner.
2002-07-07 20:54:44 +00:00
Jack Jansen 1892cf0312 Started on support for using standard setup.py to build at least
the "standard" modules. Unfinished, but shouldn't harm anything.
2002-06-27 22:09:19 +00:00
Jack Jansen c70815ac0f Disabled non-carbon builds (for the moment still optional) and made
these scripts work with the new precompiled headers.
2002-06-26 22:06:08 +00:00
Jack Jansen e0c62b4db0 Make the prototype match the declaration in the GUSI header files. 2002-06-26 20:43:24 +00:00
Jack Jansen 027f6722c4 Changed some prototypes to match the exact definition in some faraway Apple
header files. If we're building with precompiled headers these are in scope.
2002-06-26 20:37:40 +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 7504dfedb4 - Got rid of non-carbon builds
- Use precompiled headers
- Rationalize config file names.
2002-06-26 20:17:02 +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 bdac001cf0 - Got rid of non-carbon stuff
- Use precompiled headers
- Rationalized naming scheme
2002-06-23 22:09:45 +00:00
Jack Jansen 0b06be7b0b Patch #557719 by Tony Lownds, slightly massaged by me: streamline the
OSX framework build process. Things fixed/modified:
- the filesystem case-sensitivity test now works for builds outside
  the source directory
- various other fixes for building outside the source directory
- python.app now has a target in the main Makefile
- WASTE and AquaTk are found more automatically
2002-06-21 14:48:38 +00:00
Jack Jansen fc7d379a96 - Got rid of newmodule.c
- These are the final projects that support classic.
2002-06-20 22:56:22 +00:00
Jack Jansen 5d0990494e Open the source file in universal newline mode. 2002-06-20 20:42:07 +00:00
Guido van Rossum bea18ccde6 SF patch 568629 by Oren Tirosh: types made callable.
These built-in functions are replaced by their (now callable) type:

    slice()
    buffer()

and these types can also be called (but have no built-in named
function named after them)

    classobj (type name used to be "class")
    code
    function
    instance
    instancemethod (type name used to be "instance method")

The module "new" has been replaced with a small backward compatibility
placeholder in Python.

A large portion of the patch simply removes the new module from
various platform-specific build recipes.  The following binary Mac
project files still have references to it:

    Mac/Build/PythonCore.mcp
    Mac/Build/PythonStandSmall.mcp
    Mac/Build/PythonStandalone.mcp

[I've tweaked the code layout and the doc strings here and there, and
added a comment to types.py about StringTypes vs. basestring.  --Guido]
2002-06-14 20:41:17 +00:00
Martin v. Löwis 606edc1d97 Patch #568235: Add posix.setpgid. 2002-06-13 21:09:11 +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
Martin v. Löwis 2befa48926 Patch #505375: Make doc strings optional. 2002-06-09 13:41:37 +00:00
Just van Rossum 84fca948c8 fixed refcount leak in CreateNewWindow() and CreateWindowFromResource(). 2002-06-05 17:41:03 +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 dc74568782 Added missing dirs to LIBSUBDIRS, and reformatted it so it's easier to read
and maintain. Fixes #557482.
2002-05-23 22:18:13 +00:00
Jack Jansen a43b2c4e30 Regenerated from new Universal Headers. 2002-05-22 15:08:58 +00:00
Jack Jansen a7f4ded436 Allow the script to have not only a TEXT filetype but also a null filetype (to enable files to be created from the Unix side of OSX to be droppable on the MacPython interpreter). 2002-05-22 15:02:08 +00:00
Jack Jansen 0e2f798301 Replaced lots of PyMem_DEL() calls with PyObject_DEL(). 2002-05-22 14:31:48 +00:00
Jack Jansen 422cdde69a Enable WITH_PYMALLOC. 2002-05-22 14:31:10 +00:00
Jack Jansen 94ce52e8e8 Added 2 more addresses to send release notifications to. 2002-05-22 14:30:37 +00:00
Jack Jansen eaba9d7b28 Added typechecking to the individual python->CF converters, so we can use them in the CF object initializers safely. 2002-05-13 21:23:10 +00:00
Jack Jansen 23be1ceb51 Added CFPreferences support. Added these as functions, not methods, which seemed counter-intuitive. 2002-05-13 21:21:49 +00:00
Jack Jansen 7906634f28 - Better exception when a NULL CF object is encountered.
- Manually generate a routine with funny error semantics.
2002-05-12 22:04:14 +00:00
Jack Jansen 6d207c09aa - Get data from CFData objects as Python strings and vv.
- Started on supporting CFPropertyLists.
2002-05-10 22:51:58 +00:00
Jack Jansen 42251323b4 Fixed string and dict conversion, and implemented booleans and numbers (int and float). I think we now have enough CFType support to start on plists and CFpreferences!
Transparent handling of unknown CFType objects still TBD.
2002-05-08 22:13:51 +00:00
Jack Jansen 1df628ddce Partial fix for string handling. Null byte TBD. 2002-05-08 15:29:33 +00:00
Jack Jansen 5ad6f7a3a9 More support for bridging between Python and CoreFoundation objects. Still untested. 2002-05-07 23:00:03 +00:00
Jack Jansen cb376460b7 Added pycfbridge.c 2002-05-07 22:59:06 +00:00
Jack Jansen 0627c3e371 Added enumobject.c 2002-05-07 21:42:08 +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 efaffae8f6 First steps towards a generalized converter of Python object
hierarchies to CoreFoundation object hierarchies and vice versa.
2002-05-05 21:48:12 +00:00
Jack Jansen 65300f17c3 Regenerated.
Bugfix candidate.
2002-04-24 09:13:24 +00:00
Jack Jansen 033b79c483 Regenerated. 2002-04-23 22:46:01 +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 18983536dc First part of fix for #493826: if 'errn' key exists in return value this doesn't necesarily signal an error, only if the value is non-zero it does. This
does not correspond with my reading of the documentation, but the OSX Finder can return 'errn'=0, and it knows better than me:-)

Bugfix candidate.
2002-04-23 21:03:21 +00:00
Jack Jansen 656b735af9 Backport of 1.6.4.2.2.3 from release22-maint branch. 2002-04-23 19:59:03 +00:00
Jack Jansen d92b7a01c5 Updated URL. 2002-04-23 19:56:20 +00:00
Jack Jansen 601b2fddf2 Backport of select parts of release22-maint (up to 1.38.4.2.2.3). 2002-04-23 19:50:53 +00:00
Jack Jansen ca80002694 Added Christopher Smith. 2002-04-22 13:56:25 +00:00
Jack Jansen c6d2a20bc6 Removed note on test_time failing.
Bugfix candidate.
2002-04-22 11:46:16 +00:00
Jack Jansen 7aace7a2dc Regenerated to include Internet Config error strings.
Bugfix candidate.
2002-04-22 11:45:46 +00:00
Jack Jansen 117dbdf4b4 Added an optional file with MacErrors.h extensions: IC errors aren't in there.
Bugfix candidate.
2002-04-22 11:44:26 +00:00
Jack Jansen a258324a3d Enable universal newline support for MacPython. 2002-04-14 22:13:35 +00:00
Jack Jansen 7b8c7546eb Mass checkin of universal newline support.
Highlights: import and friends will understand any of \r, \n and \r\n
as end of line. Python file input will do the same if you use mode 'U'.
Everything can be disabled by configuring with --without-universal-newlines.

See PEP278 for details.
2002-04-14 20:12:41 +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 85705e73b1 Got rid of obsolete defines. 2002-04-11 20:56:15 +00:00
Jack Jansen 786681ac60 Got rid of obsolete appearance flag. 2002-04-11 20:56:13 +00:00
Jack Jansen cc8258d827 Added boolobject.c 2002-04-11 20:54:58 +00:00
Jack Jansen 5159f1da7d Got rid of ifdefs for long-obsolete GUSI versions and other lurkers. 2002-04-11 20:53:03 +00:00
Jack Jansen 32baa2c8d2 These are long obsolete. Get rid of them. 2002-04-11 20:50:39 +00:00
Jack Jansen b19444feca Got rid of ifdefs for long-obsolete GUSI versions and other stuff that is now standard (appearance, interned strings) 2002-04-11 20:48:25 +00:00
Jack Jansen 8ab04b4d65 Got rid of ifdefs for long-obsolete GUSI versions. 2002-04-11 20:46:23 +00:00
Jack Jansen e9c0358bf4 e macresource.need() to open the W resource file in the application init
code (if it isn't open already).

PythonIDE still opens the resource file "manually" because it also uses
presence of the CURS resource to determine whether it needs to adjust
sys.path.
2002-04-03 21:52:10 +00:00
Jack Jansen 8f3078b3f0 Got the example program to work in MachoPython. 2002-04-03 21:28:02 +00:00
Jack Jansen ff773eba36 Added a "run with commandline Python" flag. Works in MachoPython, should work
in OSX MacPython (untested), and should be disabled/removed in OS9 (but
that doesn't happen yet).
2002-03-31 22:01:33 +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 77afbc0b3b Add Mac/Lib/lib-scriptpackages to sys.path too. 2002-03-30 23:43:36 +00:00
Jack Jansen 4092606d6b Modified to allow it to run in MachoPython in a reasonable way. It still
needs a decent commandline interface, though.
2002-03-30 23:43:04 +00:00
Jack Jansen 61ef790907 Auxiliary files used by BuildApplet for MachoPython. 2002-03-29 23:48:55 +00:00
Jack Jansen 8134976fee Auxiliary files for building the IDE applet. Running the IDE through
BuildApplet for MachoPython now seems to do the right thing, yeah!
2002-03-29 23:46:34 +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 96f9e0864a Missed one version number. 2002-03-29 23:43:21 +00:00
Jack Jansen bdcb1c4597 First stab at an icon for the IDE. 2002-03-29 22:28:32 +00:00
Just van Rossum ca3d307271 repair damage: canceling the "save options" dialog now works again. 2002-03-29 21:48:42 +00:00
Just van Rossum 8bb61c8d4c repair damage: now works again as a CFM app. 2002-03-29 21:47:56 +00:00
Jack Jansen 9a38947fba Completely revamped newline handling. PyEdit is now newline-preserving
(if a single newline convention is used in the sourcefile), and the
"save options" has a newline style radio button.

The creator radio button also has the new choices PythonW and None.

Just: just shout (and revert) if you don't agree.
2002-03-29 21:26:04 +00:00
Jack Jansen e0ba087d44 Allow file without filetype as long as they end in ".py".
Added a -D flag (can really only be specified on OSX commandline) to not
revector sys.stderr, for debugging the IDE itself. Not sure whether
this should stay.
2002-03-29 21:23:47 +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 2cce33f3bd Added -Wno-long-double 2002-03-29 21:17:14 +00:00
Jack Jansen c5fa303e78 Changed visible name (in dock, menubar) of the interpreter to PythonW.
Changed version numbers and copyright.
2002-03-29 21:16:41 +00:00
Jack Jansen 3cef721b61 Allow .pyc files as applets as well as .py files. .py files have
priority, for safety reasons.
2002-03-29 14:43:50 +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 0035fb27f4 In MachoPython print "Pythonw" in banner to distinguish from command-line
python.
Removed debug output.
2002-03-29 14:27:06 +00:00
Jack Jansen 0cd0e656ef Added target "installunixprograms" which installs python and pythonw in
/usr/local/bin (referring to the framework-based interpreter and Python.app).

Added target symlinkmacsubtree to aid in debugging.
2002-03-29 14:18:18 +00:00
Jack Jansen ab10ce6c6b Shell script that invokes Python.app from the command line. Called pythonw
because of similarity to the same program on Windows.
2002-03-29 14:15:22 +00:00
Just van Rossum 4e6d13cebf Make object browser work in OSX (by rewriting the old browser
LDEF in Python). If at all possible, this should go into 2.2.1.
2002-03-26 12:06:11 +00:00
Jack Jansen a516a59caa Include obmalloc.c in the build. 2002-03-25 15:43:37 +00:00
Jack Jansen 714d7268d5 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
2002-03-25 00:32:17 +00:00