This is a big one, touching lots of files. Some of the platforms
aren't tested yet. Briefly, this changes the return value of the
os/posix functions stat(), fstat(), statvfs(), fstatvfs(), and the
time functions localtime(), gmtime(), and strptime() from tuples into
pseudo-sequences. When accessed as a sequence, they behave exactly as
before. But they also have attributes like st_mtime or tm_year. The
stat return value, moreover, has a few platform-specific attributes
that are not available through the sequence interface (because
everybody expects the sequence to have a fixed length, these couldn't
be added there). If your platform's struct stat doesn't define
st_blksize, st_blocks or st_rdev, they won't be accessible from Python
either.
(Still missing is a documentation update.)
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.
parameter for the return string (as unix pathnames are not limited
by the 255 char pstring limit).
Implemented the function for MachO-Python, where it returns unix pathnames.
stored in the CVS repository). It can either decode resource/data forks
in the standard Mac way or decode only the resource fork but store
the result in the data fork (the MacOSX preferred way). Finder info
and all other stuff is ignored.
enough, but may have side-effects because it preallocates a single
codeop.Compiler() to compile all statements the user enters.
Just: please review and retract/modify if necessary.
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
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.