After downloading WASTE, putting it in the right place (as mentioned in the comment in setup.py in CVS) and running ranlib on the libWASTE.a file, I was able to get the WASTE module to compile and link. So far so good.
Then, I dropped PythonIDEMain.py on the Python.app. Error on MacOS.EnableAppSwitch. No problem, just comment it out. I was able to get as far as macresource.need before having tough problems.
It turns out that while os.path.join and the like create '/asdf/zxcv/wqr' slash delimited strings, the code that converts a python string into a C FSRef (? or FSSpec?) needs ':' delimited strings. Or the Carbon library itself needs colon delimited strings. I didn't look into it too much except to determine that slash delimited path strings were the problem. Anyway, I wrote an awful hack in macresource.py that converts any slash delimited paths to colon delimited and allows the IDE to get up and running!!!
There are caveats, however. I had to comment out quite a few more MacOS.EnableAppSwitch calls as well as the call that installs the Console and Output windows in the IDE. But I only worked on it for about an hour, and already, I can create new python files, execute them (output goes to the Console application), use the module browser, see nice traceback windows, and bring up a post-mortem debugger! Awesome.
Here are some screenshots:
- After getting the IDE up and running it's main loop, trying to open a file gives a traceback because the "path" string has slashes in it...
- I can create a new file and execute it, though! Output goes to Console.app
- Lots of other functionality is present, including module browsing, tracebacks, and post-mortem debugging!
1 comment:
your links are corrupt :(
Post a Comment