From Jack.Jansen@cwi.nl Fri May 1 10:39:10 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Fri, 01 May 1998 11:39:10 +0200 Subject: [Pythonmac-SIG] plplot on the Mac In-Reply-To: Message by Just van Rossum , Thu, 30 Apr 1998 22:11:47 +0200 , Message-ID: > I'd say, use the Python approach, which is to put a file containing an alias > pointing to the lib into the preferences folder. That way, if the user moves > the lib folder to a different location on the same volume, the alias will > still > point to the correct place. See the Python sources and EditPythonPrefs.py for > examples on how to do that. And have a look at the Mac preferences.py module (which is used by EditPythonPrefs), which has a nice interface to preferences files with default values taken from other places. The only problem is it isn't documented yet:-( -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From tmk@dad.be Sat May 2 13:00:43 1998 From: tmk@dad.be (tmk) Date: Sat, 2 May 1998 14:00:43 +0200 Subject: [Pythonmac-SIG] How to format the documentation? In-Reply-To: References: Message-ID: At 14:30 +0200 1998/04/27, Just van Rossum wrote: >At 14:08 +0200 4/27/98, Jack Jansen wrote: >>Folks, >>since the mac-specific modules have been taken out of the core Python >>documentation set I have to decide how to format the MacPython >>library manual. I see two possibilities: >>- Create a manual for the mac-specific portions of the library >> only. People will have to get the standard lib.ps (or lib.pdf or >> whatever) to get at the rest of the documentation. >>- Create a customized lib.ps (.pdf, etc) that contains the >> documentation not only for the mac-specific modules but for all >> modules supported on the mac. >>The former approach is handy for people who use Python on multiple >>platforms, the latter for people who use Python on the mac only. >> >>Preferences, please? > >Option 1. I would imagine option 2 would be a maintenance nightmare, >so I am wondering why you offer it to us in the first place... > Option 1. = tmk = From Jack.Jansen@cwi.nl Fri May 8 15:10:19 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Fri, 08 May 1998 16:10:19 +0200 Subject: [Pythonmac-SIG] MacPython 1.5.1 available Message-ID: MacPython 1.5.1 is now available at www.python.org (and at http://www.cwi.nl/~jack.macpython.html ). It contains all the new 1.5.1 functionality, and a few new mac-specific things (since 1.5b3). This release comes with an installer that can install Python for any of PPC, 68, cfm68k macintoshes. The developer kit (to develop extension modules in C, or embed Python in your own application) is also included in the installer. Source is available for the truly demanding user. Packages that are included and optionally installed are Tkinter, the NumPy numerics package (although not the very latest version), the PIL and img image handling packages and a few other third-party contributions, of which Just van Rossum's IDE, an integrated development environment with editor, debugger, etc. deserves special mention. Additions since MacPython 1.4, the last "official" release, are too numerous to mention, see the release notes included in the package. There is one gotcha with this release: the cfm68k version has problems with packages and NumPy. 68k users may have to use the static 68k interpreter or refrain from using these features (or stick with MacPython 1.4). Discussion of MacPython primarily takes place on the pythonmac-sig mailing list. See the SIG section on www.python.org for details. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From Jack.Jansen@cwi.nl Fri May 8 16:18:32 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Fri, 08 May 1998 17:18:32 +0200 Subject: [Pythonmac-SIG] MacPython 1.5.1 available In-Reply-To: Message by Jack Jansen , Fri, 08 May 1998 16:10:19 +0200 , Message-ID: > MacPython 1.5.1 is now available at www.python.org (and at > http://www.cwi.nl/~jack.macpython.html ). The correct URL is, of course, http://www.cwi.nl/~jack/macpython.html as some people pointed out.... Also, Tony Ingraldi graciously ran the postscript documentation through a PDF converter, so Acrobat Reader formatted documentation is now also available. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From mizutori@nn.iij4u.or.jp Mon May 11 16:09:52 1998 From: mizutori@nn.iij4u.or.jp (Mizutori Tetsuya) Date: Tue, 12 May 1998 00:09:52 +0900 Subject: [Pythonmac-SIG] JPython Runner for Macintosh 1.0 (released) Message-ID: [JPython Runner for Macintosh 1.0 - Macintosh Java application] JPython Runner for Macintosh is a launcher program for executing JPython classes or script files on the Macintosh Java platform, and it is easier to use than Apple's JBindery tool. You can use JPython Runner to do any of the following: (1) invoke the Install Shield program for JPython, (2) install standard Python library, and (3) run your JPython scripts as a HelloWorld.py file. The most advantage of using JPython Runner is that you do not need at all to have the MRJ Software Development Kit package, especially JBindery tool. It supports the required suite of AppleScript commands, including Open the specified script files and Quit application. The program and its documentation is available at: JPython is an implementation of the object-oriented scripting language Python, seamlessly integrated with the Java platform. JPython will run flawlessly on any 1.1 compliant Java VM, so it should run on Macintosh with MRJ 2.0. JPython Runner is a Macintosh Java application, and is written in almost 100% pure Java but for calling MRJ's ClassLoader and AppleEvent handlers. The whole source code of JPython Runner is released free in public. System requirements: * Apple's Macintosh Runtime for Java 2.0 or later. * JPython installer class 1.0 and Python standard library package 1.5.1. * PowerPC Macintosh, or 68K Macintosh with CFM-68K Runtime Enabler 4.0. :-)> -- Mizutori Tetsuya, Tokyo, Japan mailto:mizutori@nn.iij4u.or.jp http://www.bekkoame.ne.jp/~mizutori/ From steve@estel.uindy.edu Thu May 14 12:26:24 1998 From: steve@estel.uindy.edu (Steve Spicklemire) Date: Thu, 14 May 1998 06:26:24 -0500 (EST) Subject: [Pythonmac-SIG] trouble building 1.5.1 with Cw3 Message-ID: <199805141126.GAA04753@estel.uindy.edu> I'm trying to build 1.5.1 under CW3. When I try to build the project "PythonCorePPC.prj" I get: Link Error : export symbol 'GUSILoadConfiguration' is undefined Link Error : export symbol 'DelayConsole__17GUSIConfigurationCFv' is undefined Link Error : export symbol 'GUSILoadConfiguration__17GUSIConfigurationFPPc' is undefined Link Error : export symbol 'DoInitialize__11SIOUXSocketFv' is undefined I have the CWGUSI lib.. and it is clearly able to resolve many of the symbols use in the source.... I've looked around for things called 'Configuration' and nothing much comes up. I'm thinking that these are supposed to be defined in some other resource or library that I'm somehow not including in the project... any ideas? thanks! -steve From just@letterror.com Thu May 14 12:33:40 1998 From: just@letterror.com (Just van Rossum) Date: Thu, 14 May 1998 13:33:40 +0200 Subject: [Pythonmac-SIG] trouble building 1.5.1 with Cw3 In-Reply-To: <199805141126.GAA04753@estel.uindy.edu> Message-ID: At 6:26 AM -0500 5/14/98, Steve Spicklemire wrote: >I'm trying to build 1.5.1 under CW3. When I try to build the >project "PythonCorePPC.prj" I get: > >Link Error : export symbol 'GUSILoadConfiguration' is undefined > >Link Error : export symbol 'DelayConsole__17GUSIConfigurationCFv' is >undefined > >Link Error : export symbol >'GUSILoadConfiguration__17GUSIConfigurationFPPc' is undefined > >Link Error : export symbol 'DoInitialize__11SIOUXSocketFv' is undefined > >I have the CWGUSI lib.. and it is clearly able to resolve many of the >symbols use in the source.... I've looked around for things called >'Configuration' and nothing much comes up. I'm thinking that these are >supposed to be defined in some other resource or library that I'm >somehow not including in the project... any ideas? There's a couple of patches to GUSI. You find them in Python 1.5.1:Mac:GUSI-mods. Just From wolfgang@amadeus.m.eunet.de Sun May 17 15:08:27 1998 From: wolfgang@amadeus.m.eunet.de (Wolfgang Keller) Date: Sun, 17 May 1998 16:08:27 +0200 Subject: [Pythonmac-SIG] FaceSpan-like 'AppBuilder' for Python? Message-ID: Hello, I've just installed the demo of FaceSpan on my Mac and (some of you might barbecue me for this, I'm sure :-) I have to say that I like the approach for everything that's more than just a throw-away script. But while Python is imho definitely preferable to AppleScript for more 'serious' applications, unfortunately there seems to be no such thing as FaceSpan for it (the PythonIDE is a great tool, but it's imho entirely different). Or is there a simple way to 'plug' Python into FaceSpan, Codewarrior or vTCL? FaceSpan already offers support for all OSA-languages, but apparently not for Python... Wolfgang Keller Zu Risiken und Nebenwirkungen von Junkmail lesen Sie de.admin.net-abuse.mail und fragen sie Ihren Postmaster oder Provider From aweisser@kau1.kodak.com Tue May 19 03:36:05 1998 From: aweisser@kau1.kodak.com (Adam Weisser) Date: Tue, 19 May 1998 12:36:05 +1000 Subject: [Pythonmac-SIG] Problems installing Python 1.5.1 for Mac Message-ID: <3560F015.EF0A79D9@kodak.com.au> Hi. I'm having problems trying to install Python 1.5.1 for Mac on a 8500/180 running 7.5.5. After installation, when it tries to run the configure script, it comes up immediately with the following error: 'import exceptions' failed; use -v for traceback defaulting to old style exceptions 'import site' failed; use -v for traceback Traceback (innermost last): File "flap:jack:Python:Mac:scripts:ConfigurePython.py", line 11, in ? ImportError: No module named os We also had similar problems installing on a 8100/100 running 7.6.2. Both machines have 200+ Mb RAM and have virtual memory switched off. I also tried decreasing memory allocations to no avail. This problem requires an urgent solution, so please get back to me so I don't have to rewrite the thing in C!!!!!! Thanks Adam -- ---------------------------------------------------------------- Adam Weisser aweisser@kodak.com.au CI Digital Imaging Products & Services ph: +61 3 9353 3923 Kodak Australia fax: +61 3 9353 3940 ---------------------------------------------------------------- From just@letterror.com Tue May 19 10:46:21 1998 From: just@letterror.com (Just van Rossum) Date: Tue, 19 May 1998 11:46:21 +0200 Subject: [Pythonmac-SIG] Problems installing Python 1.5.1 for Mac In-Reply-To: <3560F015.EF0A79D9@kodak.com.au> Message-ID: At 12:36 PM +1000 5/19/98, Adam Weisser wrote: >Hi. > >I'm having problems trying to install Python 1.5.1 for Mac on a 8500/180 >running 7.5.5. This particular configuration should be no problem: a friend of mine uses an 8500 running 7.5.5, and Python is quite happy there. >After installation, when it tries to run the configure >script, it comes up immediately with the following error: > >'import exceptions' failed; use -v for traceback >defaulting to old style exceptions >'import site' failed; use -v for traceback >Traceback (innermost last): > File "flap:jack:Python:Mac:scripts:ConfigurePython.py", line 11, in ? >ImportError: No module named os Hmm, that's bad. Apparently there's something wrong with sys.path, since it can't find the first non-builtin module ConfigurePython tries to import. What install options did you choose? Please remove the Python 1.5.1 prefs file from the prefs folder and run ConfigurePython again. If it still doesn't work, please start the interpreter and do something like this: Python 1.5.1 (#37, Apr 27 1998, 13:36:04) [CW PPC w/GUSI w/MSL] Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import sys >>> sys.path ['', ':', 'DevDev:PyPy:Python 1.5.1:', 'DevDev:PyPy:Python 1.5.1:Lib', 'DevDev:PyPy:Python 1.5.1:PlugIns', 'DevDev:PyPy:Python 1.5.1:Lib:lib-tk', 'DevDev:PyPy:Python 1.5.1:Mac:Lib', 'DevDev:PyPy:Python 1.5.1:Mac:Lib:lib-toolbox', 'DevDev:PyPy:Python 1.5.1:Mac:Lib:lib-scripting', 'DevDev:PyPy:Python 1.5.1::LibLetterror', 'DevDev:PyPy:Python 1.5.1:Extensions:NumPy', 'DevDev:PyPy:Python 1.5.1:Extensions:NumPy:NumPy'] >>> Do the pathnames printed exist? (Especially the :Lib, :Mac:Lib and :PlugIns ones) Is there enough disk space? (Just guessing, the installer should complain about that, but I'm not sure how Python applets/scripts react.) >We also had similar problems installing on a 8100/100 running 7.6.2. >Both machines have 200+ Mb RAM and have virtual memory switched off. Should be no problem. >I also tried decreasing memory allocations to no avail. > >This problem requires an urgent solution, so please get back to me so I >don't have to rewrite the thing in C!!!!!! Which I'm sure will take longer than fixing the Python setup... Good luck, and let us know what happens! (And if others have experienced similar problems: please let us know.) Just From billpy@mousa.demon.co.uk Tue May 19 12:02:20 1998 From: billpy@mousa.demon.co.uk (billpy@mousa.demon.co.uk) Date: Tue, 19 May 1998 07:02:20 -0400 (EDT) Subject: No subject Message-ID: <199805191102.HAA23610@python.org> From billb Tue May 19 08:45:18 1998 remote from Haymarket Message-Id: In-Reply-To: <3560F015.EF0A79D9@kodak.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 19 May 1998 08:45:16 +0100 To: Adam Weisser , pythonmac-sig@python.org From: Bill Bedford Subject: Re:[Pythonmac-SIG] Problems installing Python 1.5.1 for Mac At 12:36 pm +1000 19/05/98, Adam Weisser wrote: ~Hi. ~ ~I'm having problems trying to install Python 1.5.1 for Mac on a 8500/180 ~running 7.5.5. After installation, when it tries to run the configure ~script, it comes up immediately with the following error: ~ ~'import exceptions' failed; use -v for traceback ~defaulting to old style exceptions ~'import site' failed; use -v for traceback ~Traceback (innermost last): ~ File "flap:jack:Python:Mac:scripts:ConfigurePython.py", line 11, in ? ~ImportError: No module named os ~ ~We also had similar problems installing on a 8100/100 running 7.6.2. ~Both machines have 200+ Mb RAM and have virtual memory switched off. ~ ~I also tried decreasing memory allocations to no avail. ~ ~This problem requires an urgent solution, so please get back to me so I ~don't have to rewrite the thing in C!!!!!! ~ Check that the old python extension has been rmoved from your extention folder. Bill Bedford Owner Brit_Rail-L list for the history of railways in Britain Subscribe at autoshare@mousa.demon.co.uk From Jack.Jansen@cwi.nl Tue May 19 13:13:52 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 19 May 1998 14:13:52 +0200 Subject: [Pythonmac-SIG] Re: Startup time In-Reply-To: Message by Rob Managan , Mon, 18 May 1998 17:35:06 -0700 , Message-ID: Rob sent me some profiler output showing that an almost empty Python script spent about 30% of its runtime in find_module() (of which half was spent in PyMac_FindResourceModule). Since 30% was spent in the yield code (and hence given to other applications) this means that half the startup delay can be accounted to import module lookup. I'm sending this reply to the whole group, maybe someone else has some nifty ideas for improvement? > Since I am bothering you I thought I would pass on some profiling info. > This is crude but may help. I have attached 2 text files (tab delimited). > They are sorted by tim espent in a routine and time spent in a routine > including all children. > > I ran a test script that printed one line to the screen and quit. > Find_module and Py_FindResourceModule seem to take the most time. Not sure > what it means though. There's little to be done about that (at least: little that I can think of, so ideas are welcome). find_module has to loop over sys.path trying all extensions to see if the file exists. This is costly on the macintosh. I think there must be a faster way (similar to what "find file" in the finder uses, which is pretty quick), but I haven't had time to investigate. If you have ideas on this I'd definitely like to hear them. Import time is probably one of the most time-consuming tasks in Python: I have a frozen version of our multimedia editor (about 150 modules all together) that starts in about 10 seconds while the non-frozen version takes about a minute on the same machine. The PyMac_FindResourceModule is called once on every sys.path component for each import. It checks whether the sys.path component is a file in stead of a folder, and, if so, checks whether it has a PYC resource of the correct name. All its runtime is collected in the first few imports, though: if string interning is enabled (and it is, in MacPython) it will remember that a certain sys.path component is a folder and do a quick exit the next time. So then the overhead is only a call and a couple of pointer compares for each sys.path component. The effect that the first few calls to FindResourceModule take more time is especially notable since the new exception code in Python 1.5: now the interpreter has to do some imports early in initialization. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From just@letterror.com Tue May 19 20:46:47 1998 From: just@letterror.com (Just van Rossum) Date: Tue, 19 May 1998 21:46:47 +0200 Subject: [Pythonmac-SIG] Microseconds.py Message-ID: I just learned in comp.sys.mac.programmer.whatever that there exists a toolbox function called Microseconds(). Apparently it is not really precise up to the Microsecond, but still a whole lot more precise than TickCount(). Thanks to Jack's wonderful calldll module, I was able to interface it in a matter of minutes (but won't run on 68k ;-). This might be useful for better profiling, where TickCount is really somewhat too course. Just # Microseconds.py import calldll import struct _InterfaceLib = calldll.getlibrary('InterfaceLib') _Microseconds = calldll.newcall(_InterfaceLib.Microseconds, 'None', 'InString') def Microseconds(): """erm, don't try this at home...""" a = '\0' * 8 _Microseconds(a) h, l = struct.unpack('LL', a) return float((h << 32) | l) def _test(): import Evt while 1: print Microseconds() / 1000000.0, print Evt.TickCount() / 60.0 if __name__ == "__main__": _test() From aweisser@kau1.kodak.com Wed May 20 00:42:07 1998 From: aweisser@kau1.kodak.com (Adam Weisser) Date: Wed, 20 May 1998 09:42:07 +1000 Subject: [Pythonmac-SIG] Re: Problems installing Python 1.5.1 for Mac References: Message-ID: <356218CF.41623B93@kodak.com.au> Jack Jansen wrote: > > Adam, didn't I answer this same question a week or so ago, or was that from > someone else with the same problem? Or did I forget to push "send" in the end? Wasn't me Jack. I'm new here... You did answer my request for Mac docs... > Anyway, here goes. First thing to try is to remove all files with "python" in > their name from the system folder. You'll probably have a "PythonCore 1.5.1" > and a "Python 1.5.1 Preferences". Remove your Python and do a new install. Done... and this is what I get when it tryies to configurePython: I cannot import the Res module, nor load it from either of toolboxmodules shared libraries. The errors encountered were: import Res: No module named Res load from toolboxmodules.CFM68K.slb: toolboxmodules.CFM68K.slb: File not found load from toolboxmodules.ppc.slb: toolboxmodules.ppc.slb: File not found > If this doesn't help do the following: > - double-click python while keeping the option keep depressed. > - in the following dialog, select "trace import statements". Press OK. > - At the prompt, type > >>> import sys > >>> print sys.path, sys.prefix, sys.exec_prefix > - send me the result. > You got it: Python 1.5.1 (#37, Apr 27 1998, 13:36:04) [CW PPC w/GUSI w/MSL] Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam # WS2:Applications:Python 1.5.1:Lib:exceptions.pyc matches WS2:Applications:Python 1.5.1:Lib:exceptions.py import exceptions # precompiled from WS2:Applications:Python 1.5.1:Lib:exceptions.pyc # WS2:Applications:Python 1.5.1:Lib:site.pyc matches WS2:Applications:Python 1.5.1:Lib:site.py import site # precompiled from WS2:Applications:Python 1.5.1:Lib:site.pyc # WS2:Applications:Python 1.5.1:Lib:os.pyc matches WS2:Applications:Python 1.5.1:Lib:os.py import os # precompiled from WS2:Applications:Python 1.5.1:Lib:os.pyc import mac # builtin # WS2:Applications:Python 1.5.1:Lib:macpath.pyc matches WS2:Applications:Python 1.5.1:Lib:macpath.py import macpath # precompiled from WS2:Applications:Python 1.5.1:Lib:macpath.pyc # WS2:Applications:Python 1.5.1:Lib:string.pyc matches WS2:Applications:Python 1.5.1:Lib:string.py import string # precompiled from WS2:Applications:Python 1.5.1:Lib:string.pyc import strop # builtin # WS2:Applications:Python 1.5.1:Lib:stat.pyc matches WS2:Applications:Python 1.5 .1:Lib:stat.py import stat # precompiled from WS2:Applications:Python 1.5.1:Lib:stat.pyc >>> import sys >>> print sys.path, sys.prefix, sys.exec_prefix ['', ':', 'WS2:Applications:Python 1.5.1:', 'WS2:Applications:Python 1.5.1:Lib', 'WS2:Applications:Python 1.5.1:PlugIns', 'WS2:Applications:Python 1.5.1:Lib:lib-tk', 'WS2:Applications:Python 1.5.1:Mac:Lib', 'WS2:Applications:Python 1.5.1:Mac:Lib:lib-toolbox', 'WS2:Applications:Python 1.5.1:Mac:Lib:lib-scripting', 'WS2:Applications:Python 1.5.1:Extensions:img:Lib'] WS2:Applications:Python 1.5.1: WS2:Applications:Python 1.5.1: Can anybody help me? Adam -- ---------------------------------------------------------------- Adam Weisser aweisser@kodak.com.au CI Digital Imaging Products & Services ph: +61 3 9353 3923 Kodak Australia fax: +61 3 9353 3940 ---------------------------------------------------------------- From just@letterror.com Wed May 20 01:55:44 1998 From: just@letterror.com (Just van Rossum) Date: Wed, 20 May 1998 02:55:44 +0200 Subject: [Pythonmac-SIG] Microseconds.py In-Reply-To: Message-ID: Hmm, I got an email from the PythonPolice (it is everywhere, it's even watching us in this remote province of PythonLand!) that what I do here is a Sin. Strings are immutable, and the C programmer should make sure they do not change. By using calldll you have almost the power of a C programmer, so the same advise should be followed. Silly me. Thankfully, after some correspondence with Mr. PyPolice, an elegant solution was found. It's still a hack, but at least it's safe... I threw in a Seconds() function as well. Just # Microseconds.py import calldll import struct import array _InterfaceLib = calldll.getlibrary('InterfaceLib') _Microseconds = calldll.newcall(_InterfaceLib.Microseconds, 'None', 'InLong') def Microseconds(): buffer = array.array('c', '\0\0\0\0\0\0\0\0') ptr = buffer.buffer_info()[0] _Microseconds(ptr) h, l = struct.unpack('LL', buffer) return float((h << 32) | l) def Seconds(): return Microseconds() / 1000000.0 def _test(): import Evt while 1: print Seconds(), Evt.TickCount() / 60.0 if __name__ == "__main__": _test() From just@letterror.com Wed May 20 02:01:27 1998 From: just@letterror.com (Just van Rossum) Date: Wed, 20 May 1998 03:01:27 +0200 Subject: [Pythonmac-SIG] Re: Problems installing Python 1.5.1 for Mac In-Reply-To: <356218CF.41623B93@kodak.com.au> References: Message-ID: >> Anyway, here goes. First thing to try is to remove all files with >>"python" in >> their name from the system folder. You'll probably have a "PythonCore 1.5.1" >> and a "Python 1.5.1 Preferences". Remove your Python and do a new install. > >Done... and this is what I get when it tryies to configurePython: > >I cannot import the Res module, nor load it from either of >toolboxmodules shared libraries. The errors encountered were: >import Res: No module named Res >load from toolboxmodules.CFM68K.slb: toolboxmodules.CFM68K.slb: File not >found >load from toolboxmodules.ppc.slb: toolboxmodules.ppc.slb: File not found Is ConfigurePython right about this? Do those files not exist? (in :Python 1.5.1:PlugIns:) Assuming you didn't build Python from the source (if you did, please tell us): The installer must have screwed up. So I ask again: what installer options did you choose? How much free disk is there? Just From managan@llnl.gov Thu May 21 00:53:39 1998 From: managan@llnl.gov (Rob Managan) Date: Wed, 20 May 1998 16:53:39 -0700 Subject: [Pythonmac-SIG] PPC vs 68K Message-ID: Just to stir the soup a little! I am finishing up the latest version of the Numeric extension (also known as NumPy). The PPC version works fine but the CFM68K version is problematic. Seems to work fine from the console. The test file dies on the first line; something like: array([1,2,3]) The same line works fine on the console. So my question is: How much interest is there in the CFM68K version??? I know Jack has said that the CFM68K version has other troubles. How many would use a 68K version? How's that for stirring the soup up! *-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*- Rob Managan mailto://managan@llnl.gov LLNL ph: 925-423-0903 P.O. Box 808, L-183 FAX: 925-423-5804 Livermore, CA 94551-0808 From just@letterror.com Thu May 21 01:18:17 1998 From: just@letterror.com (Just van Rossum) Date: Thu, 21 May 1998 02:18:17 +0200 Subject: [Pythonmac-SIG] PPC vs 68K In-Reply-To: Message-ID: At 4:53 PM -0700 5/20/98, Rob Managan wrote: >Just to stir the soup a little! Yessir! >I am finishing up the latest version of the Numeric extension (also known >as NumPy). The PPC version works fine but the CFM68K version is >problematic. Seems to work fine from the console. The test file dies on the >first line; something like: > >array([1,2,3]) > >The same line works fine on the console. Strange. Something like this crashes from the console, too b.t.w.: >>> a = Numeric.array([0.0, 0.1, 0.2, 0.3]) >>> a kaboom! (the same with integer works ok.) Jack once built a static 68k interpreter with NumPy, which runs fine. So it is pretty hairy cfm68k stuff, I presume :-(. >So my question is: How much interest is there in the CFM68K version??? I >know Jack has said that the CFM68K version has other troubles. How many >would use a 68K version? I would not personally use it much, but I'm working on an app which will use NumPy extensively, and would like people with 68k machines to be able to use it... But: it seems quite a nasty bug, so if it's going to take several people weeks to fix it, it might not be worth it. I'd be happy to test, though, the good ol' Quadra is not far away... (Or if you could help me to set up for debugging, I could step with the MW debugger, I don't really know how to do that for shared libs :-( ) >How's that for stirring the soup up! Very good indeed. Thanks! On a related note: I recently tried to compile calldll for cfm68k, and it partially works. Trouble here is that I have no clue about calling conventions, let alone 68k specifics in that area. Some calls work, some crash. Perhaps you or others know about this subject so we could collectively try to get it to work? Same question remains, though: how many people need it? Just From FoulCraven@aol.com Thu May 21 05:31:00 1998 From: FoulCraven@aol.com (FoulCraven) Date: Thu, 21 May 1998 00:31:00 EDT Subject: [Pythonmac-SIG] gdmodule for MacPython PPC (to generate GIF files via Python) Message-ID: <958b6793.3563ae05@aol.com> I ended up figuring out how to compile the gdmodule extension (http://www.rdt.monash.edu.au/~richard/gdmodule/) into a shared library for MacPython (PPC only) today and it appears to work... I have not played much with it other than running the gddemo.py file that came with the gdmodule soure. I used the GD 1.3 sources and compiled under CodeWarrior 9 (the only and latest version I have access to). Anyway, does anyone want a copy to try out? The demo ran under 7.6.1 on my 7600 at work, and under 8.1 on my 8100 at home. Should I make it available via the web? Regards, Dave DiCarlo From rcohen@humbug.llnl.gov Thu May 21 18:50:29 1998 From: rcohen@humbug.llnl.gov (Ron Cohen) Date: Thu, 21 May 1998 10:50:29 -0700 Subject: [Pythonmac-SIG] PPC vs 68K In-Reply-To: (message from Rob Managan on Wed, 20 May 1998 16:53:39 -0700) Message-ID: <199805211750.KAA05241@humbug.llnl.gov> Rob, although I don't have a physical 68K mac, I would use 68K version, so that I can have the luxury of working on mac versions of NumPy codes under MAE on my Sun workstation; MAE emulates a 68K mac. The actual mac's I have access to are all PPC's, though, so this is not essential. But I got used to being able to do this under 1.4. -Ron Cohen- From fernando@digital.ddnet.es Thu May 21 23:59:35 1998 From: fernando@digital.ddnet.es (Fernando Garcia) Date: Fri, 22 May 1998 00:59:35 +0200 Subject: [Pythonmac-SIG] PPC vs 68K In-Reply-To: <199805211750.KAA05241@humbug.llnl.gov> References: (message from Rob Managan on Wed, 20 May 1998 16:53:39 -0700) Message-ID: Hello I was thinking about this issue with the "I don't mind" floating around me, but suddenly I remember that I'm writing a progamming course with python for Macworld (spanish edition) that starts on July and many, many users in Spain still have 68K machines. Python able to run on 68K machines is a big win, other environments (MPW, CodeWarrior) dont, so It would be nice to have a runnable version (although not perfect). Just my two cents of Euro :-) Regards, Fernando A las 10:50 -0700 del dia 21/5/98, Ron Cohen escribio: >Rob, although I don't have a physical 68K mac, I would use 68K >version, so that I can have the luxury of working on mac >versions of NumPy codes under MAE on my Sun workstation; MAE >emulates a 68K mac. The actual mac's I have access to are >all PPC's, though, so this is not essential. But I got used >to being able to do this under 1.4. > >-Ron Cohen- > > >_______________________________________________ >Pythonmac-SIG maillist - Pythonmac-SIG@python.org >http://www.python.org/mailman/listinfo/pythonmac-sig ***************************************************************************** Digital Domain es miembro de ASIMELEC ***************************************************************************** Digital Domain S.L. Tlef. (91) 7268038 Fax. (91) 7262102 http://www.ddnet.es/ email administrativo: admin@digital.ddnet.es email personal: fernando@digital.ddnet.es *****************************************************************************  From Jack.Jansen@cwi.nl Mon May 25 13:08:29 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Mon, 25 May 1998 14:08:29 +0200 Subject: [Pythonmac-SIG] PPC vs 68K In-Reply-To: Message by Just van Rossum , Thu, 21 May 1998 02:18:17 +0200 , Message-ID: > On a related note: I recently tried to compile calldll for cfm68k, and > it partially works. Trouble here is that I have no clue about calling > conventions, let alone 68k specifics in that area. Some calls work, > some crash. Perhaps you or others know about this subject so we could > collectively try to get it to work? There is a good description of 68K calling sequences, but it is in a very funny place: IM PPC System Software, page 1-42. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From steve@estel.uindy.edu Tue May 26 03:25:20 1998 From: steve@estel.uindy.edu (Steve Spicklemire) Date: Mon, 25 May 1998 21:25:20 -0500 (EST) Subject: [Pythonmac-SIG] Re: trouble building 1.5.1 with Cw3 In-Reply-To: <199805141126.GAA04753@estel.uindy.edu> (steve) Message-ID: <199805260225.VAA25942@estel.uindy.edu> OK... so now I'm building away with CW3! I simply didn't realize that I needed to *replace* sources in the GUSI distribution I somehow thought that the new sources would just get used by the linker automatically (sort of like GUSI functions get used rather than MSL functions). Anyway.. now I'm on to the next problem. I'm building a plugin for Macromedia Director that allows you to mix Lingo/Python within Director 6. They have a pretty good cross platform API and I had little trouble getting the Win32 version to work (after I sorted out a few details that I won't bore you with!). Now to the Mac version of my PlugIn. I can't seem to get off the ground. I can build it, but it dies early in the initialization process. I've made my own PyMac_PluginInitialize() function the idea of which is to do as little diddling as is absolutely required to get GUSI set up and the basic modules initialized. I think there must be some other setting that are really screwing things up. I've got the initialization process running in the debugger and the truly odd thing is that the builtins get set up OK.. but then when the module dictionary get passed back up to the init code it's zero. I really don't get it! I know in the olden days you could set the size of an 'int' and so on... I don't see any such settings in CW3. Any thoughts or moral support would be appreciated. thanks, -steve From Jack.Jansen@cwi.nl Tue May 26 09:36:19 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 26 May 1998 10:36:19 +0200 Subject: [Pythonmac-SIG] Re: trouble building 1.5.1 with Cw3 In-Reply-To: Message by Steve Spicklemire , Mon, 25 May 1998 21:25:20 -0500 (EST) , <199805260225.VAA25942@estel.uindy.edu> Message-ID: > [...] I'm building a > plugin for Macromedia Director that allows you to mix Lingo/Python > within Director 6. They have a pretty good cross platform API and I > had little trouble getting the Win32 version to work (after I sorted > out a few details that I won't bore you with!). Now to the Mac version > of my PlugIn. I can't seem to get off the ground. I can build it, but > it dies early in the initialization process. I've made my own > > PyMac_PluginInitialize() > > function the idea of which is to do as little diddling as is > absolutely required to get GUSI set up and the basic modules > initialized. I think there must be some other setting that are really > screwing things up. Steve, I never looked at Director plugins, but assuming they are code fragments you have to make sure you include set correct library initilization entry point (probably __initialize) in the CFM section of the preferences panel. If the plugin is in another form (code resource or whatever) you also have to make sure the __initialize entry point is called. The exact details should be in the "Targeting MacOS" book on the CW documentation CD. The __initialize call does the magic needed to get C++ initializers executed (needed by GUSI) and setting up info for setjmp/longjmp to work, and possibly more. If you get this to work, would you be willing to share the code (or at least the skeleton) and write up a 1-page description or so? -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From steve@estel.uindy.edu Tue May 26 11:52:33 1998 From: steve@estel.uindy.edu (Steve Spicklemire) Date: Tue, 26 May 1998 05:52:33 -0500 (EST) Subject: [Pythonmac-SIG] Re: trouble building 1.5.1 with Cw3 In-Reply-To: (message from Jack Jansen on Tue, 26 May 1998 10:36:19 +0200) Message-ID: <199805261052.FAA26335@estel.uindy.edu> Hi Jack, Director plugins (called 'extras') are code resources. I'll look at the targeting MacOS book. (amazing, I suppose, that I've never had to refer to it before. ;-> ) The entry points to the code resource are now set to 'Initialize' and 'Terminate'. That seems to work for the examples in the 'XDK'. (It turns out the development kit from Macromedia is set up for CW11, and I'm using CW-Pro3, so I had to change the project around quite a lot to get it to build properly. The example plug-ins seem to work OK though... so I think I'm doing that part right now.) I wonder if the problem is that I'm using the 'PythonCore' shared library to get at Python? I'd like that since it might mean that my plug-in would continue to work with newer versions of Python without a recompile. thanks! -steve >>>>> "Jack" == Jack Jansen writes: >> [...] I'm building a plugin for Macromedia Director that allows >> you to mix Lingo/Python within Director 6. They have a pretty >> good cross platform API and I had little trouble getting the >> Win32 version to work (after I sorted out a few details that I >> won't bore you with!). Now to the Mac version of my PlugIn. I >> can't seem to get off the ground. I can build it, but it dies >> early in the initialization process. I've made my own >> >> PyMac_PluginInitialize() >> >> function the idea of which is to do as little diddling as is >> absolutely required to get GUSI set up and the basic modules >> initialized. I think there must be some other setting that are >> really screwing things up. Jack> Steve, I never looked at Director plugins, but assuming they Jack> are code fragments you have to make sure you include set Jack> correct library initilization entry point (probably Jack> __initialize) in the CFM section of the preferences Jack> panel. If the plugin is in another form (code resource or Jack> whatever) you also have to make sure the __initialize entry Jack> point is called. The exact details should be in the Jack> "Targeting MacOS" book on the CW documentation CD. Jack> The __initialize call does the magic needed to get C++ Jack> initializers executed (needed by GUSI) and setting up info Jack> for setjmp/longjmp to work, and possibly more. Jack> If you get this to work, would you be willing to share the Jack> code (or at least the skeleton) and write up a 1-page Jack> description or so? -- Jack Jansen | ++++ stop the execution Jack> of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you Jack> agree copy these lines to your sig ++++ Jack> http://www.cwi.nl/~jack | see Jack> http://www.xs4all.nl/~tank/spg-l/sigaction.htm From FoulCraven@aol.com Thu May 28 01:58:01 1998 From: FoulCraven@aol.com (FoulCraven@aol.com) Date: Wed, 27 May 1998 20:58:01 EDT Subject: [Pythonmac-SIG] gdmodule for MacPython PPC (to generate GIF files via Pyth Message-ID: Jack, et al: For what it's worth, I've posted the PPC-only MacPython gd module at: http://members.tripod.com/~Icenyne/macpython-gd/ I included my hacked version of the python gddemo.py file and a different demo GIF than the GD1.3 distribution contained. The gd module appears to work. I have also tried Richard Jones graph.py with sucess, but have not included it since it is available at the Python gd module page: http://alumni.dgs.monash.edu.au/~richard/gdmodule/ All the soures and CW project files I used to generate the module are included. I am awfully surprised that I was able to generate a working shared library with such little effort and no reading of manuals, CW or otherwise... I documented all the changes I made in the source files; grep-ing on 'dgd' should find all the changes to the sources I made. The rest of the details are in either version of the readme file. --Dave DiCarlo >> Anyway, does anyone want a copy to try out? The demo ran under >> 7.6.1 on my 7600 at work, and under 8.1 on my 8100 at home. >> Should I make it available via the web? > >Yes, definitely do, and tell me the URL so I can add it to the macpython >page. >-- >Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ >Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig >++++ >http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm > >