From Jack.Jansen@cwi.nl Sun Feb 1 22:27:27 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Sun, 01 Feb 1998 23:27:27 +0100 Subject: [PYTHONMAC-SIG] Strange FSSpec behaviour Message-ID: I've recently encountered some strange behaviour with FSSpecs and partial pathnames in Python, and I'm wondering whether anyone else has seen similar symptoms and/or knows what could cause this. Since a few weeks turning partial pathnames into FSSpecs suddenly started behaving erratically: the first few calls in a Python program would work as expected, but after a while it would start failing with "directory not found" errors. Doing an os.chdir() would make them work again for a while, but then things went wrong again. After quite some other things tried it turned out that turning off the recently-installed ValueFax extensions fixed the problem: it appears as if somehow running valuefax will change the idea the system has of my working directory (note: only the idea the _system_ has, so it only influences fsspec calls and things like GetCreatorAndType: normal I/O has its own idea of a working directory and continues functioning), but only after a while (or when I use it too often??). I'm 90% sure the problem is somehow with the valuefax extension or its printer-driver, but just in case there is a problem with the way Python uses the macos current directory I thought I'd ask you all about similar experiences... -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From seanh@prognet.com Mon Feb 2 20:27:30 1998 From: seanh@prognet.com (Sean Hummel) Date: Mon, 02 Feb 1998 12:27:30 -0800 Subject: [PYTHONMAC-SIG] A plugin for allowing OSA scripts to run. Message-ID: <199802022027.AA30668@murrow.prognet.com> Hi, I have written a plugin module for Python which allows the user to make a single call which compiles and executes the intended Applescript. Basically it would work something like this: import OSAm script =\ 'tell application "Finder" \r'+\ 'restart \r'+\ 'end tell' OSAm.CompileAndExecute(script) The return value is either the error text of the script or the return value of the script. Is anyone interested in such a module? Or does someone already know of a better one? _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From seanh@prognet.com Mon Feb 2 22:30:27 1998 From: seanh@prognet.com (Sean Hummel) Date: Mon, 02 Feb 1998 14:30:27 -0800 Subject: [PYTHONMAC-SIG] Where to get the OSAm plugin. Message-ID: <199802022230.AA16895@murrow.prognet.com> To download the OSAm plugin for the Macintosh, go here: http://borealis.prognet.com/OSAm.html Sorry forgot to give this earlier. _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From jstrout@ucsd.edu Wed Feb 11 19:00:53 1998 From: jstrout@ucsd.edu (Joseph J. Strout) Date: Wed, 11 Feb 1998 11:00:53 -0800 Subject: [PYTHONMAC-SIG] Python ICQ Message-ID: I've started a list of Python users who also use ICQ, and may be willing to chat with other Python users via that protocol: http://www-acs.ucsd.edu/~jstrout/python/icq.html Since there is a perception (which I believe to be erroneous) that Mac Python users are rare, I thought I'd extend this special invitation to the PythonMac mailing list. Please see the above page for information on how to add yourself to the Python ICQ list. Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Department of Neuroscience, UCSD | | jstrout@ucsd.edu http://www-acs.ucsd.edu/~jstrout/ | `------------------------------------------------------------------' [ Help stop spam: http://www.imc.org/ube-sol.html ] _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From jimmy@cs.cofc.edu Sat Feb 21 06:07:12 1998 From: jimmy@cs.cofc.edu (James B. Wilkinson) Date: Sat, 21 Feb 1998 01:07:12 -0500 Subject: [PYTHONMAC-SIG] Framework/Setting the port Message-ID: I decided to try to do some work on the Mac Framework and got myself into a heap of trouble. I can't find any way to explain the symptoms. I'm hoping that some of you can shed some light. In the process of debugging I found that I wasn't seeing all the events. I finally remembered having asked about that previously, and somebody had said that SIOUX sometimes steals events, and they never make it to your own app. So I stole the TEWindow code from ped and put it into the Framework. Then I made a subclass of it called DebugWindow and had the Application class create one when it starts up. I gave the Application class a method that subclasses of Window can call to write into the debug window, and sure enough, I get to see all the events that way. So far so good. Then I started really messing with the Framework. I had had some previous experience with another framework in C before I started playing Python. That framework uses a very different (it seemed to me) scheme for setting the port. I liked that scheme and thought I'd change this Framework to match. It sets the port only in the following places: 1) In the event loop it sets the port to any window that is getting an idle proc run on it. It restores the original port at the end of this. 2) In DoDialog if the event is activate on a dialog window it sets the port to that window before calling the handler. This was a special case to ward off problems in a particular case that I don't remember now. 3) In DoUpdate it sets the port to the window being updated before calling the handler. Restore the original on exit. 4) In DoActivate it sets the port to the window getting the activate event before calling the handler. Restore the original on exit if it was a deactivate. Leave it set to the activating window on activates. 5) Set the port to a window being destroyed before calling the handler. Restore the original on return from the handler. 6) In the routine used to register a window with the framework, set the port to the new window and leave it there. It was number 4) that I particularly missed in the Python Framework. I couldn't figure out how it could be right NOT to set the port to a window that is coming active. So I put that in. The application I have been working on works ok if I disable my debug window, but if that is turned on, things get funny. The debug window comes up first, and works ok. My app window them comes up and activates, but the text boxes work funny. If I type in one, I just get extra copies of the caret, but not the characters that I type. All this fixes itself if I click the mouse in the app window, and things are fine from there on. So I started looking at what happens on mouse clicks and found that things don't get fixed if I comment out the SetPort in the do_inContent method of the Window class. Clearly that line of code is what is fixing my problem. But why is it not ok to let the SetPort get called earlier when the activate event came along? I can't figure that. Even more strange is the results I got when I started doing GetPorts and printing out what they returned. The port is the *SAME* before and after the SetPort in do_inContent. That sounds like the SetPort in the activate handler did its job. So how can a SetPort that doesn't actually change the port make the textboxes start behaving correctly? Or is GetPort lying to me? It's all very strange. Oh, yeah, the routine that writes into the debug window sets the port before doing so and restores it afterward. In practical terms this isn't a serious problem. If the debug window isn't there, the problem doesn't come up, at least so far. If the debug window is there, then I'm debugging my program, and I know how to work around the problem. Still, I don't like mysteries. They're a sure indication that I don't know enough. In this case I obviously don't know as much as I thought I did when I started messing with this thing. Any suggestions welcome, and thanks. ------------------------------------------------------------- Jimmy Wilkinson | Perfessor of Computer Science jimmy@cs.CofC.edu | The College of Charleston (803) 953-8160 | Charleston SC 29424 If there is one word to describe me, that word would have to be "profectionist". _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From jimmy@cs.cofc.edu Sat Feb 21 06:26:44 1998 From: jimmy@cs.cofc.edu (James B. Wilkinson) Date: Sat, 21 Feb 1998 01:26:44 -0500 Subject: [PYTHONMAC-SIG] python15b3 development Message-ID: Two things I had to change in the development folder before I could get things to work: 1) the file xxmodule.c seems to be missing. I downloaded the full source distribution and found it there. 2) When I dod a make in xx.prj, I got the message 'Couldn't find project file "PythonCore".' This seemed to refer to the item labeled "PythonCore" listed under "Libraries" in the Files panel of xx.prj, and I certainly didn't have a project file named PythonCore in the development folder. I got things to work by removing it from the project and adding the "PythonCore 1.5b3" dll from the extensions folder. Maybe there should be a note about this in the README? While running Modulator during all this I noticed that, when you point into a textbox, the cursor switches rapidly back and forth between ibeam and arrow. Is this something to do with Tk? Thanks again. ------------------------------------------------------------- Jimmy Wilkinson | Perfessor of Computer Science jimmy@cs.CofC.edu | The College of Charleston (803) 953-8160 | Charleston SC 29424 If there is one word to describe me, that word would have to be "profectionist". _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From just@letterror.com Sat Feb 21 10:16:31 1998 From: just@letterror.com (Just van Rossum) Date: Sat, 21 Feb 1998 11:16:31 +0100 Subject: [PYTHONMAC-SIG] Anyone did a ColorPicker Python wrapper? Message-ID: As subject: has anyone wrapped ColorPicker functionality in an extension module? I secretly hope I don't have to do it myself... Thanks, Just _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From Jack.Jansen@cwi.nl Sun Feb 22 22:47:46 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Sun, 22 Feb 1998 23:47:46 +0100 Subject: [PYTHONMAC-SIG] python15b3 development In-Reply-To: Message by "James B. Wilkinson" , Sat, 21 Feb 1998 01:26:44 -0500 , Message-ID: Recently, "James B. Wilkinson" said: > Two things I had to change in the development folder before I could get > things to work: > > 1) the file xxmodule.c seems to be missing. I downloaded the full source > distribution and found it there. Oops, my fault. I exclude all .c files in the distribution, but I should make an exception for xxmodule.c (and for the .c file in the embedding demo). > 2) When I dod a make in xx.prj, I got the message 'Couldn't find project > file "PythonCore".' This seemed to refer to the item labeled "PythonCore" > listed under "Libraries" in the Files panel of xx.prj, and I certainly > didn't have a project file named PythonCore in the development folder. And this is casued by the new distribution process, which moves PythonCore to the extensions folder under the name PythonCore . Just: do you think there's an easy fix for this, or should I just put a note in the readme file? > > While running Modulator during all this I noticed that, when you point into > a textbox, the cursor switches rapidly back and forth between ibeam and > arrow. Is this something to do with Tk? I've seen this too, but not had the time to look into it. It could be a problem with modulator (I'll check that by trying it on unix), with Tk or with the Python/Sioux and Tk eventloop interacting. I'll put it on the todo list, but it isn't high-priority. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From Jack.Jansen@cwi.nl Sun Feb 22 22:55:03 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Sun, 22 Feb 1998 23:55:03 +0100 Subject: [PYTHONMAC-SIG] Anyone did a ColorPicker Python wrapper? In-Reply-To: Message by Just van Rossum , Sat, 21 Feb 1998 11:16:31 +0100 , Message-ID: Recently, Just van Rossum said: > As subject: has anyone wrapped ColorPicker functionality in an > extension module? I secretly hope I don't have to do it myself... I had a quick look (hoping the interface was bgennable), and it looks like something that is more suited to a handcrafted interface (modulator-assisted). The structures containing both input- and output-parameters are not something that is easy to explain to bgen. I'll gladly accept contributed code:-) -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From just@letterror.com Mon Feb 23 00:31:00 1998 From: just@letterror.com (Just van Rossum) Date: Mon, 23 Feb 1998 01:31:00 +0100 Subject: [PYTHONMAC-SIG] python15b3 development In-Reply-To: References: Message by "James B. Wilkinson" , Sat, 21 Feb 1998 01:26:44 -0500 , Message-ID: >> 2) When I dod a make in xx.prj, I got the message 'Couldn't find project >> file "PythonCore".' This seemed to refer to the item labeled "PythonCore" >> listed under "Libraries" in the Files panel of xx.prj, and I certainly >> didn't have a project file named PythonCore in the development >> folder. > >And this is casued by the new distribution process, which moves >PythonCore to the extensions folder under the name PythonCore >. Just: do you think there's an easy fix for this, or should >I just put a note in the readme file? If we're going to include the developers stuff with the standard distribution, I could try to tell the installer to put PythonCore in two places (only if the dev stuff is being installed), but I am not sure this is easy or at all possible. Changing the name back to just "PythonCore" for the dev version would require even more hacking into the installer... But I'll look into it. Just _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From skip@calendar.com (Skip Montanaro) Mon Feb 23 03:05:05 1998 From: skip@calendar.com (Skip Montanaro) (Skip Montanaro) Date: Sun, 22 Feb 1998 22:05:05 -0500 (EST) Subject: [PYTHONMAC-SIG] How to print a PostScript file? Message-ID: <199802230305.WAA21099@dolphin.automatrix.com> I'm generating PostScript from a small Python application on my Mac (never having programmed anything more than simple spreadsheets on a Mac before). I don't have a PostScript printer so I've been displaying the output in MacGS and printing from there. The application will eventually be delivered to a Mac with a PostScript printer, however. Is there an easy way to print a PostScript file from within Python? It's simple Adobe Level-1 PostScript. Thanks, Skip Montanaro | Musi-Cal: http://concerts.calendar.com/ skip@calendar.com | Python Support: http://www.pythonpros.com/ (518)372-5583 | XEmacs: http://www.automatrix.com/~skip/xemacs/tip.html _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From skip@calendar.com (Skip Montanaro) Mon Feb 23 03:10:51 1998 From: skip@calendar.com (Skip Montanaro) (Skip Montanaro) Date: Sun, 22 Feb 1998 22:10:51 -0500 (EST) Subject: [PYTHONMAC-SIG] Bomberoo with applet memory set too low... Message-ID: <199802230310.WAA21191@dolphin.automatrix.com> My little Python application does things the Unix way -- assume you have infinite virtual memory and suck an entire file in with a single read() or readlines() call. This has some rather negative consequences on the Mac. The most troublesome is that I get an Error 10 bomb dialog if I haven't set the applet's min size/preferred size values high enough. Two questions: 1. Shouldn't Python crap out more gracefully in this situation? 2. Can BuildApplet be modified to set defaults for min/preferred sizes so users (programmers) don't have to remember to pop up the applet's info box and increase those values? FYI, I'm using MacPython 1.5b3. Thanks, Skip Montanaro | Musi-Cal: http://concerts.calendar.com/ skip@calendar.com | Python Support: http://www.pythonpros.com/ (518)372-5583 | XEmacs: http://www.automatrix.com/~skip/xemacs/tip.html _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From Jack.Jansen@cwi.nl Mon Feb 23 10:44:47 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Mon, 23 Feb 1998 11:44:47 +0100 Subject: [PYTHONMAC-SIG] Bomberoo with applet memory set too low... In-Reply-To: Message by Skip Montanaro , Sun, 22 Feb 1998 22:10:51 -0500 (EST) , <199802230310.WAA21191@dolphin.automatrix.com> Message-ID: > > My little Python application does things the Unix way -- assume you have > infinite virtual memory and suck an entire file in with a single read() or > readlines() call. This has some rather negative consequences on the Mac. > The most troublesome is that I get an Error 10 bomb dialog if I haven't set > the applet's min size/preferred size values high enough. Two questions: > > 1. Shouldn't Python crap out more gracefully in this situation? Definitely... It isn't always simple, though: if it is Python who does the malloc that fails it usually gets turned into a MemoryError exception, but if it's the underlying C library things usually get messy. I can't seem to reproduce this bomb, though: do you have example code? > > 2. Can BuildApplet be modified to set defaults for min/preferred sizes > so users (programmers) don't have to remember to pop up the applet's > info box and increase those values? I'm not sure I like this. BuildApplet is interface-less at the moment, and I'd like to keep it that way. Option-dropping a python source on buildapplet could cause a dialog to appear, but then people are likely to forget to option-drop. What do people think? -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From steve@estel.uindy.edu Mon Feb 23 10:59:52 1998 From: steve@estel.uindy.edu (Steve Spicklemire) Date: Mon, 23 Feb 1998 05:59:52 -0500 (EST) Subject: [PYTHONMAC-SIG] Bomberoo with applet memory set too low... Message-ID: <199802231059.FAA26699@estel.uindy.edu> I like option-drag... it's consistent with the interpreter that way (you can option-drag to it as well...) -steve >>>>> "Jack" == Jack Jansen writes: >> My little Python application does things the Unix way -- >> assume you have infinite virtual memory and suck an entire file >> in with a single read() or readlines() call. This has some >> rather negative consequences on the Mac. The most troublesome >> is that I get an Error 10 bomb dialog if I haven't set the >> applet's min size/preferred size values high enough. Two >> questions: >> >> 1. Shouldn't Python crap out more gracefully in this situation? Jack> Definitely... It isn't always simple, though: if it is Jack> Python who does the malloc that fails it usually gets turned Jack> into a MemoryError exception, but if it's the underlying C Jack> library things usually get messy. I can't seem to reproduce Jack> this bomb, though: do you have example code? >> 2. Can BuildApplet be modified to set defaults for >> min/preferred sizes so users (programmers) don't have to >> remember to pop up the applet's info box and increase those >> values? Jack> I'm not sure I like this. BuildApplet is interface-less at Jack> the moment, and I'd like to keep it that Jack> way. Option-dropping a python source on buildapplet could Jack> cause a dialog to appear, but then people are likely to Jack> forget to option-drop. Jack> What do people think? -- Jack Jansen | ++++ stop the Jack> execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ Jack> if you agree copy these lines to your sig ++++ Jack> http://www.cwi.nl/~jack | see Jack> http://www.xs4all.nl/~tank/spg-l/sigaction.htm Jack> _______________ PYTHONMAC-SIG - SIG on Python for the Apple Jack> Macintosh Jack> send messages to: pythonmac-sig@python.org administrivia to: Jack> pythonmac-sig-request@python.org _______________ _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From billpy@mousa.demon.co.uk Mon Feb 23 11:54:45 1998 From: billpy@mousa.demon.co.uk (Bill Bedford) Date: Mon, 23 Feb 1998 11:54:45 +0000 Subject: [PYTHONMAC-SIG] How to print a PostScript file? In-Reply-To: <199802230305.WAA21099@dolphin.automatrix.com> Message-ID: <204845855905440740715@mousa.demon.co.uk> ~I'm generating PostScript from a small Python application on my Mac (never ~having programmed anything more than simple spreadsheets on a Mac before). ~I don't have a PostScript printer so I've been displaying the output in ~MacGS and printing from there. The application will eventually be delivered ~to a Mac with a PostScript printer, however. Is there an easy way to print ~a PostScript file from within Python? It's simple Adobe Level-1 PostScript. ~ Mmm mutter, mutter....... there's no printing implemented in python, except via appleevents and other apps. But for PostScript you can use send you file to Drop*PS or the apple laserwriter unility for printing. Drop*PS is at _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From just@letterror.com Mon Feb 23 14:46:47 1998 From: just@letterror.com (Just van Rossum) Date: Mon, 23 Feb 1998 15:46:47 +0100 Subject: [PYTHONMAC-SIG] How to print a PostScript file? In-Reply-To: <204845855905440740715@mousa.demon.co.uk> References: <199802230305.WAA21099@dolphin.automatrix.com> Message-ID: At 11:54 AM +0000 2/23/98, Bill Bedford wrote: >Mmm mutter, mutter....... there's no printing implemented in python, except >via appleevents and other apps. Has anyone here got experience how to do this in, say, C? It would be really nice if we could print from Python. How hard is it? Just _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From Jack.Jansen@cwi.nl Mon Feb 23 15:53:06 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Mon, 23 Feb 1998 16:53:06 +0100 Subject: [PYTHONMAC-SIG] How to print a PostScript file? In-Reply-To: Message by Just van Rossum , Mon, 23 Feb 1998 15:46:47 +0100 , Message-ID: > Has anyone here got experience how to do this in, say, C? It would be really > nice if we could print from Python. How hard is it? Printing in general should be fairly easy: you open a special sort of graphport and render in that. When someone tells me which calls are needed (or which interfaces should be bgenned) I should be able to implement that quickly. Postscript printing (i.e. from postscrip source, not through quickdraw calls) is a different story, however, it uses some tricks if I remember correctly but I don't know exactly which ones. So, I'll definitely need a bit of help before I can implement this... -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From tony@metanet.com Tue Feb 24 18:05:30 1998 From: tony@metanet.com (Tony Lownds) Date: Tue, 24 Feb 1998 10:05:30 -0800 Subject: [PYTHONMAC-SIG] How to print a PostScript file? In-Reply-To: References: Message by Just van Rossum , Mon, 23 Feb 1998 15:46:47 +0100 , Message-ID: I asked PostScript Guy Glenn Reid about this and he said: It's pretty easy. There are "QuickDraw comments" that are escapes to write raw PostScript code through the printer driver. The only catch is the coordinate system and stuff like that. In the old days you had to know where QuickDraw had left you and do things like scale fonts by -1 in Y to flip them rightside up, because QuickDraw flipped the Y axis to emulate the screen model. These days they might do all that for you before you begin the PostScript escape. I haven't looked in any detail in years. But any discussion of printing and the QuickDraw driver should document the PostScript escape. I can almost remember the name of it, but not quite. I think you use the call "PicComment" with some special constant to tell the driver it's PostScript. Hope this helps, -Tony Lownds At 4:53 PM +0100 2/23/98, Jack Jansen wrote: >> Has anyone here got experience how to do this in, say, C? It would be really >> nice if we could print from Python. How hard is it? > >Printing in general should be fairly easy: you open a special sort of >graphport and render in that. When someone tells me which calls are needed >(or >which interfaces should be bgenned) I should be able to implement that >quickly. > >Postscript printing (i.e. from postscrip source, not through quickdraw calls) >is a different story, however, it uses some tricks if I remember correctly >but >I don't know exactly which ones. So, I'll definitely need a bit of help >before >I can implement this... >-- >Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ >Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ >http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm > > > >_______________ >PYTHONMAC-SIG - SIG on Python for the Apple Macintosh > >send messages to: pythonmac-sig@python.org >administrivia to: pythonmac-sig-request@python.org >_______________ __________________________________________________________________________ Tony Lownds 650-327-8200 Metagraphics, Inc. fax 650-964-9575 _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From Jack.Jansen@cwi.nl Wed Feb 25 13:49:24 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Wed, 25 Feb 1998 14:49:24 +0100 Subject: [PYTHONMAC-SIG] Anyone using Pmw with MacPython? Message-ID: Is anyone using Pmw on the Mac? I tried it, and it sort-of works (after a minor bugfix to the PmwLoader.py) file, but various things don't work exactly as expected. If anyone is interested in helping me debug Pmw (or, more likely, the Mac Tcl/Tk port or MacPython) please let me know, -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From tmk@dad.be Wed Feb 25 14:34:43 1998 From: tmk@dad.be (tmk) Date: Wed, 25 Feb 1998 15:34:43 +0100 Subject: [PYTHONMAC-SIG] Anyone using Pmw with MacPython? In-Reply-To: Message-ID: What's Pmw Jack? = tmk = >Is anyone using Pmw on the Mac? I tried it, and it sort-of works (after a >minor bugfix to the PmwLoader.py) file, but various things don't work exactly >as expected. > >If anyone is interested in helping me debug Pmw (or, more likely, the Mac >Tcl/Tk port or MacPython) please let me know, >-- >Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From wilsona@plk.af.mil Wed Feb 25 15:09:27 1998 From: wilsona@plk.af.mil (Anthony Wilson) Date: Wed, 25 Feb 1998 08:09:27 -0700 Subject: [PYTHONMAC-SIG] Anyone using Pmw with MacPython? Message-ID: <199802251502.IAA06228@ug2.plk.af.mil> > THIS MESSAGE IS IN MIME FORMAT. Since your mail reader does not understand this format, some or all of this message may not be legible. --MS_Mac_OE_2971238967_3014782_MIME_Part Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit hello tmk, >What's Pmw Jack? the following is an excerpt from a posting by the maintainer of Pmw, Greg, to the comp.lang.python list. Hope this helps. ************************* ******** Anthony L. Wilson ******** * * Analog IC Designer * * * Air Force Research Lab, Kirtland AFB, NM, 87109 * * * Ph: 505.846.4499 Fax: 505.846.2290 * * ******* mailto:wilsona@plk.af.mil ******* *************************** ------------------------------------------------------------------------ For more information on Pmw, see the home page at http://www.dscpl.com.au/pmw/ and click on the link to the latest version. You can fetch the entire distribution from ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.6.2.tar.gz If you have any comments, enhancements or new contributions, please contact me (gregm@iname.com). ===================================================================== For those that do not know about Pmw, here is an extract from the documentation. Pmw is a framework for building high-level compound widgets, or megawidgets, constructed using other widgets as component parts. It promotes consistent look and feel within and between graphical applications, is highly configurable to your needs and is easy to use. Pmw consists of: A few base classes, providing a framework for building megawidgets. A library of flexible and extensible megawidgets built on the base classes, such as ButtonBox, ComboBox, MessageDialog, etc. A lazy importer/dynamic loader which is automatically invoked when Pmw is first imported. This gives unified access to all Pmw classes and functions though the "Pmw." prefix. It also speeds up module loading time by only importing Pmw sub-modules when needed. Reference documentation, consisting of complete listings of megawidget options, methods and components. Full descriptions are also available for all the base classes and several other megawidget classes. Descriptions of the other megawidgets will be released soon. A test framework and tests for both the Tkinter module and all the Pmw megawidgets. A slick demonstration of the megawidgets. An interface to the BLT busy, graph and vector commands. The interface to Pmw megawidgets is similar to basic Tk widgets, so it is easy for developers to include both megawidgets and basic Tk widgets in their graphical applications. In addition, all Pmw megawidgets may themselves be extended, using either inheritance or composition. The use of the Pmw framework and megawidgets replaces common widget combinations with higher level abstractions. This simplifies code, making it more readable and maintainable and more easily modifiable. The ability to extend Pmw megawidgets enables developers to create new megawidgets based on previous work. -- Greg McFarlane INMS Telstra Australia (gregm@iname.com) --MS_Mac_OE_2971238967_3014782_MIME_Part Content-type: text/html; charset="US-ASCII" Content-transfer-encoding: quoted-printable Re: [PYTHONMAC-SIG] Anyone using Pmw with MacPython? hello tmk,

>What's Pmw Jack?
the following is an excerpt from a posting by the maintainer of Pmw, Greg, = to the comp.lang.python list.

Hope this helps.

*************************
******** Anthony L. Wilson ********
* * Analog IC Designer * *
* Air Force Research Lab, Kirtland AFB, NM, 87109 *
* * Ph: 505.846.4499 Fax: 505.846.2290 * *
******* mailto:wilsona@plk.af.mil *******
***************************

------------------------------------------------------------------------ For more information on Pmw, see the home page at
http://www.dscpl.com.au/pmw/
and click on the link to the latest version.

You can fetch the entire distribution from
ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.6.2.tar.gz<= /U>

If you have any comments, enhancements or new contributions, please
contact me (gregm@iname.com).

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

For those that do not know about Pmw, here is an extract from the
documentation.

Pmw is a framework for building high-level compound widgets, or
megawidgets, constructed using other widgets as component parts.
It promotes consistent look and feel within and between graphical
applications, is highly configurable to your needs and is easy to
use.

Pmw consists of:

A few base classes, providing a framework for building
megawidgets.

A library of flexible and extensible megawidgets built on the
base classes, such as ButtonBox, ComboBox, MessageDialog,
etc.

  A lazy importer/dynamic loader which is automatically invoked
  when Pmw is first imported. This gives unified access to all
  Pmw classes and functions though the "Pmw." prefix. It al= so
  speeds up module loading time by only importing Pmw
  sub-modules when needed.

Reference documentation, consisting of complete listings of
megawidget options, methods and components. Full
descriptions are also available for all the base classes and
several other megawidget classes. Descriptions of the other
megawidgets will be released soon.

A test framework and tests for both the Tkinter module and
all the Pmw megawidgets.

A slick demonstration of the megawidgets.

An interface to the BLT busy, graph and vector commands.

The interface to Pmw megawidgets is similar to basic Tk widgets,
so it is easy for developers to include both megawidgets and basic
Tk widgets in their graphical applications. In addition, all Pmw
megawidgets may themselves be extended, using either inheritance
or composition.

The use of the Pmw framework and megawidgets replaces common
widget combinations with higher level abstractions. This
simplifies code, making it more readable and maintainable and more
easily modifiable. The ability to extend Pmw megawidgets enables
developers to create new megawidgets based on previous work.

--
Greg McFarlane
INMS Telstra Australia (gregm@iname.com= )



--MS_Mac_OE_2971238967_3014782_MIME_Part-- _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________ From Jack.Jansen@cwi.nl Wed Feb 25 15:36:13 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Wed, 25 Feb 1998 16:36:13 +0100 Subject: [PYTHONMAC-SIG] Anyone using Pmw with MacPython? In-Reply-To: Message by "Anthony Wilson" , Wed, 25 Feb 1998 08:09:27 -0700 , <199802251502.IAA06228@ug2.plk.af.mil> Message-ID: The one things Greg fails to mention about Pmw is that the widget set lives on top of Tkinter. Therefore it should be portable between Unix/Mac/Windows. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm _______________ PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org _______________