From Jack.Jansen@cwi.nl Mon Feb 5 23:39:06 1996 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 06 Feb 1996 00:39:06 +0100 Subject: [PYTHONMAC-SIG] WPY for the mac? Message-ID: <9602052339.AA11577=jack@schelvis.cwi.nl> Tonight I was wondering, looking at the list of systems supported by WPY, whether it would be useful to have a mac port of wpy, and how much work it would be. Lo and behold: 10 seconds later I see another posting of someone asking for a WPY mac port. Is anyone here familiar with WPY? How much work would it be to port it, and is it worth the trouble (i.e. how good is it)? -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm ================= 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 5 23:51:06 1996 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 06 Feb 1996 00:51:06 +0100 Subject: [PYTHONMAC-SIG] Tk7.5b1 is out, anyone looking at it? Message-ID: <9602052351.AA11619=jack@schelvis.cwi.nl> The next release of Tcl/Tk (beta 1) is out, and from the blurb it looks as though it may be easier to integrate in Python: one of the main differences with alfa 2 is a complete rewrite of the I/O subsystem to be more portable to different platforms. Is anyone going to look into putting this beast into Python, or should I pull the stuff over and have a look (sigh)? -- 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 jps@tfs.com Tue Feb 6 00:25:54 1996 From: jps@tfs.com (jps@tfs.com) Date: Mon, 5 Feb 1996 16:25:54 -0800 Subject: [PYTHONMAC-SIG] WPY for the mac? Message-ID: <9602060025.AA17818@msusrv.tfs.com> : Is anyone here familiar with WPY? How much work would it be to port : it [to the Mac], and is it worth the trouble (i.e. how good is it)? I *would* like to see wpy on the Mac. There are several desirable Python applications that I haven't ported to the Mac because it suffers from being out of the mainstream of Python GUI options. I've only played with wpy on Solaris, where it was fine for my modest needs. I did see one problem where it would block on input while holding the Python interpreter lock. This blocked the other threads of my application. The fix had to be made within a library routine (whose identity I have forgotten). -jeff stearns P.S. The headers on Jack's message say: To: pythonmac-sig@python.org From: Jack Jansen Thus replies will go to Jack, not to this list. Is this the intended behavior? ================= 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 Tue Feb 6 09:33:23 1996 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 06 Feb 1996 10:33:23 +0100 Subject: [PYTHONMAC-SIG] mail addresses on the list In-Reply-To: Message by jps@tfs.com , Mon, 5 Feb 1996 16:25:54 -0800 , <9602060025.AA17818@msusrv.tfs.com> Message-ID: <9602060933.AA12225=jack@schelvis.cwi.nl> Recently, jps@tfs.com said: > P.S. The headers on Jack's message say: > To: pythonmac-sig@python.org > From: Jack Jansen > Thus replies will go to Jack, not to this list. Is this the intended behavio > r? Yes. Many mailers have a reply (send a message to the From: or Reply-To: person) and followup (send a message to the From/Reply-To *and* the To: people). Adding a "Reply-To: pythonmac-sig@python.org" will make it difficult to reply to the originator of the message only. -- 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 Tue Feb 6 14:37:50 1996 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 06 Feb 1996 15:37:50 +0100 Subject: [PYTHONMAC-SIG] Wanted: Python w/GUSI testers... Message-ID: <9602061437.AA12949=jack@schelvis.cwi.nl> I've created Python interpreters that use GUSI, the Grand Unified Socket Interface for their I/O and I would like it very much if some people downloaded these and tested them. Note that the executables are only *very* lightly tested, so expect all sorts of things to fail. GUSI is a unix-like I/O system for mac programs, allowing the use of sockets, select, etc. I've finally been convinced that using GUSI in python is also the only way to get Tcl/Tk to work, and it appears that GUSI may also provide the functionality needed to implement threads on the mac. This release is done to get some idea of where the use of GUSI will mess up the expectancies of the rest of python. You can obtain a 68K or PPC executable from . Note that these files are interpreters only, you're expected to have "the rest" of the python distribution installed already. Also, don't throw away your normal interpreter: I'm pretty sure that these interpreters will have some serious shortcomings. Here are the main differences with a normal 1.3.1 interpreter: - No stdwin, img, mactcp modules - Unix-like socket and select modules - os.stat() returns same info as on unix (no type/creator/resource-size) - no resource-fork opening with open('file', '*r') - (PPC only) The interpreter is statically linked and does not use PythonCore. - (PPC only) Dynamic modules are incompatible (maybe you should remove PlugIns from your sys.path, to be sure). -- 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 Wed Feb 7 10:39:36 1996 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Wed, 07 Feb 1996 11:39:36 +0100 Subject: [PYTHONMAC-SIG] Backward compatability Message-ID: <9602071039.AA14477=jack@schelvis.cwi.nl> Guido suggested (in a private message) to remove the '*' option (open the resource fork) from open() and replace it by a method MacOS.openrf() that opens the resource fork. Also, he suggested doing away with the extra fields returned by os.stat() on the mac (the resource fork size, creator and type), to make stat() compatible across all platforms. Will people be seriously bothered by these incompatible changes? Also, there are three modules I would like to get rid of, in favour of bgen-generated modules with the same functionality (but probably a completely different interface), and again I would like to hear whether this would hurt people. I want to replace the ctb and speech interfaces by bgen-generated ones. Also, I want to get rid of mactcp/macdnr in favor of a socket-like interface. For the latter: if I do this, are there people who still want the low-level mactcp interface (or, alternatively, an OpenTransport interface)? If you use these interfaces: please reply. Failure to do so will strengthen me in my conviction that I can toss these without seriously inconveniencing people... -- 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 Wed Feb 7 13:38:50 1996 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Wed, 07 Feb 1996 14:38:50 +0100 Subject: [PYTHONMAC-SIG] Wanted: Python w/GUSI testers... In-Reply-To: Message by guzdial@cc.gatech.edu (Mark Guzdial) , Tue, 6 Feb 1996 17:35:17 -0500 (EST) , Message-ID: <9602071338.AA14955=jack@schelvis.cwi.nl> Recently, guzdial@cc.gatech.edu (Mark Guzdial) said: > I was just playing with them some -- it's really exciting! Here are some > things that I noted: > > (1) I may be using the urllib wrong, but I couldn't get readlines() to work > on the object that urlopen returned > [example deleted] > (2) ftplib worked strange. [example deleted] these two are examples of the same problem: socket.makefile() opens a socket in ascii-mode, not binary mode. The workaround is simple: find all calls to makefile("r") and makefile("w") in the Lib folder (and your own programs) and change them to makefile("rb") and makefile("wb"). Mark has also experienced crashes upon exiting PythonGUSI, and so did I. For now, the workaround appears to be to close all your sockets before exiting. I am suspecting Open Transport of this, so I would be interested in people reporting whether MacTCP machines also crash if they have sockets open upon exiting python. -- 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 guzdial@cc.gatech.edu Thu Feb 8 15:25:39 1996 From: guzdial@cc.gatech.edu (Mark Guzdial) Date: Thu, 8 Feb 1996 10:25:39 -0500 (EST) Subject: [PYTHONMAC-SIG] Backward compatability Message-ID: I vote for compatibility. I don't use these additional features, but I'd like to be able to run some of the other Python code I see/hear about. Mark >Guido suggested (in a private message) to remove the '*' option (open >the resource fork) from open() and replace it by a method >MacOS.openrf() that opens the resource fork. > >Also, he suggested doing away with the extra fields returned by >os.stat() on the mac (the resource fork size, creator and type), to >make stat() compatible across all platforms. > >Will people be seriously bothered by these incompatible changes? > >Also, there are three modules I would like to get rid of, in favour of >bgen-generated modules with the same functionality (but probably a >completely different interface), and again I would like to hear >whether this would hurt people. I want to replace the ctb and speech >interfaces by bgen-generated ones. Also, I want to get rid of >mactcp/macdnr in favor of a socket-like interface. For the latter: if >I do this, are there people who still want the low-level mactcp >interface (or, alternatively, an OpenTransport interface)? > >If you use these interfaces: please reply. Failure to do so will >strengthen me in my conviction that I can toss these without seriously >inconveniencing people... >-- >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 >================= -------------------------- Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280 (404) 894-5618 : Fax (404) 894-0673 : guzdial@cc.gatech.edu http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.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 guido@CNRI.Reston.VA.US Sun Feb 18 16:44:28 1996 From: guido@CNRI.Reston.VA.US (Guido van Rossum) Date: Sun, 18 Feb 1996 11:44:28 -0500 Subject: [PYTHONMAC-SIG] Mac Python with Tk -- early beta Message-ID: <199602181644.LAA28004@monty> I have managed to build a 68K Python with Tk that can run Grail. Download it from ftp://ftp.python.org/pub/mac/beta/, files python68Kgusitk.sit.hqx, README-tk, and Tkinter.py. Here's the README-tk file: Mac Python with Tk -- early beta ================================ The file python68Kgusitk.sit.hqx is a Binhexed, Stuffed Macintosh 68K Python binary that supports John Ousterhout's Tk toolkit. It is just the application binary -- you'll have to get one of the other distributions (1.3 or 1.3.1) to get the Python library code; EXCEPT there's a new version of Tkinter.py, which you *have* to use, sitting (as a separate text file) in this directory. I assume you are already familiar with running Python on your Mac -- if you aren't, you should definitely first download and try the 1.3 or 1.3.1 releases for Mac (this directory or one up). If you can't run the EditPythonPrefs.py script, don't even think about running my version. (Hint: EditPythonPrefs.py and EditPythonPrefs.rsrc must be in the same directory.) There's no PPC binary, because I haven't been able to build and test one one yet. I hope I'll get to that within a few days. In the mean time, the 68K binary *should* work on a PPC in emulation mode, but you can't use Jack's nift applets or synamically loaded extension modules. There are no source patches or project files yet, because I haven't sorted out exactly what I did to make it work. In a while, I hope. This uses the latest Tk beta release: Tcl 7.5b1 and Tk 4.1b1. This is the first version I could get to work with Python on the Mac. I didn't have to make any changes to the Tcl/Tk sources. There are plenty of little bugs in the Tk beta; the most annoying is that it will crash with a bus error if it tries to use font metrics before an "update" or "update idletasks" has been done. For the time being, I make this call in Tkinter.py as soon as the root window is created. This means that you will see an an empty root window when your app comes up, until your app withdraws it or adds widgets and calls update() or mainloop(). This version also uses the GUSI library (Grand Unified Socket Interface, by Matthias Neeracher). This means the full socket and select modules are available. it does mean that all calls to socket.makefile() must be patched to use 'rb' or 'wb' as the file mode (this affects modules like ftplib, httplib, maybe urllib). When using async I/O (select, Tk's createfilehandler()) intensively, I noticed some weird effects where Python, Tk, GUSI and the SIOUX console window seem to be competing for events. I got better results by disabling Python's own event handling with the call MacOS.EnableAppswitch(-1) -- I also added this to Tkinter.py. This means you can't interrupt the Python code with Command-period. With these provisions, it *does* run Grail (a patched version, not yet distributed). it's a memory hog (notice the preferred memory usage of 6Meg). It is slow, though part of that is probably due to my 14k4 modem. It takes about 30 seconds for Grail to start up when all its .pyc files are up-to-date (I ran Tools/scripts/compileall.py in the Grail source directory to do this). Some smaller applets work -- I had trouble with Life and Daleks though. --Guido van Rossum URL: ================= PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org ================= From guzdial@cc.gatech.edu Mon Feb 19 18:52:55 1996 From: guzdial@cc.gatech.edu (Mark Guzdial) Date: Mon, 19 Feb 1996 13:52:55 -0500 (EST) Subject: [PYTHONMAC-SIG] Mac Python with Tk -- early beta Message-ID: I'm very excited about this announcement, and just downloaded all the different pieces. But I can't seem to get any of it working. I typed in the "Simple Hello World Program" from the "Tkinter Life Preserver" documentation, and I'm getting strange errors: - If I just import it, I get told that Frame is unknown. - If I execfile it, I get an I/O error. (See below) I start WISH before I do any imports -- is that the right thing to do? Thanks for any pointers! Mark Python 1.3 (Feb 17 1996) [CW 68K w/GUSI] Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> from hellotk import * Traceback (innermost last): File "", line 1, in ? File "Guz AV:Python 1.3.1:src:hellotk.py", line 3, in ? class Application(Frame): NameError: Frame >>> from Tkinter import * >>> from hellotk import * >>> a=Application() Traceback (innermost last): File "", line 1, in ? NameError: Application >>> a = hellotk.Application() Traceback (innermost last): File "", line 1, in ? NameError: hellotk >>> import hellotk >>> a = hellotk.Application() Traceback (innermost last): File "", line 1, in ? AttributeError: Application >>> execfile("Guz AV:Python 1.3:src:hellotk.py") Traceback (innermost last): File "", line 1, in ? IOError: (22, 'package 5 not present [Transcendental Functions]') >>> -------------------------- Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280 (404) 894-5618 : Fax (404) 894-0673 : guzdial@cc.gatech.edu http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.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 guzdial@cc.gatech.edu Mon Feb 19 20:28:49 1996 From: guzdial@cc.gatech.edu (Mark Guzdial) Date: Mon, 19 Feb 1996 15:28:49 -0500 (EST) Subject: [PYTHONMAC-SIG] Mac Python with Tk -- early beta Message-ID: HOORAY!!! After I fixed my line endings and got Tkconstants.py from Guido, it all worked! It's pretty amazingly fast (being used to HyperCard and SuperCard). Quitting is a little weird, in that you quit from Tk and then again from Python. (And if you just keep importing demos, everything gets added into the one window, which is also strange.) But it works and I'm really excited about using this!! A couple of odd things: - Not all the tkinter demos work. For example, the scrolling canvas gives me some error about "xscroll." But most of those I've tried work just fine, which is pretty amazing compatibility. - Try pong and set the speed to really low. The ball actually "cleans" the screen -- it's trail is a different gray shade from the background. >> I typed in the "Simple Hello World Program" from the "Tkinter Life >> Preserver" documentation, and I'm getting strange errors: >> - If I just import it, I get told that Frame is unknown. >> - If I execfile it, I get an I/O error. >> (See below) >> >> I start WISH before I do any imports -- is that the right thing to do? > >You shouldn't have to run WISH at all -- the Tk library and Tcl >interpreter are linked into the Python application. > >Did you transfer the Tkinter.py file that was also on the ftp site? >If not, please do so. If you did, maybe you transferred it in binary >mode? Then it has newlines instead of carriage returns as line >separators, and the Mac Python interpreter (which only understands >carriage returns) will believe it contains only a single line, which >is just a comment (because the first line of the file is a comment). > >If you have an editor like BBEdit or Alpha, or even the CodeWarrior >IDE's editor, there should be an indication of whether it's a Unix or >Mac text file, and it should let you change the type and save it back >to convert it. > >Let me know if this helps... > >--Guido van Rossum >URL: -------------------------- Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280 (404) 894-5618 : Fax (404) 894-0673 : guzdial@cc.gatech.edu http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.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 Tue Feb 20 10:02:20 1996 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 20 Feb 1996 11:02:20 +0100 Subject: [PYTHONMAC-SIG] PYTH creator code Message-ID: <9602201002.AA28182=jack@schelvis.cwi.nl> Folks, apparently the 'PYTH' creator code that has been used by python for a long time is officially in use by someone else, so for the next release I'll have to pick a different one (probably 'Pyth'). I'll include a script with the next distribution to fix existing files, but I'm posting this message to see if anyone has any ideas of other things that have to be changed, or other problems this may cause. Guido: shall I register the codes in the name of the Python Software Activity? If so: what is the address of the PSA? -- 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 carrera@frantic.com Thu Feb 22 00:52:19 1996 From: carrera@frantic.com (Julio Carrera) Date: Wed, 21 Feb 1996 19:52:19 -0500 Subject: [PYTHONMAC-SIG] Python.h and freeze.py Message-ID: <199602220052.TAA07235@dialin1.wing.net> Although this is not the appropiate list, I thought some of you might be able to steer me in the right direction. I want to write a C extension module on NT but I cannot find Python.h in the NT distribution. The same goes for freeze.py. Any ideas? -Julio ------------------------------------------------------------------------------ Julio Carrera 6 Fisher Ave. Wellesley, MA 02181 (617) 239-1532 carrera@frantic.com ---------------------------------------------------------------------------- -- ================= PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org ================= From guido@CNRI.Reston.VA.US Sun Feb 25 05:03:37 1996 From: guido@CNRI.Reston.VA.US (Guido van Rossum) Date: Sun, 25 Feb 1996 00:03:37 -0500 Subject: [PYTHONMAC-SIG] Tk Python with Tcl/Tk beta 2 Message-ID: <199602250503.AAA14820@monty> Following the new Tcl/Tk beta release, I've made a new version of Python with Tk available (still only for 68K Mac, though I have now confirmed that it can be done for PPC as well). The URL of the directory is ftp://ftp.python.org/pub/python/mac/beta/ Get the files README-tk, python68Kgusitk.sit.hqx and Tkinter.py (plus the Python 1.3.1 release in the same directory if you haven't got it yet). For build instructions, see README-tk-build and fetch some additional files. The changes to _tkinter.c are incompatible with the Tcl/Tk beta 1 (the only other changes were made to Tkinter.py and the project; you may want to get the new macmodule.c since there were some silent updates to it after I first announced the previous version). The only noticeable change is the fact that the SIOUX console window now gets its events correctly. It is now also possible to interrupt the Python code using Command-Period. The bus error in CharWidth seems to have gone, and I have successfully run several applications. Grail sometimes works ;-) --Guido van Rossum URL: ================= 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 25 22:25:11 1996 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Sun, 25 Feb 1996 23:25:11 +0100 Subject: [PYTHONMAC-SIG] Tk Python with Tcl/Tk beta 2 In-Reply-To: Message by Guido van Rossum , Sun, 25 Feb 1996 00:03:37 -0500 , <199602250503.AAA14820@monty> Message-ID: <9602252225.AA17513=jack@schelvis.cwi.nl> If people are desparate for a PPC-version of TkPython I can probably make one available in the next few days (I built one from Guido's sources with the beta-1 desitribution with few problems, so I think beta-2 should be easy too), but I'll only do it if people can't wait for it. It'll be a single (huge) executable, like the 68k version. What I would really like to concentrate on is a PPC Python that uses the normal shared-library structure but based on the GUSI I/O system, and with tkinter/tk/tcl in a dynamic module (so it doesn't take oodles of memory if you don't use it), but this'll probably take a week (or maybe two), so I'd prefer people to wait a while and use 68k tkpython in the mean time. -- 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 guzdial@cc.gatech.edu Mon Feb 26 20:51:01 1996 From: guzdial@cc.gatech.edu (Mark Guzdial) Date: Mon, 26 Feb 1996 15:51:01 -0500 (EST) Subject: [PYTHONMAC-SIG] Problems with new TkInter on Mac Message-ID: I'm trying to use the Beta 2 release of PythonTk with the new Tkinter. It hung my machine several times, and after playing with mixtures of Beta 1 and Beta 2, I'm pretty sure it's the new Tkinter.py. (Guido, I did make sure that my line-endings are Mac-ified -- BBedit reports that it's a Mac-style text file.) I can run the old Tkinter with either Beta 1 and Beta 2, and all is fine. But whenever I use the new Tkinter, my cursor just freezes very early in the startup. (System 7.5 on a Quadra 840AV with 16M RAM.) I cleaned out a whole bunch of Inits, thinking that maybe that was the problem, but I'm still getting freezes. Any suggestions? Did the tkconstants.py file change, too? BTW, in case anybody else is playing with the Tkinter examples, canvas-with-scrollbars has two options, 'xscroll' and 'yscroll', which need to be changed to the documented 'xscrollcommand' and 'yscrollcommand' to get them to work right. Then everything works fine. (I'm working my way through the Ousterhout book and finding that the marriage of Tk and Python is really terrific!) Mark -------------------------- Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280 (404) 894-5618 : Fax (404) 894-0673 : guzdial@cc.gatech.edu http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.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 guido@CNRI.Reston.VA.US Mon Feb 26 20:56:33 1996 From: guido@CNRI.Reston.VA.US (Guido van Rossum) Date: Mon, 26 Feb 1996 15:56:33 -0500 Subject: [PYTHONMAC-SIG] Problems with new TkInter on Mac In-Reply-To: Your message of "Mon, 26 Feb 1996 15:51:01 EST." References: Message-ID: <199602262056.PAA18134@monty> > I'm trying to use the Beta 2 release of PythonTk with the new Tkinter. It > hung my machine several times, and after playing with mixtures of Beta 1 > and Beta 2, I'm pretty sure it's the new Tkinter.py. (Guido, I did make > sure that my line-endings are Mac-ified -- BBedit reports that it's a > Mac-style text file.) I can run the old Tkinter with either Beta 1 and > Beta 2, and all is fine. But whenever I use the new Tkinter, my cursor > just freezes very early in the startup. (System 7.5 on a Quadra 840AV with > 16M RAM.) I cleaned out a whole bunch of Inits, thinking that maybe that > was the problem, but I'm still getting freezes. Any suggestions? Did the > tkconstants.py file change, too? Yes. This is a major OOPS. I *thought* that the bus error problem was gone, so I removed the work-around from Tkinter. Turns out that it's not gone, however on my 68K Mac it only occurs when the network is not connected :-( I just put a new Tkinter.py on the ftp site, but here's the full fix: make sure that the try-except clause after the tkinter.create() call in def __init__ in class Tk looks like this (note the else clause, which is the fix): try: # Disable event scanning except for Command-Period import MacOS MacOS.EnableAppswitch(0) except ImportError: pass else: # Work around nasty MacTk bug self.update() > BTW, in case anybody else is playing with the Tkinter examples, > canvas-with-scrollbars has two options, 'xscroll' and 'yscroll', which need > to be changed to the documented 'xscrollcommand' and 'yscrollcommand' to > get them to work right. Then everything works fine. (I'm working my way > through the Ousterhout book and finding that the marriage of Tk and Python > is really terrific!) Thanks! --Guido van Rossum URL: ================= PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org ================= From guzdial@cc.gatech.edu Thu Feb 29 17:17:00 1996 From: guzdial@cc.gatech.edu (Mark Guzdial) Date: Thu, 29 Feb 1996 12:17:00 -0500 (EST) Subject: [PYTHONMAC-SIG] Printing from Python? Message-ID: Does anyone print anything directly from Python? I was trying to figure out how to do it and can't seem to find anything built-in to Python or in the Mac-specific extensions. (There was echo2printer, but that seems to have gone away?) I'd love to be able to dump text and/or postscript. Thanks! Mark -------------------------- Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280 (404) 894-5618 : Fax (404) 894-0673 : guzdial@cc.gatech.edu http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.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 jstrout@ucsd.edu Thu Feb 29 17:49:00 1996 From: jstrout@ucsd.edu (Joseph Strout) Date: Thu, 29 Feb 1996 09:49:00 -0800 (PST) Subject: [PYTHONMAC-SIG] Printing from Python? In-Reply-To: Message-ID: Again, I'm new here, so I could be totally wrong, but didn't I see something about sending AppleScript commands from Python? If so, then you can just write to a textfile with type 'TEXT' and creator 'R*ch' (for BBEdit) or 'TTXT' (for TeachText), then tell the Finder to print it (if you have Scriptable Finder, i.e. System 7.5). Or, more laboriously, tell BBEdit (or even the Scriptable Text Editor) to open it, print it, and quit. Hmm, does seem to be a bit of a pain though, doesn't it? ,------------------------------------------------------------------. | Joseph J. Strout Department of Neuroscience, UCSD | | jstrout@ucsd.edu http://www-acs.ucsd.edu/~jstrout/ | `------------------------------------------------------------------' ================= PYTHONMAC-SIG - SIG on Python for the Apple Macintosh send messages to: pythonmac-sig@python.org administrivia to: pythonmac-sig-request@python.org =================