From joe@strout.net Fri Aug 6 17:42:08 1999 From: joe@strout.net (Joseph J. Strout) Date: Fri, 6 Aug 1999 09:42:08 -0700 Subject: [Pythonmac-SIG] NavServices, GWorlds: you want 'em, I got 'em Message-ID: FYI, I've made little helper modules for Navigation Services and GWorlds (offscreen graphics) in MacPython. If anybody wants 'em, just let me know. Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From PClaerhout@CREO.BE Mon Aug 9 13:18:46 1999 From: PClaerhout@CREO.BE (Pieter Claerhout) Date: Mon, 9 Aug 1999 14:18:46 +0200 Subject: [Pythonmac-SIG] Duplicate items in a list Message-ID: <2B1262E83448D211AE4B00A0C9D61B0368847E@MSGEURO1> Hello, does anyone know an easy way to delete duplicate items from a list? What I want to accomplish is something like this: - original list: ("A", "A", "B", "A", "C", "C", "C") - new list: ("A", "B", "C") Kind regards, Pieter Pieter Claerhout - PClaerhout@creo.be Response Center - Applications Support Creo Europe - Excelsiorlaan 21 - 1930 Zaventem - Belgium Tel: +32 (2) 711 14 00 - Fax: +32 (2) 720 96 71 From A.M.INGRALDI@larc.nasa.gov Mon Aug 9 13:35:04 1999 From: A.M.INGRALDI@larc.nasa.gov (Anthony M. Ingraldi) Date: Mon, 09 Aug 1999 08:35:04 -0400 Subject: [Pythonmac-SIG] Duplicate items in a list Message-ID: <199908091235.IAA02835@express.larc.nasa.gov> On Monday, August 9, 1999, Pieter Claerhout wrote: > does anyone know an easy way to delete duplicate items from a list? > This may not be the most efficient way, but anyway... def remove_duplicates(aList): newList = [] for item in aList: if not (item in newList): newList.append(item) return newList -- Tony Ingraldi A.M.INGRALDI@LaRC.NASA.GOV Phone : (757) 864-3039 Fax : (757) 864-7892 From joe@strout.net Mon Aug 9 13:39:02 1999 From: joe@strout.net (Joseph J. Strout) Date: Mon, 9 Aug 1999 05:39:02 -0700 Subject: [Pythonmac-SIG] Duplicate items in a list In-Reply-To: <2B1262E83448D211AE4B00A0C9D61B0368847E@MSGEURO1> Message-ID: At 5:18 AM -0700 8/9/99, Pieter Claerhout wrote: >does anyone know an easy way to delete duplicate items from a list? Assuming the items are hashable, the best way (AFAIK) is to stuff them into a dictionary, then get the dictionary's keys(). Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From andres@corrada.com Mon Aug 9 14:24:12 1999 From: andres@corrada.com (Andres Corrada) Date: Mon, 09 Aug 1999 09:24:12 -0400 Subject: [Pythonmac-SIG] Duplicate items in a list References: <2B1262E83448D211AE4B00A0C9D61B0368847E@MSGEURO1> Message-ID: <37AED625.B560B0D8@corrada.com> Hi Pieter, I won't vouch for my understanding and use of the copy module, but here is some code that deletes duplicates from a list (not tuple): import copy def DeleteDuplicates( list ): if len( list ) <= 1: return copy.copy( list ) else: return ListJoin( [ list[ 0 ] ], RemoveAll( list[ 0 ], DeleteDuplicates( list[ 1: ] ) ) ) def ListJoin( listA, listB ): returnList = [] for i in range( len( listA ) ): returnList.append( listA[ i ] ) for i in range( len( listB ) ): returnList.append( listB[ i ] ) return returnList def RemoveAll( objectToRemove, list ): returnList = copy.copy( list ) while 1: try: returnList.remove( objectToRemove ) except: break return returnList ------------------------------------------------------- Andres Corrada-Emmanuel Email: andres@corrada.com Owner http://www.corrada.com/mamey Mamey Phone: (413) 587-9595 ------------------------------------------------------- From jhrsn@pop.pitt.edu Mon Aug 9 20:36:10 1999 From: jhrsn@pop.pitt.edu (Jim Harrison) Date: Mon, 9 Aug 1999 15:36:10 -0400 Subject: [Pythonmac-SIG] Status of MacPython? Message-ID: <199908091934.PAA27806@post-ofc04.srv.cis.pitt.edu> I'm new to Python (but in the process of getting hooked) and I'm interested in working in python on the Mac in addition to working with Zope (=Python) on Linux. I guess I can add my name to those who will be working with both Mac and Linux and who would like to see an efficient built-in solution for the tab vs. space problem in line indenting and other outstanding issues. I would also vote for syntax coloring in the IDE even if multiline strings are not cleanly handled. It would be really useful to me to see some brief comments on the future of Mac Python from Jack and/or Just, even though I know that crystal-ball stuff is inexact. Is it anticipated that standard python will compile for Mac OS X or will a special distribution be required? Will Mac Python continue as a separate entity? Are additional Mac Python releases (i.e., the 1.5.2 final) anticipated? If MacPython will continue in the future, what's the prognosis of the current development effort? Jim Harrison ________________________________________________________________________ James H. Harrison, Jr., MD, PhD Associate Director, Division of Pathology Informatics Department of Pathology, Univ. of Pittsburgh Health System C920 PUH, 200 Lothrop Street Pittsburgh, PA 15213 jhrsn@pop.pitt.edu | voice: 412-647-5529 | fax: 412-647-9588 "If you want sense, you'll have to make it yourself!!"-Norton Juster ________________________________________________________________________ From joe@strout.net Mon Aug 9 20:58:01 1999 From: joe@strout.net (Joseph J. Strout) Date: Mon, 9 Aug 1999 12:58:01 -0700 Subject: [Pythonmac-SIG] Status of MacPython? In-Reply-To: <199908091934.PAA27806@post-ofc04.srv.cis.pitt.edu> References: <199908091934.PAA27806@post-ofc04.srv.cis.pitt.edu> Message-ID: At 3:36 PM -0400 08/09/99, Jim Harrison wrote: >working with both Mac and Linux and who would like to see an efficient >built-in solution for the tab vs. space problem in line indenting... I also go back and forth between MacOS and Linux a lot, using Python on both (there's a lot of Python CGI on my web site these days). I just use tabs for everything. Works for me -- what's wrong with this solution? I use pico when editing in Unix (obviously I do this as little as possible!), but I've heard that emacs is quite configurable; I think you can make it do four-character tabs, at which point it's just like the Mac. >other outstanding issues. I would also vote for syntax coloring in the >IDE even if multiline strings are not cleanly handled. Hear hear! :) >It would be really useful to me to see some brief comments on the future >of Mac Python from Jack and/or Just, even though I know that crystal-ball >stuff is inexact. Is it anticipated that standard python will compile for >Mac OS X or will a special distribution be required? I'm not Jack or Just, but in case my $0.02 is worth that much, from what I know of MacOS X the standard Unix distribution should compile out of the box (at least, as much as any unix package compiles out-of-the-box for any new flavor of Unix). > Will Mac Python continue as a separate entity? This is a good question. I'd guess that some Mac-specific modules will always be in order, for accessing Mac services not available on other platforms. Whether we'll need an entirely separate build is unclear. Probably we will, as most Mac users won't want to follow the usual Unix method of downloading things as source code and wrestling with it for a few hours to get it to compile before using it. > Are additional Mac Python releases (i.e., >the 1.5.2 final) anticipated? A good question... Jack, Just? Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From jeffrey@Digicool.com Mon Aug 9 21:05:25 1999 From: jeffrey@Digicool.com (Jeffrey P Shell) Date: Mon, 09 Aug 1999 16:05:25 -0400 Subject: [Pythonmac-SIG] Status of MacPython? Message-ID: <199908092002.QAA03328@python.org> > It would be really useful to me to see some brief comments on the future > of Mac Python from Jack and/or Just, even though I know that crystal-ball > stuff is inexact. Is it anticipated that standard python will compile for > Mac OS X or will a special distribution be required? Will Mac Python > continue as a separate entity? Are additional Mac Python releases (i.e., > the 1.5.2 final) anticipated? If MacPython will continue in the future, > what's the prognosis of the current development effort? It wasn't terribly difficult building Python 1.5.2 on MacOS X Server, but Mac OS X was quite a different story, mostly due to it being so new and in development stage that none of the configuration scripts would catch the right things. I tried and tried and hacked away at these, but it is something that is nowhere near my realm of expertise and when I finally got Python to compile without breaking, the compiled code wasn't always in the right place (it seems that some stuff went into the .dylib file, while a majority went into the .a). At this point, I gave up. I don't think it will be too hard getting (normal) Python to compile on MacOS X, it'll just require someone smarter than I am about configuration script programming and all the wild new features of MacOS X's Unix side. (I bet it's a fair amount of trickery getting a good Python built on Darwin too). MacPython will run, but it would be in the "Blue Box" area until someone takes the time to make it Carbon complient. As I'm not a MacOS Developer (just a long-time-happy-user), I don't know the difficulty in this. Tip Top (www.tiptop.com) makes a product called Objective Everything which opens up OpenStep/YellowBox/Cocoa (whatever flavor NeXT's old rockin framework is called this month) to Python, Perl, and TCL. It runs on MacOS X and Server, but currently is only Python 1.4. There is supposed to be a new release sometime (hopefully soon) that uses Python 1.5. Of interest is that TipTop says that Objective Everything says (and I quote): "Carbon development and scripting. Objective-Everything is Carbon-ready! It lets you leverage the Carbon API from any of the Objective languages." (from the MacOS X Server press release for OE). So there is another option for MacOS X and Python development for Mac OS (Carbon) applications, and presumably it'll be an alternative to jumping-through-appleevents to script other applications via Python. That's all I know on the MacOS X side. I think MacPython will continue to be MacOS "Classic" (I think that's the official term from Apple) based. A unixy build of Python for MacOS X's BSDI underbelly will be a different beast, and there'll also be the commercial-but-free-for-some-uses Objective Everything for Cocoa/Carbon development in MacOS X and Python. (As a note: when installing LinuxPPC, don't get too cocky reordering your partitions with pdisk. *sigh*. Especially, don't say "I hope my regular MacOS Partition has survived all this" jokingly, because, well, it didn't). From jack@oratrix.nl Tue Aug 10 09:33:39 1999 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 10 Aug 1999 10:33:39 +0200 Subject: [Pythonmac-SIG] Status of MacPython? In-Reply-To: Message by Jim Harrison , Mon, 9 Aug 1999 15:36:10 -0400 , <199908091934.PAA27806@post-ofc04.srv.cis.pitt.edu> Message-ID: <19990810083340.50A9C303120@snelboot.oratrix.nl> > It would be really useful to me to see some brief comments on the future > of Mac Python from Jack and/or Just, even though I know that crystal-ball > stuff is inexact. Is it anticipated that standard python will compile for > Mac OS X or will a special distribution be required? Will Mac Python > continue as a separate entity? Are additional Mac Python releases (i.e., > the 1.5.2 final) anticipated? If MacPython will continue in the future, > what's the prognosis of the current development effort? I'm not sure what the best choice is for MacOS X. One possibility would be to start with plain-old-unix-Python and add the Mac modules we want. The other would be to start with MacPython, make it carbon-compliant and start with that. Each of the approaches has its merits: The unix-approach would bring MacPython more in line with the other platforms, but the mac-approach would make it easier to keep things like the current preferences stuff, PYC-resources and the dynamic module scheme. Maybe we could start off with two distributions (or one distribution with two binaries?) and work towards one binary from there, I don't know... Of course, things that third parties (like CodeWarrior) do could also have great impact on this question. And 1.5.2 final is alive and kicking, the problem is that I'm fiendishly busy, and so is Just, and the final packing up of a distribution just doesn't seem to happen. Actually, if I have to pack something up right now it'll be 1.5.2+, as my sources track the CVS repository and these have gone past 152 (and I don't have the time to retrieve the old stuff, adapt the projects, etc). -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From jeffrey@Digicool.com Tue Aug 10 15:21:35 1999 From: jeffrey@Digicool.com (Jeffrey P Shell) Date: Tue, 10 Aug 1999 10:21:35 -0400 Subject: [Pythonmac-SIG] Status of MacPython? Message-ID: <199908101418.KAA24620@python.org> > I'm not sure what the best choice is for MacOS X. One possibility would be to > start with plain-old-unix-Python and add the Mac modules we want. The other > would be to start with MacPython, make it carbon-compliant and start with > that. Each of the approaches has its merits: The unix-approach would bring > MacPython more in line with the other platforms, but the mac-approach would > make it easier to keep things like the current preferences stuff, > PYC-resources and the dynamic module scheme. > > Maybe we could start off with two distributions (or one distribution with two > binaries?) and work towards one binary from there, I don't know... Of course, > things that third parties (like CodeWarrior) do could also have great impact > on this question. The new version of ProjectBuilder in MacOS X (Developer Preview) has the ability to import projects, and (I believe) it can import CodeWarrior projects so work can be done to carbon-ify them. I think I was able to bring in the MacPython sources this way, but I didn't know my way around near-well enough to go any further. I'm getting a new 8 gig hard drive today whose purpose is to let me install a few alternate OS's and not wipe my main hard drive out again *waaa!*. Getting Python compiled on MacOS X is not a high priority for me, but MacOS X Server may become one if DC Customers want to deploy Zope on that platform, so I'm interested in getting that up and running again. Would a carbon-complient MacPython mean it would support threads? That's the most important thing to me. I always end up compiling Python on XXX platforms because any "shipped" Pythons tend not to be threaded. .jPS From jhrsn@pop.pitt.edu Tue Aug 10 16:21:39 1999 From: jhrsn@pop.pitt.edu (Jim Harrison) Date: Tue, 10 Aug 1999 11:21:39 -0400 Subject: [Pythonmac-SIG] Status of MacPython? Message-ID: <199908101519.LAA02151@post-ofc04.srv.cis.pitt.edu> Jeffrey Shell wrote: >Getting Python compiled on MacOS X is not a high priority for me, but MacOS >X Server may become one if DC Customers want to deploy Zope on that >platform, so I'm interested in getting that up and running again. I'd be interested in hearing from you in the future if you deploy Zope on MacOS X Server and/or MacOS X. My current project is a Linux Zope deployment on a G3 with Linux and Mac partitions, for intranet development. It would be interesting to take a look at performance and management requirements for MacOS X [Server or not] vs. Linux. If I could revert to a simpler setup in the future it would be an advantage. Jim ________________________________________________________________________ James H. Harrison, Jr., MD, PhD Associate Director, Division of Pathology Informatics Department of Pathology, Univ. of Pittsburgh Health System C920 PUH, 200 Lothrop Street Pittsburgh, PA 15213 jhrsn@pop.pitt.edu | voice: 412-647-5529 | fax: 412-647-9588 "If you want sense, you'll have to make it yourself!!"-Norton Juster ________________________________________________________________________ From steele@cs.brandeis.edu Wed Aug 11 11:19:13 1999 From: steele@cs.brandeis.edu (Oliver Steele) Date: Wed, 11 Aug 1999 06:19:13 -0400 Subject: [Pythonmac-SIG] Using Spaces for indentation in IDE Message-ID: <199908111019.GAA05467@life.ai.mit.edu> Joseph J. Strout writes: > At 1:45 PM -0700 07/23/99, Chris Barker wrote: >>Can the IDE be set up to use just spaces for indentation? I'd like it to >>be just like Emacs mode. > > If you must continue down this evil path, I think this is your most likely > bet. Hack the IDE code that loads and saves files. On loading, have it > convert spaces to tabs. On saving, have it convert tabs to spaces. I needed a solution for this too. (In addition to wanting to work with the many sources I download from the web, I'm doing cross-development work with people using other IDEs on Windows and UNIX.) I've put a patch that does this at http://www.cs.brandeis.edu/~steele/sources/python.html, at PyIDESpacesToTabsPatch.py. 'import' this file, and it'll patch the IDE to change spaces to tabs, and back. This is only minimally tested, but if you desperately need to edit space-indented files you might see whether it actually solves your problem -- if it's useful for enough people, maybe something like it can go in the IDE. > This will be far easier than trying to get the text engine (WASTE) to > understand that a tab isn't really a tab, but some variable number of > spaces, and that when you hit delete, sometimes you don't want to delete > just one space, but 2 or 3 or 4. This was my first approach (getting PythonIDE to understand that spaces and tabs both indent) -- it avoids PyIDESpacesToTabsPatch's problem of figuring out which tabs used to be spaces and which ones used to be tabs, and it copies the spec of python-mode.el, which seemed like a Good Thing -- but it's annoying to click in the middle of an indentation level, and to have to arrow or backspace multiple times, so I prefer the other solution. --- From PyIDESpacesToTabsPatch: "This is a work in progress; use it at your own risk. Patches PyIDE's edit windows so that an editor opened onto a file indented with spaces will have represent the spaces as tabs. Saving such a file will write it back out with spaces. Usage: Put this file in Python's search path, and after PythonIDE has launched, type 'import PyIDESpacesToTabsPatch' at its command line. To turn off the feature: import PyEdit PyEdit.Editor.CONVERT_SPACES_TO_TABS = 0 To turn it back on: PyEdit.Editor.CONVERT_SPACES_TO_TABS = 1 To do: - auto-detect 2- and 8-space indents - save a new buffer as space-indented - only tabify *.py files? - let you see whether the file you're editing is space-indented" From andres@corrada.com Wed Aug 11 16:46:03 1999 From: andres@corrada.com (Andres Corrada) Date: Wed, 11 Aug 1999 11:46:03 -0400 Subject: [Pythonmac-SIG] Status of MacPython? References: <199908101519.LAA02151@post-ofc04.srv.cis.pitt.edu> Message-ID: <37B198F2.A1B169E3@corrada.com> Jack Jansen wrote: > And 1.5.2 final is alive and kicking, the problem is that I'm fiendishly busy, > and so is Just, and the final packing up of a distribution just doesn't seem > to happen. Can the distribution be made publicly accesible so that the community can help in getting it ready for release? It seems that there is a lot of Mac talent out there that is chomping at the bit for the release. Do they care enough to help out? ------------------------------------------------------- Andres Corrada-Emmanuel Email: andres@corrada.com Owner http://www.corrada.com/mamey Mamey Phone: (413) 587-9595 ------------------------------------------------------- From billb@mousa.demon.co.uk Fri Aug 13 12:32:04 1999 From: billb@mousa.demon.co.uk (Bill Bedford) Date: Fri, 13 Aug 1999 12:32:04 +0100 Subject: [Pythonmac-SIG] Mac PIL Message-ID: Is there a version of PIL that doesn't use Ghostscript to manipulate EPS images? -- Bill Bedford billb@mousa.demon.co.uk History has to be observed, otherwise its not history, It's just.... well one thing happening after another. From jhrsn@pop.pitt.edu Sat Aug 14 16:47:27 1999 From: jhrsn@pop.pitt.edu (Jim Harrison) Date: Sat, 14 Aug 1999 11:47:27 -0400 Subject: [Pythonmac-SIG] Acta outliner as MacPython code editor Message-ID: <199908141552.LAA16063@infobahn.icubed.com> The Acta outliner was a small, fast, elegant outline editor for the Mac that was in fairly wide use in the late 80's. It was one of my favorite programs at the time, but it has been out of distribution since the early 90's. It was recently released as 'Acta Classic' for free downloading by A Sharp and it is listed along with some comments on Macintouch's 'Antique Software' page . This version runs just fine on current hardware and software (system 8.6). For a lark, I tried setting up a Python script in Acta. I've liked outliners as code editors since using Frontier for a while several years back. Maintaining code in an outliner helps with correct indenting and also allows collapsing or expanding of code blocks or hierarchical trees within code, so you can jump from a high level to a detailed view of code easily. Python, with its indentation-based code blocks and lack of bracket delimiters is ideal for editing by an outliner. It turns out that Acta works pretty well as a Python editor. There are limitations, of course. You must save the code from Acta as text, with no topic labels (this is easy). This places tabs in front of each line corresponding to the indentation level. These text files cannot be re-opened for editing in Acta--but they are similar to files saved from the IDE and so they can be opened and edited in the IDE. You also need to change the creator type to 'Pyth' for drag & drop to work. If Acta would read in the text files, and if it had a plugin architecture that allowed development of syntax coloring ( :-) ) and passing code to Python for execution, we'd have a really unique alternative editor. Jim Harrison ________________________________________________________________________ James H. Harrison, Jr., MD, PhD Associate Director, Division of Pathology Informatics Department of Pathology, Univ. of Pittsburgh Health System C920 PUH, 200 Lothrop Street Pittsburgh, PA 15213 jhrsn@pop.pitt.edu | voice: 412-647-5529 | fax: 412-647-9588 "If you want sense, you'll have to make it yourself!!"-Norton Juster ________________________________________________________________________ From doug@sonosphere.com Mon Aug 16 08:16:44 1999 From: doug@sonosphere.com (Doug Wyatt) Date: Mon, 16 Aug 1999 00:16:44 -0700 Subject: [Pythonmac-SIG] Error in PyDebugger.py / bdb.py In-Reply-To: <199907182047.NAA26872@mail-gw5.pacbell.net> References: <199907182047.NAA26872@mail-gw5.pacbell.net> Message-ID: At 13:47 -0700 7/18/99, savageb wrote: >> Try replacing bdb.py with the attached file. >> >> Just >> > > That didn't fix it. I get the following traceback: > > > File "bdb.py", line 248, in clear_all_file_breaks > blist = Breakpoint.bplist[filename, line] > > or : > > File "bdb.py", line 223, in clear_break > for bp in Breakpoint.bplist[filename, lineno][:]: > > depending on whether I am trying to clear all or just the single breakpoint. > > I am going to try a clean reinstall of Python, just to make sure I don't > have something else messed up. Hi, FWIW, this is happening to me too, with a fairly recently clean install of 1.52b1. I don't seem to remember this happening with 1.51. Doug From PClaerhout@CREO.BE Mon Aug 16 11:22:37 1999 From: PClaerhout@CREO.BE (Pieter Claerhout) Date: Mon, 16 Aug 1999 12:22:37 +0200 Subject: [Pythonmac-SIG] Templates in PythonIDE Message-ID: <2B1262E83448D211AE4B00A0C9D61B0368849B@MSGEURO1> Hi guys, I just had an idea of an addition that I would find useful to add to the PythonIDE. Can we maybe implement some sort of templates, instead of typing every standard part again and again (a bit like in Visual Basic)? I think we have to direct this question to Jack or Just?? I don't know if it's already on the to do-list for the new version?? If it already was, then just forget this mail... By the way: when will the final release of Python 1.5.2 for the mac be available (together with a new version of the IDE maybe??)?? Kind regards, Pieter Pieter Claerhout - PClaerhout@creo.be Response Center - Applications Support Creo Europe - Excelsiorlaan 21 - 1930 Zaventem - Belgium Tel: +32 (2) 711 14 00 - Fax: +32 (2) 720 96 71 From just@letterror.com Mon Aug 16 11:43:54 1999 From: just@letterror.com (Just van Rossum) Date: Mon, 16 Aug 1999 12:43:54 +0200 Subject: [Pythonmac-SIG] Error in PyDebugger.py / bdb.py In-Reply-To: References: <199907182047.NAA26872@mail-gw5.pacbell.net> <199907182047.NAA26872@mail-gw5.pacbell.net> Message-ID: >FWIW, this is happening to me too, with a fairly recently clean >install of 1.52b1. I don't seem to remember this happening with 1.51. I've uploaded a fixed IDE and bdb.py for use with MacPython 1.5.2b1 to (no, Joe's syntax coloring code is not in there yet...) Just From doug@sonosphere.com Mon Aug 16 17:19:01 1999 From: doug@sonosphere.com (Doug Wyatt) Date: Mon, 16 Aug 1999 09:19:01 -0700 Subject: [Pythonmac-SIG] Error in PyDebugger.py / bdb.py In-Reply-To: References: <199907182047.NAA26872@mail-gw5.pacbell.net> <199907182047.NAA26872@mail-gw5.pacbell.net> Message-ID: At 12:43 +0200 8/16/99, Just van Rossum wrote: >>FWIW, this is happening to me too, with a fairly recently clean >>install of 1.52b1. I don't seem to remember this happening with 1.51. > > I've uploaded a fixed IDE and bdb.py for use with MacPython 1.5.2b1 to > > Thanks, but that doesn't solve it. Now I'm getting a KeyError: File "bdb.py", line 223, in clear_break for bp in Breakpoint.bplist[filename, lineno][:]: Breakpoint.bplist is an empty dictionary (though my file has several breakpoints). Doug From just@letterror.com Mon Aug 16 17:55:32 1999 From: just@letterror.com (Just van Rossum) Date: Mon, 16 Aug 1999 18:55:32 +0200 Subject: [Pythonmac-SIG] Error in PyDebugger.py / bdb.py In-Reply-To: References: <199907182047.NAA26872@mail-gw5.pacbell.net> <199907182047.NAA26872@mail-gw5.pacbell.net> Message-ID: At 9:19 AM -0700 8/16/99, Doug Wyatt wrote: >Thanks, but that doesn't solve it. Now I'm getting a KeyError: > >File "bdb.py", line 223, in clear_break > for bp in Breakpoint.bplist[filename, lineno][:]: > >Breakpoint.bplist is an empty dictionary (though my file has several >breakpoints). Hm, could you try trashing the Python IDE prefs file and see whether that helps? Just From doug@sonosphere.com Mon Aug 16 19:52:29 1999 From: doug@sonosphere.com (Doug Wyatt) Date: Mon, 16 Aug 1999 11:52:29 -0700 Subject: [Pythonmac-SIG] Error in PyDebugger.py / bdb.py In-Reply-To: References: <199907182047.NAA26872@mail-gw5.pacbell.net> <199907182047.NAA26872@mail-gw5.pacbell.net> Message-ID: At 18:55 +0200 8/16/99, Just van Rossum wrote: > At 9:19 AM -0700 8/16/99, Doug Wyatt wrote: >>Thanks, but that doesn't solve it. Now I'm getting a KeyError: >> >>File "bdb.py", line 223, in clear_break >> for bp in Breakpoint.bplist[filename, lineno][:]: >> >>Breakpoint.bplist is an empty dictionary (though my file has several >>breakpoints). > > Hm, could you try trashing the Python IDE prefs file and see whether that > helps? Aak, my mistake; I somehow was still running the old IDE. All better now! Thanks, Doug From dev2@iodp.com Tue Aug 17 14:55:32 1999 From: dev2@iodp.com (Arnaud Masson) Date: Tue, 17 Aug 1999 15:55:32 +0200 Subject: [Pythonmac-SIG] MacPython source, which CodeWarrior ? Message-ID: Hi I have downloaded Python 1.5.1 source. The doc says the projects are for CW Pro 1 but I when I open them with Pro 1, the IDE says the projects are for a newer IDE. Which version of CW is actually required ? Also how easy it is to make an existing C++, object oriented application scriptable by an embeded python environment ? Has anyone already made that for a commercial Mac application ? I have tried the nice Python IDE that comes in with Mac Python 1.5.1. When I run some samples, IDE menus are deleted and I can't use it anymore. I must relaunch the Python IDE. What's wrong ? Is it fixed in the 1.5.2b release ? Thanks in advance. ------------------------------- Arnaud Masson Software Engineer - IoDP ------------------------------- From jack@oratrix.nl Tue Aug 17 15:12:55 1999 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 17 Aug 1999 16:12:55 +0200 Subject: [Pythonmac-SIG] MacPython source, which CodeWarrior ? In-Reply-To: Message by Arnaud Masson , Tue, 17 Aug 1999 15:55:32 +0200 , Message-ID: <19990817141256.33226303120@snelboot.oratrix.nl> > I have downloaded Python 1.5.1 source. > The doc says the projects are for CW Pro 1 but I when I open them with Pro > 1, the IDE says the projects are for a newer IDE. > Which version of CW is actually required ? Probably CW Pro 2, then. Still, I would advise to use the 1.5.2b release, or wait a few days until 1.5.2 final is available. There is really little reason to stick with older releases once a new one is out. And Python beta releases are usually just as solid as normal releases. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From forkel@arsnova.de Wed Aug 18 09:20:55 1999 From: forkel@arsnova.de (Malte Forkel) Date: Wed, 18 Aug 1999 10:20:55 +0200 Subject: [Pythonmac-SIG] MacPython source, which CodeWarrior ? References: Message-ID: <37BA6CE7.A7399EF9@arsnova.de> I successfully used CW Pro2 with the 1.5.1 source (and newer releases as well). The projects seem to be for a newer version though. I had to edit many of the project settings as those were lost in CW Pro 2. I could provide a record of changes I made to the project and sources to compile a 68K standalone Python. Arnaud Masson wrote: > Hi > > I have downloaded Python 1.5.1 source. > The doc says the projects are for CW Pro 1 but I when I open them with Pro > 1, the IDE says the projects are for a newer IDE. > Which version of CW is actually required ? > > Also how easy it is to make an existing C++, object oriented application > scriptable by an embeded python environment ? > Has anyone already made that for a commercial Mac application ? > > I have tried the nice Python IDE that comes in with Mac Python 1.5.1. > When I run some samples, IDE menus are deleted and I can't use it anymore. > I must relaunch the Python IDE. > What's wrong ? Is it fixed in the 1.5.2b release ? > > Thanks in advance. > > ------------------------------- > Arnaud Masson > Software Engineer - IoDP > ------------------------------- > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://www.python.org/mailman/listinfo/pythonmac-sig ----------------------------------------------------------------- Malte Forkel mailto:forkel@arsnova.de Alt-Moabit 60 Phone (x49-30) 399241-0 D-10555 Berlin Fax (x49-30) 399241-22 ----------------------------------------------------------------- From forkel@arsnova.de Wed Aug 18 11:02:06 1999 From: forkel@arsnova.de (Malte Forkel) Date: Wed, 18 Aug 1999 12:02:06 +0200 Subject: [Pythonmac-SIG] Python vs. AppleEvents Message-ID: <37BA849E.EDEB677F@arsnova.de> --------------2A3744D7FD3217474EBF9F28 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, I'd like to use Python and the AppleEvent interface to access the information stored in a Now Contact address file. Now Contact is a scriptable contact manager. Unfortenately, I do not have any AppleScript / AppleEvent specific experience (yet :-). I followed the example in Mac:Demo:applescript.html and used gensuitemodule to create an Now Contact specific module. I managed to do simple data access calls (e.g. get some entry's name) but I haven't figured out how to do more interesting things, e.g. count the entries and loop over them. How about the existings suites like Standard_Suite and AppleScript_Suite? Should I use those tools in Mac:Contrib, i.e. PythonScript and osam? I assume there is a convenience vs. performance tradeoff? Any suggestions and / or sample code would be highly appreciated. Malte ----------------------------------------------------------------- Malte Forkel mailto:forkel@arsnova.de Alt-Moabit 60 Phone (x49-30) 399241-0 D-10555 Berlin Fax (x49-30) 399241-22 ----------------------------------------------------------------- --------------2A3744D7FD3217474EBF9F28 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hello,

I'd like to use Python and the AppleEvent interface to access the information stored in a
Now Contact address file. Now Contact is a scriptable contact manager. Unfortenately,
I do not have any AppleScript / AppleEvent specific experience (yet :-).

I followed the example in Mac:Demo:applescript.html and used gensuitemodule to create an Now Contact specific module. I managed to do simple data access calls (e.g. get some
entry's name) but I haven't figured out how to do more interesting things, e.g. count the
entries and loop over them. How about the existings suites like Standard_Suite and
AppleScript_Suite?

Should I use those tools in Mac:Contrib, i.e. PythonScript and osam? I assume there is a
convenience vs. performance tradeoff?

Any suggestions and / or sample code would be highly appreciated.

Malte

-----------------------------------------------------------------
Malte Forkel                            mailto:forkel@arsnova.de
Alt-Moabit 60                           Phone (x49-30) 399241-0
D-10555 Berlin                          Fax   (x49-30) 399241-22
-----------------------------------------------------------------
  --------------2A3744D7FD3217474EBF9F28-- From jack@oratrix.nl Wed Aug 18 13:21:26 1999 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 18 Aug 1999 14:21:26 +0200 Subject: [Pythonmac-SIG] Python vs. AppleEvents In-Reply-To: Message by Malte Forkel , Wed, 18 Aug 1999 12:02:06 +0200 , <37BA849E.EDEB677F@arsnova.de> Message-ID: <19990818122126.8909A303120@snelboot.oratrix.nl> > I followed the example in Mac:Demo:applescript.html and used > gensuitemodule to create an Now Contact specific module. I managed to do > simple data access calls (e.g. get some > entry's name) but I haven't figured out how to do more interesting > things, e.g. count the > entries and loop over them. How about the existings suites like > Standard_Suite and > AppleScript_Suite? Some of the basic stuff you need to do this is available (see aetools.py, aetypes.py and aepack.py in Mac:Lib:lib-toolbox) but I never got around to getting the overall design done. What I'd really like, in case you're interested in giving it a try, is if you could do something like: for objspec in app.contact['all']: print "First name:" objspec.NameInfo.first_name.get() The idea begin that app.contact['all'] returns a list of object specifiers (the 'all' should probably be done differently, though), and object specifiers have a magic __getattr__ that'll return object specifiers for its elements and properties. The ComponentItem and such in aetypes.py are about as far as I got (which isn't very far). The most difficult part, I think, is to get a nice design done, the example I give above already has flaws and I don't know how to iron them out. Once the design is ready the implementation shouldn't be too much work, as it is mainly glue: the lowlevel interface is (AFAIK) complete. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From PClaerhout@CREO.BE Wed Aug 18 14:28:36 1999 From: PClaerhout@CREO.BE (Pieter Claerhout) Date: Wed, 18 Aug 1999 15:28:36 +0200 Subject: [Pythonmac-SIG] REALBasic and Python Message-ID: <2B1262E83448D211AE4B00A0C9D61B036884A5@MSGEURO1> Hello, has someone already tried using REALBasic to make a GUI to drive Python scripts? I think this would be useful because it's very easy and very quick to build an interface in REALBasic, but I find the Python language more convenient for the programs I want to write. Is it possible to connect the two?? Kind regards, Pieter Pieter Claerhout - PClaerhout@creo.be Response Center - Applications Support Creo Europe - Excelsiorlaan 21 - 1930 Zaventem - Belgium Tel: +32 (2) 711 14 00 - Fax: +32 (2) 720 96 71 From eddthompson@ssi.parlorcity.com Wed Aug 18 16:48:00 1999 From: eddthompson@ssi.parlorcity.com (EuphoriaDJ) Date: Wed, 18 Aug 1999 10:48:00 -0500 Subject: [Pythonmac-SIG] Re: Pythonmac-SIG digest, Vol 1 #222 - 2 msgs In-Reply-To: <199908180502.BAA14501@python.org> Message-ID: could anyone give me an idea on how to access the clipboard what I want to do is copy something to the clipboard and when I activate my program it reads it and mods it example: getclipboard(text) read(text) that is it that is about all I want to do. PS I just came up against another wall in my python learning I never have had experience with object oreinted programing does anyone know of a book that can get me up to speed on oop? Tks An Elephant: A mouse built to government specifications Never try to out stubborn a cat Natural laws have no pity TTFN http://www.parlorcity.com/edd/index.html From jack@oratrix.nl Wed Aug 18 17:09:53 1999 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 18 Aug 1999 18:09:53 +0200 Subject: [Pythonmac-SIG] Re: Pythonmac-SIG digest, Vol 1 #222 - 2 msgs In-Reply-To: Message by EuphoriaDJ , Wed, 18 Aug 1999 10:48:00 -0500 , Message-ID: <19990818160953.E284B303120@snelboot.oratrix.nl> > could anyone give me an idea on how to access the clipboard > > what I want to do is copy something to the clipboard and when I activate my > program it reads it and mods it > > > example: > > getclipboard(text) > read(text) The Scrap module is what you need. The quick way to use it is: - Putting stuff in: Scrap.ZeroScrap() Scrap.PutScrap("TEXT", "Hello World") - Getting stuff out: h = Res.Resource("") Scrap.GetScrap(h, "TEXT") print "Clipboard contains:", h.data The rather strange interface is because it is more-or-less a straight mapping of the C interface to Python. (Or, in other words, see Inside Mac for more use cases). -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From maccgi@bellsouth.net Thu Aug 19 18:54:25 1999 From: maccgi@bellsouth.net (Richard Gordon) Date: Thu, 19 Aug 1999 13:54:25 -0400 Subject: [Pythonmac-SIG] [off] Get Python Version & Installed Modules? Message-ID: This isn't really a Mac Python question, but maybe one of you guys will know the answer and help me get unstuck anyway. The story is that my virtual host, www.communitech.com, does offer python on Solaris, but it can only run as a cgi. They've disabled interactive mode and you basically can't do anything with python from the command line in telnet (unlike perl, which they let run in telnet- go figure). Anyway, this makes python a bit awkward to deal with and it would be very useful if there are any trick methods for determining the exact version that's running (i know it's 1.5-something, but lacking interactive accesss, I don't know exactly) and the modules that are installed (maybe including any in site_python?). The idea would be to run this as a cgi and spit the results out into my browser. I guess I could try to run a script that climbed the appropriate part of the tree, but they've also got things set up so that I don't have access to anything outside of my home directory, so I'm not sure if that will work. What I'm hoping is that python has a builtin that will return this information magically. Finally, my experience with Communitech's tech support has not been good regarding python and it appears that no one there actually knows much about it, thus I am trying to figure this out on my own. Any help is appreciated. Richard Gordon -------------------- Gordon Consulting & Design Database Design/Scripting Languages mailto:richard@richardgordon.net http://www.richardgordon.net 770.971.6887 (voice) 770.216.1829 (fax) From joe@strout.net Thu Aug 19 20:47:06 1999 From: joe@strout.net (Joseph J. Strout) Date: Thu, 19 Aug 1999 12:47:06 -0700 Subject: [Pythonmac-SIG] [off] Get Python Version & Installed Modules? In-Reply-To: References: Message-ID: At 1:54 PM -0400 08/19/99, Richard Gordon wrote: >The story is that my virtual host, www.communitech.com, does offer >python on Solaris, but it can only run as a cgi. They've disabled >interactive mode and you basically can't do anything with python >from the command line in telnet If possible, I suggest you dump them and switch to dreamhost.com, which is much more reasonable. It will be a hassle to switch, but if you're going to do much Python CGI, it will be well worth it to be able to run and test your code interactively. >Finally, my experience with Communitech's tech support has not been >good regarding python and it appears that no one there actually >knows much about it, thus I am trying to figure this out on my own. >Any help is appreciated. Another reason to switch. I switched for the same reason (well, worse; web2010 are a bunch of perl-heads and refused to even install Python for me) -- it was a nuisance, but it was worth it. Good luck, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From maccgi@bellsouth.net Thu Aug 19 21:51:52 1999 From: maccgi@bellsouth.net (Richard Gordon) Date: Thu, 19 Aug 1999 16:51:52 -0400 Subject: [Pythonmac-SIG] [off] Get Python Version & Installed Modules? In-Reply-To: References: Message-ID: At 12:47 -0700 08/19/1999, Joseph J. Strout wrote: >If possible, I suggest you dump them and switch to dreamhost.com, >which is much more reasonable. It will be a hassle to switch, but >if you're going to do much Python CGI, it will be well worth it to >be able to run and test your code interactively. I would, but communitech is too good a deal otherwise (350 MB, unlimited transfer, telnet, cgi, MySQL, Excite, Real, etc., for $20/mo.). >Another reason to switch. I switched for the same reason (well, >worse; web2010 are a bunch of perl-heads and refused to even install >Python for me) -- it was a nuisance, but it was worth it. I haven't actually asked them to un-cripple python for me, so maybe I should at least request that. Even if I was just using MacPython on my machine, I don't know of a way to build a list of installed modules other than by scanning the directory. Is there any kind of method (or maybe even a module?) that just tells you which modules are available in a particular installation? Thanks. Richard Gordon -------------------- Gordon Consulting & Design Database Design/Scripting Languages mailto:richard@richardgordon.net http://www.richardgordon.net 770.971.6887 (voice) 770.216.1829 (fax) From billb@mousa.demon.co.uk Fri Aug 20 12:05:55 1999 From: billb@mousa.demon.co.uk (Bill Bedford) Date: Fri, 20 Aug 1999 12:05:55 +0100 Subject: [Pythonmac-SIG] Calldll Message-ID: There is something that has been bothering me about calldll for a while, and that is I seem to be unable to access records using it. For instance I can call Get/SetCurrentProcess, But I cannot access the Process Information Record. I presume I have to set up a struct that matches the PIR, but how do I deal with pointers? -- Bill Bedford billb@mousa.demon.co.uk History has to be observed, otherwise its not history, It's just.... well one thing happening after another. From jack@oratrix.nl Fri Aug 20 12:55:11 1999 From: jack@oratrix.nl (Jack Jansen) Date: Fri, 20 Aug 1999 13:55:11 +0200 Subject: [Pythonmac-SIG] Calldll In-Reply-To: Message by Bill Bedford , Fri, 20 Aug 1999 12:05:55 +0100 , Message-ID: <19990820115512.01EC6303120@snelboot.oratrix.nl> > There is something that has been bothering me about calldll for a > while, and that is I seem to be unable to access records using it. > For instance I can call Get/SetCurrentProcess, But I cannot access > the Process Information Record. > > I presume I have to set up a struct that matches the PIR, but how do > I deal with pointers? I've included David Ascher in the cc-list to this posting, because he's working on a thing called (I think) AutoStruct that does most of what you want, and gives you (from Python) a nice interface (struct.member) to the structs as well. The one thing that would be difficult (I think, but maybe David can comment on this) is if your struct contains pointers to C objects that you would like to be wrapped in the corresponding Python object. For instance, look at a imaginary function that returns a WindowPtr and x, y coordinates: struct { WindowPtr win; int x, y; }; What you would really like is if the "win" object was wrapped into the Python Win.Window object. From C you would do this as return Py_BuildValue("O&ii", WinObj_New, str.win, str.x, str.y); So if there were a way in which the AutoStruct could be told that there's something called a WINDOWPTR (or whatever magic cookie) and that the routines to convert it from/to C are WinObj_New and WinObj_Convert, with the standard O& calling sequence, then we'd be all set and calldll could do almost anything that the prebuilt toolbox modules can do (I think callbacks are the only exception). -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From da@ski.org Fri Aug 20 17:43:19 1999 From: da@ski.org (David Ascher) Date: Fri, 20 Aug 1999 09:43:19 -0700 (Pacific Daylight Time) Subject: [Pythonmac-SIG] Calldll In-Reply-To: <19990820115512.01EC6303120@snelboot.oratrix.nl> Message-ID: On Fri, 20 Aug 1999, Jack Jansen wrote: > > There is something that has been bothering me about calldll for a > > while, and that is I seem to be unable to access records using it. > > For instance I can call Get/SetCurrentProcess, But I cannot access > > the Process Information Record. > > > > I presume I have to set up a struct that matches the PIR, but how do > > I deal with pointers? > > I've included David Ascher in the cc-list to this posting, because he's > working on a thing called (I think) AutoStruct that does most of what you > want, and gives you (from Python) a nice interface (struct.member) to the > structs as well. Right. It's still very much in a state of flux, but getting input on what should be in there for the first alpha release is good. > The one thing that would be difficult (I think, but maybe David can > comment on this) is if your struct contains pointers to C objects that > you would like to be wrapped in the corresponding Python object. For > instance, look at a imaginary function that returns a WindowPtr and x, > y coordinates: > > > struct { > WindowPtr win; > int x, y; > }; Am I correct that the C function in question returns a pointer to such a struct? (in other words, that a struct is used to return multiple values?) > What you would really like is if the "win" object was wrapped into the Python > Win.Window object. From C you would do this as > return Py_BuildValue("O&ii", WinObj_New, str.win, str.x, str.y); > > So if there were a way in which the AutoStruct could be told that there's > something called a WINDOWPTR (or whatever magic cookie) and that the routines > to convert it from/to C are WinObj_New and WinObj_Convert, with the standard > O& calling sequence, then we'd be all set and calldll could do almost anything > that the prebuilt toolbox modules can do (I think callbacks are the only > exception). I'm not sure I understand this bit (and alas I'm in a rush today). With calldll, I'm pretty sure everything is doable =). (calldll is not something I'm using for my stuff because I'm working on CE, where calldll is not yet done -- and hard to write -- there are lots of chips to support). I'll think about it -- if any of you are going to be at the O'Reilly conference, feel free to ask me more about AutoStruct. --david ---------------------------------------------------------------- This message brought to you by the National Non-Sequitur Society We may not make sense, but the panda is a giant racoon. ----------------------------da@ski.org-------------------------- From maccgi@bellsouth.net Sat Aug 21 18:22:30 1999 From: maccgi@bellsouth.net (Richard Gordon) Date: Sat, 21 Aug 1999 13:22:30 -0400 Subject: [Pythonmac-SIG] [off] Get Python Version & Installed Modules? In-Reply-To: <19990819211652.D662ECF320@oratrix.oratrix.nl> References: <19990819211652.D662ECF320@oratrix.oratrix.nl> Message-ID: At 23:16 +0200 08/19/1999, Jack Jansen wrote: >A quick thing you can try is run the script > ># Show some info about this Python >print "Content-Type: text/plain" >print >import sys >print "sys.path=", sys.path >print "version", sys.version >print "builtin modules", sys.builtin_module_name >import os >print "os.onviron", os.environ Just to provide the final chapter on this, you may be interested and appalled to hear that there is in fact a way to run python scripts from telnet on my host service at http://www.communitech.net. Another user tipped me that this can be accomplished with perl 'myscript.py' Do you believe that? It may not be the craziest thing I've ever heard of, but it's pretty damn close. It does work and python executes the script when the header is read. Apparently, they do not want people to be able to call the interactive interpreter altho I can't imagine why they are afraid of it. Richard Gordon -------------------- Gordon Consulting & Design Database Design/Scripting Languages mailto:richard@richardgordon.net http://www.richardgordon.net 770.971.6887 (voice) 770.216.1829 (fax) From jack@oratrix.nl Sun Aug 22 21:53:14 1999 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 22 Aug 1999 22:53:14 +0200 Subject: [Pythonmac-SIG] Calldll In-Reply-To: Message by David Ascher , Fri, 20 Aug 1999 09:43:19 -0700 (Pacific Daylight Time) , Message-ID: <19990822205320.29500CF320@oratrix.oratrix.nl> Recently, David Ascher said: > > struct { > > WindowPtr win; > > int x, y; > > }; > > Am I correct that the C function in question returns a pointer to such a > struct? (in other words, that a struct is used to return multiple > values?) Yes, there's a few places where either (a) you have to build such a struct, (b) macos returns one or (c) there's a long-lived object with such a form that you keep alive to communicate between your application and MacOS (sort of a poor mans object). > I'm not sure I understand this bit (and alas I'm in a rush today). With > calldll, I'm pretty sure everything is doable =). (calldll is not > something I'm using for my stuff because I'm working on CE, where calldll > is not yet done -- and hard to write -- there are lots of chips to > support). Note that when we Maccies talk "calldll" we mean a completely different module than Sam Rushings calldll for Windows. Same idea, but different interface and implementation. Still, something useable with the one should be useable with the other. I think I'll just wait until you feel ready to release your module and then I'll have a look at how to incorporate the functionality I want. There's quite a few Python object types that are basically straight wrappers around a corresponding C API object in both MacOS and Windows, and all of these share the same semantics for passing from and to C. And as PyArg_Parse already has ("O!", typeobject, &obj) and ("O&", conversionroutine, &ptr) I think I should be able to convince Guido that, say, ("O+", typeobject, &ptr) where the conversion routine is looked up in the type object would be a nifty thing to have. Then exporting this functionality to Python (directly through your module, or through struct) shouldn't be too hard. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From maccgi@bellsouth.net Mon Aug 23 02:26:54 1999 From: maccgi@bellsouth.net (Richard Gordon) Date: Sun, 22 Aug 1999 21:26:54 -0400 Subject: [Pythonmac-SIG] Grail? Message-ID: I've been attempting to get Grail to run this weekend, but without much luck. When I launch it, I get the python.out window, then things collapse without any Mac error code, traceback, etc., python just goes away. It's acting like it's memory starved, so I raised Python to 40 megs, but it didn't make any difference. I am trying to run grail 0.5. If anyone has any suggestions, I'd be grateful. Richard Gordon -------------------- Gordon Consulting & Design Database Design/Scripting Languages mailto:richard@richardgordon.net http://www.richardgordon.net 770.971.6887 (voice) 770.216.1829 (fax) From PClaerhout@CREO.BE Mon Aug 23 09:17:35 1999 From: PClaerhout@CREO.BE (Pieter Claerhout) Date: Mon, 23 Aug 1999 10:17:35 +0200 Subject: [Pythonmac-SIG] Widget demos from the PythonIDE Message-ID: <2B1262E83448D211AE4B00A0C9D61B036884B0@MSGEURO1> Hello, is it possible to use the widgets from the PythonIDE outside the IDE or can they only be used inside the IDE? When I try to run one of the widget demo scripts by double- clicking them in the Finder, then I get an error which tells me that a resource cannot be found? Kind regards, Pieter Pieter Claerhout - PClaerhout@creo.be Response Center - Applications Support Creo Europe - Excelsiorlaan 21 - 1930 Zaventem - Belgium Tel: +32 (2) 711 14 00 - Fax: +32 (2) 720 96 71 From just@letterror.com Mon Aug 23 09:59:25 1999 From: just@letterror.com (Just van Rossum) Date: Mon, 23 Aug 1999 10:59:25 +0200 Subject: [Pythonmac-SIG] Widget demos from the PythonIDE In-Reply-To: <2B1262E83448D211AE4B00A0C9D61B036884B0@MSGEURO1> Message-ID: At 10:17 AM +0200 8/23/99, Pieter Claerhout wrote: >Hello, > >is it possible to use the widgets from the PythonIDE outside the >IDE or can they only be used inside the IDE? > >When I try to run one of the widget demo scripts by double- >clicking them in the Finder, then I get an error which tells me >that a resource cannot be found? That's right. And once you've figured out which how to solve that it still won't work, since those demos require an even loop, or more specifically, a Wapplication.Application instance to be active. I've appended a minimal version of such an app. It's a bit weird, but that comes from the fact that W was originally designed to make app extension easy (mostly "add a new kind of window"), not application development itself (I only use it in 2 apps: the IDE itself and a customized font editor). Just """Minimal W application.""" import Wapplication class TestApp(Wapplication.Application): def __init__(self): import Res Res.FSpOpenResFile("Widgets.rsrc", 1) self._menustocheck = [] self.preffilepath = ":Python:PythonIDE preferences" Wapplication.Application.__init__(self, 'Pyth') # open a new text editor import PyEdit PyEdit.Editor() # start the mainloop self.mainloop() TestApp() From humbert@hagen.de Mon Aug 23 20:05:05 1999 From: humbert@hagen.de (L. Humbert) Date: Mon, 23 Aug 1999 21:05:05 +0200 Subject: [Pythonmac-SIG] PythonScript - Questions -v0.5 beta 1 24/04/98 Message-ID: <99082321353809.00489@haspe> Dear Bill Bedford, dear friends of Python and Mac-Computers, we are working on solutions to drive some things in our Computer-Lab in our K12-school. Because the software for locking iMacs is much to expensive for us, we decided to give some own programming a chance (;- --- If anyone has answers to the questions, please answer with a "Reply to all" - so my collegue at school get´s the mail, too. I´m subscribed to some maillists and don´t have time to read any more, so please reply direct to the author. I know - my english is very bad - I´m just a manual reader (and not a writer). --- Our Server is a Linux-based system - so I went the way up to Python by studying BSCW, which we will set up for using in school to - after some time I used some rudimentary Python-based functions to program some (more or less) useful things for the mac-linux-connection (you may look at them at http://in.Hagen.de/humbert/vortraege/ but ... excuse my ... it´s in german) ------ The problems and thought of solutions: ================================ Our iMacs in school are running MacOS 8.6. We want to lock them with ResEdit (make some folders: unvisible some unvisible and locked etc. We are connecting to the serverinfrastructure a) by atalk (mounting the Linux-homedir on the students destop) - so we can´t use our old version of At Ease b) with tcp/ip with using the module-roaming and IMAP as post-protocol on our Linux-Server We have to use some local software on our iMacs. In getaete.py I found, that you have only implemented English, French and Japanese, but not German -- please tell me the nessecary Code for german -- perhaps it is "3"? What do we have to change, to make this work? Are there any other points to look at? Why did you comment out the openosax ? and openaete ? in getaete.py We want to Python-Script some things, we can do with AppleScript, but some other (like writing on the Server; checking, if the user has correct locked in, ..) are only possible with Python, I think. Because we have little time to test, any answer would be fine. Yours sincerley Ludger Humbert PPS: The test of the application PyScript.py didn´t run: >>> import PythonScript >>> SIGNATURE = 'MACS' >>> TIMEOUT = 10*60*60 >>> PythonScript.PsScript(SIGNATURE, TIMEOUT) Traceback (innermost last): File "", line 1, in ? File "brecht:Programmiersprachen:Python 1.5.2b1:Mac:Contrib:PythonScript:PythonScript.py", line 116, in PsScript pyscript = getaete.Getaete(sig) File "brecht:Programmiersprachen:Python 1.5.2b1:Mac:Contrib:PythonScript:getaete.py", line 48, in Getaete data = compileaete(data) File "brecht:Programmiersprachen:Python 1.5.2b1:Mac:Contrib:PythonScript:getaete.py", line 222, in compileaete gsuites = openaeut() File "brecht:Programmiersprachen:Python 1.5.2b1:Mac:Contrib:PythonScript:getaete.py", line 319, in openaeut rf = OpenRFPerm(fullname, 0, 1) TypeError: Str255 arg must be string of at most 255 chars From seanh@unforgettable.com Tue Aug 24 08:11:31 1999 From: seanh@unforgettable.com (Sean Hummel) Date: Tue, 24 Aug 1999 00:11:31 -0700 Subject: [Pythonmac-SIG] Embedding problems on the Macintosh Message-ID: <199908240711.DAA13094@pop06.iname.net> Hi I'm having some problems using the Py_CompileString function. Previously in my application I was using Compiled PYC resources for embedding Python modules in my application. However I need to now use plain text files, and I was looking for a way to do this. Since I couldn't find an example of this, I went header diving in the Python source. I had all ready figure out how to get this to work with already compiled 'PYC ' resources, and I tried using the Py_CompileString. The problem is that every time I call "Py_CompileString" it causes my application to quit. The following is the segment of code I am using. I set my heap up to 26000 so that works. The problem is that the function "Py_CompileString" never returns, and it dumps the application. // // Initialize Python // PyMac_Initialize(); FSSpec mainfilespec; long size; PyObject *code; PyObject *result; char errortext[4096]={0}; int errornumber=0; int inited=0; inited=Py_IsInitialized(); if (fnfErr != FSMakeFSSpec(0,0,"\pmain.py",&mainfilespec)) { short mfref=0; long size=0; char* data=NULL; FSpOpenDF(&mainfilespec,fsCurPerm,&mfref); GetEOF(mfref,&size); SetFPos(mfref,1,0); data=new char[size]; if (data) { long inout=size; FSRead(mfref,&inout,data); code=Py_CompileString(data,"main.py",0); delete [] data; } FSClose(mfref); if (errornumber) { printf(errortext); } } else { ExitToShell(); } From jack@oratrix.nl Tue Aug 24 10:14:26 1999 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 24 Aug 1999 11:14:26 +0200 Subject: [Pythonmac-SIG] Embedding problems on the Macintosh In-Reply-To: Message by "Sean Hummel" , Tue, 24 Aug 1999 00:11:31 -0700 , <199908240711.DAA13094@pop06.iname.net> Message-ID: <19990824091426.D56B5303120@snelboot.oratrix.nl> > > Hi I'm having some problems using the Py_CompileString function. Previously > in my application I was using Compiled PYC resources for embedding Python > modules in my application. However I need to now use plain text files, and > I was looking for a way to do this. > > Since I couldn't find an example of this, I went header diving in the Python > source. I had all ready figure out how to get this to work with already > compiled 'PYC ' resources, and I tried using the Py_CompileString. > > The problem is that every time I call "Py_CompileString" it causes my > application to quit. The only thing I can think of is that the C++ stuff (GUSI) isn't initialized correctly. Make sure that __initialize is set as initialization entry point (in the linker preference section in CodeWarrior) so the C++ runtime gets a chance to initalize. See the PythonStandalone or PythonStandSmall projects for examples. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From billb@mousa.demon.co.uk Tue Aug 24 12:01:24 1999 From: billb@mousa.demon.co.uk (Bill Bedford) Date: Tue, 24 Aug 1999 12:01:24 +0100 Subject: [Pythonmac-SIG] Re: PythonScript - Questions -v0.5 beta 1 24/04/98 In-Reply-To: <99082321353809.00489@haspe> References: <99082321353809.00489@haspe> Message-ID: At 9:05 pm +0200 23/08/99, L. Humbert wrote: >--- >Our Server is a Linux-based system - so I went the way up to Python >by studying >BSCW, which we will set up for using in school to - >after some time I used some rudimentary Python-based functions to program some >(more or less) useful things for the mac-linux-connection (you may >look at them >at >http://in.Hagen.de/humbert/vortraege/ >but ... excuse my ... it´s in german) >------ > >The problems and thought of solutions: >================================ >Our iMacs in school are running MacOS 8.6. > >We want to lock them with ResEdit (make some folders: >unvisible >some >unvisible and locked >etc. Neither of these are available through apple events. They can be done through the file manager. > >We have to use some local software on our iMacs. > >In getaete.py I found, that you have only implemented >English, French and Japanese, >but not German -- please tell me the nessecary Code for german -- perhaps >it is "3"? >What do we have to change, to make this work? These codes refer to the applescript dialects. As far as I know Apple has never released (written?, finished?) a German dialect. At the moment it seems only the English one is supported, so you are unlikely to find one of the others. >Why did you comment out the >openosax ? >and >openaete ? >in getaete.py These two methods read though all the applescript information in the dialect and the scripting additions. If you are only addressing a single application then commenting them out will speed up your script a lot. > >We want to Python-Script some things, we can do with AppleScript, >but some other >(like writing on the Server; checking, if the user has correct locked in, ..) >are only possible with Python, I think. You may find that the standard python/apple event interface will work better for you. The apple event information is in text files which would work on your server. Using PythonScript would means reading resources off one of the clients at every transaction. > >PPS: The test of the application PyScript.py didn´t run: > >>>> import PythonScript >>>> SIGNATURE = 'MACS' >>>> TIMEOUT = 10*60*60 >>>> PythonScript.PsScript(SIGNATURE, TIMEOUT) > >Traceback (innermost last): > File "", line 1, in ? > File "brecht:Programmiersprachen:Python >1.5.2b1:Mac:Contrib:PythonScript:PythonScript.py", line 116, in >PsScript > pyscript = getaete.Getaete(sig) > File "brecht:Programmiersprachen:Python >1.5.2b1:Mac:Contrib:PythonScript:getaete.py", line 48, in Getaete > data = compileaete(data) > File "brecht:Programmiersprachen:Python >1.5.2b1:Mac:Contrib:PythonScript:getaete.py", line 222, in >compileaete > gsuites = openaeut() > File "brecht:Programmiersprachen:Python >1.5.2b1:Mac:Contrib:PythonScript:getaete.py", line 319, in openaeut > rf = OpenRFPerm(fullname, 0, 1) >TypeError: Str255 arg must be string of at most 255 chars fullname is the path to the applescript dialect. On my system it is "Hermit:System Folder:Scripting Additions:Dialects:English Dialect" =65 characters If you are getting a Str255 error then either you have your system folder buried very deep or Python is looking for the dialect file on your server. I can't help thinking that what you are trying to down would be a lot simpler if you used OS X server instead of Linux :-) -- Bill Bedford billb@mousa.demon.co.uk History has to be observed, otherwise its not history, It's just.... well one thing happening after another. From guido@CNRI.Reston.VA.US Tue Aug 24 16:10:56 1999 From: guido@CNRI.Reston.VA.US (Guido van Rossum) Date: Tue, 24 Aug 1999 11:10:56 -0400 Subject: [Pythonmac-SIG] Robert Roebling: wxPython Message-ID: <199908241510.LAA02845@kaluha.cnri.reston.va.us> Anybody interested in porting wxPython to the Mac? WxWindows has already been ported, so it's probably a simple task. This is about the only cross-platform GUI toolkit that works on the Mac besides Tk (most of the new Linux offerings are "cross-platform" meaning Unix and Windows...). Please help this guy! (And where's the Mac port of 1.5.2 final? :-) --Guido van Rossum (home page: http://www.python.org/~guido/) ------- Forwarded Message Date: Mon, 23 Aug 1999 14:29:04 -0000 From: Robert Roebling To: Guido van Rossum cc: Robin Dunn , Stefan Csomor Subject: wxPython Hi Guido, I'm the author of the Linux/GTK variant of wxWindows and although I admit that I haven't written a single line of code in that snake languge or yours, you may have noticed that some of my work does get used by users of Python, more exactly wxPython. wxPython are the Python bindings to the wxWindows GUI library and from what I have heard (and only that), they are not quite unpopular. Currently, wxWindows has been ported to GTK, Windows and Mac (there also is a badly maintained Motif port), but our Python bindings are availble only for Unix and Windows, as our wxPython pioneer doesn't have access to a Mac. I wonder if you could maybe drop a notice somewhere to motivate someone form the MacPython team (assuming that there is one) to lend a hand. Note, that this is mainly a question of compiling and making a package out of it, as the code and the bindings are already there - this doesn't mean that 10 minutes will be enough for that, of course. I CC this mail to Stefan Csomor, the author of the Mac port, and Robin Dunn, the author of the Python bindings of wxWindows, Regards, Robert ------- End of Forwarded Message From dozier@abs.net Tue Aug 24 21:38:06 1999 From: dozier@abs.net (Bill Dozier) Date: Tue, 24 Aug 1999 16:38:06 -0400 Subject: [Pythonmac-SIG] Robert Roebling: wxPython Message-ID: <199908242038.QAA26012@vwww1.abs.net> Guido, I'm interested; in fact, I've sort of hacked around trying to see if it would build and it looked promising. I just borrowed a header file or two from Stefan's code to get the right preprocessor variables set and then it looks like all I need to do is comment out the code that depends on parts of the library that Stefan doesn't have ported yet. Since Robin's wxPython C++ code is mostly SWIG-generated and therefore pretty platform-neutral, I expected this to be the case. I was planning to try again once the final 1.5.2 (with CW Pro 5 projects for building extensions) and the final Mac wxWindows were released. I would really like to see this fly since I don't want to have to learn any OS-specific API if I can help it and I really don't like Tk on the Mac. If no one with more MacPython experience than me wants to do this, then I guess I will give it a go. Bill ---------- >From: Guido van Rossum >To: pythonmac-sig@python.org >Subject: [Pythonmac-SIG] Robert Roebling: wxPython >Date: Tue, Aug 24, 1999, 11:10 AM > > Anybody interested in porting wxPython to the Mac? > WxWindows has already been ported, so it's probably a simple task. > > This is about the only cross-platform GUI toolkit that works on the > Mac besides Tk (most of the new Linux offerings are "cross-platform" > meaning Unix and Windows...). > > Please help this guy! > > (And where's the Mac port of 1.5.2 final? :-) > > --Guido van Rossum (home page: http://www.python.org/~guido/) > > ------- Forwarded Message > > Date: Mon, 23 Aug 1999 14:29:04 -0000 > From: Robert Roebling > To: Guido van Rossum > cc: Robin Dunn , Stefan Csomor .ch> > Subject: wxPython > > > Hi Guido, > > I'm the author of the Linux/GTK variant of wxWindows > and although I admit that I haven't written a single > line of code in that snake languge or yours, you may > have noticed that some of my work does get used by > users of Python, more exactly wxPython. wxPython are > the Python bindings to the wxWindows GUI library and > from what I have heard (and only that), they are not > quite unpopular. Currently, wxWindows has been ported > to GTK, Windows and Mac (there also is a badly maintained > Motif port), but our Python bindings are availble only > for Unix and Windows, as our wxPython pioneer doesn't > have access to a Mac. I wonder if you could maybe drop > a notice somewhere to motivate someone form the MacPython > team (assuming that there is one) to lend a hand. Note, > that this is mainly a question of compiling and making > a package out of it, as the code and the bindings are > already there - this doesn't mean that 10 minutes will > be enough for that, of course. > > I CC this mail to Stefan Csomor, the author of the Mac port, > and Robin Dunn, the author of the Python bindings of wxWindows, > > Regards, > > Robert > > > ------- End of Forwarded Message > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://www.python.org/mailman/listinfo/pythonmac-sig > From jwblist@olympus.net Wed Aug 25 01:54:53 1999 From: jwblist@olympus.net (John W Baxter) Date: Tue, 24 Aug 1999 17:54:53 -0700 Subject: [Pythonmac-SIG] Status of MacPython? In-Reply-To: References: <199908091934.PAA27806@post-ofc04.srv.cis.pitt.edu> Message-ID: At 12:58 -0700 8/9/99, Joseph J. Strout wrote: >I use pico when editing in Unix (obviously I do this as little as >possible!), but I've heard that emacs is quite configurable; I think >you can make it do four-character tabs, at which point it's just like >the Mac. emacs can be configured to do 4-column tabs, and ours is (but only when python-mode is active). I didn't do the deed, so I don't know how it was done. GNU Emacs 19.34.1 (i386-unknown-bsdi3.0, X toolkit), specifically. --John -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From jwblist@olympus.net Wed Aug 25 02:03:19 1999 From: jwblist@olympus.net (John W Baxter) Date: Tue, 24 Aug 1999 18:03:19 -0700 Subject: [Pythonmac-SIG] Status of MacPython? In-Reply-To: References: <199908091934.PAA27806@post-ofc04.srv.cis.pitt.edu> Message-ID: At 12:58 -0700 8/9/99, Joseph J. Strout wrote: >This is a good question. I'd guess that some Mac-specific modules >will always be in order, for accessing Mac services not available on >other platforms. Whether we'll need an entirely separate build is >unclear. Probably we will, as most Mac users won't want to follow >the usual Unix method of downloading things as source code and >wrestling with it for a few hours to get it to compile before using >it. For a long time, more Macs will be running MacOS 8 or 9 than are running MacOS X (including 100% of my current Macs, and several company Macs, on which MacOS X won't run). I don't know whether I'll be buying a new Mac or not...it depends on whether I like what I see in MacOS X (an alternative is a switch to Linux, and let my newer current Mac (7300) top out at whatever the end of the line for classic MacOS is). A Carbon-based MacPython would work for folks with Machine/OS combinations as far back as Carbon.lib works reliably (however far back that is, and assuming it turns out to be reliable on anything). I'd hate to see lots of folks stopped at some version (1.5.2?) of Python by having the future be MacOS X only. On the other hand, Jack and the others who do the work have only so much time. --John -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From maccgi@bellsouth.net Wed Aug 25 02:43:58 1999 From: maccgi@bellsouth.net (Richard Gordon) Date: Tue, 24 Aug 1999 21:43:58 -0400 Subject: [Pythonmac-SIG] Status of MacPython? In-Reply-To: References: <199908091934.PAA27806@post-ofc04.srv.cis.pitt.edu> Message-ID: At 18:03 -0700 08/24/1999, John W Baxter wrote: >I'd hate to see lots of folks stopped at some version (1.5.2?) of Python by >having the future be MacOS X only. On the other hand, Jack and the others >who do the work have only so much time. FWIW, there was a similar thread on the MacPerl list a few months ago. I think that I am correct in summarizing the upshot of it as: 1. Plain Old Perl will run on MacOS X and MacPerl has no developmental future there. 2. MacPerl's development will continue, but in the context of OS8/9 only (I don't even recall seeing anything about Carbon, but could be mistaken about that). 3. The assumption is that it will be years before OS X is the dominant Mac operating system mainly because of hardware limitations. I don't know that any of the above has (or should have) any bearing on MacPython's future, but just thought you'd be interested. Richard Gordon -------------------- Gordon Consulting & Design Database Design/Scripting Languages mailto:richard@richardgordon.net http://www.richardgordon.net 770.971.6887 (voice) 770.216.1829 (fax) From nbornstein@plr.com Wed Aug 25 03:01:33 1999 From: nbornstein@plr.com (Niel M. Bornstein) Date: Tue, 24 Aug 1999 22:01:33 -0400 Subject: [Pythonmac-SIG] toolboxmodules.ppc.slb error on *some* Macs Message-ID: My client has reported the following error on 2 out of 20 of his clients' Macs, both of them PPC's of some sort running MacOS 7.5.1. This is a stand-alone application built with Python 1.5.2b1. I apologize for the rough transcription of the traceback, but my client knows nothing about the Mac, and he's not been the best guy to get this kind of info from. Traceback(innerMost last): File "Kyoto:projects:pivotal:1.01b3:Plink.PY",Line7, in?: File "Kyoto:Development:Python 1.5.2b1:Mac:LIB:frmeWork.py", Line 8, in? Import Error: Toolbox modules.ppc.scb: The Named Libreary Wasn't found: Does anyone have any idea what this error might actually be refering to? Line 7 in Plink.py is "import FrameWork" and line 8 in framework.py is "from AE import *". Do I need to copy toolboxmodules.ppc.slb and/or the alias AE.ppc.slb to these Macs? Thanks, Niel From robin@alldunn.com Wed Aug 25 05:34:47 1999 From: robin@alldunn.com (Robin Dunn) Date: Tue, 24 Aug 1999 21:34:47 -0700 Subject: [Pythonmac-SIG] Robert Roebling: wxPython References: <026101beee8a$b17d77c0$1a25d2d1@jenkondev.com> Message-ID: <006f01beeeb3$2b594560$fa01a8c0@easystreet.com> Hi all, I'd like to jump in at this point and add that contributions of Mac hardware and development tools for this project would be greatly appreciated. This would allow me to better manage the wxMac version of the project, ensure compatibility between versions, synchronize releases and be able to provide support for the toolkit as a whole instead of just for a few flavors of it. To those of you who can donate time to help, that is wonderful and thank you. To the rest of you, if you have spare machines of sufficient capabilities to be useful on a project like this, please consider wxPython a worthy project to donate to. If you know of somebody else who might be able to help, please forward this request on to them. (Anybody have Steve Jobs' email address? ;-) While considering this request please think of the potential benefit to the world-wide software development community, as well as the potential tax write-off! -- Robin Dunn Software Craftsman robin@AllDunn.com http://AllDunn.com/robin/ http://AllDunn.com/wxPython/ Check it out! > Bill Dozier dozier@abs.net > Tue, 24 Aug 1999 16:38:06 -0400 > > Guido, > > I'm interested; in fact, I've sort of hacked around trying to see if it > would build and it looked promising. I just borrowed a header file or two > from Stefan's code to get the right preprocessor variables set and then it > looks like all I need to do is comment out the code that depends on parts of > the library that Stefan doesn't have ported yet. > > Since Robin's wxPython C++ code is mostly SWIG-generated and therefore > pretty platform-neutral, I expected this to be the case. I was planning to > try again once the final 1.5.2 (with CW Pro 5 projects for building > extensions) and the final Mac wxWindows were released. > > I would really like to see this fly since I don't want to have to learn any > OS-specific API if I can help it and I really don't like Tk on the Mac. If > no one with more MacPython experience than me wants to do this, then I guess > I will give it a go. > > Bill > > ---------- > >From: Guido van Rossum > >To: pythonmac-sig@python.org > >Subject: [Pythonmac-SIG] Robert Roebling: wxPython > >Date: Tue, Aug 24, 1999, 11:10 AM > > > > > Anybody interested in porting wxPython to the Mac? > > WxWindows has already been ported, so it's probably a simple task. > > > > This is about the only cross-platform GUI toolkit that works on the > > Mac besides Tk (most of the new Linux offerings are "cross-platform" > > meaning Unix and Windows...). > > > > Please help this guy! > > > > (And where's the Mac port of 1.5.2 final? :-) > > > > --Guido van Rossum (home page: http://www.python.org/~guido/) > > > > ------- Forwarded Message > > > > Date: Mon, 23 Aug 1999 14:29:04 -0000 > > From: Robert Roebling > > To: Guido van Rossum > > cc: Robin Dunn , Stefan Csomor > > .ch> > > Subject: wxPython > > > > > > Hi Guido, > > > > I'm the author of the Linux/GTK variant of wxWindows > > and although I admit that I haven't written a single > > line of code in that snake languge or yours, you may > > have noticed that some of my work does get used by > > users of Python, more exactly wxPython. wxPython are > > the Python bindings to the wxWindows GUI library and > > from what I have heard (and only that), they are not > > quite unpopular. Currently, wxWindows has been ported > > to GTK, Windows and Mac (there also is a badly maintained > > Motif port), but our Python bindings are availble only > > for Unix and Windows, as our wxPython pioneer doesn't > > have access to a Mac. I wonder if you could maybe drop > > a notice somewhere to motivate someone form the MacPython > > team (assuming that there is one) to lend a hand. Note, > > that this is mainly a question of compiling and making > > a package out of it, as the code and the bindings are > > already there - this doesn't mean that 10 minutes will > > be enough for that, of course. > > > > I CC this mail to Stefan Csomor, the author of the Mac port, > > and Robin Dunn, the author of the Python bindings of wxWindows, > > > > Regards, > > > > Robert > > > > > > ------- End of Forwarded Message > > > > > > _______________________________________________ > > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > > http://www.python.org/mailman/listinfo/pythonmac-sig > > > > > > > From jack@oratrix.nl Wed Aug 25 09:47:06 1999 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 25 Aug 1999 10:47:06 +0200 Subject: [Pythonmac-SIG] toolboxmodules.ppc.slb error on *some* Macs In-Reply-To: Message by "Niel M. Bornstein" , Tue, 24 Aug 1999 22:01:33 -0400 , Message-ID: <19990825084707.3FC10303120@snelboot.oratrix.nl> > Traceback(innerMost last): > File "Kyoto:projects:pivotal:1.01b3:Plink.PY",Line7, in?: > File "Kyoto:Development:Python 1.5.2b1:Mac:LIB:frmeWork.py", Line 8, in? > Import Error: Toolbox modules.ppc.scb: > The Named Libreary Wasn't found: > > Does anyone have any idea what this error might actually be refering to? > Line 7 in Plink.py is "import FrameWork" and line 8 in framework.py is > "from AE import *". Do I need to copy toolboxmodules.ppc.slb and/or the > alias AE.ppc.slb to these Macs? I would start with running ConfigurePython again on the machines in question. If that fails try reinstalling Python (in which case you should manually remove any file with "Python" in its name from the System Folder). -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From a.flaus@dundee.ac.uk Wed Aug 25 09:47:01 1999 From: a.flaus@dundee.ac.uk (Andrew Flaus) Date: Wed, 25 Aug 1999 09:47:01 +0100 Subject: [Pythonmac-SIG] installing modules Message-ID: <000101beeed6$66184070$b5412486@bioch.dundee.ac.uk> Hi I've just installed macpython 1.5.2b1 on an iMac. As a first exercise, I am trying to complete a little task which would be immensely aided by Hinsen's 'ScientificPython 2.0' modules (available from starship). Unfortunately I am having trouble making these functional and there doesn't seem to be any mac-specific simpleton's documentation or FAQ: 1. Even after editing sys.path to include the path, re-running the configure application and restarting Python, the interpreter resolutely refuses to see the modules at all. 2. If I transfer a .py file, say xxx.py, into one of the functional modules (e.g. Numeric), I can import it and it compiles to xxx.pyc. However, when I do dir(xxx) I get only 4 "underscored" (i.e. _yyy_) entries in the list and the commands the modules provide are not recognised. I'm sure its straightforward but can someone please tell me what I'm doing wrong here. In exchange, I'd be happy to write up the explanation and contribute it plus some of the real newbie things I had to discover to an Macpython FAQ or hints page. Thanks. Andrew. From nbornstein@plr.com Wed Aug 25 11:30:26 1999 From: nbornstein@plr.com (Niel M. Bornstein) Date: Wed, 25 Aug 1999 06:30:26 -0400 Subject: [Pythonmac-SIG] toolboxmodules.ppc.slb error on *some* Macs In-Reply-To: <19990825084707.3FC10303120@snelboot.oratrix.nl> References: Message by "Niel M. Bornstein" , Tue, 24 Aug 1999 22:01:33 -0400 , Message-ID: >I would start with running ConfigurePython again on the machines in question. >If that fails try reinstalling Python (in which case you should manually >remove any file with "Python" in its name from the System Folder). Hmm. These are stand-alone apps, no Python installed, so I didn't ever run ConfigurePython on them. Do I need to? Niel From just@letterror.com Wed Aug 25 11:49:47 1999 From: just@letterror.com (Just van Rossum) Date: Wed, 25 Aug 1999 12:49:47 +0200 Subject: [Pythonmac-SIG] toolboxmodules.ppc.slb error on *some* Macs In-Reply-To: References: <19990825084707.3FC10303120@snelboot.oratrix.nl> Message by "Niel M. Bornstein" , Tue, 24 Aug 1999 22:01:33 -0400 , Message-ID: At 6:30 AM -0400 8/25/99, Niel M. Bornstein wrote: >>I would start with running ConfigurePython again on the machines in question. >>If that fails try reinstalling Python (in which case you should manually >>remove any file with "Python" in its name from the System Folder). > >Hmm. These are stand-alone apps, no Python installed, so I didn't ever run >ConfigurePython on them. Do I need to? No. I assume they're built with BuildApplication? Honestly, I am stunned: I see no reason why it could fail on one machine and not the other. Any more clues about the differences between the machines on which the program does run and those on which is doesn't? Just From nbornstein@plr.com Wed Aug 25 12:01:06 1999 From: nbornstein@plr.com (Niel M. Bornstein) Date: Wed, 25 Aug 1999 07:01:06 -0400 Subject: [Pythonmac-SIG] toolboxmodules.ppc.slb error on *some* Macs In-Reply-To: References: <19990825084707.3FC10303120@snelboot.oratrix.nl> Message by "Niel M. Bornstein" , Tue, 24 Aug 1999 22:01:33 -0400 , Message-ID: At 6:49 AM -0400 8/25/99, Just van Rossum wrote: >No. I assume they're built with BuildApplication? Yes. >Honestly, I am stunned: I see no reason why it could fail on one machine >and not the other. Any more clues about the differences between the >machines on which the program does run and those on which is doesn't? I will try to get my client to be a little more detailed on his explanation. He just says "PPC Mac running MacOS 7.5.1", I'm sure he doesn't have any clue about checking extensions, etc. One thing which *may* be a factor: he did report problems downloading the app on some machines. He didn't say whether these machines were the ones affected. It may turn out that there was some corruption in the BinHex file which caused this problem. Thanks, Niel From jack@oratrix.nl Wed Aug 25 12:53:20 1999 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 25 Aug 1999 13:53:20 +0200 Subject: [Pythonmac-SIG] toolboxmodules.ppc.slb error on *some* Macs In-Reply-To: Message by "Niel M. Bornstein" , Wed, 25 Aug 1999 07:01:06 -0400 , Message-ID: <19990825115321.7BBC6303120@snelboot.oratrix.nl> > At 6:49 AM -0400 8/25/99, Just van Rossum wrote: > >No. I assume they're built with BuildApplication? > > Yes. > > >Honestly, I am stunned: I see no reason why it could fail on one machine > >and not the other. Any more clues about the differences between the > >machines on which the program does run and those on which is doesn't? > > I will try to get my client to be a little more detailed on his > explanation. He just says "PPC Mac running MacOS 7.5.1", I'm sure he > doesn't have any clue about checking extensions, etc. What you could ask your client to do is to option-start your application, check the "enter interactive mode after script finishes" and tell him to type "import sys; print sys.path, sys.modules" at the >>> prompt and send you the results. Maybe you should ask him to do this both on a working and a nonworking machine. Sys.path should be [applicationfolder, application, ':']. Sys.modules may give you a clue what has been imported from where. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From nbornstein@plr.com Wed Aug 25 13:42:28 1999 From: nbornstein@plr.com (Niel M. Bornstein) Date: Wed, 25 Aug 1999 08:42:28 -0400 Subject: [Pythonmac-SIG] toolboxmodules.ppc.slb error on *some* Macs References: <19990825115321.7BBC6303120@snelboot.oratrix.nl> Message-ID: <37C3E4B4.8734579E@plr.com> Jack Jansen wrote: > What you could ask your client to do is to option-start your application, > check the "enter interactive mode after script finishes" and tell him to type > "import sys; print sys.path, sys.modules" at the >>> prompt and send you the > results. Maybe you should ask him to do this both on a working and a > nonworking machine. > > Sys.path should be [applicationfolder, application, ':']. Sys.modules may give > you a clue what has been imported from where. Thanks, I will try this. Niel From rwadkins@saci.org Tue Aug 31 01:01:25 1999 From: rwadkins@saci.org (Randy M. Wadkins) Date: Mon, 30 Aug 1999 18:01:25 -0600 Subject: [Pythonmac-SIG] molecular modeling toolkit (mmkt)? In-Reply-To: <199908301852.OAA00008@python.org> References: <199908301852.OAA00008@python.org> Message-ID: Has anyone used the mmtk on a Mac? I have no experience whatsoever with Python, but would like to use the mmkt. If anyone has experience porting, say, Python and C code for Linux to the Mac, I would very, very much appreciate someone holding my hand in getting the mmtk ported. Thank you all in advance. --Randy ****************************************************************** "As the light changed from red to green to yellow and back to red again, I sat there thinking about life. Was it nothing more than a bunch of honking and yelling? Sometimes it seemed that way." --Jack Handy, _Deep_Thoughts_ Randy M. Wadkins, Ph.D. Cancer Therapy & Research Center Institute for Drug Development 14960 Omicron Drive San Antonio, TX 78245 phone: (210)-677-3835 fax: (210)-677-0058 E-mail: rwadkins@saci.org CTRC Homepage: http://www.ctrc.saci.org ****************************************************************** From jack@oratrix.nl Tue Aug 31 16:32:11 1999 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 31 Aug 1999 17:32:11 +0200 Subject: [Pythonmac-SIG] GRiNS 1.0 (Multimedia authoring software in Python) available Message-ID: <19990831153211.C03C035BB1F@snelboot.oratrix.nl> [Warning: This message could be seen as being commercial] Folks, we proudly announce the first commercial release of GRiNS, our multimedia authoring and playback system for the internet. It allows you to create SMIL presentations (SMIL is the W3C standard for multimedia over the net, and used by applications such as RealNetworks G2 player), and completely written in Python. Well, completely: there's a few extension modules involved to make various media rendering toolkits available, but the whole application framework is in Python (And most of the extension modules have found their way back into the Python community, or will do so shortly, of course). Thanks to Python we're able to release GRiNS for all three major platforms at the same time: Macintosh, Windows and Unix (SGI and Sun; sorry, no Linux yet, due to the fact that we don't know of any decent media libraries (esp. movie libraries), so please enlighten us if you know of something). If you want to have a look at what a Python multiplatform application can look like check it out at http://www.oratrix.com/GRiNS . And feel free to ask us, Sjoerd Mullender (sjoerd@oratrix.com) or me, if you want to know anything about technical details (or commercial details, which we will duly forward:-). Oh yes: if anyone has good suggestions for places they always use for being kept informed about new software (i.e. who we should inform about this release) we'd be happy if you could share them with us. Here's the press release, for completeness sake: --------------------------------------------------------- Oratrix Development BV http://www.oratrix.com/ GRiNS for SMIL WILL TRANSFORM MULTIMEDIA WEB AUTHORING Amsterdam, The Netherlands (August 30, 1999) - Oratrix Development BV today announced the release of GRiNS for SMIL V1.0, a unique authoring and presentation system for local and streaming media on the Web. GRiNS/SMIL allows content providers to create adaptive multimedia productions that tailor content to the needs and resources of the user community. Working together with RealNetworks®’ RealSystem® G2, GRiNS provides access to the full capabilities of the SMIL language on Windows, Macintosh and UNIX systems. Users on all these platforms can finally design multimedia presentations with adaptive content. According to Dick Bulterman, founder and managing director of Oratrix Development, "GRiNS/SMIL will transform Web multimedia from a one-size-fits-all paradigm to one in which the needs, resources and capabilities of individual users can determine the quality and content provided inside a streaming media presentation." Presentations can be made that not only adjust for bandwidth constraints, but also for language (for example, English and Spanish), or media type (text, image or video). "GRiNS/SMIL fills a critical gap in the authoring market," adds Bulterman. "We greatly simplify the process of creating SMIL presentations for the RealNetworks RealPlayer® G2 at an affordable price." Bulterman, described by UK's Internet Magazine as one of the Web's 10 behind-the-sceens heroes, says that the system's ability to create adaptive presentations will open up new value-added markets by allowing authors to tailor their content to the needs and resources of their clients. Commenting on the release, Len Jordan, senior vice-president, Media Systems, RealNetworks, Inc. said: "GRiNS provides an intuitive and easy complement to Realslideshow(TM) for users who want to exploit multiple media types and advanced capabilities of both SMIL and RealSystem G2." Geoff Freed of CPB/WGBH National Center for Accessible Media added: "The ability of GRiNS/SMIL to provide control of adaptive content for both streaming media and the local GRiNS player will significantly lower the barrier for creating presentations that are accessible to the widest possible range of Web users." Ivar Brinkman of Elsevier Science Publishers noted: "The fact that GRiNS is available for Macintosh and UNIX as well as Windows-98/NT allows Elsevier to work with all of our authors in evaluating new approaches to showcase and enhance our printed publications." GRiNS/SMIL was developed by Oratrix Development BV, an Amsterdam-based spin-off of CWI, the Dutch national center for mathematics and computer science. Oratrix Development is winner of the McKinsey & Co. "New Venture" award and has been selected by the Twinning Venture Capital Network in the Netherlands. GRiNS/SMIL has been tested by over two thousand users world-wide in beta form. GRiNS/SMIL is available at http://www.oratrix.com/GRiNS/. For more information contact Manja Strick van Linschoten at Oratrix Development: Email: Manja.Strickvl@oratrix.com TEL: +31 20 679 5306 FAX: +31 20 679 5309 -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm