From peter.sommerfeld@gmx.de Sat Nov 7 13:29:18 1998 From: peter.sommerfeld@gmx.de (Peter Sommerfeld) Date: Sat, 07 Nov 1998 14:29:18 +0100 Subject: [Pythonmac-SIG] HMGetHelpMenuHandle() ? Message-ID: <199811091109.GAA20778@python.org> May be I've missed it, but I cannot find HMGetHelpMenuHandle(). Is it available somewhere ? If not, will it be supported later ? BTW: What's about a generic sysCall(address,*params) and get/setSysVar(address,value) ? In case this is possible it wouldn't be nessecary to support all these functions with minor importance. thanks - Peter ------------------------ peter.sommerfeld@gmx.de ------------------------ From Jack.Jansen@cwi.nl Mon Nov 9 12:16:50 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Mon, 09 Nov 1998 13:16:50 +0100 Subject: [Pythonmac-SIG] HMGetHelpMenuHandle() ? In-Reply-To: Message by "Peter Sommerfeld" , Sat, 07 Nov 1998 14:29:18 +0100 , <199811091109.GAA20778@python.org> Message-ID: > > May be I've missed it, but I cannot find HMGetHelpMenuHandle(). > Is it available somewhere ? If not, will it be supported later ? It is in the Help module. > BTW: What's about a generic sysCall(address,*params) and > get/setSysVar(address,value) ? In case this is possible it > wouldn't be nessecary to support all these functions with > minor importance. The calldll module has this, to an extent. It is not very heavily supported, though, since (a) it's dangerous, (b) I myself usually just add new C modules as I need them and (c) I haven't gotten all that many reports of people using it. -- 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 sdm7g@virginia.edu Wed Nov 18 04:23:50 1998 From: sdm7g@virginia.edu (Steven D. Majewski) Date: Tue, 17 Nov 1998 23:23:50 -0500 (EST) Subject: [Pythonmac-SIG] [ The Judge, Java, Windows, Mac, XML (fwd) ] Message-ID: Although the top story, both for Dave and infoworld, news.com, and others is the java injunction, I'm forwarding this for the second item about OSA/scripting support in Mac OS Runtime for Java: I haven't looked at the examples referred to in the new release yet, so I'm not exactly sure what you can do with it, but it's clearly another way to integrate Java and CPython on the Mac. - Steve Majewski ---------- Forwarded message ---------- Date: Wed, 18 Nov 1998 03:19:28 GMT From: DaveNet email To: DaveNet World Subject: The Judge, Java, Windows, Mac, XML ------------------------------------- >From Scripting News... It's DaveNet! Released on 11/17/98; 7:19:25 PM PST ------------------------------------- Earlier today a judge in San Jose issued an injunction forcing Microsoft to either stop shipping Java Runtime with Windows and Internet Explorer, or to ship a Java Runtime that is compatible with the Java Runtime that Sun ships. The judge also ordered Microsoft to stop selling development tools for Java unless they are modified to be compatible with the Java that Sun ships. The San Jose Mercury-News has the full story: This may give Sun a lot of power. They will control a large number of bits on the Microsoft OS distribution, unless Microsoft decides to back off Java, and let Java find its own way onto Windows users' hard disks. I asked Bill Gates about this in a phone conversation late last year. "Why not just omit Java?" I asked. He said they needed Java to be competitive in the browser space. No doubt there's some interesting discussions going on in Redmond tonight! ***In the meantime The ruling comes, coincidentally, on the day we discovered that Apple's Java Runtime for the Mac has extensive, very interesting, hooks into the script runtime environment on the Mac OS. What a trip. As Microsoft is forced to back off their Windows-specific additions to Java, Apple is quietly shipping a Java that bonds at a very intimate level with the Mac OS. It's funny! And fun... ***Apple and XML One final question. Mac and publishing. Big business, right? XML and publishing. A perfect match, right? So why is there no system-level XML parser for the Mac? Apple, would you like some help here? We know some excellent Mac developers who know XML and work for reasonable money. Let's get this going! Dave Winer (Who is proud to be both a Windows and Mac developer.) ------------------------------------------- Scripting News: From savage@2xtreme.net Wed Nov 18 18:30:24 1998 From: savage@2xtreme.net (Bob Savage) Date: Wed, 18 Nov 1998 10:30:24 -0800 Subject: [Pythonmac-SIG] Re: OSA compliance In-Reply-To: Message-ID: <199811181830.KAA08727@smtp2.Stanford.EDU> Steven D. Majewski wrote: >I'm forwarding this for the >second item about OSA/scripting support in Mac OS Runtime for Java: > > > > >I haven't looked at the examples referred to in the new release yet, >so I'm not exactly sure what you can do with it, but it's clearly >another way to integrate Java and CPython on the Mac. This is very interesting indeed! It seems that any OSA-compliant language could fully use the Java Gui facilities. I looked at the OSA stuff that came with Py 1.5, but I decided against getting involved with it at this stage because it said that the whole model for inter-application messaging was going to be rewritten. Has there been any progress on this front? Bob (who is not a nimble enough programmer to adapt quickly when APIs change) Bob From Jack.Jansen@cwi.nl Thu Nov 19 11:01:26 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Thu, 19 Nov 1998 12:01:26 +0100 Subject: [Pythonmac-SIG] Re: OSA compliance In-Reply-To: Message by Bob Savage , Wed, 18 Nov 1998 10:30:24 -0800 , <199811181830.KAA08727@smtp2.Stanford.EDU> Message-ID: Recently, Bob Savage said: > I looked at the OSA stuff that came with Py 1.5, but I decided against > getting involved with it at this stage because it said that the whole model > for inter-application messaging was going to be rewritten. Has there been > any progress on this front? There has been some progress, in that various of the other selectors are now implemented (since 1.5.1). However, what I envisioned when I mentioned the "rewrite" will probably not happen, unless someone else picks it up. What I would have liked was to be able to do things like the following in Python: f = Finder() for folder in f.OpenWindows: if f.FolderName == 'blabla': f.CloseWindow() (forgive the names, they're progbably wrong, no mac near at the moment). The point here is that it would be really nice if OSA object identifiers were first-class Python objects, which you could get the attributes of with the usual Python syntax, and on which you could call methods to invoke operations with direct objects. But, I guess I won't have the time to work on this for the forseeable future:-( -- 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 billpy@mousa.demon.co.uk Fri Nov 20 15:31:37 1998 From: billpy@mousa.demon.co.uk (Bill Bedford) Date: Fri, 20 Nov 1998 15:31:37 +0000 Subject: [Pythonmac-SIG] Re: OSA compliance In-Reply-To: References: Message by Bob Savage , Wed, 18 Nov 1998 10:30:24 -0800 , <199811181830.KAA08727@smtp2.Stanford.EDU> Message-ID: <902757272884603428624@mousa.demon.co.uk> At 12:01 pm +0100 19/11/98, Jack Jansen wrote: > >What I would have liked was to be able to do things like the following >in Python: > f = Finder() > for folder in f.OpenWindows: > if f.FolderName == 'blabla': > f.CloseWindow() >(forgive the names, they're progbably wrong, no mac near at the >moment). The point here is that it would be really nice if OSA object >identifiers were first-class Python objects, which you could get the >attributes of with the usual Python syntax, and on which you could >call methods to invoke operations with direct objects. I'm not sure that you meant this exactly, it implies that each application become a separate python object type, no? If we have an 'ae' object type which represents an application's aete then we would have f = aeopen('finder') for win in f.Get(Container_window().folder()) if win == 'blabla': f.Close(Container_window(win)) > >But, I guess I won't have the time to work on this for the forseeable >future:-( Yep -- but getting here from PyScript doesn't look too difficult so I my have a go when I get too bored with "real" work........................ From FoulCraven@aol.com Wed Nov 25 02:19:05 1998 From: FoulCraven@aol.com (FoulCraven@aol.com) Date: Tue, 24 Nov 1998 21:19:05 EST Subject: [Pythonmac-SIG] Module ctb example(s)? Message-ID: Does anyone have any simple working examples of using the module ctb to send and receive serial data? No modem or anything, just straight serial data. I've tried several ways to make it work but nothing so far has. An example would be muchly appreciated. Thanks, David DiCarlo From just@letterror.com Wed Nov 25 11:04:45 1998 From: just@letterror.com (Just van Rossum) Date: Wed, 25 Nov 1998 12:04:45 +0100 Subject: [Pythonmac-SIG] Module ctb example(s)? In-Reply-To: Message-ID: At 9:19 PM -0500 11/24/98, FoulCraven@aol.com wrote: >Does anyone have any simple working examples of using >the module ctb to send and receive serial data? No modem >or anything, just straight serial data. > >I've tried several ways to make it work but nothing so far >has. An example would be muchly appreciated. Sorry, I know nothing about the ctb module, but since Jack is on the other side of the planet for 5 weeks, I did a search for "ctb" in the Mac directory. Here are two files that use ctb, hope they help you: :Mac:Lib:mactty.py :Mac:Lib:test:ctbtest.py If anyone else has a simple demo (or could write one!), let us know. Just From h3o@veda.is Thu Nov 26 16:10:54 1998 From: h3o@veda.is (the hafler trio) Date: Thu, 26 Nov 1998 11:10:54 -0500 Subject: [Pythonmac-SIG] permutation of lists Message-ID: helloo. I have a situation where I wish to permutate a list in all its possible combinations, given that one can compute the number of permutations with the formula as so: given a list with 5 elements, the number of permutations = 1x2x3x4x5. here is the definition file: def permute(list): if not list: return [list] else: res = [] for i in range(len(list)): rest = list[:i] + list[i+1:] for x in permute(rest): res.append(list[i:i+1] + x) return res then, I import.... which gives simply: >>> from permcomb import * >>> permute([1,2,3]) [[1, 2, 3]] which is quite obviously not what I am after. this works on a Linux box. why, then, not on the Mac? can anyone enlighten me here? best andrew mckenzie From guido@CNRI.Reston.VA.US Thu Nov 26 16:59:35 1998 From: guido@CNRI.Reston.VA.US (Guido van Rossum) Date: Thu, 26 Nov 1998 11:59:35 -0500 Subject: [Pythonmac-SIG] permutation of lists In-Reply-To: Your message of "Thu, 26 Nov 1998 11:10:54 EST." References: Message-ID: <199811261659.LAA28682@eric.cnri.reston.va.us> > def permute(list): > if not list: > return [list] > else: > res = [] > for i in range(len(list)): > rest = list[:i] + list[i+1:] > for x in permute(rest): > res.append(list[i:i+1] + x) > return res > > then, I import.... > which gives simply: > > >>> from permcomb import * > >>> permute([1,2,3]) > [[1, 2, 3]] Your final 'return' is indented one level too much, so you're only doing one iteration through the loop. --Guido van Rossum (home page: http://www.python.org/~guido/) From just@letterror.com Thu Nov 26 17:02:20 1998 From: just@letterror.com (Just van Rossum) Date: Thu, 26 Nov 1998 18:02:20 +0100 Subject: [Pythonmac-SIG] permutation of lists In-Reply-To: Message-ID: At 11:10 AM -0500 11/26/98, the hafler trio wrote: >helloo. > >I have a situation where I wish to permutate a list in all its possible >combinations, given that one can compute the number of permutations with >the formula as so: > >given a list with 5 elements, the number of permutations = 1x2x3x4x5. > >here is the definition file: > >def permute(list): > if not list: > return [list] > else: > res = [] > for i in range(len(list)): > rest = list[:i] + list[i+1:] > for x in permute(rest): > res.append(list[i:i+1] + x) > return res > >then, I import.... >which gives simply: > >>>> from permcomb import * >>>> permute([1,2,3]) >[[1, 2, 3]] > > >which is quite obviously not what I am after. this works on a Linux box. >why, then, not on the Mac? > >can anyone enlighten me here? You don't use any platform-specific features, so logically it is not possible that this works on Linux and not on the Mac. Why don't you run through the program using the debugger in the IDE? Just From just@letterror.com Thu Nov 26 18:22:10 1998 From: just@letterror.com (Just van Rossum) Date: Thu, 26 Nov 1998 19:22:10 +0100 Subject: [Pythonmac-SIG] permutation of lists In-Reply-To: <199811261659.LAA28682@eric.cnri.reston.va.us> References: Your message of "Thu, 26 Nov 1998 11:10:54 EST." Message-ID: At 11:59 AM -0500 11/26/98, Guido van Rossum wrote: >Your final 'return' is indented one level too much, so you're only >doing one iteration through the loop. Now that wouldn't have happened if we had curly braces, right? ;-) Just From just@letterror.com Thu Nov 26 18:42:20 1998 From: just@letterror.com (Just van Rossum) Date: Thu, 26 Nov 1998 19:42:20 +0100 Subject: [Pythonmac-SIG] IDE & MacOS 8.5? Message-ID: I just learned from Andrew Mckenzie that the Mac Python IDE refuses to work under MacOS 8.5. Since I don't have 8.5 yet, could someone help me isolate the problem? I would probably have to send the sources. These will also be included in the next MacPython release (hopefully shortly after Guido releases 1.5.2b1). It would be nice if I could get rid of the problem before then. Thanks in advance. Just From tmk@skynet.be Thu Nov 26 19:06:50 1998 From: tmk@skynet.be (tmk) Date: Thu, 26 Nov 1998 20:06:50 +0100 Subject: [Pythonmac-SIG] IDE & MacOS 8.5? In-Reply-To: Message-ID: Yo Just! How timely I'm just switching gears back to Python on my brand new PowerBook G3 series running MacOS 8.5 which just arrived a couple of days ago and indeed I'd love to help. Regards, = tmk = At 19:42 +0100 26/11/1998, Just van Rossum wrote: >I just learned from Andrew Mckenzie that the Mac Python IDE refuses to work >under MacOS 8.5. Since I don't have 8.5 yet, could someone help me isolate >the problem? I would probably have to send the sources. These will also be >included in the next MacPython release (hopefully shortly after Guido >releases 1.5.2b1). It would be nice if I could get rid of the problem >before then. Thanks in advance. > >Just > > > >_______________________________________________ >Pythonmac-SIG maillist - Pythonmac-SIG@python.org >http://www.python.org/mailman/listinfo/pythonmac-sig From just@letterror.com Fri Nov 27 00:08:20 1998 From: just@letterror.com (Just van Rossum) Date: Fri, 27 Nov 1998 01:08:20 +0100 Subject: [Pythonmac-SIG] IDE & MacOS 8.5? In-Reply-To: Message-ID: I think we've tracked the problem down and it seems that it was not a MacOS 8.5 related problem. So: don't worry, everything is cool. Andrew's problem was caused by the use of raw_input(), which is indeed somewhat broken in the IDE. I sortof fixed it -- sys.stdin now gets redirected to an instance which will call EasyDialogs.AskString() on readline(). An update will ship as part of MacPython 1.5.2b1. Just From doug@sonosphere.com Fri Nov 27 06:36:22 1998 From: doug@sonosphere.com (Doug Wyatt) Date: Fri, 27 Nov 1998 01:36:22 -0500 Subject: [Pythonmac-SIG] IDE & MacOS 8.5? In-Reply-To: Message-ID: At 19:42 +0100 11/26/98, Just van Rossum wrote: > I just learned from Andrew Mckenzie that the Mac Python IDE refuses to work > under MacOS 8.5. Since I don't have 8.5 yet, could someone help me isolate > the problem? I would probably have to send the sources. These will also be > included in the next MacPython release (hopefully shortly after Guido > releases 1.5.2b1). It would be nice if I could get rid of the problem > before then. Thanks in advance. Hi Just, Strangely enough I just now discovered a PyIDE problem. I'm running MacOS 8.1 on a G3 with PyIDE 0.9b4 and Python 1.5.1. If I launch the IDE, quit, then launch it again, I crash during the drawing of the PyIDE splash screen. I mucked around in Macsbug enough to isolate the crash in the Appearance Manager. I unchecked "System-wide platinum appearance" in the Appearance control panel, and the crashes stopped. The calling chain is: Python code calls DrawDialog which calls DrawControls where it crashes the second time it gets there On a hunch I went into Resorcerer, changed the dialog's background color, so as to create a 'dctb' resource, and the problem stopped. Strange! Doug -- Doug Wyatt doug@sonosphere.com Sonosphere (electric/improv music) http://www.sonosphere.com/ From just@letterror.com Fri Nov 27 13:20:00 1998 From: just@letterror.com (Just van Rossum) Date: Fri, 27 Nov 1998 14:20:00 +0100 Subject: [Pythonmac-SIG] IDE & MacOS 8.5? In-Reply-To: References: Message-ID: At 1:36 AM -0500 11/27/98, Doug Wyatt wrote: >Strangely enough I just now discovered a PyIDE problem. > >I'm running MacOS 8.1 on a G3 with PyIDE 0.9b4 and Python 1.5.1. > >If I launch the IDE, quit, then launch it again, I crash during the drawing >of the PyIDE splash screen. I mucked around in Macsbug enough to isolate >the crash in the Appearance Manager. I unchecked "System-wide platinum >appearance" in the Appearance control panel, and the crashes stopped. > >The calling chain is: > Python code calls DrawDialog > which calls DrawControls > where it crashes the second time it gets there > >On a hunch I went into Resorcerer, changed the dialog's background color, >so as to create a 'dctb' resource, and the problem stopped. Strange! Hm, I can't seem to be able to reproduce this at all :-(. I use MacOS 8.1 with "System-wide platinum appearance" on a G3, too. Just a slightly newer version of the IDE but I can't remember having changed much in the splash screen code. Just From h3o@veda.is Fri Nov 27 17:16:19 1998 From: h3o@veda.is (the hafler trio) Date: Fri, 27 Nov 1998 12:16:19 -0500 Subject: [Pythonmac-SIG] IDE & MacOS 8.5? In-Reply-To: References: Message-ID: >At 1:36 AM -0500 11/27/98, Doug Wyatt wrote: >>Strangely enough I just now discovered a PyIDE problem. >> >>I'm running MacOS 8.1 on a G3 with PyIDE 0.9b4 and Python 1.5.1. >> >>If I launch the IDE, quit, then launch it again, I crash during the drawing >>of the PyIDE splash screen. I mucked around in Macsbug enough to isolate >>the crash in the Appearance Manager. I unchecked "System-wide platinum >>appearance" in the Appearance control panel, and the crashes stopped. >> >>The calling chain is: >> Python code calls DrawDialog >> which calls DrawControls >> where it crashes the second time it gets there >> >>On a hunch I went into Resorcerer, changed the dialog's background color, >>so as to create a 'dctb' resource, and the problem stopped. Strange! > >Hm, I can't seem to be able to reproduce this at all :-(. I use MacOS 8.1 >with "System-wide platinum appearance" on a G3, too. Just a slightly newer >version of the IDE but I can't remember having changed much in the splash >screen code. > >Just there appears to be confusion in Mac-Land about the appearance manager versions. I have found that the latest (non-system) commercial software installers have 1.02 which they dump into the extensions folder 'just to be on the safe side', but the version of the system software that came with the machine I am now writing on is 1.03. I have also noticed that some software will simply not run with an incompatible version of the latter. there seems to be no comprehension of a higher version - as in 'if the appearance manager is 1.03, then it can't be current, so let's "upgrade" it to 1.02.' bah. ah well. best andrew mckenzie From doug@sonosphere.com Sun Nov 29 05:42:35 1998 From: doug@sonosphere.com (Doug Wyatt) Date: Sun, 29 Nov 1998 00:42:35 -0500 Subject: [Pythonmac-SIG] IDE & MacOS 8.5? In-Reply-To: References: Message-ID: At 12:16 -0500 11/27/98, the hafler trio wrote: > there appears to be confusion in Mac-Land about the appearance manager > versions. I have found that the latest (non-system) commercial software > installers have 1.02 which they dump into the extensions folder 'just to be > on the safe side', but the version of the system software that came with > the machine I am now writing on is 1.03. I have also noticed that some > software will simply not run with an incompatible version of the latter. > there seems to be no comprehension of a higher version - as in 'if the > appearance manager is 1.03, then it can't be current, so let's "upgrade" it > to 1.02.' bah. Hmn... that could definitely explain things. I have Appearance Extension 1.0.1, which says "MacOS 8.1" in its 'vers' 2 resource. This suggests that maybe it's the version that came with this machine (G3 desktop), but I'll have to fetch my system CD back from my brother to find out. It's very possible that I had a newer one and someone's installer "downgraded" me. I searched the Apple web pages and DejaNews for references to newer versions and didn't see any ... If you'd like to email me 1.0.3, I'd really appreciate that. Thanks for the reply, Doug -- Doug Wyatt doug@sonosphere.com Sonosphere (electric/improv music) http://www.sonosphere.com/