From pecora@anvil.nrl.navy.mil Sun Sep 3 15:12:50 2000 From: pecora@anvil.nrl.navy.mil (Louis M. Pecora) Date: Sun, 3 Sep 2000 10:12:50 -0400 Subject: [Pythonmac-SIG] Scientific plotting calls for Python on Mac Message-ID: There seem to be several packages out there for Python scientific/numeric plotting on the Mac, but it is not clear which are simplest to use -- my criteria. Some seem to require several packages. Although I will pursue trying to sort this out, let me ask: Does anyone know of a simple, "standalone" Python plotting module? Even just, open a window, draw some lines and simple patterns, write a little text, maybe even catch some keystroke events, but that's it. Higer level plot data would be nice, but I could build that. The problem is getting a pack that does not require me messing with installing many things. If that's possible. Thanks for any help. [I also posted this on comp.lang.python. Sorry if you are reading it a second time] Cheers, Lou Pecora From pecora@anvil.nrl.navy.mil Sun Sep 3 15:13:20 2000 From: pecora@anvil.nrl.navy.mil (Louis M. Pecora) Date: Sun, 3 Sep 2000 10:13:20 -0400 Subject: [Pythonmac-SIG] Installing Tkinter on the Mac?? Message-ID: I have downloaded Tkinter from the Python site and followed the short instructions putting the Tk folders in the extensions folder. But I still do not have access to Tk modules in Python. Does anyone know how to get Tk to work on the Mac? I have looked at the terse instructions and other material with the download and found nothing so far. My guess is I am not putting the folders/modules in the right places or don't have the right paths defined. Any help appreciated. [I also posted this on comp.lang.python. Sorry if you are reading it a second time] Cheers, Lou Pecora From kantel@mpiwg-berlin.mpg.de Sun Sep 3 15:51:30 2000 From: kantel@mpiwg-berlin.mpg.de (=?iso-8859-1?Q?J=F6rg?= Kantel) Date: Sun, 3 Sep 2000 16:51:30 +0200 Subject: [Pythonmac-SIG] Installing Tkinter on the Mac?? In-Reply-To: References: Message-ID: At 10:13 Uhr -0400 03.09.2000, Louis M. Pecora wrote: > have downloaded Tkinter from the Python site and followed the short >instructions putting the Tk folders in the extensions folder. But I >still do not have access to Tk modules in Python. Does anyone know >how to get Tk to work on the Mac? I wrote a little How To about that topic (english) (german) HTH J"org -- http://www.kantel.de/ # http://homepage.mac.com/jkantel/homepage.html joerg@kantel.de # jkantel@mac.com visit: http://rollbergnews.editthispage.com/ - die WebSite fuer unmoegliche Nachrichten und http://DerSchockwellenreiter.editthispage.com, mein Web-Tagebuch in Manila http://www.die-herforder.de - linke Politik online - nur im Internet From pr1@club-internet.fr Mon Sep 4 17:46:14 2000 From: pr1@club-internet.fr (Philippe de Rochambeau) Date: Mon, 04 Sep 2000 18:46:14 +0200 Subject: [Pythonmac-SIG] Pyxie on Mac Message-ID: <39B3D1D5.C36A45B0@club-internet.fr> Does Pyxie run on MacPython? If so, how do you install it? Many thanks. Philippe de Rochambeau From ross@itsthateasy.net Mon Sep 4 20:23:38 2000 From: ross@itsthateasy.net (Ross Karchner) Date: Mon, 04 Sep 2000 15:23:38 -0400 Subject: FW: [Pythonmac-SIG] Pyxie on Mac In-Reply-To: Message-ID: on 9/4/00 12:46 PM, Philippe de Rochambeau at pr1@club-internet.fr wrote: > Does Pyxie run on MacPython? If so, how do you install it? I almost sent a similar question a few hours ago, but I tried to do it through the eGroup, which isn't allowed. I think Pyxie depends on pyXML, which I believe has parts that need to be compiled from C. Here is part of the message I almost sent... "Could someone tell me how to get PyXML and Pyxie running on the mac? I am trying to follow through Sean McGrath's "XML Processing with Python" book, which is very NT/Linux-centric. It seems that PyXML requires a C compiler, which I don't have..." -Ross > > Many thanks. > > Philippe de Rochambeau > From richard@wmblake.com Mon Sep 4 23:02:05 2000 From: richard@wmblake.com (Richard Blumberg) Date: Mon, 4 Sep 2000 18:02:05 -0400 Subject: [Pythonmac-SIG] Where to get pythoncgislave? Message-ID: I'm trying to figure out how to use Python to handle cgi requests with Apple's Personal Web Sharing. From the posts on this list, I gather that I need a script called pythoncgislave.py, but I can't find it. Any suggestions? Thanks. Richard From jack@oratrix.nl Tue Sep 5 09:59:31 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 05 Sep 2000 10:59:31 +0200 Subject: [Pythonmac-SIG] cfm68k Python Message-ID: <20000905085936.C2310D71FF@oratrix.oratrix.nl> Hi folks, up to now I've left the cfm68k targets in the CodeWarrior project files, even though I don't build them myself anymore because the next MacPython release will be PPC-only. I've left them in so that if someone wants to give cfm68k support a try life would be easier for them, but I just got a complaint that all these extra targets do slow down the building process and clutter things up. I tend to agree, so I'm probably going to remove the 68k targets unless people speak up now and tell me they're really planning to revive cfm68k support. -- 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/ ++++ From awatson@bigfoot.com Tue Sep 5 12:39:37 2000 From: awatson@bigfoot.com (Andrew Watson) Date: Tue, 05 Sep 2000 19:39:37 +0800 Subject: [Pythonmac-SIG] Line endings and readline() Message-ID: I am trying to run a macpython script on a linux box, but when I try and readline() from a saved text file, it gets confused about line endings ( the text files are generated on a mac ). Is there some easy way of convincing python to change what it expects as the end-of-line character, to deal with this sort of crodd-platform problem? Andrew Watson From cbarker@jps.net Tue Sep 5 18:03:26 2000 From: cbarker@jps.net (Chris Barker) Date: Tue, 05 Sep 2000 10:03:26 -0700 Subject: [Pythonmac-SIG] Where to get pythoncgislave? References: Message-ID: <39B5275E.CF5DC260@jps.net> This is a multi-part message in MIME format. --------------6EC20B0F04180E7C34838EA2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Richard Blumberg wrote: > I'm trying to figure out how to use Python to handle cgi requests > with Apple's Personal Web Sharing. From the posts on this list, I > gather that I need a script called pythoncgislave.py, but I can't > find it. Any suggestions? It's been posted in this list recently, and here it is again. By the way, it only works with the version of Personal Web Sharing that comes with OS 9.*. It looks like it would be pretty easy to adapt it to work with OS 8.6, but I havn't gotten around to doing that yet. Drop me a line if you want to do it. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ --------------6EC20B0F04180E7C34838EA2 Content-Type: text/plain; charset=us-ascii; name="PythonCGISlave.py" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="PythonCGISlave.py" """PythonCGISlave.py -- Python script server enabling Python CGI under WebStar. Install - create an applet of PythonCGISlave.py - place the applet somewhere in the WebStar folder - in the Admin app, create a new "action", call it PYTHON, click the "Choose" button and select our applet. - go to Suffix Mappings, create a new suffix .PY, type TEXT, creator *. How it works WebStar (or other Mac web server) will send an AppleEvent to PythonCGISlave for each Python CGI request. Most relevant CGI parameters are taken from the AppleEvent and stuffed into os.environ. Then the script gets executed. This emulates Unix-style CGI as much as possible, so CGI scripts that are written portably should now also work under WebStar. Since PythonCGISlave will not quit, there is hardly any startup overhead. If an exception occurs in the CGI script, PythonCGISlave will write a traceback to a file called PythonCGISlave.errors, and then quit. The latter seems a good idea, just in case we leak memory. """ # # Written by Just van Rossum, but largely stolen from example code by Jack. # import MacOS MacOS.SchedParams(0, 0) from MiniAEFrame import AEServer, MiniApplication import os import string import cStringIO import sys import traceback import mimetools import time __version__ = '3.0' # log file for errors sys.stderr = open(sys.argv[0] + ".errors", "a+") def convertFSSpec(fss): return fss.as_pathname() # AE -> os.environ mappings ae2env = { 'DIRE': ('DOCUMENT_ROOT', convertFSSpec), 'kfor': ('QUERY_STRING', None), 'Kcip': ('REMOTE_ADDR', None), 'svnm': ('SERVER_NAME', None), 'svpt': ('SERVER_PORT', None), 'addr': ('REMOTE_HOST', None), 'scnm': ('SCRIPT_NAME', None), 'meth': ('REQUEST_METHOD', None), } class PythonCGISlave(AEServer, MiniApplication): def __init__(self): MiniApplication.__init__(self) AEServer.__init__(self) self.installaehandler('aevt', 'oapp', self.open_app) self.installaehandler('aevt', 'quit', self.quit) self.installaehandler('WWW\275', 'sdoc', self.cgihandler) print "%s version %s ready." % (self.__class__.__name__, __version__) self.mainloop() def quit(self, **args): self.quitting = 1 def open_app(self, **args): pass def cgihandler(self, pathargs, **args): sys.stdout.write('cgihandler has been called\n') sys.stdout.write('time is :') sys.stdout.write(time.ctime(time.time())+'\n') sys.stdout.flush() sys.stdout.write('pathargs is:') sys.stdout.write(repr(pathargs)) sys.stdout.write('\n') sys.stdout.flush() sys.stdout.write('args is:') sys.stdout.write(repr(args)) sys.stdout.write('\n\nkeys of args is:\n\n') sys.stdout.write(repr(args.keys())) #for (key,value) in args.items(): # sys.stdout.write( key + ':\t') # sys.stdout.write(value) # sys.stdout.write('\n') #sys.stdout.flush() root = args['DIRE'].as_pathname() script = string.replace(args['scnm'], '/', ':') path = os.path.join(root, script) sys.stderr.flush() inFile = cStringIO.StringIO(args['Kfrq']) firstline = inFile.readline() msg = mimetools.Message(inFile, 0) env = {} for key in msg.keys(): env['HTTP_' + string.upper(string.replace(key, "-", "_"))] = msg[key] items = args.items() items.sort() for key, value in items: if key[0] == "_": continue if ae2env.has_key(key): envkey, converter = ae2env[key] if converter: value = converter(value) env[envkey] = value else: env['AE_' + string.upper(key)] = str(value) os.environ = env saveout = sys.stdout savein = sys.stdin out = sys.stdout = cStringIO.StringIO() sys.stdin = cStringIO.StringIO(args.get('post', "")) os.chdir(os.path.dirname(path)) sys.argv = [path] namespace = {"__name__": "__main__"} try: execfile(path, namespace) except: traceback.print_exc() sys.stderr.flush() self.quitting = 1 sys.stdout = saveout sys.stdin = savein #return None # how to let the server know there was an error? return "There was an error in PythonCGISlave" namespace.clear() sys.stdout = saveout sys.stdin = savein return "HTTP/1.0 200 OK\n" + out.getvalue() sys.stdout.write('PythonCGISlave has been started\n') sys.stdout.write('time is :') sys.stdout.write(time.ctime(time.time())+'\n') sys.stdout.flush() PythonCGISlave() --------------6EC20B0F04180E7C34838EA2-- From cbarker@jps.net Tue Sep 5 18:08:18 2000 From: cbarker@jps.net (Chris Barker) Date: Tue, 05 Sep 2000 10:08:18 -0700 Subject: [Pythonmac-SIG] Line endings and readline() References: Message-ID: <39B52882.2377272A@jps.net> Andrew Watson wrote: > Is there some easy way of convincing python to change what it expects as the > end-of-line character, to deal with this sort of crodd-platform problem? No, and I wish there was. Your options are to translate the file first (the dos2unix, and unix2dos utilities also have a mac2unix option), or to read it in as a binary file, and do your translation in your code: data = string.split(open(filename,'rb').read(),'\r') Or something like that. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From jack@oratrix.nl Tue Sep 5 22:50:56 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 05 Sep 2000 23:50:56 +0200 Subject: [Pythonmac-SIG] Line endings and readline() In-Reply-To: Message by Chris Barker , Tue, 05 Sep 2000 10:08:18 -0700 , <39B52882.2377272A@jps.net> Message-ID: <20000905215101.6E0CDD71FD@oratrix.oratrix.nl> Recently, Chris Barker said: > Andrew Watson wrote: > > Is there some easy way of convincing python to change what it expects as th > e > > end-of-line character, to deal with this sort of crodd-platform problem? > > No, and I wish there was. There are some cases where it can be useful, but in general you should leave this to whoever did the transfer from mac to unix or vice-versa. After all Python isn't the only Unix program that'll have trouble with Mac line endings: all unix programs will. FTP clients, archivers, and remote file server packages will usually do the conversion for you if you set them up correctly. And on the Mac this should be a breeze because all files of type TEXT should be translated (unix and windows programs will have to gues whether a file is text based on the extension, so you'll have to do the correct setup there yourself). A quick trick for converting any known convention to \n convention is the following (if you can afford reading your whole file into memory) data = f.read() data = string.replace(data, '\r\n', '\n') data = string.replace(data, '\r', '\n') It'll even work for confused files, as you can often find in webpages and such that have been edited on multiple systems. The only thing it won't handle is files with \n\r (which can happen if you send a file back and forth between all three platforms and don't get the conversion right), but this is unsolvable anyway. -- 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 jwblist@olympus.net Wed Sep 6 02:33:08 2000 From: jwblist@olympus.net (John W Baxter) Date: Tue, 5 Sep 2000 18:33:08 -0700 Subject: [Pythonmac-SIG] Line endings and readline() In-Reply-To: <39B52882.2377272A@jps.net> References: <39B52882.2377272A@jps.net> Message-ID: At 10:08 -0700 9/5/00, Chris Barker wrote: >Andrew Watson wrote: >> Is there some easy way of convincing python to change what it expects as the >> end-of-line character, to deal with this sort of crodd-platform problem? > >No, and I wish there was. > >Your options are to translate the file first (the dos2unix, and unix2dos >utilities also have a mac2unix option), or to read it in as a binary >file, and do your translation in your code: > >data = string.split(open(filename,'rb').read(),'\r') > >Or something like that. Or move the files between Mac/Windows on the one hand and Unix on the other (or between Mac and Windows) with decent FTP clients on Mac or Windows, in text (ASCII) mode. They'll be correct for the target platform. [Don't, of course, do this with files which should be moved in binary...such files like their 0x0A and 0x0D characters left alone.] --John -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From just@letterror.com Wed Sep 6 08:10:48 2000 From: just@letterror.com (Just van Rossum) Date: Wed, 6 Sep 2000 08:10:48 +0100 Subject: [Pythonmac-SIG] Line endings and readline() In-Reply-To: <20000905215101.6E0CDD71FD@oratrix.oratrix.nl> References: Message by Chris Barker , Tue, 05 Sep 2000 10:08:18 -0700 , <39B52882.2377272A@jps.net> Message-ID: At 11:50 PM +0200 05-09-2000, Jack Jansen wrote: >There are some cases where it can be useful, but in general you should >leave this to whoever did the transfer from mac to unix or >vice-versa. After all Python isn't the only Unix program that'll have >trouble with Mac line endings: all unix programs will. FTP clients, >archivers, and remote file server packages will usually do the >conversion for you if you set them up correctly. And on the Mac this >should be a breeze because all files of type TEXT should be translated >(unix and windows programs will have to gues whether a file is text >based on the extension, so you'll have to do the correct setup there >yourself). What about the situation where you want to mount a Unix volume? It's really irksome to share code between Mac and Unix this way: you don't really *want* conversion, you just want it to *work* on both platforms... I understand a similar problem exists under Windows, but at least Python on Windows is able to correctly handle text files which have \n instead of \r\n line endings. I sometimes wish MacPython would simply accept \n files. It not doing so leads to funny problems, as we've seen recently: a unix file starting with a #! line will run just fine on the Mac: it simply does nothing... (everything is hidden behind that initial comment.) I don't know what would be the best solution; I'm so much used to dealing with this problem that I hardly ever think about it anymore. Just From jack@oratrix.nl Wed Sep 6 13:14:08 2000 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 06 Sep 2000 14:14:08 +0200 Subject: [Pythonmac-SIG] cfm68k Python In-Reply-To: Message by Gordon Worley , Fri, 1 Jan 1904 00:22:42 -0400 , Message-ID: <20000906121408.8E853303181@snelboot.oratrix.nl> > >I tend to agree, so I'm probably going to remove the 68k targets > >unless people speak up now and tell me they're really planning to > >revive cfm68k support. > > Sounds good. But, will you be keeping some archived versions around? > I have 68k machines I sometimes use Python on, but just for simple > stuff. I'd hate it if I lost my old copy of the installer for one of > the recent versions as of now and couldn't download it again. The 1.5.2 installer will remain available indefinitely, as it is the last MacPython to support 68k machines. And if people want to experiment with building 2.0 for 68k they can get the most recent projects from the CVS archive and massage them to work with the most recent sources. -- 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 jack@oratrix.nl Wed Sep 6 13:18:11 2000 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 06 Sep 2000 14:18:11 +0200 Subject: [Pythonmac-SIG] Line endings and readline() In-Reply-To: Message by Just van Rossum , Wed, 6 Sep 2000 08:10:48 +0100 , Message-ID: <20000906121812.3B43C303181@snelboot.oratrix.nl> > What about the situation where you want to mount a Unix volume? It's really > irksome to share code between Mac and Unix this way: you don't really > *want* conversion, you just want it to *work* on both platforms... On the mac this isn't a problem, at least not with every remote-mounting package I've used (K/ashare currently, CAP in the past). The mac sees mac line endings, but the bits that are actually in the file on unix are unix line-endings and the conversion is done transparently on read and write. Because Mac files have the signature field this works fine. Remote mounting Unix disks on Windows machines is much more of a problem, because Windows doesn't have the filetype. For that reason most remote mounting solutions for Windows don't do newline mapping, and hence you normally store your files with the Windows end of line convention. -- 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 cbarker@jps.net Wed Sep 6 20:32:18 2000 From: cbarker@jps.net (Chris Barker) Date: Wed, 06 Sep 2000 12:32:18 -0700 Subject: [Pythonmac-SIG] PLplot and MacPython References: <20000906121812.3B43C303181@snelboot.oratrix.nl> Message-ID: <39B69BC2.4F7D9D8A@jps.net> Has anyone tried to get PL plot to work with Mac Python? PL plot is a pretty nifty plotting paclage, with bindings to Fortran, C, C++, Python and TCL. The web page indicates that there is a Mac driver available now. Has anyone chaecked it out? see: http://emma.la.asu.edu/plplot/ for info. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From pecora@anvil.nrl.navy.mil Wed Sep 6 20:42:07 2000 From: pecora@anvil.nrl.navy.mil (Louis M. Pecora) Date: Wed, 6 Sep 2000 15:42:07 -0400 Subject: [Pythonmac-SIG] Re: Piddle on the Mac In-Reply-To: <39B6978C.58227F1A@jps.net> References: Message-ID: Chris Barker wrote: >"Louis M. Pecora" wrote: > >> Never got it to work. Will go back to Tk and that widget stuff with canvas. I am searching for a simple plotting APIs to embed in my numerical simulations programs. Just for quick and easy graphics feedback and info while I concentrate most of the time on the numerical algorithms and mathematics. > >Hmm. What version of Python are you using? if you're using 1.6, that may >explain it, Otherwise, it really should work. I could send you my Piddle >folder if you want. I'm using it on a stock 1.5.2c1 version. I'm using 1.5.2c1 . I have the Piddle folder and put it in the lib folder in Python folder and added a path to it $PYTHON:lib:Piddle: (or something). What might help is to tell me what demo's tests should work on the Mac just by dropping them on the Interpreter. Do any work from the IDE. I remember the issue of Tkinter *not* working from the IDE. Something about console windows. >Unless you're using tk for other things, I would encourage you to get >Piddle to work it's pretty nice, and graphite should work on top of it, >which would be even nicer. Tk on the Mac is really kind of a pain. > >Did you try GNUplot? there were a couple of messages on this list about >it working on the Mac. If so, it would be pretty full featured. Looked at GNUplot and decided it appeared to need Tk. Is that right? Anyway, that's why I went for Tkinter. Cheers, Lou Pecora From managan@llnl.gov Wed Sep 6 20:50:20 2000 From: managan@llnl.gov (Rob Managan) Date: Wed, 6 Sep 2000 12:50:20 -0700 Subject: [Pythonmac-SIG] PLplot and MacPython In-Reply-To: <39B69BC2.4F7D9D8A@jps.net> References: <20000906121812.3B43C303181@snelboot.oratrix.nl> <39B69BC2.4F7D9D8A@jps.net> Message-ID: At 12:32 PM -0700 9/6/00, Chris Barker wrote: >Has anyone tried to get PL plot to work with Mac Python? PL plot is a >pretty nifty plotting paclage, with bindings to Fortran, C, C++, Python >and TCL. The web page indicates that there is a Mac driver available >now. Has anyone chaecked it out? > >see: > >http://emma.la.asu.edu/plplot/ > >for info. > >-Chris > I am partly to blame for the driver. As far as I know it is part of the current CVS archive except for the Codewarrior projects which got deemed too large compared to a makefile. This was in XML form since binary files are hard to get installed properly. I am willing to email out my set of files to those interested and have done so to several folks. There are two drivers actually. One is a single frame version that replaces the image as fast as you draw it. This can be used for animation. The second will draw a window and at the end of the plot will pause to let you see it until you are ready to go on. There is a menu available to save it as a PICT file or copy it to the clipboard. Eight windows are kept on the screen and then recycled. I am not exercising it right now but think it works. -- *-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*- Rob Managan LLNL ph: 925-423-0903 P.O. Box 808, L-095 FAX: 925-422-3389 Livermore, CA 94551-0808 From rcohen@llnl.gov Wed Sep 6 22:49:30 2000 From: rcohen@llnl.gov (Ron Cohen) Date: Wed, 6 Sep 2000 14:49:30 -0700 (PDT) Subject: [Pythonmac-SIG] PLplot and MacPython In-Reply-To: References: <20000906121812.3B43C303181@snelboot.oratrix.nl> <39B69BC2.4F7D9D8A@jps.net> Message-ID: <14774.48106.207279.366748@gargle.gargle.HOWL> I used these a few years back and found them pretty good. Rob, what are you using now? -Ron Cohen- Rob Managan writes: > At 12:32 PM -0700 9/6/00, Chris Barker wrote: > >Has anyone tried to get PL plot to work with Mac Python? PL plot is a > >pretty nifty plotting paclage, with bindings to Fortran, C, C++, Python > >and TCL. The web page indicates that there is a Mac driver available > >now. Has anyone chaecked it out? > > > >see: > > > >http://emma.la.asu.edu/plplot/ > > > >for info. > > > >-Chris > > > > I am partly to blame for the driver. As far as I know it is part of > the current CVS archive except for the Codewarrior projects which got > deemed too large compared to a makefile. This was in XML form since > binary files are hard to get installed properly. > > I am willing to email out my set of files to those interested and > have done so to several folks. > > There are two drivers actually. One is a single frame version that > replaces the image as fast as you draw it. This can be used for > animation. The second will draw a window and at the end of the plot > will pause to let you see it until you are ready to go on. There is a > menu available to save it as a PICT file or copy it to the clipboard. > Eight windows are kept on the screen and then recycled. > > I am not exercising it right now but think it works. > > -- > *-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*- > Rob Managan > LLNL ph: 925-423-0903 > P.O. Box 808, L-095 FAX: 925-422-3389 > Livermore, CA 94551-0808 > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://www.python.org/mailman/listinfo/pythonmac-sig > From cbarker@jps.net Thu Sep 7 00:41:50 2000 From: cbarker@jps.net (Chris Barker) Date: Wed, 06 Sep 2000 16:41:50 -0700 Subject: [Pythonmac-SIG] Running a script "from scratch" from the IDE References: <20000906121812.3B43C303181@snelboot.oratrix.nl> <39B69BC2.4F7D9D8A@jps.net> <14774.48106.207279.366748@gargle.gargle.HOWL> Message-ID: <39B6D63E.83397486@jps.net> I often find that I want to run a script "from scratch" form the IDE. What I mean is that is should run EXACTLY the same as it would if dropped on the interpreter. All old references to variable will be gone, all files closed, and all moduled reloaded (even nested modules). Is it possible to do this? If not, would it be hard to modify the IDE to to this? I have looked for a "clear all" kind of function in Python, and havn't found one. Besides, as far as I can tell, the IDE is using a single instance of the Python interpreter to execute code, and run itslef, so a "clear all: would be a disaster. If it would be a nightmare to make the IDE behave in this way, what have other people done? I would be happy to run Python form an editor such as BBedit, Alpha, or Pepper (the last two even have a syntax highlighted Python mode, alhtough Alpha's is a bit scetchy). Has anyone gotten a really nice set up, using an editor, running Python from the editor, and having a nive syntax highlighted, Python-indenting-aware mode. It seems the trick toi running Python form an editor is that you want the console window to stick around at the end of a run, but when you run again, you need it to clear itself out and start again. Can the interpreter be made to behave this way? What about using it as an MPW tool? IT seems that MacPerl is used a lot this way. What are my options? I love Python, and I love developing with it on my Linux box, but on the Mac, I find it a major struggle. It seems like it could be simpler. -Thanks, -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From jack@oratrix.nl Thu Sep 7 09:37:49 2000 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 07 Sep 2000 10:37:49 +0200 Subject: [Pythonmac-SIG] Running a script "from scratch" from the IDE In-Reply-To: Message by Chris Barker , Wed, 06 Sep 2000 16:41:50 -0700 , <39B6D63E.83397486@jps.net> Message-ID: <20000907083750.EDB63303181@snelboot.oratrix.nl> > I often find that I want to run a script "from scratch" form the IDE. > What I mean is that is should run EXACTLY the same as it would if > dropped on the interpreter. All old references to variable will be gone, > all files closed, and all moduled reloaded (even nested modules). > > Is it possible to do this? The only reasonable way to do this would be to have the IDE fire up a Python interpreter. That would also solve the Tk problem, by the way. There's been some discussion on this (don't remember whether it was on the list or a private exchange between Just and me) but I don't remember whether actual code was written. -- 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 just@letterror.com Thu Sep 7 14:01:05 2000 From: just@letterror.com (Just van Rossum) Date: Thu, 7 Sep 2000 14:01:05 +0100 Subject: [Pythonmac-SIG] Running a script "from scratch" from the IDE In-Reply-To: <20000907083750.EDB63303181@snelboot.oratrix.nl> References: Message by Chris Barker , Wed, 06 Sep 2000 16:41:50 -0700 , <39B6D63E.83397486@jps.net> Message-ID: At 10:37 AM +0200 07-09-2000, Jack Jansen wrote: >> I often find that I want to run a script "from scratch" form the IDE. >> What I mean is that is should run EXACTLY the same as it would if >> dropped on the interpreter. All old references to variable will be gone, >> all files closed, and all moduled reloaded (even nested modules). >> >> Is it possible to do this? > >The only reasonable way to do this would be to have the IDE fire up a Python >interpreter. That would also solve the Tk problem, by the way. > >There's been some discussion on this (don't remember whether it was on the >list or a private exchange between Just and me) but I don't remember whether >actual code was written. I started writing some code but then realized it's not as easy as it sounds. The main problem is that the plain interpreter doesn't respond to quit events, so you would have to quit it manually each time if there was a traceback. Or write YetAnotherWrapperAppletThatTakesCareOfThis. Ugh. The other problem was that I was too lazy to figure out how to implement something like this: findertools.launch(, ) (It's important to be able to specify the exact app, otherwise you'll get strange behavior when you have multiple versions installed) It needs to perform these steps: - find out where the interpreter app is - if the interpreter is still running: quit it - check whether script is saved - ask for save if not - launch interpreter with script file I wrote the UI part (ie. another menu item in the script popup menu: "Run with Interpreter"), but then gave up when I realized how much work the actual functionality was... Just From anewcombe@earthlink.net Thu Sep 7 13:01:37 2000 From: anewcombe@earthlink.net (Amos Newcombe) Date: Thu, 7 Sep 2000 08:01:37 -0400 Subject: [Pythonmac-SIG] Line endings and readline() In-Reply-To: References: Message-ID: >I am trying to run a macpython script on a linux box, but when I try and >readline() from a saved text file, it gets confused about line endings ( the >text files are generated on a mac ). > >Is there some easy way of convincing python to change what it expects as the >end-of-line character, to deal with this sort of crodd-platform problem? > >Andrew Watson I do it this way: def readline(self): s = self.chBuffer self.chBuffer = '' while 1: c = self.f.read(1) if not c: break if c == '\n' or c == '\r': if c == '\r': c = self.f.read(1) if c and c != '\n': self.chBuffer = c s = s + '\n' break s = s + c if s != '': self.cLines = self.cLines + 1 return s This is a method of an object (self) that serves as a general-purpose line reader. It has a field f, which contains the result of an open() call (or maybe a urllib.urlopen() call). This recognizes either '\r', '\n', or '\r\n' as a single line break. Go crazy with them. Mix and match in the same file! I can deal with it all! Muhahahahahahahaha! Amos Newcombe PS If there is any interest in this object I will be happy to oblige. -- The difference between theory and practice is that, in theory, there is no difference between theory and practice. From jack@oratrix.nl Thu Sep 7 13:47:37 2000 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 07 Sep 2000 14:47:37 +0200 Subject: [Pythonmac-SIG] Running a script "from scratch" from the IDE In-Reply-To: Message by Just van Rossum , Thu, 7 Sep 2000 14:01:05 +0100 , Message-ID: <20000907124738.30619303181@snelboot.oratrix.nl> > I started writing some code but then realized it's not as easy as it > sounds. The main problem is that the plain interpreter doesn't respond to > quit events, so you would have to quit it manually each time if there was a > traceback. Or write YetAnotherWrapperAppletThatTakesCareOfThis. Ugh. What's the problem with yet another wrapper applet? -- 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 redbird@rbisland.cx Thu Sep 7 21:00:25 2000 From: redbird@rbisland.cx (Gordon Worley) Date: Thu, 7 Sep 2000 16:00:25 -0400 Subject: [Pythonmac-SIG] Where to get pythoncgislave? In-Reply-To: <39B5275E.CF5DC260@jps.net> References: <39B5275E.CF5DC260@jps.net> Message-ID: At 10:03 AM -0700 9/5/2000, Chris Barker wrote: >Richard Blumberg wrote: >> I'm trying to figure out how to use Python to handle cgi requests >> with Apple's Personal Web Sharing. From the posts on this list, I >> gather that I need a script called pythoncgislave.py, but I can't >> find it. Any suggestions? > >It's been posted in this list recently, and here it is again. Could you put this on the Web somewhere? Or maybe get it included in the next release (if it is alreayd, sorry, but I'm not that interested in doing cgi so I don't keep up on this threads usually, other than to notice when pythoncgislave.py has been posted yet again)? It just seems like a waste of list bandwidth to keep sending it out this way (not so much for the individuals, but for the server). -- Gordon Worley http://www.rbisland.cx/ mailto:redbird@rbisland.cx PGP: C462 FA84 B811 3501 9010 20D2 6EF3 77F7 BBD3 B003 From redbird@rbisland.cx Thu Sep 7 21:10:57 2000 From: redbird@rbisland.cx (Gordon Worley) Date: Thu, 7 Sep 2000 16:10:57 -0400 Subject: [Pythonmac-SIG] Line endings and readline() In-Reply-To: References: Message-ID: >>I am trying to run a macpython script on a linux box, but when I try and >>readline() from a saved text file, it gets confused about line endings ( the >>text files are generated on a mac ). >> >>Is there some easy way of convincing python to change what it expects as the >>end-of-line character, to deal with this sort of crodd-platform problem? If you can get to the files before they are read (e.g. a human types them in, etc.) on the Linux box, take them into BBEdit (the lite version, of course, unless you happen to have paid for the full thing) and just save the file with different line endings (you can choose from Mac, DOS, and Unix). Unfortunately, BBEdit is not scriptable, so if automation is key then the previously mentioned solutions will probably be best. -- Gordon Worley http://www.rbisland.cx/ mailto:redbird@rbisland.cx PGP: C462 FA84 B811 3501 9010 20D2 6EF3 77F7 BBD3 B003 From tmk@microscript.be Fri Sep 8 12:57:54 2000 From: tmk@microscript.be (tmk [microscript]) Date: Fri, 08 Sep 2000 13:57:54 +0200 Subject: [Pythonmac-SIG] charset conversions Message-ID: Yo, I'm looking into doing character set conversions in Python (e.g. from MacRoman to ISO-8859-1). I was wondering if it already exists some stuff in this area. I've tried looking in the current library of python modules but I was unable to find something of interest. Is Python biased towards ISO-8859-1, although apparently MacPython defaults to interpreting text as MacRoman? Indeed I'm willing to code the simple stuff I need but before I dig into it I thought I'd ask in the list first in case there already is a standardized way to do it (There's One Way To Do It (tm)). :-) TIA = tmk = From just@letterror.com Fri Sep 8 14:22:27 2000 From: just@letterror.com (Just van Rossum) Date: Fri, 8 Sep 2000 14:22:27 +0100 Subject: [Pythonmac-SIG] charset conversions In-Reply-To: Message-ID: At 1:57 PM +0200 08-09-2000, tmk [microscript] wrote: >Yo, > >I'm looking into doing character set conversions in Python (e.g. from >MacRoman to ISO-8859-1). > >I was wondering if it already exists some stuff in this area. I've tried >looking in the current library of python modules but I was unable to find >something of interest. > >Is Python biased towards ISO-8859-1, although apparently MacPython defaults >to interpreting text as MacRoman? The only place where Python seems to care about the encoding at all are in calls like string.lower() and string constants like string.letters. >Indeed I'm willing to code the simple stuff I need but before I dig into it >I thought I'd ask in the list first in case there already is a standardized >way to do it (There's One Way To Do It (tm)). Wait for Python 2.0 and you'll find all the encoding conversions you need, thanks to the new Unicode support. Or play with the older 1.6 alpha's: it's all in there. >>> unicode("abcde", "macroman").encode("ISO-8859-1") 'abcde' >>> Just From jack@oratrix.nl Fri Sep 8 13:30:02 2000 From: jack@oratrix.nl (Jack Jansen) Date: Fri, 08 Sep 2000 14:30:02 +0200 Subject: [Pythonmac-SIG] charset conversions In-Reply-To: Message by "tmk [microscript]" , Fri, 08 Sep 2000 13:57:54 +0200 , Message-ID: <20000908123008.22DCAD71FF@oratrix.oratrix.nl> Recently, "tmk [microscript]" said: > Yo, > > I'm looking into doing character set conversions in Python (e.g. from > MacRoman to ISO-8859-1). > > I was wondering if it already exists some stuff in this area. I've tried > looking in the current library of python modules but I was unable to find > something of interest. Up until recently MacPython was confused: some parts of the system thought it was iso-latin-1, others thought it was macroman. (And most parts didn't have a clue:-). As of 2.0b1 (which is due in a few days) MacPython will have Unicode support and converters between the various charsets. If you have applications that do character conversion it would be very helpful if you could try the unicode support and provide feedback on how well it is working. There is a potential downside to the Unicode support: there's a good chance that strings (as in "text-strings", binary data is fine) that have 8-bit characters in them will stop working in various areas such as regular expressions. This is because the Python default character encoding has been changed to "ascii". You should be able to set it to either MacRoman or iso-latin-1 yourself, though. -- 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 jack@oratrix.nl Fri Sep 8 23:55:01 2000 From: jack@oratrix.nl (Jack Jansen) Date: Sat, 09 Sep 2000 00:55:01 +0200 Subject: [Pythonmac-SIG] Need some hands to debug MacPython installer Message-ID: <20000908225506.92145D71FF@oratrix.oratrix.nl> Folks, I need some people to test the MacPython 2.0b1 installer. It is almost complete, only things like the readme file and some of the documentation (on building and such) remains to be done. At least: as far as I know. If someone (or someones) could try ftp://ftp.cwi.nl/pub/jack/python/mac/PythonMac20preb1Installer.bin and tell me whether it works that would be much appreciated. One thing to note is that if you've been building 2.0b1 MacPythons from the CVS repository you'll have to remove your preference file first (no such problem with older prefs files). All feedback is welcome, of course, but I'm especially interested in hearing which things I've forgotten (if people could check that expected new modules and such are indeed there), and which bits of the documentation (in Mac:Demo) needs massaging. Oh, and bugs of course, in the unlike event of there being any:-) -- 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/ ++++ From cbarker@jps.net Sat Sep 9 01:12:20 2000 From: cbarker@jps.net (Chris Barker) Date: Fri, 08 Sep 2000 17:12:20 -0700 Subject: [Pythonmac-SIG] "Official" mac python Docs. References: <20000908225506.92145D71FF@oratrix.oratrix.nl> Message-ID: <39B98064.F87A8215@jps.net> Is anyone working on updating the "official" MacPython docs, I mean the ones that are on the python.org website, alongside the Library Reference, and all that. It looks to me, at a quick glance, that it hasn't been updated in a while. AS an example, it still refers to the Think C consol package. Has anyone build MacPython with think C recently. Does Think C still even exist? If no one is working on that, I'd be willing to start. I'll need a lot of help from the more knowledgable folks on theis group, but I think it's a worthy project. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From sdm7g@virginia.edu Sat Sep 9 01:23:45 2000 From: sdm7g@virginia.edu (Steven D. Majewski) Date: Fri, 8 Sep 2000 20:23:45 -0400 (EDT) Subject: [Pythonmac-SIG] Need some hands to debug MacPython installer In-Reply-To: <20000908225506.92145D71FF@oratrix.oratrix.nl> Message-ID: On Sat, 9 Sep 2000, Jack Jansen wrote: > All feedback is welcome, of course, but I'm especially interested in > hearing which things I've forgotten (if people could check that > expected new modules and such are indeed there), and which bits of the > documentation (in Mac:Demo) needs massaging. Oh, and bugs of course, > in the unlike event of there being any:-) Install went smoothly. I haven't been following the latest developments, so I'm not sure if this is SUPPOSED to work yet or not, but: Python 2.0b1 (#64, Sep 8 2000, 23:37:06) [CW PPC w/GUSI2 w/THREADS] Copyright (c) 2000 BeOpen.com. All Rights Reserved. [...] >>> import thread >>> import threading Traceback (most recent call last): File "", line 1, in ? File "Work:Python 2.0preb1:Lib:threading.py", line 538, in ? _MainThread() File "Work:Python 2.0preb1:Lib:threading.py", line 465, in __init__ import atexit ImportError: No module named atexit (I'll try exercising some old scripts and see what else happens.) ---| Steven D. Majewski (804-982-0831) |--- ---| Department of Molecular Physiology and Biological Physics |--- ---| University of Virginia Health Sciences Center |--- ---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- "All operating systems want to be unix, All programming languages want to be lisp." From jaredu@its.caltech.edu Sat Sep 9 04:04:53 2000 From: jaredu@its.caltech.edu (Jared Updike) Date: Fri, 8 Sep 2000 20:04:53 -0700 (PDT) Subject: [Pythonmac-SIG] GUSI Prefs Resources Message-ID: I'm not certain which of these lines to include and/or what strings to change (it looks like this is supposed to be a template of some sort) to get the preferences in my project to support no-SIOUX-console window mode. I know I need to stick a 'GUI' in here somewhere. Any ideas? resource 'TMPL' (PYTHONOPTIONS_ID, "Popt") { { "preference version", 'DBYT', "Interactive after script", 'DBYT', "Verbose import", 'DBYT', "Optimize", 'DBYT', "Unbuffered stdio", 'DBYT', "Debug parser", 'DBYT', "Keep window on normal exit", 'DBYT', "Keep window on error exit", 'DBYT', "No interactive option dialog", 'DBYT', "No argc/argv emulation", 'DBYT', "Old standard exceptions", 'DBYT', "No site-python support", 'DBYT', } }; --Jared Web: http://waffles.caltech.edu Phone: (626)395-3762 Campus Adress: 255 S. Hill #7 Adress: MSC 935 Caltech Pasadena, CA 91126-0935 From jack@oratrix.nl Sat Sep 9 21:31:47 2000 From: jack@oratrix.nl (Jack Jansen) Date: Sat, 09 Sep 2000 22:31:47 +0200 Subject: [Pythonmac-SIG] GUSI Prefs Resources In-Reply-To: Message by Jared Updike , Fri, 8 Sep 2000 20:04:53 -0700 (PDT) , Message-ID: <20000909203152.56C31D71FF@oratrix.oratrix.nl> Jared, the TMPL resource isn't all that interesting: it is there so that ResEdit and Resourcerer allow you a slightly more decent editing interface than undocumented hexadecimal numbers. The best way to do this is really to simply drop your program on EditPythonPrefs and set the no-console setting that way. If you really want a .r source file you can then always derez the result. -- 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 jack@oratrix.nl Sat Sep 9 23:53:50 2000 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 10 Sep 2000 00:53:50 +0200 Subject: [Pythonmac-SIG] Need some hands to debug MacPython installer In-Reply-To: Message by "Steven D. Majewski" , Fri, 8 Sep 2000 20:23:45 -0400 (EDT) , Message-ID: <20000909225355.381DDD71FF@oratrix.oratrix.nl> Oops, indeed some of the new modules were inadvertantly excluded. I'll create a new installer tomorrow (which should also contain the documentation and such). -- 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 tmk@microscript.be Mon Sep 11 08:26:57 2000 From: tmk@microscript.be (tmk [microscript]) Date: Mon, 11 Sep 2000 09:26:57 +0200 Subject: [Pythonmac-SIG] charset conversions In-Reply-To: <20000908123008.22DCAD71FF@oratrix.oratrix.nl> Message-ID: Thanks Jack (and Just). I'll be waiting for Python 2. I'm planning to use this feature extensively for web form processing (being able to correctly handle european languages like french and spanish) and email (MIME seems to favor ISO-8859-N encodings). I'll certainly report my findings back to the list as soon as I've been able to experiment with MacPython 2 beta. Btw, any hint as yet as to whether MacPython 2 beta is carbonized for MacOS X (Public Beta) (as opposed to still being a 'classic' app). I'm planning to switch to that OS as my main OS as soon as it's available (ie hopefully by the end of the week). Another btw are some mac pythoneer going to be present on Apple Expo on Paris on the 13th? I'll be there and it would be cool some of you guys and gals :-). = tmk = > From: Jack Jansen > Date: Fri, 08 Sep 2000 14:30:02 +0200 > To: "tmk [microscript]" > Cc: Python Mac mailing list > Subject: Re: [Pythonmac-SIG] charset conversions > > > Recently, "tmk [microscript]" said: >> Yo, >> >> I'm looking into doing character set conversions in Python (e.g. from >> MacRoman to ISO-8859-1). >> >> I was wondering if it already exists some stuff in this area. I've tried >> looking in the current library of python modules but I was unable to find >> something of interest. > > Up until recently MacPython was confused: some parts of the system > thought it was iso-latin-1, others thought it was macroman. (And most parts > didn't have a clue:-). > > As of 2.0b1 (which is due in a few days) MacPython will have Unicode > support and converters between the various charsets. If you have > applications that do character conversion it would be very helpful if > you could try the unicode support and provide feedback on how well it > is working. > > There is a potential downside to the Unicode support: there's a good > chance that strings (as in "text-strings", binary data is fine) that > have 8-bit characters in them will stop working in various areas such > as regular expressions. This is because the Python default character > encoding has been changed to "ascii". You should be able to set it to > either MacRoman or iso-latin-1 yourself, though. > -- > 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 pr1@club-internet.fr Mon Sep 11 08:36:46 2000 From: pr1@club-internet.fr (Philippe de Rochambeau) Date: Mon, 11 Sep 2000 09:36:46 +0200 Subject: [Pythonmac-SIG] re: MacPython 2.0 Installer Message-ID: <39BC8B8A.DA69C796@club-internet.fr> The installer works fine. One of the links on the documentation's index.html page is dangling: "Another set of Macintosh-savvy examples, more aimed at beginners, is maintained by Joseph Strout, at http://www-acs.ucsd.edu/~jstrout/python/. " Are there any (Mac) threading examples anywhere? What about XML? The XML tutorial available on www.python.org is outdated. Many thanks. Philippe de Rochambeau From devill@fox.co.za Mon Sep 11 09:18:25 2000 From: devill@fox.co.za (Gregory De Villiers) Date: Mon, 11 Sep 2000 10:18:25 +0200 Subject: [Pythonmac-SIG] Newbie: MacDNR module Message-ID: Hi all I am new to Pyton for starters. Very new in fact. Please bear with my stupidity, if it is obvious. I have read back in archives for answers to my question but alas... I have started the tedious task of reading through the various documentation files and have stumbled across the following in the "Macintosh Library Modules" documentation: "This module provides an interface to the Macintosh Domain Name Resolver. It is usually used in conjunction with the mactcp module, to map hostnames to IP addresses. It may not be available in all Mac Python versions." It is not available in my version. Some of the functions in this DNR are however of interest to me. What I would like to know is: 1. Why is it not available? Is it incompatible with newer OS-es or something like that? 2. If it is possible for me to get it, where can I get it? Thanks in advance. Greg -- --- Gregory De Villiers For more information, please visit http://www.fox.co.za/ From jack@oratrix.nl Mon Sep 11 09:58:38 2000 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 11 Sep 2000 10:58:38 +0200 Subject: [Pythonmac-SIG] charset conversions In-Reply-To: Message by "tmk [microscript]" , Mon, 11 Sep 2000 09:26:57 +0200 , Message-ID: <20000911085951.441B6303181@snelboot.oratrix.nl> > I'm planning to use this feature extensively for web form processing (being > able to correctly handle european languages like french and spanish) and > email (MIME seems to favor ISO-8859-N encodings). > > I'll certainly report my findings back to the list as soon as I've been able > to experiment with MacPython 2 beta. Yes, please do! > Btw, any hint as yet as to whether MacPython 2 beta is carbonized for MacOS > X (Public Beta) (as opposed to still being a 'classic' app). I'm planning to > switch to that OS as my main OS as soon as it's available (ie hopefully by > the end of the week). Sorry, 2.0 will still be classic. MacPython is 99% ready for the Carbon transition, and I have a carbon MacPython running, but the underlying I/O library, GUSI, isn't publicly available for Carbon yet. And that would result in a Python that doesn't know about sockets and select, so that seems hardly worth the trouble. A 2.0-Carbon will become available as soon as possibly, but later than 2.0-Classic. > Another btw are some mac pythoneer going to be present on Apple Expo on > Paris on the 13th? I'll be there and it would be cool some of you guys and > gals :-). No, I would have liked to go but I don't have the time:-( -- 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 jack@oratrix.nl Mon Sep 11 10:18:15 2000 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 11 Sep 2000 11:18:15 +0200 Subject: [Pythonmac-SIG] Newbie: MacDNR module In-Reply-To: Message by Gregory De Villiers , Mon, 11 Sep 2000 10:18:25 +0200 , Message-ID: <20000911091815.BCB94303181@snelboot.oratrix.nl> > I have started the tedious task of reading through the various > documentation files and have stumbled across the following in the > "Macintosh Library Modules" documentation: > > "This module provides an interface to the Macintosh Domain Name > Resolver. It is usually used in conjunction with the mactcp module, > to map hostnames to IP addresses. It may not be available in all Mac > Python versions." It is _very_ outdated. MacPython nowadays supports that standard socket module, which has (most of) this functionality in gethostbyname() and gethostbyaddr(). The MacDNR and MacTCP modules should be removed from the documentation. -- 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 tom@othermedia.com Mon Sep 11 11:11:46 2000 From: tom@othermedia.com (tom smith) Date: Mon, 11 Sep 2000 11:11:46 +0100 Subject: [Pythonmac-SIG] XML and MacPython In-Reply-To: Message-ID: I recently bought the "XML and Python programming book". Do the xml modules work with MacPython? I've been using python in Virtual PC for the last week. Is there a list of stuff that works in vanilla python but not in macPython, like odbc, Tkinter etc thanks tom p.s I downloaded Swish, a tk-tcl-based xml editor and it's didn't work...maybe this points to why I can't get Tkinter to not crash. From jack@oratrix.nl Mon Sep 11 14:26:40 2000 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 11 Sep 2000 15:26:40 +0200 Subject: [Pythonmac-SIG] "Official" mac python Docs. In-Reply-To: Message by Chris Barker , Fri, 08 Sep 2000 17:12:20 -0700 , <39B98064.F87A8215@jps.net> Message-ID: <20000911132641.617FB303181@snelboot.oratrix.nl> > Is anyone working on updating the "official" MacPython docs, I mean the > ones that are on the python.org website, alongside the Library > Reference, and all that. It looks to me, at a quick glance, that it > hasn't been updated in a while. AS an example, it still refers to the > Think C consol package. Has anyone build MacPython with think C > recently. Does Think C still even exist? > > If no one is working on that, I'd be willing to start. I'll need a lot > of help from the more knowledgable folks on theis group, but I think > it's a worthy project. Yes, please please please do so!!!! You have just gotten yourself elected (or is that appointed:-) to be the MacPython Documentation Coordinator. Congratulations! The documentation hasn't been updated in about 4 years or so, I simply haven't had the time for it. The documentation is currently in the main sourceforge cvs archive, in a sort of LaTex format. It would be easiest if we can keep it that way (because the pythonlabs folks will then do all the formatting work and indexing and such when there is a new release:-), but if that is a problem we can work out a different scheme. Let me know what formatting package/editor would work for you, and what organization. I think that the first step needed is to take inventory of all the mac-specific modules we have and create an "Undocumented Mac modules" section in which we list them all. Then we can remove all the obsolete modules in the existing documentation, and then slowly begin adding documentation for modules (and removing those modules from the undocumented section). And all this is just the library section of the manual. The other documentation, that is currently represented by the htmlfiles in the Mac:Demo folder and a few bits and pieces elsewhere, could also do with some organization... -- 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 cbarker@jps.net Mon Sep 11 18:39:43 2000 From: cbarker@jps.net (Chris Barker) Date: Mon, 11 Sep 2000 10:39:43 -0700 Subject: [Pythonmac-SIG] "Official" mac python Docs Project References: <20000911132641.617FB303181@snelboot.oratrix.nl> Message-ID: <39BD18DF.9087A804@jps.net> Hi all, I am embarking on the project of updating the "official" MacPython Docs. There is a whole lot to be documented, but for the moment, I am focusing on the " official" docs because they are included in the main doc tree people find on the main Python Web site. I am also a fan of LaTeX, and the Python docs LaTeX format allows very nice printed (Postscript and PDF) and html docs from the same source, all with free software. I know of no better way to do that. (SGML+docbook is a good option too, but I'm not sure what free tools there are to manipulate it, and there is a lot more markup to do than for LaTeX. I think the Python docs are headed that way, however) As it stands, there is obsolete info in there, plus a whole lot missing. My plan is as follows: My first goal is to make sure there is nothing incorrect in the document. The next step is to start adding stuff, with the goal of making it complete! I will go thru the docs to see what is listed in there, and try to import every listed module. Any I find that don't work, I'll post here, and someone can tell me what the status is. In the meantime, feel free to send me documentation of any modules that are not currently in that document, as well as notes about things like the IDE, using tkinter, embedding/extending on the mac, etc. If you are sending me more than a few sentences, it wouold be great if you could send it in Python-doc-LaTeX form. (NOTE: it's mostly just LaTeX, but it has some special markup and restrictions, so that it can be processes by LateX2html, there is a doc about docs, if you want to know how to do it) If you don't want to deal with that, I will gladly take it in any form you give it to me. Thanks for all the help I know you will give me!!! NOTE TO JACK: What version of MacPython should I be documenting? is the fianl version of 1.6 out? what about 2.0 (I know you just released and alpha of the installer, but should I try to document that?) -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From jack@oratrix.nl Mon Sep 11 23:02:30 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 12 Sep 2000 00:02:30 +0200 Subject: [Pythonmac-SIG] "Official" mac python Docs Project In-Reply-To: Message by Chris Barker , Mon, 11 Sep 2000 10:39:43 -0700 , <39BD18DF.9087A804@jps.net> Message-ID: <20000911220236.10827D7207@oratrix.oratrix.nl> Chris, I like your plan! A few minor comments and answers to questions: Recently, Chris Barker said: > My first goal is to make sure there is nothing incorrect in the > document. The next step is to start adding stuff, with the goal of > making it complete! Great! How about my idea of a previous email, that we start adding stuff by crating an "undocumented mac modules" section in which we start by simply listing them? Or is that overkill, and do you think we can finish the documentation quickly enough that this won't be needed? > I will go thru the docs to see what is listed in there, and try to > import every listed module. Any I find that don't work, I'll post here, > and someone can tell me what the status is. Another problem, and probably a more difficult one, is modules that are implemented but have gotten new methods, or lost methods. IDE's modulebrowser can be of some help here, but some things it can't do (like finding the methods implemented on a builtin type). > What version of MacPython should I be documenting? is the fianl version > of 1.6 out? what about 2.0 (I know you just released and alpha of the > installer, but should I try to document that?) There won't be a final 1.6, we're going straight to 2.0. By the time 1.6 was planned I was far ahead already without any way to turn back. And 1.6 was released mainly because CNRI wanted it very much. So I'd suggest documenting 2.0b1, which'll be out in an hour or so (or possibly tomorrowmorning). -- 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 jack@oratrix.nl Mon Sep 11 23:34:40 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 12 Sep 2000 00:34:40 +0200 Subject: [Pythonmac-SIG] MacPython 2.0b1 released Message-ID: <20000911223446.1377BD7207@oratrix.oratrix.nl> MacPython 2.0beta1 has been released. You can download it through the MacPython homepage, http://www.cwi.nl/~jack/macpython.html . Aside from all the goodies that are not mac-specific there's quite a bit of new mac-only stuff too. Here's the release notes: Changes in 2.0b1 since 1.5.2 ---------------------------- These release notes refer to Mac-specific changes only. See NEWS (in the Misc folder) for machine-independent changes. Unfortunately I have messed my administration up, so I can't give complete Mac-specific release notes for the changes in this release. So, I will have to leave it at the highlights: - 68K support has been dropped, this release is PPC only. - Threads support (through standard Python threads module). - Tkinter works again! At least: it doesn't immedeately crash in obvious ways. - Appearance support through App module and added calls in many other modules. Most dialogs and applets have also been converted to Appearance. There's also a ControlAccessor module that handles [GS]etControlData with their plethora of argument types. - Navigation Services support, with macfs StandardFile calls transparently replaced by their NavServices counterparts. - Offscreen QuickDraw and GWorld support through Qdoffs module. - Drag manager support (Drag module). - Much better CGI support and examples, see :Mac:Tools:CGI. - Better OSA/AppleEvent support. - Up/downcasting of handle-based types is now unified and implemented in the inherting module, e.g. handleobj = ctlobj.as_Resource() ctlobj = Ctl.as_Control(handle) - Added macos.FreeMem(), MaxBlock() and CompactMem(), mainly so apps in Python can give low-memory warnings. - MediaDescr module parses some QuickTime media descriptions (but definitely not all). What is not in this distribution -------------------------------- - The garbage collection mods to 2.0 have not been enabled, mainly due to lack of test-time. - Stackless Python/microthreads are not in here. Ask on the pythonmac-SIG if you want them. - Carbon support is not in here, but should be happening as soon as GUSI is ready. - Distutils is not in here, again due to lack of time. Known problems -------------- This list is far from complete, more problems may be listed on the MacPython homepage, http://www.cwi.nl/~jack/macpython.html. - The IDE and Tkinter do not work together. Run tkinter programs under PythonInterpreter. - Aliases do not work in sys.path entries. -- 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/ ++++ From cbarker@jps.net Mon Sep 11 23:49:38 2000 From: cbarker@jps.net (Chris Barker) Date: Mon, 11 Sep 2000 15:49:38 -0700 Subject: [Pythonmac-SIG] Running a script "from scratch" from the IDE References: Message by Chris Barker , Wed, 06 Sep 2000 16:41:50 -0700 , <39B6D63E.83397486@jps.net> Message-ID: <39BD6182.2268658A@jps.net> Just van Rossum wrote: > >The only reasonable way to do this would be to have the IDE fire up a Python > >interpreter. That would also solve the Tk problem, by the way. > I started writing some code but then realized it's not as easy as it > sounds. The main problem is that the plain interpreter doesn't respond to > quit events, so you would have to quit it manually each time if there was a > traceback. Or write YetAnotherWrapperAppletThatTakesCareOfThis. Ugh. What does it take to write YetAnotherWrapperAppletThatTakesCareOfThis ? Could it be written in Python? Is there a similar example I could look at and adapt? In any case, this would be useful for anyone wanting to interface Python with any other editor as well, so I'd love to see someone take it on. I'm willing t try myself, but the Mac is such a mystery to me, it won't be easy. > The other problem was that I was too lazy to figure out how to implement > something like this: > > findertools.launch(, ) > - find out where the interpreter app is > - if the interpreter is still running: quit it > - check whether script is saved > - ask for save if not > - launch interpreter with script file It seems like the easy way would be to have the location of the interpreter to use set as a preference. That makes the first step easy. The second step may require the YetAnotherWrapperAppletThatTakesCareOfThis, or could the ability to respond to a quit event be built into the interpreter? It seems like a good idea for assorted reasons. Would the file have to be saved?, or could the interpreter be passed the contents of the buffer you're editing? > I wrote the UI part (ie. another menu item in the script popup menu: "Run > with Interpreter"), but then gave up when I realized how much work the > actual functionality was... I'm sorry to hear that. Maybe we have revived your interest??? -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Tue Sep 12 00:39:17 2000 From: cbarker@jps.net (Chris Barker) Date: Mon, 11 Sep 2000 16:39:17 -0700 Subject: [Pythonmac-SIG] "Official" mac python Docs Project References: <20000911220236.10827D7207@oratrix.oratrix.nl> Message-ID: <39BD6D25.35D25BD7@jps.net> Jack Jansen wrote: > Great! How about my idea of a previous email, that we start adding > stuff by crating an "undocumented mac modules" section in which we > start by simply listing them? Or is that overkill, and do you think we > can finish the documentation quickly enough that this won't be needed? I think that's a fine idea. See my next post. Any modules that are not there can be sent to me, with as much info as possible. If nothing else, I will put the doc string in (if it has anything of use at all) and a list of the members of the module. What the members do can then be filled in. I just went through the doc, and I think I can get it correct pretty quickly, but there really isn't much point in doing this unless we can fill it out some, soI'll be focussing on that. > Another problem, and probably a more difficult one, is modules that > are implemented but have gotten new methods, or lost methods. IDE's > modulebrowser can be of some help here, but some things it can't do > (like finding the methods implemented on a builtin type). I've started a list of added (and missing) methods of the modules in the doc. The methods on teh built in types and such I'll jsut have to hope whoever is using it will be willing to put a little time in to give me some info. > > What version of MacPython should I be documenting? is the fianl version > > of 1.6 out? what about 2.0 (I know you just released and alpha of the > > installer, but should I try to document that?) > > There won't be a final 1.6, we're going straight to 2.0. By the time > 1.6 was planned I was far ahead already without any way to turn > back. And 1.6 was released mainly because CNRI wanted it very much. So > I'd suggest documenting 2.0b1, which'll be out in an hour or so (or > possibly tomorrowmorning). Hmm. when is 2.0 final expected o be released? IN the mean time, I'll go get the beta. Is 2.0b1 as stable as teh 1.6 beta you had out? See my next note for some info on the doc. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Tue Sep 12 00:49:43 2000 From: cbarker@jps.net (Chris Barker) Date: Mon, 11 Sep 2000 16:49:43 -0700 Subject: [Pythonmac-SIG] "Official" mac python Docs Project: requests for help/comments References: <20000911220236.10827D7207@oratrix.oratrix.nl> Message-ID: <39BD6F97.8DA04044@jps.net> Hi all, I've taken a first quick pass through the Mac modules Official Python Doc. Having looked at it again, I'd like to do more than just edit it. I'd love to turn it into a defininative reference for Mac Python users. Most importantly, I'd like it to have a good intro to using Python on the Mac, and how it differs from Unix and Windows. This is particularly critical, because all the books (and the rest of the official docs) have a very command-line centric notion of Python. I intend to go through the various docs that are in the MacPython distibution, and put some of that info into this doc. I'm also hoping folks will contibute!! Anyway, the first step is to clean up what's there. My comments have been gleaned from the 1.5.2 distribution, but I intend to make it all correct for version 2.0, at Jack's suggestion. We might as well not have it out of date as soon as it's done! At the moment, if you want to see the doc, go to the python.org web page. IN the future, once I have changed things, I'll send out a pdf or something for all to look at. Here are my notes so far. Comments and contibutions welcome: There are a list of modules in the intro that are interfaces to various mac toolboxes. They are not documented. Does anyone want to provide some documentation for any of these?? Also, are there any others that should be on this list? I've checked to make sure these modules all exist. At the very least, I will add the modules to the doc, along with a list of methods, gleaned from the modules themselves. AE (Apple events): (there is some stuff in the HTML docs I may take a look at to add to this) Cm (Component Manager): Ctl (Control Manager): Dlg (Dialog Manager): Evt (Event Manager): Fm (Font Manager): List (List Manager): Menu (Menu Manager): Qd (Quick Draw): Qt (Quick Time): Res (Resoure Manager): Scrap(Scrap Manager): Snd (Sound Manager): TE (TextEdit): Waste (Non-Apple TextEdit replacement): exists, but is called waste (note case). is the is the same thing? Win (Window Manager) : Other Modules::::::::::::::::::::::::::::::::::: Module: mac Need to add the following to the list of methods: altsep, curdir, defpath,environ, error, fstat, getbootvol, lseek, makedirs, pardir, pathsep, remove, removedirs, renames, sep, Clearly, none of these are going to work. should they even be there? execl, execle, execlp, execlpe, execvp, execvpe, Attributes: name Modules in os: sys, path Module: macpath Need to add: abspath, basename, dirname Module: Macconsole Is this completely dead?? Is there a replacement? Module: macdnr gone. functionality in standard socket module. Module: MacOS Add: AcceptHIghLevelEvent : what does this do? Module: macostools What are all the k* types? there are a whole pile of them!! Module: aetools Does someone want to volunteer to docuemnt this?? Module: mactcp gone. see socket module Module: EasyDialogs Need to add the following: AskPassword Is the text about background operation and non-modal dialogs still true? Module: FrameWork What is the status of this? Is anyone useing or developing it? Module: MiniAEFrame What is the status of this?? Has it been developed since the docs were written? Is anyone still using it?? That's about it. Let's start adding stuff!!! -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From smith@oe.fau.edu Tue Sep 12 04:06:07 2000 From: smith@oe.fau.edu (Samuel Smith) Date: Mon, 11 Sep 2000 23:06:07 -0400 Subject: [Pythonmac-SIG] MacPython 2.0b1 released In-Reply-To: <20000911223446.1377BD7207@oratrix.oratrix.nl> References: <20000911223446.1377BD7207@oratrix.oratrix.nl> Message-ID: > >What is not in this distribution >-------------------------------- > >- The garbage collection mods to 2.0 have not been enabled, mainly >due to lack of test-time. >- Stackless Python/microthreads are not in here. Ask on the >pythonmac-SIG if you want them. It says ask if you want stackless python and microthreads. I want them thanks. I have been using it for some simulation tasks. >- Carbon support is not in here, but should be happening as soon as >GUSI is ready. >- Distutils is not in here, again due to lack of time. > >Known problems >-------------- > >This list is far from complete, more problems may be listed on the >MacPython homepage, >http://www.cwi.nl/~jack/macpython.html. > >- The IDE and Tkinter do not work together. Run tkinter programs >under PythonInterpreter. >- Aliases do not work in sys.path entries. > >-- >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/ ++++ > >_______________________________________________ >Pythonmac-SIG maillist - Pythonmac-SIG@python.org >http://www.python.org/mailman/listinfo/pythonmac-sig -- ********************************** Samuel M. Smith Ph.D. Professor Director Advanced Marine Systems Lab **************(Dania SeaTech Building)*********************** Institute for Ocean and Systems Engineering Florida Atlantic University Rm. 225 B, SeaTech Bldg. 101 North Beach Road, Dania, FL 33004 (voice) 954-924-7232 (secretary) 954-924-7230 (fax) 954-924-7233 (mobile) 561-251-2114 (email) smith@oe.fau.edu (web) http://www.oe.fau.edu From just@letterror.com Tue Sep 12 08:50:56 2000 From: just@letterror.com (Just van Rossum) Date: Tue, 12 Sep 2000 08:50:56 +0100 Subject: [Pythonmac-SIG] MacPython 2.0b1 released In-Reply-To: <20000911223446.1377BD7207@oratrix.oratrix.nl> Message-ID: At 12:34 AM +0200 12-09-2000, Jack Jansen wrote: >MacPython 2.0beta1 has been released. You can download it through the >MacPython homepage, http://www.cwi.nl/~jack/macpython.html . Wow, excellent! (Sorry I haven't been very actively helping lately: I hope= to be able to spend more time on MacPython later this year. Right now we're= extremely busy _using_ Python for a big project, which is fun, but it's= consuming more than all of our time currently :-( ) >What is not in this distribution >-------------------------------- > >- The garbage collection mods to 2.0 have not been enabled, mainly due to= lack of test-time. Hm, that's unfortunate. I was hoping it would "just work"... Any specific= reasons that it doesn't? >- Stackless Python/microthreads are not in here. Ask on the pythonmac-SIG= if you want them. No can do: the stackless patches have not been updated to the current state= of the CVS tree, and I have no idea when this will happen. In the mean time= Christian Tismer and Gordon McMillan and I have been trying to plot out a= proposal to integrate this stuff in 2.1, but were not very far yet... Just From jack@oratrix.nl Tue Sep 12 11:01:38 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 12 Sep 2000 12:01:38 +0200 Subject: [Pythonmac-SIG] "Official" mac python Docs Project In-Reply-To: Message by Chris Barker , Mon, 11 Sep 2000 16:39:17 -0700 , <39BD6D25.35D25BD7@jps.net> Message-ID: <20000912100143.E80D4D7205@oratrix.oratrix.nl> Recently, Chris Barker said: > I think that's a fine idea. See my next post. Any modules that are not > there can be sent to me, with as much info as possible. If nothing else, > I will put the doc string in (if it has anything of use at all) and a > list of the members of the module. What the members do can then be > filled in. > > I just went through the doc, and I think I can get it correct pretty > quickly, but there really isn't much point in doing this unless we can > fill it out some, soI'll be focussing on that. Ok, great. Do you have checkin permissions on the sourceforge.net repository? No, it appears not. Then it's probably easiest if you forward modified/new files to me and I'll check them in. Or (better) ask one of the admins to give you checkin permissions. That is: if you have a unix machine available, checkin permission is difficult from a Mac at the moment. > Hmm. when is 2.0 final expected o be released? IN the mean time, I'll go > get the beta. Is 2.0b1 as stable as teh 1.6 beta you had out? 2.0 is expected to have a short beta cycle, so it shouldn't take too long. As to 2.0b1 stability compared to 1.6a2: my guess is that it's more stable, but as it's only been out for 12 hours I can't really promise this. I _do_ promise that I won't be doing wild things between 2.0b1 and 2.0final, just work on missing stuff (distutils comes to mind). Carbon MacPython will have to wait until after 2.0. -- 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 jack@oratrix.nl Tue Sep 12 11:43:31 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 12 Sep 2000 12:43:31 +0200 Subject: [Pythonmac-SIG] "Official" mac python Docs Project: requests for help/comments In-Reply-To: Message by Chris Barker , Mon, 11 Sep 2000 16:49:43 -0700 , <39BD6F97.8DA04044@jps.net> Message-ID: <20000912104336.21A60D7205@oratrix.oratrix.nl> Recently, Chris Barker said: > There are a list of modules in the intro that are interfaces to various > mac > toolboxes. They are not documented. Does anyone want to provide some > documentation > for any of these?? Also, are there any others that should be on this > list? I've > checked to make sure these modules all exist. At the very least, I will > add the modules to the doc, along with a list of methods, gleaned from > the modules themselves. I think for these we should list the modules, refer to Inside Mac for documentation and explain how argument handling differs. Maybe we should also list the missing and added calls explicitly: some calls are missing because they're meaningless in Python, or unimplementable. Some are added because they're needed in Python but not in C (the as_Resource() coercion stuff and such). Once there is a framework I can take it upon myself to do the last bit. > Waste (Non-Apple TextEdit replacement): exists, but is called waste > (note case). is > the is the same thing? Yes, it's the same. Again, this can be documentated mainly with a reference to the Waste documentation. > Module: mac This is documented as the "os" module. If there is a "mac" module section in the lib manual it should be no more than a reference to the os section, possibly with a few paragraphs explaining which things are missing (execl and friends) and which are only placeholders. > Module: macpath > Need to add: > > abspath, basename, dirname This is not a module that is normally used, it is usually imported as os.path. The only reason to use it directly is if you want to manipulate Mac pathnames on non-mac systems. Again, documenting it by referring to os.path should be good enough. > Module: Macconsole > Is this completely dead?? Is there a replacement? It's dead, and there's no replacement. > Module: macdnr > gone. functionality in standard socket module. Dead, indeed. Also, no need to keep a pointer in the manual, it's been dead for years. > Module: MacOS > Add: > AcceptHIghLevelEvent : what does this do? It was part of AppleEvent handling. I think it is not needed anymore in newer MacOSes, because this happens under the hood, but I'm not sure. Unless someone complains I'll just take it out (it's gone in Carbon anyway). > Module: macostools > What are all the k* types? there are a whole pile of them!! Don't worry: they're imported (with import *) from MACFS. Ignore them. > Module: aetools > Does someone want to volunteer to docuemnt this?? This is going to be a lot of work. > Module: mactcp > gone. see socket module > > Module: EasyDialogs > Need to add the following: > AskPassword > > Is the text about background operation and non-modal dialogs > still true? No, it's not true anymore. Another thing to note here is that most of the methods have gotten new optional parameters. > Module: FrameWork > > What is the status of this? Is anyone useing or developing it? Yes, I'm using it, and a lot of the examples in Demo use it. It should really be merged with W and with my private framework, but I don't have the time. > Module: MiniAEFrame > > What is the status of this?? Has it been developed since the > docs were > written? Is anyone still using it?? Yes, this is used more heavily. The CGI examples, for instance, use it. > > > That's about it. Let's start adding stuff!!! Okay, here's a first list of things that modules that aren't documented yet: buildtools - Helper module for BuildApple, BuildApplication and macfreeze. Not that important. cfmfile - Ditto. codewarrior_support - Unfinished, shouldn't be in the dsitribution. dbmac - Never seen it before:-) does it work? findertools - Should be documented. findmodulefiles - I think this is outdated. Just, do you know? icopen - Very handy module, but I've never used it. Should be documented. maccache - Seems silly in this era. I'll remove it unless someone complains. macerrors - can be documented with a one-liner somewhere. macfsn - Auto-imported to replace StandardFile calls in macfs with NavServices calls. one-liner is macfs is probably ok. mactty - Does this still work? Does ctb still work? nsremote - Should probably be documented. PixMapWrapper - Should be documented preferences - Should be documented pythonprefs - Should be documented py_resource - Helper for BuildApplet and friends. Not all that important to document. quietconsole - Should be documented SoundMgr - Obsolete, use Sound And all the packages in lib-scriptpackages should be documented (minimally). aepack, aetools and aetypes should move to Lib (so lib-scriptpackages and lib-toolbox contain only generated files). lib-scripting will go. -- 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 jack@oratrix.nl Tue Sep 12 11:48:23 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 12 Sep 2000 12:48:23 +0200 Subject: [Pythonmac-SIG] MacPython 2.0b1 released In-Reply-To: Message by Just van Rossum , Tue, 12 Sep 2000 08:50:56 +0100 , Message-ID: <20000912104828.790D8D7205@oratrix.oratrix.nl> Recently, Just van Rossum said: > >- The garbage collection mods to 2.0 have not been enabled, mainly due to= > lack of test-time. > > Hm, that's unfortunate. I was hoping it would "just work"... Any specific= > reasons that it doesn't? Just that I was afraid about what it would break. And error reports on the sourceforge site seem to indicate that it does indeed break things. If anyone wants to give this a try that would be nice. I'm especially interested in how the toolbox modules hold themselves with GC. > >- Stackless Python/microthreads are not in here. Ask on the pythonmac-SIG= > if you want them. > > No can do: the stackless patches have not been updated to the current state= > of the CVS tree, and I have no idea when this will happen. That's a shame. But with this note in the distribution at least I know the pressure will be on you (as Samuel Smith has already asked for them on this list;-). -- 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 fgranger@altern.org Tue Sep 12 11:59:48 2000 From: fgranger@altern.org (Francois Granger) Date: Tue, 12 Sep 2000 12:59:48 +0200 Subject: [Pythonmac-SIG] "Official" mac python Docs Project: requests for help/comments In-Reply-To: <39BD6F97.8DA04044@jps.net> Message-ID: on 12/09/00 1:49, Chris Barker at cbarker@jps.net wrote: >=20 > Hi all, >=20 > I've taken a first quick pass through the Mac modules Official Python > Doc. Having looked at it again, I'd like to do more than just edit it. > I'd love to turn it into a definitive reference for Mac Python users. Great > I intend to go through the various docs that are in the MacPython > distibution, and put some of that info into this doc. I'm also hoping > folks will contibute!! My spare cycles are rare like yours probably. And I am not a great programmer. But MacPython helped me to solve easily and elegantly some problems. For a beginning, I'd like to help by proof reading and correcting documentation. > There are a list of modules in the intro that are interfaces to various > mac > toolboxes. They are not documented. A pointer to "Inside Ma" online somewhere ??? http://developer.apple.com/techpubs/macos8/mac8.html This is what I got. Is there a way to edit LaTEX documents on Mac ? I got these: http://www.esm.psu.edu/mac-tex/ http://www.esm.psu.edu/mac-tex/editors.html --=20 Fran=E7ois Granger fgranger@altern.org From tom@sz-sb.de Tue Sep 12 12:51:49 2000 From: tom@sz-sb.de (Tom) Date: Tue, 12 Sep 2000 13:51:49 +0200 Subject: [Pythonmac-SIG] "Official" mac python Docs Project: requests for help/comments Message-ID: <39BE18D1.609DEA08@sz-sb.de> Jack Jansen write >findmodulefiles - I think this is outdated. Just, do you know? Which module did replace it? It is still used over here to produce singe file python applications on the mac (installer and other stuff). regards tom From jack@oratrix.nl Tue Sep 12 12:57:39 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 12 Sep 2000 13:57:39 +0200 Subject: [Pythonmac-SIG] "Official" mac python Docs Project: requests for help/comments In-Reply-To: Message by Tom , Tue, 12 Sep 2000 13:51:49 +0200 , <39BE18D1.609DEA08@sz-sb.de> Message-ID: <20000912115740.4C04D303181@snelboot.oratrix.nl> > > Jack Jansen write > > >findmodulefiles - I think this is outdated. Just, do you know? > > Which module did replace it? It is still used over here to produce > singe file python applications on the mac (installer and other stuff). Okay, if someone uses it then it'll stay, clearly. Or at worst it'll move to Unsupported. Macfreeze (and, through it, BuildApplication) currently inspect the source code (using the Python:Tools:freeze modules) to find modules used. Findmodulefiles has the disadvantage that you have to be sure every module you need is exercised. -- 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 just@letterror.com Tue Sep 12 14:39:09 2000 From: just@letterror.com (Just van Rossum) Date: Tue, 12 Sep 2000 14:39:09 +0100 Subject: [Pythonmac-SIG] MacPython 2.0b1 released In-Reply-To: <20000912104828.790D8D7205@oratrix.oratrix.nl> References: Message by Just van Rossum , Tue, 12 Sep 2000 08:50:56 +0100 , Message-ID: At 12:48 PM +0200 12-09-2000, Jack Jansen wrote: >Just that I was afraid about what it would break. And error reports on >the sourceforge site seem to indicate that it does indeed break >things. > >If anyone wants to give this a try that would be nice. I'm especially >interested in how the toolbox modules hold themselves with GC. Just check to see whether the IDE functions ok should sortof be enough... >> >- Stackless Python/microthreads are not in here. Ask on the pythonmac-SIG= >> if you want them. >> >> No can do: the stackless patches have not been updated to the current state= >> of the CVS tree, and I have no idea when this will happen. > >That's a shame. But with this note in the distribution at least I know >the pressure will be on you (as Samuel Smith has already asked for >them on this list;-). Actually, the pressure is on Christian T. ;-) Just From cbarker@jps.net Tue Sep 12 20:29:32 2000 From: cbarker@jps.net (Chris Barker) Date: Tue, 12 Sep 2000 12:29:32 -0700 Subject: [Pythonmac-SIG] "Official" mac python Docs Project: requestsfor help/comments References: Message-ID: <39BE841C.42D9AA97@jps.net> Francois Granger wrote: > My spare cycles are rare like yours probably. And I am not a great > programmer. But MacPython helped me to solve easily and elegantly some > problems. For a beginning, I'd like to help by proof reading and correcting > documentation. I'll take whatever help I can get. I'll be posting updates to the docs on this list. > A pointer to "Inside Ma" online somewhere ??? > http://developer.apple.com/techpubs/macos8/mac8.html > This is what I got. Anyone else have other or better pointers? > Is there a way to edit LaTEX documents on Mac ? > I got these: > > http://www.esm.psu.edu/mac-tex/ > http://www.esm.psu.edu/mac-tex/editors.html This is the best site for TeX-on-the-Mac info. I use OzTeX and the Alpha editor, it has a very nice LaTeX mode. The Pepper editor seems to be pretty nice as well. Unfortunately, the whole Python docs system is all set up to be run on a Unix-like system. That includes using make to build everything, LaTeX2html, a perl Script, to build the html, and assorted unix tools to put it all together. It ran "out-of-the-box" on my Linux box, but getting it all to work on the Mac would be a challenge. All is not lost, however. The LaTeX stuff can certainly be edited on a Mac, and there is no reason why the printable version couldn't be made on the Mac as well, you're just not going to get the html, and info, etc. That doesn't really matter, however. eventually, it all gets put into cvs, and built by the docs folks anyway. I'll be testing it out on my Linux box in the meantime. Thanks for your help,. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From jimmy@CS.cofc.EDU Tue Sep 12 21:38:40 2000 From: jimmy@CS.cofc.EDU (James B. Wilkinson) Date: Tue, 12 Sep 2000 16:38:40 -0400 Subject: [Pythonmac-SIG] "Official" mac python Docs Project: requests for help/comments Message-ID: I meant to send this to the list but sent it to Chris Barker instead. Too easy to hit the "reply" button. Duh. > >Module: FrameWork > > What is the status of this? Is anyone useing or developing it? > Well, yeah. All my Pythonmac stuff uses it. I've also been mulling over the possibility of adding undo/redo to the Framework, but I'd hate to put out the effort only to find out that I should have quit using the Framework long ago and switched to something else. Mostly, I find it hard to believe that one of you guys hasn't already done that somewhere. Anybody got any advice for me on that? Thanks ------------------------------------------------------------- Jimmy Wilkinson | Perfesser of Computer Science jimmy@cs.CofC.edu | The College of Charleston (843) 953-8160 | Charleston SC 29424 If there is one word to describe me, that word would have to be "profectionist". Any form of incompitence is an athema to me. From jack@oratrix.nl Tue Sep 12 21:42:05 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 12 Sep 2000 22:42:05 +0200 Subject: [Pythonmac-SIG] Obsolete scripts? Message-ID: <20000912204210.86F99D71FE@oratrix.oratrix.nl> Is anyone using either PackLibDir or RunLibScript from the :Mac:scripts folder? I'm planning to retire them (to Unsupported, for now) unless people convince me otherwise. -- 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/ ++++ From jack@oratrix.nl Tue Sep 12 21:58:11 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 12 Sep 2000 22:58:11 +0200 Subject: [Pythonmac-SIG] "Official" mac python Docs Project: requests for help/comments In-Reply-To: Message by "James B. Wilkinson" , Tue, 12 Sep 2000 16:38:40 -0400 , Message-ID: <20000912205816.92A10D71FE@oratrix.oratrix.nl> Recently, "James B. Wilkinson" said: > I've also been mulling over the possibility of adding undo/redo to the > Framework, but I'd hate to put out the effort only to find out that I > should have quit using the Framework long ago and switched to something > else. Mostly, I find it hard to believe that one of you guys hasn't already > done that somewhere. Anybody got any advice for me on that? FrameWork is only half the solution. In GRiNS (the stuff that pays my rent) we started of using FrameWork, but by now it's only the Menu code that has survived. Just's W (used in IDE) is in a similar situation. Unfortunately both W and GRiNS-windowinterface are rather specialised: they're fine for some applications but not for others. But once you start thinking about what you'd really want in a GUI framework if it is to remain general enough you quickly end up with something resembling MFC:-( The strong point of FrameWork is that it allows you to break into the control-flow at many different places. W, for instance, uses a different way to enable/disable menus and that plugs right in leaving the rest intact. The weak points of FrameWork are that it has no abstract command interface (but that shouldn't be difficult), that it's dialog support is minimal and that it's control/toolbar support is non-existent. -- 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 managan@llnl.gov Tue Sep 12 22:44:47 2000 From: managan@llnl.gov (Rob Managan) Date: Tue, 12 Sep 2000 14:44:47 -0700 Subject: [Pythonmac-SIG] MacPython 2.0b1 released In-Reply-To: <20000911223446.1377BD7207@oratrix.oratrix.nl> References: <20000911223446.1377BD7207@oratrix.oratrix.nl> Message-ID: At 12:34 AM +0200 9/12/00, Jack Jansen wrote: >MacPython 2.0beta1 has been released. You can download it through the >MacPython homepage, http://www.cwi.nl/~jack/macpython.html . > Here is a request for the installer. It seems that the developer option does not install the Numerical/includes folder. Could that be added? Thanks. -- *-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*- Rob Managan LLNL ph: 925-423-0903 P.O. Box 808, L-095 FAX: 925-422-3389 Livermore, CA 94551-0808 From cbarker@jps.net Wed Sep 13 01:07:16 2000 From: cbarker@jps.net (Chris Barker) Date: Tue, 12 Sep 2000 17:07:16 -0700 Subject: [Pythonmac-SIG] Re: FrameWork (was"Official" ...) References: <20000912205816.92A10D71FE@oratrix.oratrix.nl> Message-ID: <39BEC534.3EEBF81D@jps.net> Jack Jansen wrote: > Unfortunately both W and GRiNS-windowinterface are rather > specialised: they're fine for some applications but not for others. > > But once you start thinking about what you'd really want in a GUI > framework if it is to remain general enough you quickly end up with > something resembling MFC:-( Or maybe wxPython!!! It seems that there is a need for a nice Application Framework for the Mac. It would probably be no more work to get wxPython working on the Mac than it would be to build a whole framework, and you'd get a cross platform solution to boot!! There are a few fols on the wxPython mailing list that are starting to work on it, but it appears no one yet with much Mac programming experience. Any of you want to volunteer to help?? See the wxPython Mailing lists for more info. or: http://www.wxpython.org/ -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From jwblist@olympus.net Wed Sep 13 02:30:18 2000 From: jwblist@olympus.net (John W Baxter) Date: Tue, 12 Sep 2000 18:30:18 -0700 Subject: [Pythonmac-SIG] "Official" mac python Docs Project: requests for help/comments In-Reply-To: <20000912104336.21A60D7205@oratrix.oratrix.nl> References: <20000912104336.21A60D7205@oratrix.oratrix.nl> Message-ID: At 12:43 +0200 9/12/00, Jack Jansen wrote: >> Module: MacOS >> Add: >> AcceptHIghLevelEvent : what does this do? > >It was part of AppleEvent handling. I think it is not needed anymore >in newer MacOSes, because this happens under the hood, but I'm not >sure. Unless someone complains I'll just take it out (it's gone in >Carbon anyway). High Level Events include Apple events; but it is possible to use the High Level Events mechanism for other than Apple events (which are high level events set up the "right" way). And the call is indeed gone in Carbon, which leaves only the Apple events portion supported. I don't know what all that means with respect to the Python documentation or what should be in Python releases pre-Carbon. --John -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From jack@oratrix.nl Wed Sep 13 11:20:51 2000 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 13 Sep 2000 12:20:51 +0200 Subject: [Pythonmac-SIG] "Official" mac python Docs Project: requests for help/comments In-Reply-To: Message by John W Baxter , Tue, 12 Sep 2000 18:30:18 -0700 , Message-ID: <20000913102052.2B4F7303181@snelboot.oratrix.nl> > >It was part of AppleEvent handling. I think it is not needed anymore > >in newer MacOSes, because this happens under the hood, but I'm not > >sure. Unless someone complains I'll just take it out (it's gone in > >Carbon anyway). > > High Level Events include Apple events; but it is possible to use the High > Level Events mechanism for other than Apple events (which are high level > events set up the "right" way). Ok, thanks. I'll rip out AcceptHighLevelEvent in the next release, unless someone screams loudly. -- 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 lefebvre@med.mcgill.ca Wed Sep 13 16:29:05 2000 From: lefebvre@med.mcgill.ca (Luc Lefebvre) Date: Wed, 13 Sep 2000 11:29:05 -0400 Subject: [Pythonmac-SIG] MacPython2.0beta1 install Message-ID: Hi, I installed on a PMac beige G3, no problems. I had to download CarbonLibs update to get NavigationServices so that I could run IDE with OS8.1 . Plus, as invited to do so, just another voice asking for microthreads. cheers ------------------------------- Luc Lefebvre project engineer Aerospace Medical Research Unit McGill University Montreal Canada -----BEGIN PGP PUBLIC KEY BLOCK----- Available upon request or public keyservers. key fingerprint: D2E5 5E35 B910 6F4E 0242 EC63 0FD9 96D0 C7F4 784E -----END PGP PUBLIC KEY BLOCK----- From jwight@bigfoot.com Wed Sep 13 16:39:27 2000 From: jwight@bigfoot.com (Jonathan Wight) Date: Wed, 13 Sep 2000 10:39:27 -0500 Subject: [Pythonmac-SIG] MacPython 2.0b1 released In-Reply-To: <20000911223446.1377BD7207@oratrix.oratrix.nl> Message-ID: on 9/11/00 5:34 PM, Jack Jansen at jack@oratrix.nl wrote: > MacPython 2.0beta1 has been released. You can download it through the > MacPython homepage, http://www.cwi.nl/~jack/macpython.html . Any chance of getting a 2.0b1 source distribution? (for those of us too lazy to deal with CVS). Jon. From jack@oratrix.nl Wed Sep 13 16:42:11 2000 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 13 Sep 2000 17:42:11 +0200 Subject: [Pythonmac-SIG] MacPython2.0beta1 install In-Reply-To: Message by Luc Lefebvre , Wed, 13 Sep 2000 11:29:05 -0400 , Message-ID: <20000913154229.EC000303181@snelboot.oratrix.nl> > Hi, > > I installed on a PMac beige G3, no problems. I had to download CarbonLibs > update to get NavigationServices so that I could run IDE with OS8.1 try actually _using_ 2.0 today>. Luc, did you actually *have to* download NavServices? My intention was that NavServices is optional, and if you don't have it you'll keep to old Standard File interface. If you indeed had to get NavServices, what was the error and when did you get it? And finally, for the ReadMe or Relnotes, where did you get this CarbonLibs/NavServices? Thanks in advance, -- 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 jack@oratrix.nl Wed Sep 13 16:43:58 2000 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 13 Sep 2000 17:43:58 +0200 Subject: [Pythonmac-SIG] MacPython 2.0b1 released In-Reply-To: Message by Jonathan Wight , Wed, 13 Sep 2000 10:39:27 -0500 , Message-ID: <20000913154358.E6E93303181@snelboot.oratrix.nl> > Any chance of getting a 2.0b1 source distribution? (for those of us too lazy > to deal with CVS). Only if you volunteer to actually test it (or someone else volunteers). Let me know, -- 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 vincem@en.com Wed Sep 13 17:00:55 2000 From: vincem@en.com (Vincent Marchetti) Date: Wed, 13 Sep 2000 12:00:55 -0400 Subject: [Pythonmac-SIG] Documentation Project Message-ID: Regarding the recent discussion of updating the Python documentation for Macintosh users: I've recently been working with the OSA support, using Python to control applications I'm writing through Apple Events. I can take on documenting the modules used here including aetools, aepack, AE, etc, and organizing the How-To and examples in the scripting folder. I can work with LaTex, -- in one of your earlier messages you (Chris) mention a document on documentation -- where is this?. Is there a LaTex template (style file?) for producing the standard module documentation? Vince Marcheti vincem@en.com From lefebvre@med.mcgill.ca Wed Sep 13 17:18:32 2000 From: lefebvre@med.mcgill.ca (Luc Lefebvre) Date: Wed, 13 Sep 2000 12:18:32 -0400 Subject: [Pythonmac-SIG] MacPython2.0beta1 install In-Reply-To: <20000913154229.EC000303181@snelboot.oratrix.nl> References: <20000913154229.EC000303181@snelboot.oratrix.nl> Message-ID: Hi Jack, I got the message first when the install ended and the installer tried to lauch the tests, something to the effect that the NavigationLibs are needed. Clicking OK sent the dlog box away but also terminated the test procedure. I then tried to launch the IDE with the same result. I then went to the Apple site, under support, software updates, searched for navigation, this gave me a link to a carbonLib update <"CarbonLib 1.0.4.smi"> which includes "Navigation Services 1.0.1". Installing this got rid of the pesky dlog box....;^). If I can be of any further assistance, please let me know. I will be only too happy to oblige. thanks. At 5:42 PM +0200 9/13/00, Jack Jansen wrote: > > Hi, >> >> I installed on a PMac beige G3, no problems. I had to download CarbonLibs >> update to get NavigationServices so that I could run IDE with OS8.1 > try actually _using_ 2.0 today>. > >Luc, >did you actually *have to* download NavServices? My intention was that >NavServices is optional, and if you don't have it you'll keep to old Standard >File interface. > >If you indeed had to get NavServices, what was the error and when did you get >it? > >And finally, for the ReadMe or Relnotes, where did you get this >CarbonLibs/NavServices? > >Thanks in advance, >-- >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 -- ------------------------------- Luc Lefebvre project engineer Aerospace Medical Research Unit McGill University Montreal Canada -----BEGIN PGP PUBLIC KEY BLOCK----- Available upon request or public keyservers. key fingerprint: D2E5 5E35 B910 6F4E 0242 EC63 0FD9 96D0 C7F4 784E -----END PGP PUBLIC KEY BLOCK----- From lefebvre@med.mcgill.ca Wed Sep 13 17:21:18 2000 From: lefebvre@med.mcgill.ca (Luc Lefebvre) Date: Wed, 13 Sep 2000 12:21:18 -0400 Subject: [Pythonmac-SIG] PythonMac Docs In-Reply-To: <20000913160206.74DCD1CEAC@dinsdale.python.org> References: <20000913160206.74DCD1CEAC@dinsdale.python.org> Message-ID: Hi, I have been doing some LaTeX stuff and could run latex2html on official MacPython docs if there was a need to do so in order to provide docs in html format for the MacOS folks. -- ------------------------------- Luc Lefebvre project engineer Aerospace Medical Research Unit McGill University Montreal Canada -----BEGIN PGP PUBLIC KEY BLOCK----- Available upon request or public keyservers. key fingerprint: D2E5 5E35 B910 6F4E 0242 EC63 0FD9 96D0 C7F4 784E -----END PGP PUBLIC KEY BLOCK----- From lefebvre@med.mcgill.ca Wed Sep 13 19:35:48 2000 From: lefebvre@med.mcgill.ca (Luc Lefebvre) Date: Wed, 13 Sep 2000 14:35:48 -0400 Subject: [Pythonmac-SIG] MacPython2.0beta1 install In-Reply-To: <20000913154229.EC000303181@snelboot.oratrix.nl> References: <20000913154229.EC000303181@snelboot.oratrix.nl> Message-ID: Hi Jack, Tried using the IDE and when I try to open a file i can't see it in the NavServices dlog box. I can see the files fine if I try to save another file to the same directory though . The scripts in those files seem to work OK. hmmmm.... At 5:42 PM +0200 9/13/00, Jack Jansen wrote: > > Hi, >> >> I installed on a PMac beige G3, no problems. I had to download CarbonLibs >> update to get NavigationServices so that I could run IDE with OS8.1 > try actually _using_ 2.0 today>. > >Luc, >did you actually *have to* download NavServices? My intention was that >NavServices is optional, and if you don't have it you'll keep to old Standard >File interface. > >If you indeed had to get NavServices, what was the error and when did you get >it? > >And finally, for the ReadMe or Relnotes, where did you get this >CarbonLibs/NavServices? > >Thanks in advance, >-- >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 -- ------------------------------- Luc Lefebvre project engineer Aerospace Medical Research Unit McGill University Montreal Canada -----BEGIN PGP PUBLIC KEY BLOCK----- Available upon request or public keyservers. key fingerprint: D2E5 5E35 B910 6F4E 0242 EC63 0FD9 96D0 C7F4 784E -----END PGP PUBLIC KEY BLOCK----- From lefebvre@med.mcgill.ca Wed Sep 13 19:44:39 2000 From: lefebvre@med.mcgill.ca (Luc Lefebvre) Date: Wed, 13 Sep 2000 14:44:39 -0400 Subject: [Pythonmac-SIG] MacPython2.0beta1 install In-Reply-To: <20000913154229.EC000303181@snelboot.oratrix.nl> References: <20000913154229.EC000303181@snelboot.oratrix.nl> Message-ID: Hi, I found that launching "editPythonPrefs", selecting the "Default Startup Options" button, and then checking the "Dont use NavServices for Macfs calls" fixes the problem of the IDE created .py files not being visible from the file/open dlog box. I wonder if this being checked as a default in the install would remove the need for the NavServices all together the those who have older OSes installed... At 5:42 PM +0200 9/13/00, Jack Jansen wrote: > > Hi, >> >> I installed on a PMac beige G3, no problems. I had to download CarbonLibs >> update to get NavigationServices so that I could run IDE with OS8.1 > try actually _using_ 2.0 today>. > >Luc, >did you actually *have to* download NavServices? My intention was that >NavServices is optional, and if you don't have it you'll keep to old Standard >File interface. > >If you indeed had to get NavServices, what was the error and when did you get >it? > >And finally, for the ReadMe or Relnotes, where did you get this >CarbonLibs/NavServices? > >Thanks in advance, >-- >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 -- ------------------------------- Luc Lefebvre project engineer Aerospace Medical Research Unit McGill University Montreal Canada -----BEGIN PGP PUBLIC KEY BLOCK----- Available upon request or public keyservers. key fingerprint: D2E5 5E35 B910 6F4E 0242 EC63 0FD9 96D0 C7F4 784E -----END PGP PUBLIC KEY BLOCK----- From cbarker@jps.net Wed Sep 13 20:09:20 2000 From: cbarker@jps.net (Chris Barker) Date: Wed, 13 Sep 2000 12:09:20 -0700 Subject: [Pythonmac-SIG] Documentation Project References: Message-ID: <39BFD0E0.D953339B@jps.net> Vincent Marchetti wrote: > I've recently been working with the OSA support, using Python to control > applications I'm writing > through Apple Events. I can take on documenting the modules used here > including aetools, aepack, AE, > etc, and organizing the How-To and examples in the scripting folder. Great! Consider your offer accepted. > I can work with LaTex, -- in one of your earlier messages you (Chris) > mention a document on > documentation -- where is this?. Cool. The "doc" doc is part of the official Python docs series (along with the tutorial, the Library reference, and the mac doc that I'm working on). It can be found at: http://www.python.org/doc/current/doc/doc.html or the PS and PDF versions can be downloaded from: http://www.python.org/doc/current/download.html > Is there a LaTex template (style file?) > for producing the standard module documentation? There certainly is, and it is pretty rigid to allow the various versions of the docs to be generated, and all be cross-referenced and indexed correctly. Take a look at the doc doc, and then download the docs from the sourceforge CVS server for samples. (If that's a pain, I can send them to you.) -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From jack@oratrix.nl Wed Sep 13 21:53:28 2000 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 13 Sep 2000 22:53:28 +0200 Subject: [Pythonmac-SIG] MacPython 2.0b1 released In-Reply-To: Message by Jonathan Wight , Wed, 13 Sep 2000 11:04:26 -0500 , Message-ID: <20000913205333.921C9D7218@oratrix.oratrix.nl> Okay, I'm convinced:-) As of now a MacPython 2.0b1 source distribution is available at ftp://ftp.cwi.nl/pub/jack/python/mac/MacPython20b1src.sit . If you don't want to do a lot of hacking you'd best also get the specialised version of GUSI 2.1.1 it needs, from ftp://ftp.cwi.nl/pub/jack/python/mac/GUSI211-for-MacPython.sit . -- 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 dgoodger@bigfoot.com Thu Sep 14 01:57:04 2000 From: dgoodger@bigfoot.com (David Goodger) Date: Wed, 13 Sep 2000 20:57:04 -0400 Subject: [Pythonmac-SIG] Re: MacPython 2.0b1 In-Reply-To: <20000912160133.BC4BF1CE64@dinsdale.python.org> Message-ID: Haven't played around with it much, but here's a few things I noticed with the installer: 1. At the end of the README file, there's a reference to 1.6a2: 'you can trash anything in the system folder that has "python" in the name and not "1.6a2"'. Should be 2.0b1? 2. Info box in the installer refers to 1.5.2 for Minimal Install for PPC. 3. Installer info box: Tk & PIL: Tk 8.3 in text, 8.0 in "version". 4. Installer info box: version for Numerical is listed as "Aug-00". Should be 16? img's version? From tmk@microscript.be Thu Sep 14 09:40:46 2000 From: tmk@microscript.be (tmk [microscript]) Date: Thu, 14 Sep 2000 10:40:46 +0200 Subject: [Pythonmac-SIG] re: MacPython 2.0 Installer In-Reply-To: <39BC8B8A.DA69C796@club-internet.fr> Message-ID: Yo, I somehow managed to miss the original post on the MacPython 2.0 Installer(see the subject). Or was this a private post? If not, I'd really be interested in getting a pointer to the installer :-). TIA = tmk = > From: Philippe de Rochambeau > Organization: wwphi > Reply-To: pr1@club-internet.fr > Date: Mon, 11 Sep 2000 09:36:46 +0200 > To: Python Mailing List > Subject: [Pythonmac-SIG] re: MacPython 2.0 Installer > > The installer works fine. > > One of the links on the documentation's index.html page is dangling: > > "Another set of Macintosh-savvy examples, more aimed at beginners, is > maintained by Joseph Strout, at > http://www-acs.ucsd.edu/~jstrout/python/. " > > Are there any (Mac) threading examples anywhere? What about XML? The XML > tutorial available on www.python.org is outdated. > > Many thanks. > > Philippe de Rochambeau > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://www.python.org/mailman/listinfo/pythonmac-sig > From jack@oratrix.nl Thu Sep 14 21:51:27 2000 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 14 Sep 2000 22:51:27 +0200 Subject: [Pythonmac-SIG] MacPython2.0beta1 install In-Reply-To: Message by Luc Lefebvre , Wed, 13 Sep 2000 14:35:48 -0400 , Message-ID: <20000914205132.4909BD721E@oratrix.oratrix.nl> Recently, Luc Lefebvre said: > Tried using the IDE and when I try to open a file with the IDE> i can't see it in the NavServices dlog box. I can see > the files fine if I try to save another file to the same > directory though . The scripts in those files > seem to work OK. I can't repeat this problem. It could conceivably have something to do with the "kind" resource in the IDE, although I can't imagine what exactly. Could other people try this, and check whether they can see files created with the IDE in the IDE Open dialog? -- 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 tom@othermedia.com Fri Sep 15 11:33:30 2000 From: tom@othermedia.com (tom smith) Date: Fri, 15 Sep 2000 11:33:30 +0100 Subject: [Pythonmac-SIG] MacPython 2.0b1 released In-Reply-To: <20000911223446.1377BD7207@oratrix.oratrix.nl> Message-ID: can I have a http download for python 2 please? tom From rtrocca@libero.it Fri Sep 15 11:35:59 2000 From: rtrocca@libero.it (Riccardo Trocca) Date: Fri, 15 Sep 2000 12:35:59 +0200 Subject: [Pythonmac-SIG] MacPython2.0b1 Message-ID: Something (6 points) I noticed: 1)Numerical: -as already noted headers are missing -some library (shlb) missing: fftpack -some strange path: the path is not setted for FFT.py and company that are in the packages subfolder (or, at least, import FFT doesn't work). 2)I've written a small utility that shows a numeric 2d array in a Framework Win to mimick the view function of NumPy. I can send to Mr. Jansen to see if it is worth including in MacPython. The same code has been modified to show an L or RGB(A) image from Image. (not tested with 2.0b1) In order to do that I use a subclass of PixMapWrapper. 3)Then: I put my vote for an ftp downloadable snapshot of the MacPython 2.0b1 source (as done for MacPython 1.5.2). In my case I still didn't have time to learn CVS, but I'd like to see if I can contribute some mods I did to the Qt lib in order to to use some Qt4 calls (findNextInterestingTIme) and being able to draw a frame in a GWorld. What I did works well in 1.5.2. 4)Is somebody interested in working on the Qt support (I'll never do anything alone :-) )? I think that it would be good to document it a little bit more and to improve some section. I think that Python would be a very interesting tool to to work with Qt. For example I wrote some code to grab a frame from a movie and put it in a Numeric (or Image), and it is very useful for Computer Vision Research. With some work MacPython (and, why not, WinPython) can be an alternative to programs like videoscript or NIH Image or Video Image. I think that Qt for Java is a good inspiration. It would be interesting to work with SpriteAnimation. A good Qt module would also be a replacement or an extension to Image (a qt image importer plus the ability to use a movie or an ImageSequence with the seek function). 5)Why not including the advanced editor patch in MacPython2.0? I've found it on Mr.Strout website (www.strout.net/info/coding/python/mac) and it provides syntax coloring and mote to the IDE. Again I didn't try it on 2.0b1 but with 1.5.2 it does a pretty good job (even if it has some bug in the coloring engine). 6)IDLE. I've found that adding a mac config file in the idle folder it works. well, it starts up even if it has a lot of problems first of all with menu (ugly and messed up and not Mac-like) and occasional crashes (the open module command worked fine just once for me, after that it always crashes). Anyway the editor works (syntax coloring engine and browsing functions, etc.) Probably with some more work it can be good, but, in my case I don't know a bit about TK. Riccardo Trocca rtrocca@libero.it Laboratory of Musical Informatics DIST University of Genoa Italy From jack@oratrix.nl Fri Sep 15 13:43:21 2000 From: jack@oratrix.nl (Jack Jansen) Date: Fri, 15 Sep 2000 14:43:21 +0200 Subject: [Pythonmac-SIG] MacPython 2.0b1 released In-Reply-To: Message by tom smith , Fri, 15 Sep 2000 11:33:30 +0100 , Message-ID: <20000915124326.7B401D7202@oratrix.oratrix.nl> Recently, tom smith said: > can I have a http download for python 2 please? It's also listed on the homepage (http://www.cwi.nl/~jack/macpython.html): replace the ftp://ftp.cwi.nl/pub by http://www.cwi.nl/ftp and off you go. -- 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 jack@oratrix.nl Fri Sep 15 14:27:28 2000 From: jack@oratrix.nl (Jack Jansen) Date: Fri, 15 Sep 2000 15:27:28 +0200 Subject: [Pythonmac-SIG] MacPython2.0b1 In-Reply-To: Message by Riccardo Trocca , Fri, 15 Sep 2000 12:35:59 +0200 , Message-ID: <20000915132733.C5D2AD7202@oratrix.oratrix.nl> Recently, Riccardo Trocca said: > Something (6 points) I noticed: > > 1)Numerical: > -as already noted headers are missing > -some library (shlb) missing: fftpack > -some strange path: the path is not setted for FFT.py and company that are > in the packages subfolder (or, at least, import FFT doesn't work). Hmm, hmm. What I'd really like to do is try and get distutils working on the Mac, then this would sort-of automatically be solved. If I can't get distutils working before the final 2.0 release I'll make sure fftpack is compiled in the release. > 2)I've written a small utility that shows a numeric 2d array in a Framework > Win to mimick the view function of NumPy. > I can send to Mr. Jansen to see if it is worth including in MacPython. > The same code has been modified to show an L or RGB(A) image from Image. > (not tested with 2.0b1) > In order to do that I use a subclass of PixMapWrapper. I wonder what the best place is to put this: the Numerical distribution or the MacPython distribution. But if you think it's MacPython I'll happily accept it and put it in the Contrib directory. If you could send me a stuffit archive with the sources and a readme file that I can just drop in that would be great! > 3)Then: I put my vote for an ftp downloadable snapshot of the MacPython > 2.0b1 source (as done for MacPython 1.5.2). Done, as of yesterday. See the macpython homepage. > In my case I still didn't have time to learn CVS, but I'd like to see if I > can contribute some mods I did to the Qt lib in order to to use some Qt4 > calls (findNextInterestingTIme) and being able to draw a frame in a GWorld. > What I did works well in 1.5.2. Great minds think alike:-) I just added this functionality to the Qt module a couple of months ago. > 4)Is somebody interested in working on the Qt support (I'll never do > anything alone :-) )? I think that it would be good to document it a little > bit more and to improve some section. I think that Python would be a very > interesting tool to to work with Qt. For example I wrote some code to grab a > frame from a movie and put it in a Numeric (or Image), and it is very useful > for Computer Vision Research. With some work MacPython (and, why not, > WinPython) can be an alternative to programs like videoscript or NIH Image > or Video Image. I think that Qt for Java is a good inspiration. It would be > interesting to work with SpriteAnimation. A good Qt module would also be a > replacement or an extension to Image (a qt image importer plus the ability > to use a movie or an ImageSequence with the seek function). What exactly is the functionality you miss in the Qt module? It exports almost everything from the QuickTime library: the only exceptions are routines that were somehow difficult and for which I didn't see all that much use. If there's specific routines you want let me know and I'll try to find the time ading them. Oh yes: I have a videosource.py module that allows you to grab frames from a movie. I hadn't included that in MacPython but I'll see if I can do so. > 5)Why not including the advanced editor patch in MacPython2.0? > I've found it on Mr.Strout website (www.strout.net/info/coding/python/mac) > and it provides syntax coloring and mote to the IDE. Again I didn't try it > on 2.0b1 but with 1.5.2 it does a pretty good job (even if it has some bug > in the coloring engine). I'll leave this decision to Just. Just: what do you think? > 6)IDLE. > I've found that adding a mac config file in the idle folder it works. well, > it starts up even if it has a lot of problems first of all with menu (ugly > and messed up and not Mac-like) and occasional crashes (the open module > command worked fine just once for me, after that it always crashes). > Anyway the editor works (syntax coloring engine and browsing functions, > etc.) > Probably with some more work it can be good, but, in my case I don't know a > bit about TK. If you can give me this config file and tell me where to put it (I've never really looked at Idle) I'l gladly incorporate it. -- 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 fgranger@altern.org Sat Sep 16 18:24:58 2000 From: fgranger@altern.org (Francois Granger) Date: Sat, 16 Sep 2000 19:24:58 +0200 Subject: [Pythonmac-SIG] "Official" mac python Docs Project: requestsfor help/comments In-Reply-To: <39BE841C.42D9AA97@jps.net> References: <39BE841C.42D9AA97@jps.net> Message-ID: At 12:29 -0700 12/09/00, in message Re: [Pythonmac-SIG] "Official" mac python Docs Project, Chris Barker wrote: >The LaTeX stuff can certainly be edited on a Mac, and there is >no reason why the printable version couldn't be made on the Mac as well, For a start, send me some LaTeX source of some small doc wich need editing, i'll edit them and send them back to see if evrything goes well. -- "Computers are like horses; they can sense fear and will act based on that. Or, look at it like this. If you have a premonition of danger, maybe you're right." - Adam Engst From pecora@anvil.nrl.navy.mil Sun Sep 17 21:15:22 2000 From: pecora@anvil.nrl.navy.mil (Louis M. Pecora) Date: Sun, 17 Sep 2000 16:15:22 -0400 Subject: [Pythonmac-SIG] Getting PiddleQD to work. Message-ID: Hi, Has anyone had any experience with the plotting package Piddle? Almost got Piddle to work on my G3 running system 8.6, but have some problems. After putting the QDRotate.ppc.slb in the Mac:Tools:Plugins folder and setting some paths I can get Piddle to run piddletest. Tk seems to work (at least at first glance), but the QuickDraw backend of Piddle only runs in the IDE, so the docs say. However, when I try to run the piddletest in the IDE, nothing happens. Cmd-R or clicking on Run button does nothing. Anyone know more about this plotting package? It really looks nice, but Joe Strout who headed the team that developed it, bowed out. Is Piddle supported anymore? If so, by whom? Thanks for any pointers. -- Cheers, -- Lou Pecora P.S. I am posting this on the Python NG, too. Sorry if you're seeing it twice. Cheers, Lou Pecora From Richard.E.Brown@DARTWARE.COM Mon Sep 18 03:09:20 2000 From: Richard.E.Brown@DARTWARE.COM (Richard E. Brown) Date: 17 Sep 2000 22:09:20 EDT Subject: [Pythonmac-SIG] Embedding MacPython into an application? Message-ID: <12192@blitz1.DARTWARE.COM> Folks: I just realized that the my application might be able to have a = powerful programming language built-into it... Can anyone give me an overview of how Python could be embedded into = a standard Mac (C++, not-quite-carbonized) application? Has anyone = already done this? Many thanks! Rich Brown richard.e.brown@dartware.com Dartware, LLC http://www.dartware.com 25 S. Main St, PO Box 130 Telephone: 603-643-2268 Hanover, NH 03755-0130 USA Fax: 603-643-2289 From rtrocca@libero.it Mon Sep 18 10:27:37 2000 From: rtrocca@libero.it (Riccardo Trocca) Date: Mon, 18 Sep 2000 11:27:37 +0200 Subject: [Pythonmac-SIG] MacPython2.0b1 In-Reply-To: <20000915132733.C5D2AD7202@oratrix.oratrix.nl> References: <20000915132733.C5D2AD7202@oratrix.oratrix.nl> Message-ID: > > > -some library (shlb) missing: fftpack >> -some strange path: the path is not setted for FFT.py and company that are > > in the packages subfolder (or, at least, import FFT doesn't work). Anyway they compile easily, even if I have some problems with realffft2d. But it was just a quick and dirty test. > > 2)I've written a small utility that shows a numeric 2d array in a Framework >> Win to mimick the view function of NumPy. >> I can send to Mr. Jansen to see if it is worth including in MacPython. >> The same code has been modified to show an L or RGB(A) image from Image. >> (not tested with 2.0b1) >> In order to do that I use a subclass of PixMapWrapper. > >I wonder what the best place is to put this: the Numerical >distribution or the MacPython distribution. But if you think it's >MacPython I'll happily accept it and put it in the Contrib >directory. If you could send me a stuffit archive with the sources and >a readme file that I can just drop in that would be great! Hmmm, I'd say MacPython. Just give me the time to put some comment more and then I'll send you everything (but don't laugh too much for the bad quality of my coding) > >> In my case I still didn't have time to learn CVS, but I'd like to see if I >> can contribute some mods I did to the Qt lib in order to to use some Qt4 >> calls (findNextInterestingTIme) and being able to draw a frame in a GWorld. >> What I did works well in 1.5.2. > >Great minds think alike:-) I just added this functionality to the Qt >module a couple of months ago. In fact. looking at the source code of 2.0b1 I could see that you did it and in almost the same way I did it. Thanks! >What exactly is the functionality you miss in the Qt module? It >exports almost everything from the QuickTime library: the only >exceptions are routines that were somehow difficult and for which I >didn't see all that much use. If there's specific routines you want >let me know and I'll try to find the time ading them. To be sincere my line of thought is this: 1-The qt module is there and it has a lot of functionality and, I've all I need by now. Anyway it is a little bit difficult to start working with it if you don't already know Qt and Qt programming. I think that we could put some example more in the Qt folder. I can provide a couple including a class I made that extract frames from a movie. I'd like to see you videosource.py too. One functionality that I still didn't explore is the manipulation of sprites. There is some application to create interactive movies, but it is usually done writing some C code that creates the movie (sprite, sprite events/wired sprites). I think that it would be nice to do it in MacPython and this would make it a very very interesting product . 2-I don't know if you tried Jpython: it is a really interesting thing. I still didn't have time to test it well, but it allows you to use every java class installed on your system. This includes Qt4Java. I started looking at it and I've seen that the API has been revised a bit, ordered in packages and so on. I was thinking that something similar, if realized for CPython, would be very interesting and, probably, portable even to Win32 (don't kill me). > >> 5)Why not including the advanced editor patch in MacPython2.0? >> I've found it on Mr.Strout website (www.strout.net/info/coding/python/mac) >> and it provides syntax coloring and mote to the IDE. Again I didn't try it >> on 2.0b1 but with 1.5.2 it does a pretty good job (even if it has some bug >> in the coloring engine). > >I'll leave this decision to Just. Just: what do you think? Just a quick note: it seems to work well. > >> 6)IDLE. >> I've found that adding a mac config file in the idle folder it works. well, >> it starts up even if it has a lot of problems first of all with menu (ugly >> and messed up and not Mac-like) and occasional crashes (the open module >> command worked fine just once for me, after that it always crashes). >> Anyway the editor works (syntax coloring engine and browsing functions, > > etc.) >> Probably with some more work it can be good, but, in my case I don't know a >> bit about TK. > >If you can give me this config file and tell me where to put it (I've >never really looked at Idle) I'l gladly incorporate it. Idle, on the mac, looks for a config file called config-mac.txt. It stays in the idle folder. I created one with the following content: [EditorWindow] font-name: mpw font-size: 9 (in my case I use the MPW font, but I think that Geneva and others would not create problems). Then I drag Idle.py on the Python Interpreter app. The most interesting things are: syntax coloring tooltips when writing a function name (even if on the Mac you have to click somewhere in order to go on using it) Class browser and so on. One more thing: I noticed that the module PixMapWrapper supplied with 2.0b1 misses one method that the version of PixMapWrapper bundled with Piddle has: PixMapWrapper.grab(). Is there some reason why it cannot be supplied with 2.0? I use that method and a simple cut and paste in the 2.0b1 version seems to work (or at least in the way I use it). -- Riccardo Trocca rtrocca@libero.it Laboratory of Musical Informatics DIST University of Genoa From rtrocca@libero.it Mon Sep 18 08:35:53 2000 From: rtrocca@libero.it (Riccardo Trocca) Date: Mon, 18 Sep 2000 09:35:53 +0200 Subject: [Pythonmac-SIG] Motes about MacPython2 Message-ID: Hmm, ok, I should shut up, I noticed that every feature I needed in Qt and Qdoffs was already there (in fact I rewrote some of the functionality you added in 2.0 for QdOffs in 1.5.2. (thanks for putting the 2.0b1 sources on FTP). However I noticed that the module PixMapWrapper supplied with 2.0b1 misses one method that the version of PixMapWrapper bundled with Piddle has: PixMapWrapper.grab(). Is there some reason why it cannot be supplied with 2.0? I use that method and a simple cut and paste seems to work. Documentation: it if helps I can send some short piece of code I translated from C to Python from the qt samples in Apple site. It can be interesting to add to the Qt examples and docs. I can also write some line of docs about what I discovered/used. I've also tried the Extended Python Editor by Mr Strout and it seems to work with 2.0b1. -- Riccardo Trocca rtrocca@libero.it Laboratory of Musical Informatics DIST University of Genoa From rtrocca3@libero.it Mon Sep 18 10:33:18 2000 From: rtrocca3@libero.it (Riccardo Trocca) Date: Mon, 18 Sep 2000 11:33:18 +0200 Subject: [Pythonmac-SIG] sorry Message-ID: I posted a short message that it was just a draft (Motes (!) about macPython2) Sorry. -- Riccardo Trocca rtrocca@libero.it Laboratory of Musical Informatics DIST University of Genoa From tom@othermedia.com Mon Sep 18 11:41:50 2000 From: tom@othermedia.com (tom smith) Date: Mon, 18 Sep 2000 11:41:50 +0100 Subject: [Pythonmac-SIG] Tkinter solution? In-Reply-To: <20000914205132.4909BD721E@oratrix.oratrix.nl> Message-ID: hi all. After following http://DerSchockwellenreiter.editthispage.com/python/tkinterenglish.html I STILL couldn't get Tkinter to work. I added the pointer to the bib-tk folder to the BOTTOM of the preferences list (using EditPythonPrefs). I don't know if being at the BOTTOM of the list matters, but seems to have done the trick. Yesterday, why didn't I try this sooner? I increased the memory of the interpreter to 20MB and it worked. It will even run from the IDE (with a few bits of fallout) if that too is increased up to 20MB. tom From cbarker@jps.net Mon Sep 18 19:06:40 2000 From: cbarker@jps.net (Chris Barker) Date: Mon, 18 Sep 2000 11:06:40 -0700 Subject: [Pythonmac-SIG] Getting PiddleQD to work. References: Message-ID: <39C659B0.AC5669FC@jps.net> "Louis M. Pecora" wrote: > Has anyone had any experience with the plotting package Piddle? Almost got Piddle to work on my G3 running system 8.6, but have some problems. I have very little experience, but I have got the tests running. NOTE: I'm running 1.5.2c I have no idea if it works with 2.0 > After putting the QDRotate.ppc.slb in the Mac:Tools:Plugins folder and setting some paths I can get Piddle to run piddletest. Tk seems to work (at least at first glance), but the QuickDraw backend of Piddle only runs in the IDE, so the docs say. That appears to be true. I got the "import W" error when I try to use it without the IDE. That is probably fixable, however. >However, when I try to run the piddletest in the IDE, nothing happens. Cmd-R or clicking on Run button does nothing. I tried this, and it turns out to be an IDE/Python issue, and really nothing to do with Piddle. If you look in piddletest, it has the classic "if __name__ == "__main__" line at the end. When run in the IDE, __name__ is not __main__ (the IDE itself is main, and the script you're editing is in it's own namespace. Try going to the interactive window, set the namespace to piddletest (click ont he little arrow on the top right of the interactive window, over the scrollbar). then type mainLoop() at the prompt. It works for me. (except PIL, I don't know why) NOTE to Just: Yet another reason why the IDE could benifit from a "run as main" option. >Anyone know more about this plotting package? It really looks nice, but Joe Strout who headed the team that developed it, bowed out. Is Piddle supported anymore? Piddle is still being supported, but perhaps not the QD backend. > If so, by whom? Thanks for any pointers. Look at the sourceforge site. There is an e-groups mailing list for piddle. There should be a pointer to it on sourceforge. http://piddle.sourceforge.net/ Good luck!!! -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Mon Sep 18 19:14:44 2000 From: cbarker@jps.net (Chris Barker) Date: Mon, 18 Sep 2000 11:14:44 -0700 Subject: [Pythonmac-SIG] MacPython Docs and JPython References: <20000915132733.C5D2AD7202@oratrix.oratrix.nl> Message-ID: <39C65B94.72F7960@jps.net> Riccardo Trocca wrote: > 2-I don't know if you tried Jpython: it is a really interesting thing. > I still didn't have time to test it well, but it allows you to use > every java class installed on your system. This includes Qt4Java. I > started looking at it and I've seen that the API has been revised a > bit, ordered in packages and so on. I was thinking that something > similar, if realized for CPython, would be very interesting and, > probably, portable even to Win32 (don't kill me). Should I include a section on JPython in the MacPython docs? Does someone want to write it? -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Mon Sep 18 19:16:14 2000 From: cbarker@jps.net (Chris Barker) Date: Mon, 18 Sep 2000 11:16:14 -0700 Subject: [Pythonmac-SIG] Motes about MacPython2 References: Message-ID: <39C65BEE.29C52427@jps.net> Riccardo Trocca wrote: > Documentation: > it if helps I can send some short piece of code I translated from C > to Python from the qt samples in Apple site. > It can be interesting to add to the Qt examples and docs. I can also > write some line of docs about what I discovered/used. Would you be willing to at least write up a draft/notes about QT for the docs? I could really use that contribution. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From managan@llnl.gov Mon Sep 18 19:10:50 2000 From: managan@llnl.gov (Rob Managan) Date: Mon, 18 Sep 2000 11:10:50 -0700 Subject: [Pythonmac-SIG] Getting PiddleQD to work. In-Reply-To: <39C659B0.AC5669FC@jps.net> References: <39C659B0.AC5669FC@jps.net> Message-ID: >"Louis M. Pecora" wrote: > >NOTE to Just: Yet another reason why the IDE could benifit from a "run >as main" option. > I am sure Just will answer but I will also point out that the IDE does have this option. There is a right pointing arrow just about the vertical scroll bar. This arrow will drop down a menu, one option of which is a Run As Main option!! There are many things in the IDE that are useful once you find them! -- *-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*- Rob Managan LLNL ph: 925-423-0903 P.O. Box 808, L-095 FAX: 925-422-3389 Livermore, CA 94551-0808 From cbarker@jps.net Mon Sep 18 19:35:57 2000 From: cbarker@jps.net (Chris Barker) Date: Mon, 18 Sep 2000 11:35:57 -0700 Subject: [Pythonmac-SIG] Getting PiddleQD to work. References: <39C659B0.AC5669FC@jps.net> Message-ID: <39C6608D.30C58D02@jps.net> Rob Managan wrote: > >NOTE to Just: Yet another reason why the IDE could benifit from a "run > >as main" option. > > > > I am sure Just will answer but I will also point out that the IDE > does have this option. There is a right pointing arrow just about the > vertical scroll bar. This arrow will drop down a menu, one option of > which is a Run As Main option!! Well, what do you know! how handy. Thanks for the tip. While this solved the problem at hand, what I really want is a "run as if the script was dropped on the interpreter" option, which is considerably more difficult. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Mon Sep 18 20:36:24 2000 From: cbarker@jps.net (Chris Barker) Date: Mon, 18 Sep 2000 12:36:24 -0700 Subject: [Pythonmac-SIG] Getting the file sizes form the OS References: <20000905215101.6E0CDD71FD@oratrix.oratrix.nl> Message-ID: <39C66EB8.94C4B312@jps.net> Hi, I wrote a little utility that writes a list of files and their sizes out to a text file. I used os.xstat to get the size of the file and the resource fork. What I want is the same numbers that the finder shows, and I'm not getting that. I tried adding the sizes of the file and the resource fork together, and go tclose, but not the same. It does seem to work for simple (large) data files with no resource fork. Is there a way to query the finder, or MacOS to get the file size as listed by the finder, other than os.xstat? thanks, -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Mon Sep 18 23:49:15 2000 From: cbarker@jps.net (Chris Barker) Date: Mon, 18 Sep 2000 15:49:15 -0700 Subject: [Pythonmac-SIG] "Official" mac python Docs Project: requests for help/comments References: <20000912104336.21A60D7205@oratrix.oratrix.nl> Message-ID: <39C69BEB.F5F4E901@jps.net> Jack, and everyone else: I havew made a start on editing the docs. The following is part of a list Jack sent out of modules that need documentation. For the moment, I am putting most of them under "Undocuemnted modules", hoping some of you will add some stuff later. For the moment, could someone send me at lest one line about each of the following: > cfmfile - Ditto. > icopen - Very handy module, but I've never used it. Should be > documented. What does it do? it's not in my 1.5.2 distro. Is it new to 2.0? > macerrors - can be documented with a one-liner somewhere. > macfsn - Auto-imported to replace StandardFile calls in macfs with > NavServices calls. one-liner is macfs is probably ok. > nsremote - Should probably be documented. > PixMapWrapper - Should be documented > quietconsole - Should be documented -Thanks -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From eaj@ricochet.net Tue Sep 19 00:27:12 2000 From: eaj@ricochet.net (Eric Jacobs) Date: Mon, 18 Sep 2000 19:27:12 EDT Subject: [Pythonmac-SIG] Getting the file sizes form the OS Message-ID: <200009182324.SAA16536@rgate4.ricochet.net> On Mon, 18 Sep 2000, Chris Barker wrote: > > Is there a way to query the finder, or MacOS to get the file size as > listed by the finder, other than os.xstat? > I think what you are looking for is the "physical size" as returned by PBGetCatInfo. Currently, this call is only wrapped for the file dates in macfsmodule.c (PyMac_GetFileDates) It may be worth it to finish wrapping this call; there's a lot of good stuff in there. Be aware that the Finder's file size in the column listing indicates how much disk space has been lost to the file, not the file's actual length, so it is dependent on the type and size of the file system. From jack@oratrix.nl Tue Sep 19 09:24:20 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 19 Sep 2000 10:24:20 +0200 Subject: [Pythonmac-SIG] "Official" mac python Docs Project: requests for help/comments In-Reply-To: Message by Chris Barker , Mon, 18 Sep 2000 15:49:15 -0700 , <39C69BEB.F5F4E901@jps.net> Message-ID: <20000919082421.509ED303181@snelboot.oratrix.nl> > For the moment, could someone send me at lest > one line about each of the following: > > > cfmfile - Ditto. Cfmfile is a module that understands Code Fragments and the accompanying "cfrg" resources. It can parse them and merge them, and is used by BuildApplication to combine all plugin modules to a single executable. > > icopen - Very handy module, but I've never used it. Should be > > documented. It's documented in the source. The one-liner is that importing icopen will replace the builtin open() with a version that uses Internet Config to set file type and creator for new files. > > macerrors - can be documented with a one-liner somewhere. macerrors cotains constant definitions for many MacOS error codes. > > macfsn - Auto-imported to replace StandardFile calls in macfs with > > NavServices calls. one-liner is macfs is probably ok. macfsn contains wrapper functions that have the same API as the macfs StandardFile calls, but are implemented with Navigation Services. Importing it will replace the methods in macfs with these, if Navigation Services is available on your machine. > > nsremote - Should probably be documented. nsremote is a wrapper around the Netscape OSA modules that allows you to easily send your browser to a given url. > > PixMapWrapper - Should be documented PixMapWrapper wraps a PixMap object with a Python object that allows access to the fields by name. It also has methods to convert to/from PIL images. > > quietconsole - Should be documented quietconsole allows you to keep stdio output in a buffer without displaying it (or without displaying the stdio window altogether, if set with EditPythonPrefs) until you try to read from stdin or disable the buffering, at which point all the saved output is sent to the window. Good for GUI programs that do want to display their output at a crash. -- 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 tmk@microscript.be Tue Sep 19 10:39:23 2000 From: tmk@microscript.be (tmk@microscript.be) Date: Tue, 19 Sep 2000 11:39:23 +0200 Subject: [Pythonmac-SIG] parameterize dot notation Message-ID: <20000919101219.DB1F11D0D0@dinsdale.python.org> Yo, I've got a question for python hackers. This is not really related to = PythonMac but anyway... In UserLand's Frontier, paths to 'objects' are denoted using a syntax = such as the following: root.foo.bar.fubar (1) Now suppose that v1, v2, v3 are variables holding the values 'foo', = 'bar', 'fubar' respectively, the following notation is equivalent to = (1): root.[v1].[v2].[v3] (2) I was wondering if there's a way in Python to achieve the same ie = 'parameterize'(is that a correct word anyway?) the path to an object an = object path. After all, Python seems to support syntax such as root.foo().bar().fubar (meaning that the intermediate steps in the = previous path are not taken 'literally' if you see what I mean). TIA for your help. =3D tmk =3D= From dma@andrew.cmu.edu Tue Sep 19 13:46:15 2000 From: dma@andrew.cmu.edu (David Andersen) Date: Tue, 19 Sep 2000 08:46:15 -0400 Subject: [Pythonmac-SIG] PythonCore + debugger Message-ID: <2985534290.969353175@DAWSON.WV.CC.CMU.EDU> I've got what I hope is a simple question: how do I apply the debugger (Code Warrior 5.3) to PythonCorePPC ? I've got an extension written in C++ compiled into PythonCorePPC - couldn't do it as a shared library as Code Warrior isn't happy with exceptions in that case - this appears to work, but now I need to look at it in the debugger ... From billb@mousa.demon.co.uk Tue Sep 19 11:39:47 2000 From: billb@mousa.demon.co.uk (Bill Bedford) Date: Tue, 19 Sep 2000 11:39:47 +0100 Subject: [Pythonmac-SIG] Findertools Message-ID: <259047931837091022968@mousa.demon.co.uk> One of the interesting things about the finder appleevents is that many will take a list of objects to work on. Using the finder in this way is usually very much quicker than looping over a list in Python. I have therefore modified my findertools with the following code: def copy(src, dstdir): """Copy a file or a list of files to a folder""" finder = _getfinder() if type(src) == type([]): src_fss = [] for s in range(len(src)): src_fss.append(macfs.FSSpec(src[s])) else: src_fss = macfs.FSSpec(src) dst_fss = macfs.FSSpec(dstdir) return finder.duplicate(src_fss, to=dst_fss) def move(src, dstdir): """Move a file or a list of files to a folder""" finder = _getfinder() if type(src) == type([]): src_fss = [] for s in range(len(src)): src_fss.append(macfs.FSSpec(src[s])) else: src_fss = macfs.FSSpec(src) dst_fss = macfs.FSSpec(dstdir) return finder.move(src_fss, to=dst_fss) Jack, is there any chance of this being incorporated into future releases? -- Bill Bedford "Yes," said the skull. "Quit while you're a head, that's what I say." From stephenm@humongous.com Tue Sep 19 19:13:17 2000 From: stephenm@humongous.com (Magladry, Stephen) Date: Tue, 19 Sep 2000 11:13:17 -0700 Subject: [Pythonmac-SIG] PythonCore + debugger Message-ID: <3124AB5C4D11D31187DC005004185D1B4CD3A7@BIGPIG> Refer to the Targeting Mac Os reference from the Metrowerks documentation. There you will find a discussion about Monolithic verses multi-fragment libraries. The key difference is monolithic are stand-alone libraries and must handle their own exceptions. A multi-fragment shared library has a shared library that handles all exceptions for what ever other shared library that is part of your project. In looking at the PythonCorePPC.prj it appears to be using the wrong library. The table 5.2 in Targeting Mac OS states that "MSL ShLib-Runtime.Lib" should be used for a c or c++ Multi-fragment share library. It appears the project uses "MSL App-Runtime.Lib" with should be used for a c or c++ Multi-fragment Application. Or Am I missing something. -----Original Message----- From: David Andersen [mailto:dma@andrew.cmu.edu] Sent: Tuesday, September 19, 2000 5:46 AM To: Python Mac SIG Subject: [Pythonmac-SIG] PythonCore + debugger I've got what I hope is a simple question: how do I apply the debugger (Code Warrior 5.3) to PythonCorePPC ? I've got an extension written in C++ compiled into PythonCorePPC - couldn't do it as a shared library as Code Warrior isn't happy with exceptions in that case - this appears to work, but now I need to look at it in the debugger ... From jquinn@cs.oberlin.edu Tue Sep 19 22:14:24 2000 From: jquinn@cs.oberlin.edu (jquinn) Date: Tue, 19 Sep 2000 14:14:24 -0700 Subject: [Pythonmac-SIG] One question: IDLE on mac? Message-ID: <39C7D71E.8EAB922E@cs.oberlin.edu> What does it take to get IDLE running on the mac, and what would it take to make it part of the distro? Wait, two questions: What does it take to get IDLE running on the mac, what would it take to make it part of the distro, and what would it take to get a pythonMac FAQ that answered this question? Wait... please cc: me personally in any replies, Jameson From jaredu@its.caltech.edu Tue Sep 19 22:47:48 2000 From: jaredu@its.caltech.edu (Jared Updike) Date: Tue, 19 Sep 2000 14:47:48 -0700 (PDT) Subject: [Pythonmac-SIG] PythonCore + debugger In-Reply-To: <2985534290.969353175@DAWSON.WV.CC.CMU.EDU> Message-ID: It requires quite a bit of tweaking the project and stuff, but I have successfully done so. If you want a copy of my code and project and stuff, I have a .sit file with the project, etc. that I got PythonCorePPC to work. This is my Mac directory in the Python1.5.2c1src directory http://131.215.132.199/here/Mac.sit.bin cheers. --Jared Web: http://waffles.caltech.edu Phone: (626)395-3762 Campus Address: 255 S. Hill #7 Address: MSC 935 Caltech Pasadena, CA 91126-0935 On Tue, 19 Sep 2000, David Andersen wrote: > > I've got what I hope is a simple question: how do I apply the debugger > (Code Warrior 5.3) to PythonCorePPC ? > > I've got an extension written in C++ compiled into PythonCorePPC - couldn't > do it as a shared library as Code Warrior isn't happy with exceptions in > that case - this appears to work, but now I need to look at it in the > debugger ... > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://www.python.org/mailman/listinfo/pythonmac-sig > From sdm7g@virginia.edu Tue Sep 19 23:00:28 2000 From: sdm7g@virginia.edu (Steven D. Majewski) Date: Tue, 19 Sep 2000 18:00:28 -0400 (EDT) Subject: [Pythonmac-SIG] parameterize dot notation In-Reply-To: <20000919101219.DB1F11D0D0@dinsdale.python.org> Message-ID: On Tue, 19 Sep 2000, Tattoo Mabonzo K. wrote: > > In UserLand's Frontier, paths to 'objects' are denoted using a > syntax such as the following: > > root.foo.bar.fubar (1) > > Now suppose that v1, v2, v3 are variables holding the values > 'foo', 'bar', 'fubar' respectively, the following notation is > equivalent to (1): > > root.[v1].[v2].[v3] (2) > > I was wondering if there's a way in Python to achieve the same > ie 'parameterize'(is that a correct word anyway?) the path to an object > an object path. After all, Python seems to support syntax such as > > root.foo().bar().fubar > (meaning that the intermediate steps in the previous path are not taken > 'literally' if you see what I mean). > There are several ways to dynamically access object attributes in Python, but you don't get anything like the Frontier syntax without some extra work. I. Classes and instances in Python have a __dict__ attribute which is the objects attribute dictionary, so you could say something like: root.__dict__[v1].__dict__[v2].__dict__[v3] II. There is a getattr function, which will: [1] work for things that don't have __dict__'s but do have attributes, like functions for example. [2] for objects and classes, it will search back thru the inheritance tree, if necessary, for an ancestor that defines the attribute. ( For example, using the definitions below: root.__dict__['__getitem__'] would fail, while getattr( root, '__getitem__' ) would return: ) But the syntax would be nested rather than chained: getattr( getattr( getattr(root,v1), v2 ), v3 ) III. If you define a __getitem__ method for all of the objects, then you can use the dictionary syntax without the explicit __dict__ references -- something like: root[v1][v2][v3] In the example below, the three print statements at the bottom all print the same object. class Fubar: def __getitem__( self, what ): return getattr( self, what ) class Bar(Fubar): def __init__( self ): self.fubar = Fubar() class Foo(Bar): def __init__(self): self.bar = Bar() class Root(Foo): def __init__(self): self.foo = Foo() v1,v2,v3 = 'foo','bar','fubar' root = Root() print getattr( getattr( getattr(root,v1), v2 ), v3 ) print root.__dict__[v1].__dict__[v2].__dict__[v3] print root[v1][v2][v3] ---| Steven D. Majewski (804-982-0831) |--- ---| Department of Molecular Physiology and Biological Physics |--- ---| University of Virginia Health Sciences Center |--- ---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- "All operating systems want to be unix, All programming languages want to be lisp." From jack@oratrix.nl Wed Sep 20 09:56:43 2000 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 20 Sep 2000 10:56:43 +0200 Subject: [Pythonmac-SIG] PythonCore + debugger In-Reply-To: Message by "Magladry, Stephen" , Tue, 19 Sep 2000 11:13:17 -0700 , <3124AB5C4D11D31187DC005004185D1B4CD3A7@BIGPIG> Message-ID: <20000920085644.34B30303181@snelboot.oratrix.nl> The main problem with debugging PythonCorePPC is that by the time it is packed up in PythonCore MetroNub won't recognize it anymore. What I usually do is one of the following: - Debug in a static Python. The PythonStandSmall and PythonStandalone projects are fine for this. - Temporarily change the PythonCorePPC.prj project to make it generate something called PythonCore directly (in stead of generating PythonCorePPC which is then used by PythonCore.prj), and generate it in the correct place (Python home folder). If you do this MetroNub will be happy again when you press "debug". > Refer to the Targeting Mac Os reference from the Metrowerks documentation. > There you will find a discussion about Monolithic verses multi-fragment > libraries. The key difference is monolithic are stand-alone libraries and > must handle their own exceptions. A multi-fragment shared library has a > shared library that handles all exceptions for what ever other shared > library that is part of your project. The key point in handling exceptions correctly is that you should set your correct __initialize and __terminate entries. And, of course, you should use the C++ runtime libraries everywhere. You may also have to make sure that the "enable exceptions" compiletime option is enabled everywhere, but it could be that that doesn't matter. > In looking at the PythonCorePPC.prj it appears to be using the wrong > library. The table 5.2 in Targeting Mac OS states that > "MSL ShLib-Runtime.Lib" should be used for a c or c++ Multi-fragment share > library. It appears the project uses "MSL App-Runtime.Lib" with should be > used for a c or c++ Multi-fragment Application. Or Am I missing something. There was a good reason for this, and at the time I did it I compared the two runtime libraries (MW gives you source and projects to everything) and it appeared that the library PythonCore uses is a superset of the one MW suggests. -- 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 TattooMabonzoK. Wed Sep 20 10:53:43 2000 From: TattooMabonzoK. (TattooMabonzoK.) Date: Wed, 20 Sep 2000 11:53:43 +0200 Subject: [Pythonmac-SIG] parameterize dot notation Message-ID: <20000920095346.DA1A71CCF8@dinsdale.python.org> --Apple-Mail-794195924-1 content-transfer-encoding: quoted-printable content-type: text/plain; charset=us-ascii Hello Steven, Thanks a lot for your quite comprehensive and didactic answer. Also many = thanks to those who emailed me privately (essentially suggesting to use = 'eval') The third form root[foo][bar][fubar] is IMHO the most elegant (ie most = pythonic) although still slightly not as elegant as root.foo.bar.fubar = which clearly indicates attribute access vs. mapping element access = (although with the current Python implementation that's quite similar). = But it will serve my purpose perfectly. For some context here's how I want to use it.=20 In a Web Application I'm currently developing I'm using a Template class = to implement templates (HTML, email or whatever kind of text templates).=20= Templates can have attributes which are Templates themselves, hence my = question.=20 Template instances are basically in-memory version of a files on disk = with the added bonus that the accessor method __getattr__ takes care of = refreshing the in-memory version of file if the file on disk has changed = since last stored in memory. This provide a simple form of automatic = update and caching at the cost of having an explicit accessor method. A = trade-in between that an re-reading the files from disk everytime, or on = request but then the templates wouldn't be automatically updated.=20 Since I'm lazy :-) I'd rather have the computer do the work and handle = the automatic update thing whenever a template on disk is changed (I may = change this design if checking the file moddate for each request is too = much of a performance hit, but it doesn't seem to be). Again thanks for your input. I'm going to go the __getitem__ route. =3D tmk =3D PS: If I were more knowledgeable about Python I'd probably file a PEP = for the 'parameterize dot notation' :-). Or would that be a bad idea? On Wednesday, September 20, 2000, at 12:00 AM, Steven D. Majewski wrote: > =20 > On Tue, 19 Sep 2000, Tattoo Mabonzo K. wrote:=20 > =20 > > =20 > > In UserLand's Frontier, paths to 'objects' are denoted using a =20 > > syntax such as the following:=20 > > =20 > > root.foo.bar.fubar (1)=20 > > =20 > > Now suppose that v1, v2, v3 are variables holding the values =20 > > 'foo', 'bar', 'fubar' respectively, the following notation is =20 > > equivalent to (1): > =20 > > root.[v1].[v2].[v3] (2)=20 > > =20 > > I was wondering if there's a way in Python to achieve the same=20 > > ie 'parameterize'(is that a correct word anyway?) the path to an = object =20 > > an object path. After all, Python seems to support syntax such as > =20= > > root.foo().bar().fubar =20 > > (meaning that the intermediate steps in the previous path are not = taken =20 > > 'literally' if you see what I mean). > =20 > =20 > =20 > There are several ways to dynamically access object attributes in = Python,=20 > but you don't get anything like the Frontier syntax without some extra = =20 > work. =20 > =20 > =20 > I. Classes and instances in Python have a __dict__ attribute which is = the =20 > objects attribute dictionary, so you could say something like:=20 > =20 > root.__dict__[v1].__dict__[v2].__dict__[v3]=20 > =20 > =20 > II. There is a getattr function, which will:=20 > [1] work for things that don't have __dict__'s but do have =20 > attributes, like functions for example. =20 > [2] for objects and classes, it will search back thru the=20 > inheritance tree, if necessary, for an ancestor that defines=20= > the attribute. ( For example, using the definitions below: =20 > root.__dict__['__getitem__'] would fail, while =20 > getattr( root, '__getitem__' ) would return:=20 > ) =20 > =20 > But the syntax would be nested rather than chained:=20 > getattr( getattr( getattr(root,v1), v2 ), v3 )=20 > =20 > =20 > III. If you define a __getitem__ method for all of the objects, =20 > then you can use the dictionary syntax without the explicit=20 > __dict__ references -- something like: =20 > =20 > root[v1][v2][v3]=20 > =20 > =20 > =20 > In the example below, the three print statements at the bottom=20 > all print the same object. =20 > =20 > =20 > class Fubar:=20 > def __getitem__( self, what ):=20 > return getattr( self, what )=20 > =20 > class Bar(Fubar):=20 > def __init__( self ):=20 > self.fubar =3D Fubar()=20 > =20 > class Foo(Bar):=20 > def __init__(self):=20 > self.bar =3D Bar()=20 > =20 > class Root(Foo):=20 > def __init__(self):=20 > self.foo =3D Foo()=20 > =20 > v1,v2,v3 =3D 'foo','bar','fubar'=20 > =20 > root =3D Root()=20 > =20 > print getattr( getattr( getattr(root,v1), v2 ), v3 )=20 > print root.__dict__[v1].__dict__[v2].__dict__[v3]=20 > print root[v1][v2][v3]=20 > =20 > =20 > ---| Steven D. Majewski (804-982-0831) |---=20= > ---| Department of Molecular Physiology and Biological Physics |---=20= > ---| University of Virginia Health Sciences Center |---=20= > ---| P.O. Box 10011 Charlottesville, VA 22906-0011 |---=20= > "All operating systems want to be unix, =20 > All programming languages want to be lisp." =20 > =20 > =20 > =20 --Apple-Mail-794195924-1 content-transfer-encoding: quoted-printable content-type: text/enriched; charset=us-ascii <= flushleft>Monaco28L= ;56L;84L;112L;140L;168L;196L;224L;252L;280L;308L;336L;Hello = Steven, Thanks a lot for your quite comprehensive and didactic answer. Also many = thanks to those who emailed me privately (essentially suggesting to use = 'eval') The third form root[foo][bar][fubar] is IMHO the most elegant (ie most = pythonic) although still slightly not as elegant as root.foo.bar.fubar = which clearly indicates attribute access vs. mapping element access = (although with the current Python implementation that's quite similar). = But it will serve my purpose perfectly. For some context here's how I want to use it.=20 In a Web Application I'm currently developing I'm using a Template class = to implement templates (HTML, email or whatever kind of text templates).=20= Templates can have attributes which are Templates themselves, hence my = question.=20 Template instances are basically in-memory version of a files on disk = with the added bonus that the accessor method __getattr__ takes care of = refreshing the in-memory version of file if the file on disk has changed = since last stored in memory. This provide a simple form of automatic = update and caching at the cost of having an explicit accessor method. A = trade-in between that an re-reading the files from disk everytime, or on = request but then the templates wouldn't be automatically updated.=20 Since I'm lazy :-) I'd rather have the computer do the work and handle = the automatic update thing whenever a template on disk is changed (I may = change this design if checking the file moddate for each request is too = much of a performance hit, but it doesn't seem to be). Again thanks for your input. I'm going to go the __getitem__ route. =3D tmk =3D PS: If I were more knowledgeable about Python I'd probably file a PEP = for the 'parameterize dot notation' :-). Or would that be a bad idea? On Wednesday, September 20, 2000, at 12:00 AM, Steven D. Majewski wrote: 0000,0000,DEDE> 0000,0000,DEDE> On Tue, 19 Sep 2000, Tattoo = Mabonzo K. wrote: 0000,0000,DEDE> 0000,6363,1212> > 0000,6363,1212> > In UserLand's Frontier, paths to = 'objects' are denoted using a 0000,6363,1212> > syntax such as the following: = 0000,6363,1212> > 0000,6363,1212> > root.foo.bar.fubar (1) 0000,6363,1212> > 0000,6363,1212> > Now suppose that v1, v2, v3 are = variables holding the values 0000,6363,1212> > 'foo', 'bar', 'fubar' = respectively, the following notation is 0000,6363,1212> > equivalent to (1): > 0000,6363,1212> > root.[v1].[v2].[v3] (2) 0000,6363,1212> > 0000,6363,1212> > I was wondering if there's a way = in Python to achieve the same 0000,6363,1212> > ie 'parameterize'(is that a = correct word anyway?) the path to an object 0000,6363,1212> > an object path. After all, = Python seems to support syntax such as > 0000,6363,1212> > root.foo().bar().fubar 0000,6363,1212> > (meaning that the intermediate = steps in the previous path are not taken 0000,6363,1212> > 'literally' if you see what I = mean). > 0000,0000,DEDE> 0000,0000,DEDE> 0000,0000,DEDE> There are several ways to = dynamically access object attributes in Python, 0000,0000,DEDE> but you don't get anything like = the Frontier syntax without some extra 0000,0000,DEDE> work. 0000,0000,DEDE> 0000,0000,DEDE> 0000,0000,DEDE> I. Classes and instances in Python = have a __dict__ attribute which is the 0000,0000,DEDE> objects attribute dictionary, = so you could say something like: 0000,0000,DEDE> 0000,0000,DEDE> = root.__dict__[v1].__dict__[v2].__dict__[v3] 0000,0000,DEDE> 0000,0000,DEDE> 0000,0000,DEDE> II. There is a getattr function, = which will: 0000,0000,DEDE> [1] work for things that don't = have __dict__'s but do have 0000,0000,DEDE> attributes, like functions for = example. 0000,0000,DEDE> [2] for objects and classes, it = will search back thru the 0000,0000,DEDE> inheritance tree, if = necessary, for an ancestor that defines 0000,0000,DEDE> the attribute. ( For example, = using the definitions below: 0000,0000,DEDE> root.__dict__['__getitem__'] = would fail, while 0000,0000,DEDE> getattr( root, '__getitem__' ) = would return: 0000,0000,DEDE> < ) 0000,0000,DEDE> 0000,0000,DEDE> But the syntax would be nested = rather than chained: 0000,0000,DEDE> getattr( getattr( = getattr(root,v1), v2 ), v3 ) 0000,0000,DEDE> 0000,0000,DEDE> 0000,0000,DEDE> III. If you define a __getitem__ = method for all of the objects, 0000,0000,DEDE> then you can use the = dictionary syntax without the explicit 0000,0000,DEDE> __dict__ references -- = something like: 0000,0000,DEDE> 0000,0000,DEDE> root[v1][v2][v3] = 0000,0000,DEDE> 0000,0000,DEDE> 0000,0000,DEDE> 0000,0000,DEDE> In the example below, the three = print statements at the bottom 0000,0000,DEDE> all print the same object. = 0000,0000,DEDE> 0000,0000,DEDE> 0000,0000,DEDE> class Fubar: 0000,0000,DEDE> def __getitem__( self, = what ): 0000,0000,DEDE> return getattr( = self, what ) 0000,0000,DEDE> 0000,0000,DEDE> class Bar(Fubar): 0000,0000,DEDE> def __init__( self ): = 0000,0000,DEDE> self.fubar =3D = Fubar() 0000,0000,DEDE> 0000,0000,DEDE> class Foo(Bar): 0000,0000,DEDE> def __init__(self): = 0000,0000,DEDE> self.bar =3D Bar() = 0000,0000,DEDE> 0000,0000,DEDE> class Root(Foo): 0000,0000,DEDE> def __init__(self): = 0000,0000,DEDE> self.foo =3D Foo() = 0000,0000,DEDE> 0000,0000,DEDE> v1,v2,v3 =3D 'foo','bar','fubar' = 0000,0000,DEDE> 0000,0000,DEDE> root =3D Root() 0000,0000,DEDE> 0000,0000,DEDE> print getattr( getattr( = getattr(root,v1), v2 ), v3 ) 0000,0000,DEDE> print = root.__dict__[v1].__dict__[v2].__dict__[v3] 0000,0000,DEDE> print root[v1][v2][v3] 0000,0000,DEDE> 0000,0000,DEDE> 0000,0000,DEDE> ---| Steven D. Majewski = (804-982-0831) < |--- 0000,0000,DEDE> ---| Department of Molecular = Physiology and Biological Physics |--- 0000,0000,DEDE> ---| University of Virginia = Health Sciences Center |--- 0000,0000,DEDE> ---| P.O. Box 10011 = Charlottesville, VA 22906-0011 |--- 0000,0000,DEDE> "All operating systems = want to be unix, 0000,0000,DEDE> All programming = languages want to be lisp." 0000,0000,DEDE> 0000,0000,DEDE> 0000,0000,DEDE> = --Apple-Mail-794195924-1-- From TattooMabonzoK. Wed Sep 20 10:54:02 2000 From: TattooMabonzoK. (TattooMabonzoK.) Date: Wed, 20 Sep 2000 11:54:02 +0200 Subject: [Pythonmac-SIG] parameterize dot notation Message-ID: <20000920095406.70FF91CCF8@dinsdale.python.org> Hi Chris, On Tuesday, September 19, 2000, at 09:44 PM, Chris Barker wrote: > "Tattoo Mabonzo K." wrote:=20 > > In UserLand's Frontier, paths to 'objects' are denoted using a = syntax such as the=20 > following:=20 > > =20 > > root.foo.bar.fubar (1)=20 > > =20 > > Now suppose that v1, v2, v3 are variables holding the values 'foo', = 'bar', 'fubar'=20 > respectively, the following notation is equivalent to (1):=20 > > =20 > > root.[v1].[v2].[v3] (2)=20 > > =20 > > I was wondering if there's a way in Python to achieve the same ie = 'parameterize'(is that a=20 > correct word anyway?)=20 > =20 > I don't think so, but you can achieve the same thing with an eval=20 > statement:=20 > =20 > eval("root."+v1+"."+v2+"."v3)=20 I figured as much but that's oh sooooo ugly :-) hence pythonic at all... Besides it's not really practical because I'll use that kind of code all = over the place > =20 > > After all, Python seems to support syntax such as=20 > > =20 > > root.foo().bar().fubar (meaning that the intermediate steps in the = previous path are=20 > not taken 'literally' if you see what I mean).=20 > =20 > no, I don't. In that case, each step is taken literally. I'm pretty = sure=20 > the only way that call would work is if: =20 > =20 > root has a member, "foo" which is a function that when called returns = an=20 > object that has a member, "fubar". the value of the member "fubar" is=20= > returned.=20 What I meant to say is that each step in the path is actually = 'evaluated' meaning that a we're not too far from each step being an = 'expression'. Thanks for you input! =3D tmk =3D > =20 > =20 > -Chris=20 > =20 > -- =20 > Christopher Barker,=20 > Ph.D. =20 > cbarker@jps.net --- --- ---=20= > http://www.jps.net/cbarker -----@@ -----@@ = -----@@=20 > ------@@@ ------@@@ = ------@@@=20 > Water Resources Engineering ------ @ ------ @ ------ = @=20 > Coastal and Fluvial Hydrodynamics ------- --------- -------- = =20 > = ------------------------------------------------------------------------=20= > = ------------------------------------------------------------------------=20= > =20 > =20 From TattooMabonzoK. Thu Sep 21 08:29:24 2000 From: TattooMabonzoK. (TattooMabonzoK.) Date: Thu, 21 Sep 2000 09:29:24 +0200 Subject: [Pythonmac-SIG] weird syntax error (bug?): self.from Message-ID: <20000921072937.648981CFF9@dinsdale.python.org> Yo, Maybe this is obvious but I can't figure it: Consider the following code snippet class foo:=0D def __init__(self):=0D self.from =3D 'fubar' It generates a syntax error somewhere within self.from. I've tested this = under both 2.0b1 and 1.5.2c1. Apparently the syntax error comes from = just using 'self.from' because I've get the error whenever I use it = regardless of the context and changing 'from' to most anything else gets = rid of the error message. Is that a bug?=20 TIA =3D tmk =3D= From jack@oratrix.nl Thu Sep 21 09:26:51 2000 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 21 Sep 2000 10:26:51 +0200 Subject: [Pythonmac-SIG] weird syntax error (bug?): self.from In-Reply-To: Message by "Tattoo Mabonzo K." , Thu, 21 Sep 2000 09:29:24 +0200 , <20000921072937.648981CFF9@dinsdale.python.org> Message-ID: <20000921082651.D2913303181@snelboot.oratrix.nl> > class foo: > def __init__(self): > self.from =3D 'fubar' > = > It generates a syntax error somewhere within self.from. Yep, from is a reserved word ("from foo import *") so you can't use it as= an = identifier. -- 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 TattooMabonzoK. Thu Sep 21 10:11:12 2000 From: TattooMabonzoK. (TattooMabonzoK.) Date: Thu, 21 Sep 2000 11:11:12 +0200 Subject: [Pythonmac-SIG] weird syntax error (bug?): self.from Message-ID: <20000921091126.4B0671CDF8@dinsdale.python.org> Thanks Jack! It was indeed obvious %-). =3D tmk =3D On Thursday, September 21, 2000, at 10:26 AM, Jack Jansen wrote: > =20 > > class foo:=20 > > def __init__(self):=20 > > self.from =3D 'fubar'=20 > > =20 > > It generates a syntax error somewhere within self.from.=20 > =20 > Yep, from is a reserved word ("from foo import *") so you can't use it = as an =20 > identifier.=20 > --=20 > Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal = ++++=20 > Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your = sig ++++=20 > www.oratrix.nl/~jack | see = http://www.xs4all.nl/~tank/spg-l/sigaction.htm =20 > =20 > =20 > =20 > _______________________________________________=20 > Pythonmac-SIG maillist - Pythonmac-SIG@python.org=20 > http://www.python.org/mailman/listinfo/pythonmac-sig=20 > =20 > =20 From Ben Coburn Thu Sep 21 10:12:21 2000 From: Ben Coburn (Ben Coburn) Date: Thu, 21 Sep 2000 05:12:21 -0400 (EDT) Subject: [Pythonmac-SIG] weird syntax error (bug?): self.from In-Reply-To: <20000921082651.D2913303181@snelboot.oratrix.nl> Message-ID: On Thu, 21 Sep 2000, Jack Jansen wrote: > > > class foo: > > def __init__(self): > > self.from = 'fubar' > > > > It generates a syntax error somewhere within self.from. > > Yep, from is a reserved word ("from foo import *") so you can't use it as an > identifier. > Hummm. What I have been wondering is that with Python designed to be easy to code/read... why doesn't it us the Java syntax "import foo.*". This would be much more consistent with "import foo" than "from foo import *". I guess that it is this way to discurage people from using "from foo import *". In that case it is a subtler hint tword good programming style, than Java's simply outlawing pointers for example. Regards, Ben Coburn ----------------------------------------------------------------------- Ben Coburn "Black holes are where God divided by zero." -Anon. btcoburn@oberlin.edu Biology (CS & Chem) http://www.oberlin.edu/~bcoburn/ Oberlin College ----------------------------------------------------------------------- From rtrocca3@libero.it Wed Sep 20 22:59:54 2000 From: rtrocca3@libero.it (Riccardo Trocca) Date: Wed, 20 Sep 2000 23:59:54 +0200 Subject: [Pythonmac-SIG] QT Docs Message-ID: At 12:01 -0400 19/9/2000, pythonmac-sig-request@python.org wrote: > > Documentation: >> it if helps I can send some short piece of code I translated from C >> to Python from the qt samples in Apple site. >> It can be interesting to add to the Qt examples and docs. I can also >> write some line of docs about what I discovered/used. > > >Would you be willing to at least write up a draft/notes about QT for the >docs? I could really use that contribution. I'm a little busy with exams and research, but I'll try to do something. -- Riccardo Trocca rtrocca@libero.it Laboratory of Musical Informatics DIST University of Genoa From jack@oratrix.nl Thu Sep 21 11:14:31 2000 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 21 Sep 2000 12:14:31 +0200 Subject: [Pythonmac-SIG] weird syntax error (bug?): self.from In-Reply-To: Message by Ben Coburn , Thu, 21 Sep 2000 05:12:21 -0400 (EDT) , Message-ID: <20000921101433.8F917303181@snelboot.oratrix.nl> > Hummm. What I have been wondering is that with Python designed to be > easy to code/read... why doesn't it us the Java syntax "import foo.*". > This would be much more consistent with "import foo" than "from foo > import *". I guess that it is this way to discurage people from using > "from foo import *". In that case it is a subtler hint tword good > programming style, than Java's simply outlawing pointers for example. Note that "import foo.*" would have to mean something quite like "import foo", not like "from foo import *". If you say "from foo import bar" Python takes bar from the foo namespace and inserts it into the current namespace, under name bar. If you say "import foo.bar" bar is inserted into the foo namespace. Things are pretty complicated due to packages and such, but this is the basic idea. -- 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 TattooMabonzoK. Thu Sep 21 12:49:16 2000 From: TattooMabonzoK. (TattooMabonzoK.) Date: Thu, 21 Sep 2000 13:49:16 +0200 Subject: [Pythonmac-SIG] W applications Message-ID: <20000921114920.C77C11CE74@dinsdale.python.org> Yo, Is it correct that the fact that W relies on globals such as = _application and _signature makes it (essentially) impossible to have = several W-based application running at the same time? TIA for any input! =3D tmk =3D= From TattooMabonzoK. Thu Sep 21 14:04:15 2000 From: TattooMabonzoK. (TattooMabonzoK.) Date: Thu, 21 Sep 2000 15:04:15 +0200 Subject: [Pythonmac-SIG] Reload Module from File (quick hack) Message-ID: <20000921130420.A38CF1CD3A@dinsdale.python.org> Yo, I hope it's not bad netiquette to post unsolicited short code snippet to = list... Here's a quick hack that's prove quite useful for me. It re-parses and re-initializes a loaded module from its associated = source file by using the builtin 'reload' fuction. Quoting the doc: = 'This is useful if you have edited the module source file using an = external editor and want to try out the new version without leaving the = Python interpreter' This hack is designed to be used from PythonIDE. It refreshes the Module = associated with the file being edited in the front window. I'd suggest copying into a file named something like 'Reload Module =46rom= File' and putting that file in your PythonIDE 'Scripts' folder. import os=0Dimport sys=0Dimport W=0Dimport Win=0D=0Dapp =3D = W.getapplication()=0Dwid =3D Win.FrontWindow()=0Dif wid and = app._windows.has_key(wid):=0D f =3D app._windows[wid].path=0D dirname = =3D os.path.dirname(f)=0D module =3D os.path.basename(f)[:-3]=0D = exec 'import ' + module =0D module =3D eval(module)=0D = sys.path.insert(0, dirname)=0D reload(module)=0D del sys.path[0]=0D= print "Reloaded module '%s' from '%s'." % (module.__name__, f)=0D= Enjoy, =3D tmk =3D PS: This hack accesses some private structure from the IDE. But until we = have a clean API to the IDE it will make do :-)...= From jack@oratrix.nl Thu Sep 21 23:05:20 2000 From: jack@oratrix.nl (Jack Jansen) Date: Fri, 22 Sep 2000 00:05:20 +0200 Subject: [Pythonmac-SIG] Stdio window closing Message-ID: <20000921220525.0902DD7205@oratrix.oratrix.nl> Folks, if you run a script that produces output but exits normally and you want to see the output you currently have to manually set the "keep stdio window open on normal termination" option. I'm tempted to do something that I've wanted to do a long time: replace the two "keep open" options by something more coherent, a three way choice - Always keep the window open - Keep the window open on unseen output - Never keep the window open Would people be inconvenienced with this? Should I add a 4th option "Keep the window open on error exit"? -- 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/ ++++ From dgoodger@bigfoot.com Fri Sep 22 04:44:37 2000 From: dgoodger@bigfoot.com (David Goodger) Date: Thu, 21 Sep 2000 23:44:37 -0400 Subject: [Pythonmac-SIG] error on 'import NumTut' with 2.0b1 & Numeric Message-ID: I'm trying out Numeric and its tutorial (NumTut), which I've put on Python's path. When I try running a script containing: from NumTut import * I get a TypeError exception in pickle.py: Traceback (most recent call last): File "Cerebrum:Projects:Python-Local:Testing:numtuttest.py", line 5, in ? from NumTut import * File "Cerebrum:DevTools:Python 2.0b1:Extensions:Numerical:Lib:NumTut:__init__.py", line 14, in ? greece = pickle.load(open(os.path.join(_dir, 'greece.pik'), 'rb')) / 256.0 File "Cerebrum:DevTools:Python 2.0b1:Lib:pickle.py", line 856, in load return Unpickler(file).load() File "Cerebrum:DevTools:Python 2.0b1:Lib:pickle.py", line 516, in load dispatch[key](self) File "Cerebrum:DevTools:Python 2.0b1:Lib:pickle.py", line 689, in load_global klass = self.find_class(module, name) File "Cerebrum:DevTools:Python 2.0b1:Lib:pickle.py", line 695, in find_class __import__(module) TypeError: __import__, argument 1: expected string without null bytes, string found Upon inspection, I found that 'module' contained a long string starting with 'Numeric\015' and also containing \000 null bytes. Obviously not a module name. I first tried running it from the PythonInterpreter interactively, and from Python IDE. After the error, I couldn't copy text to the clipboard, and neither File->Quit nor cmd-Q would allow me to exit. Control-D let me exit the interpreter, but I had to do a force quit (opt-cmd-esc) to exit from the IDE. And then I got bombs in other apps (don't know if related), and had to reboot. Later I remembered that Tkinter (used by NumTut) and interactive mode don't work well together, so I dragged the script onto the PythonInterpreter icon. But I got the same error, and the same unresponsive interpreter (redirected sys.stdout & sys.stderr to capture the traceback above). I'm running Python 2.0b1 with 36 MB allocated, under MacOS 8.6. Any ideas? Known problem? Can anybody else reproduce this? Thanks in advance. -- David Goodger dgoodger@bigfoot.com Open-source projects: - The Go Tools Project: http://gotools.sourceforge.net (more to come!) From TattooMabonzoK. Fri Sep 22 08:22:35 2000 From: TattooMabonzoK. (TattooMabonzoK.) Date: Fri, 22 Sep 2000 09:22:35 +0200 Subject: [Pythonmac-SIG] MacPython 2.0b1 on Mac OS X PB (Classic) Message-ID: <20000922072244.AFC461D257@dinsdale.python.org> Yo, I've been living into Mac OS X PB for one week or so working heavily = with PythonMac 2.0b1. Everything essentially seems to be working = beautifully. I've noticed a couple of more or less minor issues: 1. I keep seing the following message in the output window: --- cut AEProcessAppleEvent error:=0DTraceback (most recent call last):=0D File = "apps:Hacking:Python 2.0b1:Mac:Lib:FrameWork.py", line 385, in = do_kHighLevelEvent=0D AEProcessAppleEvent(event)=0DMac OS Error: = (-1708, 'the AppleEvent was not handled by any handler')=0D --- cut 2. Locked files are opened without PythonMac displaying the usual = warning. This one is quite possibly a bug in the OS though since most = programs exibit the same behavior. I can't wait for a carbonized version of PythonMac though :-) =3D tmk =3D From ross@itsthateasy.net Sun Sep 24 03:37:02 2000 From: ross@itsthateasy.net (Ross Karchner) Date: Sat, 23 Sep 2000 22:37:02 -0400 Subject: [Pythonmac-SIG] Build Python source on OS X? Message-ID: <20000924023703.5D44E1CD22@dinsdale.python.org> On repeated attempts to build python 1.6 from source (on OS X Public = Beta and Developer tools), I get: (quoting the last few lines of the compile and the ensuing error) cc -g -O2 -OPT:Olimit=3D0 -I./../Include -I.. -DHAVE_CONFIG_H -c -o = unicodectype.o unicodectype.c cc: Internal compiler error: program cpp-precomp got fatal signal 11 make[1]: *** [unicodectype.o] Error 1 make: *** [Objects] Error 2 Is there a known problem with Python's Unicode support and Mac OS X? -Ross= From jack@oratrix.nl Sun Sep 24 22:58:43 2000 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 24 Sep 2000 23:58:43 +0200 Subject: [Pythonmac-SIG] AppleScript guru needed Message-ID: <20000924215848.8BF73D7202@oratrix.oratrix.nl> Hi folks, I just ran into a problem with MacPython OSA support. Two problems, actually: 1. The CodeWarrior suite declares both a property "project document" and a class "project document". As you wil understand this does not work well, as these both end up in the same namespace, and both with the same name "project_document". Is it legal OSA to have properties and classes with the same name? If it is: can anyone think of a workaround for MacPython? 2. Aepack does not handle passing classes as arguments. If anyone feels like fixing this: please be my guest. The symptom is that if you do "xxx.make(new=classname)" it should pass aetypes.Type(classname.wantd). Hmm, maybe if this is fixed the previous problem isn't a problem anymore.... Oh sigh, my brain always turns inside out when I try to reason about OSA:-( Any help is appreceated, -- 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/ ++++ From jack@oratrix.nl Mon Sep 25 11:11:23 2000 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 25 Sep 2000 12:11:23 +0200 Subject: [Pythonmac-SIG] New 2.0b1+ MacPython distribution Message-ID: <20000925101128.BCECCD721A@oratrix.oratrix.nl> Folks, as I'm away for holidays from this afternoon I've created the mandatory distribution. It is untested (I didn't even try installing it myself)and I've created it mainly so Corran can continue his work on Distutils, but if anyone else wants to give it a go the're welcome to try it. It's in the ftp://ftp.cwi.nl/pub/python/mac folder and it has "2.0b1plus" in the name. Highlights are EasyDialogs.GetArgv(), which is a nice way to get unix-style sys.argv arguments on the mac; mkcwproject, a module to create CodeWarrior projects from scratch; the new "keep console open" options and fixed gdbm and Numeric. If you install this be aware that the version number is still 2.0b1 but the preference file format has changed, so you will probably have to remove your old preferences file from the system folder before installing. -- 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/ ++++ From rtrocca3@libero.it Mon Sep 25 11:25:33 2000 From: rtrocca3@libero.it (Riccardo Trocca) Date: Mon, 25 Sep 2000 12:25:33 +0200 Subject: [Pythonmac-SIG] MacPython & Numeric Message-ID: Hello, regarding numeric and NumTut, if I recall well, it is not supposed to work on MacOS. Anyway, given the fact that I really needed something to represents matrix as images, I built a small library that can show 2D numeric arrays in a Framework Window. The use is straightforward, I also created a function shownumeric(array,"window title",zoomFactor) that shows the given num array. anyway it doesn't have scrollbars or such. it is very raw. I sent the sources some days ago to Jack in order to see if it is possible to incorporate them in MacPython. If you need to experiment I can send the same files to you (or to anybody that wants to work on improving it). -- Riccardo Trocca rtrocca@libero.it Laboratory of Musical Informatics DIST University of Genoa From rtrocca3@libero.it Mon Sep 25 11:26:45 2000 From: rtrocca3@libero.it (Riccardo Trocca) Date: Mon, 25 Sep 2000 12:26:45 +0200 Subject: [Pythonmac-SIG] MacPython2.0b1 - C++ questions Message-ID: About MacPython 2.0b1: I noticed one of the speech demo uses stdwin. I think it is not supported anymore (right?). In fact it cannot work being unable to find stdwin. In the IDE scripts menu there is the Search Python Docs script. It relies on standard_suite.py. I don't know a thing about it, but I've seen that now it is split in various folders (Netscape, Codewarrior, IE). Therefore the script don't work. It should be fixed, but I don't know how. C++ questions I'd like to embed Python is some already working tool I wrote. I used MacZoop t to make it. Now I have no idea of how to embed python. I mean: macZoop uses StdCLib,Python MSL and GUSI. the call to init MacPython is said to init also the MacToolBox, but I've got the Zoop framework that already does it. I've seen a call to pass MacPython an event, should I use it anyway (even if all of the graph stuff will be done by the Zoop framework?) To be sincere those are just simple questions because I'd like to understand how much complex is the task before attempting to do it. Thanks -- Riccardo Trocca rtrocca@libero.it Laboratory of Musical Informatics DIST University of Genoa From sdm7g@virginia.edu Mon Sep 25 17:14:12 2000 From: sdm7g@virginia.edu (Steven D. Majewski) Date: Mon, 25 Sep 2000 12:14:12 -0400 (EDT) Subject: [Pythonmac-SIG] New 2.0b1+ MacPython distribution In-Reply-To: <20000925101128.BCECCD721A@oratrix.oratrix.nl> Message-ID: On Mon, 25 Sep 2000, Jack Jansen wrote: > Folks, > as I'm away for holidays from this afternoon I've created the > mandatory distribution. It is untested (I didn't even try installing > it myself)and I've created it mainly so Corran can continue his work > on Distutils, but if anyone else wants to give it a go the're welcome > to try it. It's in the ftp://ftp.cwi.nl/pub/python/mac folder and it > has "2.0b1plus" in the name. > Thanks Jack. Note: The URL is also untested! ;-) It's actually in ftp://ftp.cwi.nl/pub/jack/python/mac/ . ---| Steven D. Majewski (804-982-0831) |--- ---| Department of Molecular Physiology and Biological Physics |--- ---| University of Virginia Health Sciences Center |--- ---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- "All operating systems want to be unix, All programming languages want to be lisp." From kjray@ix.netcom.com Mon Sep 25 18:02:06 2000 From: kjray@ix.netcom.com (kjray) Date: Mon, 25 Sep 2000 10:02:06 -0700 Subject: [Pythonmac-SIG] AppleScript guru needed Message-ID: <200009251654.MAA09503@maynard.mail.mindspring.net> >Hi folks, >I just ran into a problem with MacPython OSA support. Two problems, >actually: >1. The CodeWarrior suite declares both a property "project document" >and a class "project document". As you wil understand this does not >work well, as these both end up in the same namespace, and both with >the same name "project_document". Is it legal OSA to have properties >and classes with the same name? If it is: can anyone think of a >workaround for MacPython? > >2. Aepack does not handle passing classes as arguments. If anyone >feels like fixing this: please be my guest. The symptom is that if you >do "xxx.make(new=classname)" it should pass >aetypes.Type(classname.wantd). Hmm, maybe if this is fixed the >previous problem isn't a problem anymore.... Oh sigh, my brain always >turns inside out when I try to reason about OSA:-( [...] As far as I know, a 'property' is a data member of a class. e.g. (in AppleScript): set of to set visible of awindow to true tell application "CodeWarrior" get project document -- an property of the application which is -- an instance of the of type "project document" ... By the way a Java application can be scripted from AppleScript after you use the AppleScript editor to generate an 'aete' from the _running_ Java application... if a java class has a 'set' and 'get' methods, AppleScript refers to that as a property. class javaclass { public int getMyFoo(){...}; public int setMyFoo(){...}; } translates to AppleScript: tell application "java app" set MyFoo of ajavaobject to 1 get MyFoo of ajavaobject end tell I'm not a guru, so I suggest posting your request for help in , , and And maybe someone at can help -- or even someone at Apple itself -- do you have a (free or $$) Apple Developer membership? Are you working on "Mac:Contrib:PythonScript:"? Or something that generated python from 'aete' resource, like (I assume) "CodeWarrior_Standard_Suite.py"? By the way, each application defines its own versions of its suites -- suites are not _really_ standardized -- so I think the best way to parse an 'aete' resources is to generate a single python module putting all the classes from all of the app's suites into that module -- better still if this could be done at run-time whan a python script tries to send apple-events to an application. Or maybe I don't know what I'm talking about :-/. From dma@andrew.cmu.edu Tue Sep 26 15:00:20 2000 From: dma@andrew.cmu.edu (David Andersen) Date: Tue, 26 Sep 2000 10:00:20 -0400 Subject: [Pythonmac-SIG] 1.5.2 + Quicktime Message-ID: <3594779250.969962420@DAWSON.WV.CC.CMU.EDU> I've gone around this by removing QuickTime support, but for the record: When I build PythonStandAlone and try to launch it, I get an error: The application "PythonStandAlone" could not be opened because "QuickTimeLib -- QTGetDataRefMaxFileOffset" could not be found. This is on Mac OS 9 with CodeWarrior 5.3 From vincem@en.com Tue Sep 26 16:15:41 2000 From: vincem@en.com (Vincent Marchetti) Date: Tue, 26 Sep 2000 11:15:41 -0400 Subject: [Pythonmac-SIG] Re-- AppleScript guru needed Message-ID: IANAG but, Jack Jensen asked about legality of having classes and properties sharing the same name in AppleScript. I don't know if is legal (or even if there is a "controlling legal authority" for AppleScript and OSA naming), but I always had trouble trying to do this in scriptable applications I have written. It seems to me the problem is how the AppleScript interpreter converts a phrase like "get project document of target 1" to an object specifier. My experience is that in this case the correct specifier is made when "project document" is both the name of a class and the name of a property (of class target); however the interpreter gags when trying to make a more complex object reference, for example using whose -clauses i.e. "get targets whose (name of project document is "parrot") " In short, within AppleScript and OSA, sharing names might be legal, but not very robust. However, it seems that MetroWerks did it in setting up the scripting interface to CodeWarrior IDE. Under MacPython, the script writer should know whether the class project_document or the property project_document is required. It seems to me the best solution is to rename the Python class property to project_document_property, and a corresponding change to element target._propdict . As for the call to make, I've been using simply app.make(new = classname.want, with_properties = etc..) Vince Marchetti From just@letterror.com Tue Sep 26 20:16:23 2000 From: just@letterror.com (Just van Rossum) Date: Tue, 26 Sep 2000 20:16:23 +0100 Subject: [Pythonmac-SIG] W applications In-Reply-To: <20000921114920.C77C11CE74@dinsdale.python.org> Message-ID: At 1:49 PM +0200 21-09-2000, Tattoo Mabonzo K. wrote: >Is it correct that the fact that W relies on globals such as _application >and _signature makes it (essentially) impossible to have several W-based >application running at the same time? Yep, within the same interpreter that is. But it's not only because of the global variables: which event loop would be the boss? Who's menu's do you see? Just From dma@andrew.cmu.edu Thu Sep 28 16:50:48 2000 From: dma@andrew.cmu.edu (David Andersen) Date: Thu, 28 Sep 2000 11:50:48 -0400 Subject: [Pythonmac-SIG] PythonStandAlone + Numeric Message-ID: <3774206610.970141848@DAWSON.WV.CC.CMU.EDU> I'm building PythonStandAlone and PythonInterpreterPPC from the 1.5.2c1 source - things basically seem to work, but I'm not out of the woods yet. The PythonStand Alone application is built to the Python 1.5.2c1 folder. In PythonInterpreterPPC, "import Numeric" works correctly, so it appears the Python installation and preferences are correct. However, when I try "import Numeric" in PythonStandAlone I get the following traceback: File "", line 1, in ? File "Trollhaus:Python 1.5.2c1:Extensions:Numerical:Lib:Numeric.py", line 6,in ? import multiarray ImportError: No module named multiarray Why would "import Numeric" work in PythonInterpreterPPC, but not in PythonStandAlone? Do I need to build Numeric into PythonStandAlone? If so, how do I do that? From JWight@bigfoot.com Fri Sep 29 18:49:45 2000 From: JWight@bigfoot.com (Jonathan Wight) Date: Fri, 29 Sep 2000 12:49:45 -0500 Subject: [Pythonmac-SIG] FW: Python2.0 beta 2 on MacOSX/Darwin In-Reply-To: Message-ID: Forwarding to the PythonMac SIG... > > ------ Forwarded Message > From: "Steven D. Majewski" > Date: Fri, 29 Sep 2000 12:07:35 -0400 (EDT) > To: Darwin-Development@public.lists.apple.com > Subject: Python2.0 beta 2 on MacOSX/Darwin (fwd) > > > > > [ Same message being forwarded (NOT cross-posted!) to: > python-list@python.org > macosx-dev@omnigroup.com > Darwin-Development@public.lists.apple.com ] > > > If you want to do Mac OSX development without the developers CD, > "Darwin Tools on Mac OSX" at > has a link to the article: > > containing instructions and a shell script to merege the > Darwin development tools from the Darwin 1.0 distribution > into MacOSX. > > > Python 2.0 beta 2 > > builds on OSX or Darwin > > configure options: > > --with-dyld # otherwise you get errors trying to include rld.h > # I think thats for the old style next libraries. > > --with-suffix=.app # or ".exe" or whatever > # this solves the case insensitivity problem on HFS+ > # The only clash is when make tries to move the > # executable in "Python/python" to the parent dir. > # this renames the executable with a suffix. > > --host=Darwin # Not sure about this, but it may have stopped some > # errors with trying to build Next platform specific code. > > ( maybe that's not doing what I thought as sys.platform still= 'next') > > > > > Modules: > > bsdbm gets automagically added by configure (See notes in Modules/Setup) > > threads are also automatically configured by default. > > crypt can be added in Modules/Setup -- no added library switches needed. > > pyexpat: expat will build, but building a library using 'ar' , as in > the note in Modules/Setup will give link errors. -- Use libtool instead: > "libtool -static -o libexpat.a xmltol/*.o xmlparse/*.o" > > (CoreFoundation, which is one of the OSX Frameworks also included in > Darwin, also has functions to convert to and from XML property lists, > but I don't believe that it exposes a full XML parser api. ) > > > > Limitations: > > tests seem to run ok except that I get a : > test_re > Running tests on re.search and re.match > Running tests on re.sub > Running tests on symbolic references > Running tests on re.subn > Running tests on re.split > Running tests on re.findall > Running tests on re.match > Running tests on re.escape > Pickling a RegexObject instance > Test engine limitations > Segmentation fault > > > > using configure --with-next-framework along with --with-dyld didn't work. > (Don't remember the error -- I'll try again) > > Just uncommenting the "*shared*" in Modules/Setup gives this build error: > > cc -bundle -prebind arraymodule.o -o arraymodule.so > /usr/bin/ld: warning -prebind has no effect with -bundle > /usr/bin/ld: Undefined symbols: > _PyArg_Parse > _PyArg_ParseTuple > _PyDict_SetItemString > _PyErr_BadArgument > _PyErr_Clear > _PyErr_Format > _PyErr_NoMemory > _PyErr_Occurred > > > > To Do: > > Need to get dynamic loading of shared libraries working. > ( dynamic loading + threading + pyexpat => Zope ought to port! ) > > Then need to work on Darwin|MacOSX specific libraries. > > Tkinter, pyGtk and/or wxWindows under XFREE86 would be nice. > gtk has been ported to Darwin/XFREE86 > Tcl has been ported but not, as far as I know Tk. > Is the Mac port of Tk carbonized ? If it were, it would allow > Tk on both Darwin under X11 and MacOSX under Carbon. > ( We really want Quartz, but it would be nice to have something > that runs anywhere, and TK is probably the closest thing. > It was kind of strange to type "open PythonInterpreter" cd-ed to > the OS9 MacPython folder and see OS9 boot up and run Python. > I get an error message that my preferences are corrupt -- > I wonder if this is from the OSX install on top of OS9 > moving the system folder. But otherwise, things seem to > work -- I only tried EasyDialogs.test() and started a Tkinter > window -- not a very complete test. ) > > > > > > ---| Steven D. Majewski (804-982-0831) |--- > ---| Department of Molecular Physiology and Biological Physics |--- > ---| University of Virginia Health Sciences Center |--- > ---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- > "All operating systems want to be unix, > All programming languages want to be lisp." > > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > > > ==================================================================== > Unsubscribe: > > Help: > or > > ------ End of Forwarded Message From tony-x@lownds.com Sat Sep 30 02:23:00 2000 From: tony-x@lownds.com (Tony Lownds) Date: Fri, 29 Sep 2000 18:23:00 -0700 Subject: [Pythonmac-SIG] Python on Mac OS X w/shared modules Message-ID: <200009300124.e8U1OVj28477@localhost> Hi, I've *almost* got Python working with shared modules, by using = --with-next-framework and hacking the configure script to recognize that = Mac OS X needs Next-like settings.=20 This is the command I used, and the patch is below.=20 ./configure --with-dyld --with-next-framework --with-suffix=3D.x Unfortunately it bombs out with a missing symbol in libtool: libtool -o libpython2.0.dylib -dynamic libpython2.0.a -framework System = -U _environ=20 ld: for architecture ppc ld: Undefined symbols: ___eprintf libtool: internal link edit command failed make[1]: *** [libpython2.0.dylib] Error 1 make: *** [python.x] Error 2 If I ask the linker to ignore that symbol, it doesn't work either: [localhost:~/python/dist/src] tony% libtool -o libpython2.0.dylib = -dynamic libpython2.0.a -framework System -U _environ -U ___eprintf [localhost:~/python/dist/src] tony% ./python.x dyld: ./python.x Undefined symbols: ___eprintf Anybody have any ideas what ___eprintf is for? I'm using the development = tools copied from Darwin; does anybody here have "real" Mac OS X = Developer Tools, and if so does this error happen for them? Thanks, -Tony Lownds *** configure Fri Sep 29 17:08:15 2000 --- configure.hacked Fri Sep 29 17:58:41 2000 *************** *** 596,601 **** --- 596,608 ---- sed -e 's/://' -e 's/\./_/'` && \ ac_sys_system=3Dnext && ac_sys_release=3D$4 =20 + if test -z "$ac_sys_release" + then + set X `hostinfo | egrep 'Darwin Kernel.*:' | \ + sed -e 's/://'` && \ + ac_sys_system=3Ddarwin && = ac_sys_release=3D$5 + fi +=20 MACHDEP=3D"$ac_sys_system$ac_sys_release" fi fi *************** *** 2583,2588 **** --- 2590,2598 ---- # Minor variations in building a framework between NextStep versions 4 = and 5 =20 case $ac_sys_system/$ac_sys_release in + darwin/1.2) + ns_undef_sym=3D'_environ' + LIBTOOL_CRUFT=3D"-U $ns_undef_sym" ;; next/4*) ns_undef_sym=3D'__environ' LIBTOOL_CRUFT=3D"-U $ns_undef_sym" ;; *************** *** 2666,2672 **** hp*|HP*) LDSHARED=3D"ld -b";; OSF*) LDSHARED=3D"ld -shared -expect_unresolved \"*\"";; DYNIX/ptx*) LDSHARED=3D"ld -G";; ! next/*)=20 if test "$ns_dyld" then LDSHARED=3D'$(CC) $(LDFLAGS) -bundle -prebind' else LDSHARED=3D'$(CC) $(CFLAGS) -nostdlib -r'; --- 2676,2682 ---- hp*|HP*) LDSHARED=3D"ld -b";; OSF*) LDSHARED=3D"ld -shared -expect_unresolved \"*\"";; DYNIX/ptx*) LDSHARED=3D"ld -G";; ! darwin/*|next/*) if test "$ns_dyld" then LDSHARED=3D'$(CC) $(LDFLAGS) -bundle -prebind' else LDSHARED=3D'$(CC) $(CFLAGS) -nostdlib -r'; *************** *** 2741,2746 **** --- 2751,2758 ---- # crt1.o) gets erroneously defined as common, which breaks = dynamic # loading of any modules which reference it in System.framework next/4*|next/5*) LINKFORSHARED=3D"-u __dummy -framework System" = ;; + # darwin doesn't like __dummy + darwin/*) LINKFORSHARED=3D"-framework System" ;; =20 SCO_SV*) LINKFORSHARED=3D"-Bdynamic -dy -Wl,-Bexport";; ReliantUNIX*) LINKFORSHARED=3D"-W1 -Blargedynsym";; FreeBSD*|NetBSD*)=20 *************** *** 3882,3888 **** AIX*) DYNLOADFILE=3D"dynload_aix.o";; BeOS*) DYNLOADFILE=3D"dynload_beos.o";; hp*|HP*) DYNLOADFILE=3D"dynload_hpux.o";; ! next/*) DYNLOADFILE=3D"dynload_next.o";; *) # use dynload_shlib.c and dlopen() if we have it; otherwise stub # out any dynamic loading --- 3894,3900 ---- AIX*) DYNLOADFILE=3D"dynload_aix.o";; BeOS*) DYNLOADFILE=3D"dynload_beos.o";; hp*|HP*) DYNLOADFILE=3D"dynload_hpux.o";; ! darwin/*|next/*) DYNLOADFILE=3D"dynload_next.o";; *) # use dynload_shlib.c and dlopen() if we have it; otherwise stub # out any dynamic loading *************** *** 5461,5467 **** # check for --with-libm=3D... =20 case $ac_sys_system in ! next) ;; BeOS) ;; *) LIBM=3D-lm esac --- 5473,5479 ---- # check for --with-libm=3D... =20 case $ac_sys_system in ! darwin|next) ;; BeOS) ;; *) LIBM=3D-lm esac= From martin@loewis.home.cs.tu-berlin.de Sat Sep 30 08:57:52 2000 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Sat, 30 Sep 2000 09:57:52 +0200 Subject: [Pythonmac-SIG] Re: Python on Mac OS X w/shared modules In-Reply-To: <200009300235.e8U2ZBl28496@localhost> (message from Tony Lownds on Fri, 29 Sep 2000 19:34:09 -0700) References: <200009300235.e8U2ZBl28496@localhost> Message-ID: <200009300757.JAA00892@loewis.home.cs.tu-berlin.de> > Anybody have any ideas what ___eprintf is for? I'm using the > development tools copied from Darwin; does anybody here have "real" > Mac OS X Developer Tools, and if so does this error happen for them? __eprintf is used inside the assert macro, and defined in libgcc2.c: #include /* This is used by the `assert' macro. */ void __eprintf (const char *string, const char *expression, unsigned int line, const char *filename) { fprintf (stderr, string, expression, line, filename); fflush (stderr); abort (); } It then appears that you are not linking with libgcc. Anyway, thanks for the information. Regards, Martin