From eppstein@ics.uci.edu Sun Jul 1 22:29:33 2001 From: eppstein@ics.uci.edu (David Eppstein) Date: Sun, 01 Jul 2001 14:29:33 -0700 Subject: [Pythonmac-SIG] Re: No os._exit() in MacOS? (fwd) Message-ID: <288239.3202986573@[192.168.1.102]> This is regarding some problems I've been having with quitting W apps in MacPython -- Just found a workaround and suggested forwarding to this list. I've put the problematic source online at http://www.ics.uci.edu/~eppstein/noquit.py -- David Eppstein UC Irvine Dept. of Information & Computer Science eppstein@ics.uci.edu http://www.ics.uci.edu/~eppstein/ ---------- Forwarded Message ---------- Date: Sunday, July 1, 2001 11:18 PM +0200 From: Just van Rossum To: David Eppstein Subject: Re: No os._exit() in MacOS? Hi David, > See attached source noquit.py, slightly modified from the example in > http://www.nevada.edu/~cwebster/Python/WWidgets/usingW.html#applications > I also made a file noquit.rsrc copied from > http://www.nevada.edu/~cwebster/Python/WWidgets/MyApp.rsrc.hqx > and saved as an applet from the IDE. > > When I run the resulting applet, cmd-Q quits normally, > but pushing the "Quit" button (which just calls _quit) > results in a frozen applet. Ok, I managed to work around the problem: it seems to be a bug related to the SIOUX output window. Please post a followup to the macpython list, as I have no idea what exactly causes it -- it *is* a bug, and Jack should know about it. Here's the workaround recipe: Drop the resource file belonging to your app (.rsrc) onto EditPythonPrefs. Choose "Default Startup Options". Choose "Delay console window until needed" as well as "Keep stdio window open on: *never*". (Those are good settings for W apps anyway.) Now build your applet again. Good luck! Just ---------- End Forwarded Message ---------- From jack@oratrix.nl Mon Jul 2 09:47:52 2001 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 02 Jul 2001 10:47:52 +0200 Subject: [Pythonmac-SIG] MacPy 2.1: re module error in IDE In-Reply-To: Message by Damon Butler , 29 Jun 01 17:20:50 -0500 , <3B3BEEB800000285@impmail.impinet.com> (added by impmail.impinet.com) Message-ID: <20010702084753.40703303181@snelboot.oratrix.nl> Damon, there's two things I can say initially: - Python 2.0.1 is much newer than Python 2.1, so that it's fixed in the latter doesn't necessarily mean the fix should be in 2.1. Did you check 2.1 on other platforms? - There's two recursion limits in sre. One is the hard limit enforced by the engine, the other is a check for stack overflow, which will also cause a recursion limit. There is very little you can do about this, except for using ResEdit or Resorcerer to edit the stack size in the "cfrg" resource of PythonInterpreter and PythonIDE. I suspenc that you are running against the stack overflow. The pre/IDE problem is strange. I'll leave it to Just to comment on this. -- 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 Mon Jul 2 10:07:20 2001 From: just@letterror.com (Just van Rossum) Date: Mon, 2 Jul 2001 11:07:20 +0200 Subject: [Pythonmac-SIG] MacPy 2.1: re module error in IDE In-Reply-To: <3B3BEEB800000285@impmail.impinet.com> (added by impmail.impinet.com) Message-ID: <20010702110723-r01010600-0bf3fb18@213.84.27.177> Damon Butler wrote: > TypeError: pcre_compile() argument 1 must be string without null bytes, not > string Ah, this seems due to the conversion from regex to re. Apparently, sre allows null bytes in pattern strings, but pre doesnt :-(. As a workaround, you could patch PyFontify: import re becomes: import sre re = sre Hope this helps, Just From Damon Butler Mon Jul 2 16:09:27 2001 From: Damon Butler (Damon Butler) Date: 02 Jul 01 10:09:27 -0500 Subject: [Pythonmac-SIG] MacPy 2.1: re module error in IDE Message-ID: <3B3BEEB800000412@impmail.impinet.com> (added by impmail.impinet.com) --====50524951505557555657===1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="US-Ascii" Reply to: Re: [Pythonmac-SIG] MacPy 2.1: re module error in IDE Just, >patch PyFontify: > >import re > >becomes: > >import sre >re =3D sre Writing to let you know your simple fix simply worked. Thanks for the = debugging! Now if only Joe Strout's syntax coloring still worked... ;-) --Damon --====50524951505557555657===1 Content-Type: text/html; charset="US-Ascii" Content-Transfer-Encoding: quoted-printable
         Reply to:   Re: [Pythonmac-SIG] MacPy 2.1: re module error in IDE

Just,

>patch = PyFontify:
>
>import re
>
>becomes:
>
>import = sre
>re =3D sre

Writing to let you = know your simple fix simply worked. Thanks = for the debugging! Now if only Joe Strout's = syntax coloring still worked... ;-)

--Damon
--====50524951505557555657===1-- From Damon Butler Mon Jul 2 16:09:28 2001 From: Damon Butler (Damon Butler) Date: 02 Jul 01 10:09:28 -0500 Subject: [Pythonmac-SIG] MacPy 2.1: re module error in IDE Message-ID: <3B3BEEB800000414@impmail.impinet.com> (added by impmail.impinet.com) Reply to: Re: [Pythonmac-SIG] MacPy 2.1: re module error in IDE = Hi, Jack, >- Python 2.0.1 is much newer than Python 2.1, so that it's fixed in the = latter = >doesn't necessarily mean the fix should be in 2.1. This is I did not know. >Did you check 2.1 on other platforms? I've been trusting my Windows-using Python programmer next cube over, who'= s regex scripts with sre apparently started working under 2.1 where they = didn't under 2.0. I just ran a simple test on WinPy 2.1 myself, however, = and was surprised at the results. See below. >- There's two recursion limits in sre. One is the hard limit enforced by = the = >engine, the other is a check for stack overflow, which will also cause a = >recursion limit. So which recursion limit is it that I'm encountering here? (I typed the = following lines into the interpreter on both Mac and Win version of Py 2.1.= ) >>> import sre, pre, string >>> l =3D ["XXX", "%"*20000, "XXX"] >>> = >>> sre_regex =3D sre.compile(r"XXX.*?XXX") >>> match_object =3D sre_regex.search(string.join(l)) Traceback (most recent call last): File "", line 1, in ? RuntimeError: maximum recursion limit exceeded >>> = >>> pre_regex =3D pre.compile(r"XXX.*XXX") >>> match_object =3D pre_regex.search(string.join(l)) >>> match_object It was this discrepancy between sre and pre that I reported as a bug to = SourceForge (#437472), and was the recursion limit error I thought had = been fixed. Apparently not in 2.1 on either Mac or Windows, anyway, but is = it fixed in 2.0.1? --Damon From just@letterror.com Mon Jul 2 16:26:00 2001 From: just@letterror.com (Just van Rossum) Date: Mon, 2 Jul 2001 17:26:00 +0200 Subject: [Pythonmac-SIG] MacPy 2.1: re module error in IDE In-Reply-To: <3B3BEEB800000412@impmail.impinet.com> (added by impmail.impinet.com) Message-ID: <20010702172605-r01010600-fe6b3757@213.84.27.177> Damon Butler wrote: > Writing to let you know your simple fix simply worked. Thanks for the > debugging! Now if only Joe Strout's syntax coloring still worked... ;-) It's quite possible PyFontify.py really is broken now. Dinu, if you're reading this: I misplaced your re-i-fied PyFontify.py; can you send me your version? It seems Jack has also done it, and I would like to compare the two... Just From jack@oratrix.nl Mon Jul 2 16:39:23 2001 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 02 Jul 2001 17:39:23 +0200 Subject: [Pythonmac-SIG] MacPy 2.1: re module error in IDE In-Reply-To: Message by Damon Butler , 02 Jul 01 10:09:28 -0500 , <3B3BEEB800000414@impmail.impinet.com> (added by impmail.impinet.com) Message-ID: <20010702153923.92DFA303181@snelboot.oratrix.nl> I tested your snippet on MacPython as from the current CVS repository, and while it doesn't crash with the recursion error it also doesn't work: it returns None for the match object (and while I'm not a computer I'm under the distinct impression that it should return a match:-). I've added a comment to your bug report, and I think we should wait to see what the sre guru's have to say about the matter. -- 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 gherman@darwin.in-berlin.de Mon Jul 2 16:57:38 2001 From: gherman@darwin.in-berlin.de (Dinu Gherman) Date: Mon, 02 Jul 2001 17:57:38 +0200 Subject: [Pythonmac-SIG] MacPy 2.1: re module error in IDE References: <20010702172605-r01010600-fe6b3757@213.84.27.177> Message-ID: <3B4099F2.20EC9301@darwin.in-berlin.de> Just van Rossum wrote: > > Damon Butler wrote: > > > Writing to let you know your simple fix simply worked. Thanks for the > > debugging! Now if only Joe Strout's syntax coloring still worked... ;-) > > It's quite possible PyFontify.py really is broken now. Dinu, if you're reading > this: I misplaced your re-i-fied PyFontify.py; can you send me your version? It > seems Jack has also done it, and I would like to compare the two... Just searched, rather superficially, though as I'm not having much time right now while preparing to leave to Bordeaux. I've not found any re-version on my box and I do not quite remember having adapted one myself to use re. But using Google I found this which promises one re-version of PyFontify: http://mail.python.org/pipermail/python-list/2001-May/041235.html Hope this is useful... Regards, Dinu -- Dinu C. Gherman ReportLab Consultant - http://www.reportlab.com ................................................................ "The only possible values [for quality] are 'excellent' and 'in- sanely excellent', depending on whether lives are at stake or not. Otherwise you don't enjoy your work, you don't work well, and the project goes down the drain." (Kent Beck, "Extreme Programming Explained") From DannyM@WSG.com Mon Jul 2 22:26:03 2001 From: DannyM@WSG.com (Mendelsohn, Danny) Date: Mon, 2 Jul 2001 17:26:03 -0400 Subject: [Pythonmac-SIG] Learning Python on the Mac Message-ID: Hello, I downloaded Python 2.1 a couple of weeks ago and have been goofing of with it at work on my NT Workstation(blech!) I really like Python and wan't to take it a step further and really try and learn the language. I use Mac OS 9.1 at home and I've gone ahead and installed Python. I was going to buy the o'reilly book by Mark Lutz. Does anyone know if I can apply what's in that book to the Mac OS distribution of Python or are there glaring differences? I guess what I'm most concerned about is the lack of a real command line and having to deal with all that Mac Toolbox crap I've heard about. Any thoughts would be much appreciated. Thank You Mogador From owen@astro.washington.edu Mon Jul 2 23:34:34 2001 From: owen@astro.washington.edu (Russell E Owen) Date: Mon, 2 Jul 2001 15:34:34 -0700 Subject: [Pythonmac-SIG] Learning Python on the Mac In-Reply-To: References: Message-ID: >I downloaded Python 2.1 a couple of weeks ago and have been goofing of with >it at work on my NT Workstation(blech!) I really like Python and wan't to >take it a step further and really try and learn the language. I use Mac OS >9.1 at home and I've gone ahead and installed Python. I was going to buy the >o'reilly book by Mark Lutz. Does anyone know if I can apply what's in that >book to the Mac OS distribution of Python or are there glaring differences? > >I guess what I'm most concerned about is the lack of a real command line and >having to deal with all that Mac Toolbox crap I've heard about. On the whole MacPython works superbly and is a pleasure to use. The IDE is nice, and if you prefer you can use BBEdit (with a free 3rd party language module) or Pepper (you get syntax coloring (though not the ability to run scripts from the editor). You can build drag-and-drop applications (that put the list of files into the usual arg list) as well as double-clickable applications. As for a command line...you can get one as you launch a script if you want it (hold down the option key to control startup options or configure the interpreter to always ask for one). Most Python libraries work on most platforms (see the docs or Python Essential Reference to check on specific libraries). Some limitations include: - GUI projects are in a sad state. The only standard GUI library ported to Mac OS is Tkinter, and it doesn't work perfectly (though is fine for basic stuff). The IDE doesn't work with Tkinter, resulting in a slow and clumsy development cycle. - Mac memory management limits working with very large data sets. I hasten to add that this rarely causes me problems and I see few complaints here about it. Regards, -- Russell From hummelsean@mac.com Tue Jul 3 05:28:25 2001 From: hummelsean@mac.com (Sean Hummel) Date: Mon, 02 Jul 2001 21:28:25 -0700 Subject: [Pythonmac-SIG] Learning Python on the Mac In-Reply-To: Message-ID: Danny, the best GUI out there being used by Python developers is wxPython, but it hasn't yet been ported to the Macintosh. It is probably one of the biggest blocks to writing a complex GUI application on the Macintosh. > From: Russell E Owen > Date: Mon, 2 Jul 2001 15:34:34 -0700 > To: "Mendelsohn, Danny" , Mac Python mailing list > > Subject: Re: [Pythonmac-SIG] Learning Python on the Mac > >> I downloaded Python 2.1 a couple of weeks ago and have been goofing of with >> it at work on my NT Workstation(blech!) I really like Python and wan't to >> take it a step further and really try and learn the language. I use Mac OS >> 9.1 at home and I've gone ahead and installed Python. I was going to buy the >> o'reilly book by Mark Lutz. Does anyone know if I can apply what's in that >> book to the Mac OS distribution of Python or are there glaring differences? >> >> I guess what I'm most concerned about is the lack of a real command line and >> having to deal with all that Mac Toolbox crap I've heard about. > > On the whole MacPython works superbly and is a pleasure to use. The > IDE is nice, and if you prefer you can use BBEdit (with a free 3rd > party language module) or Pepper (you get syntax coloring (though not > the ability to run scripts from the editor). You can build > drag-and-drop applications (that put the list of files into the usual > arg list) as well as double-clickable applications. > > As for a command line...you can get one as you launch a script if you > want it (hold down the option key to control startup options or > configure the interpreter to always ask for one). > > Most Python libraries work on most platforms (see the docs or Python > Essential Reference to check on specific libraries). > > Some limitations include: > - GUI projects are in a sad state. The only standard GUI library > ported to Mac OS is Tkinter, and it doesn't work perfectly (though is > fine for basic stuff). The IDE doesn't work with Tkinter, resulting > in a slow and clumsy development cycle. > - Mac memory management limits working with very large data sets. I > hasten to add that this rarely causes me problems and I see few > complaints here about it. > > Regards, > > -- Russell > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From sburr@home.com Tue Jul 3 05:48:30 2001 From: sburr@home.com (Steven Burr) Date: Mon, 2 Jul 2001 21:48:30 -0700 Subject: [Pythonmac-SIG] Learning Python on the Mac In-Reply-To: Message-ID: <20010703044635.GBRN22670.femail17.sdc1.sfba.home.com@localhost> On Monday, July 2, 2001, at 02:26 PM, Mendelsohn, Danny wrote: > Hello, > > I downloaded Python 2.1 a couple of weeks ago and have been goofing of > with > it at work on my NT Workstation(blech!) I really like Python and wan't > to > take it a step further and really try and learn the language. I use Mac > OS > 9.1 at home and I've gone ahead and installed Python. I was going to > buy the > o'reilly book by Mark Lutz. Does anyone know if I can apply what's in > that > book to the Mac OS distribution of Python or are there glaring > differences? > > I guess what I'm most concerned about is the lack of a real command > line and > having to deal with all that Mac Toolbox crap I've heard about. > > Any thoughts would be much appreciated. I'm also making my way through Programming Python on a Mac, but I'm running OS X rather than 9. It's a fantastic book, but it might not be the best choice for learning Python on OS 9. The first third focuses on command-line system tools. Much of what it covers--e.g. using command-line arguments, piping commands from one process to another--would probably be unusable on OS 9. The second third covers GUI programming using Tkinter, which, as someone else has pointed out, doesn't work well on OS 9. (Tkinter doesn't work at all in Aqua, but I'm getting around that by running the Tkinter examples in XDarwin. See http://www.mrcla.com/XonX/ for more info about this.) Btw, I also have an NT workstation at my job. It makes telecommuting a very attractive option. : ) From dano@brightfire.com Wed Jul 4 16:27:37 2001 From: dano@brightfire.com (Daniel Lord) Date: Wed, 4 Jul 2001 08:27:37 -0700 Subject: [Pythonmac-SIG] GUI Alternatives: supplemental comments on Jython In-Reply-To: Message-ID: <200107041527.LAA24371@glatton.cnchost.com> --Apple-Mail-289481326-1 Content-Transfer-Encoding: 7bit Content-Type: text/plain; format=flowed; charset=us-ascii On Tuesday, July 3, 2001, at 09:01 AM, pythonmac-sig-request@python.org wrote: >> Some limitations include: >> - GUI projects are in a sad state. The only standard GUI library >> ported to Mac OS is Tkinter, and it doesn't work perfectly (though is >> fine for basic stuff). The IDE doesn't work with Tkinter, resulting >> in a slow and clumsy development cycle. Just an FYI to round out the GUI comments. Someone has probably pointed this out before, but for anyone who knows Java, Jython, the Python interpreter that runs in a Java 2 VM, is an excellent GUI alternative for traditional Python GUIs on OSX. Java 2 of course uses Aqua so XDarwin isn't required and the screen contention issues between X and Aqua are eliminated. I still cannot get rootless X running flawlessly (the window borders disappear and the menu characters are wrong and unreadable) with XFree86 4.1 though it sort of works :-(. While the learning curve is a little steep (no worse than Tkinter though), it uses the full capability of Java as far as I can tell. Once you understand the syntax to call Java from Jython, you have all of Java available as far as I can tell so far. I can use GridBagLayout (as well as the other layout managers) and the full suite of Swing components. I have created event listeners for lsits, button, windows, etc.--so it really is pretty complete implementation. Of course you can run plain Python through as well. Documentation is sparse ( I hope to contribute in someway soon), but the sig archives are very helpful. Full Python support is incomplete, particularly where C code is involved, Numeric for instance (although someone has a JNumrice prot in Java of Numeric that is supposed to be good). Serial port access or env vars require JNI. One can also call Java from Jython including jars and invoke Jython from Java. One can also include a single Python program in a jar along with Java that is the first thing invoked. As Java support is strengthened on OSX (I've uncovered a few cosmetic bugs but no show-stoppers yet), Jython may prove to be the most portable way to use Python most of the time (some Java limitations like no direct access to env do get in the way sometimes). Overall though I use Jython more than Python now, particularly since I can call JavaBeans and jars from Jython. It isn't a perfect replacement (there never is) but if Tkinter/X is problematic for you, have a look you might be pleasantly surprised. Of course the IDE for Python is useless, but I like it nonetheless. http://www.jython.org Jython-users@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/jython-users --Apple-Mail-289481326-1 Content-Transfer-Encoding: quoted-printable Content-Type: text/enriched; charset=us-ascii On Tuesday, July 3, 2001, at 09:01 AM, pythonmac-sig-request@python.org wrote: Some limitations include: - GUI projects are in a sad state. The only standard GUI library ported to Mac OS is Tkinter, and it doesn't work perfectly (though is fine for basic stuff). The IDE doesn't work with Tkinter, resulting in a slow and clumsy development cycle. Just an FYI to round out the GUI comments. Someone has probably pointed this out before, but for anyone who knows Java, Jython, the Python interpreter that runs in a Java 2 VM, is an excellent GUI alternative for traditional Python GUIs on OSX. Java 2 of course uses Aqua so XDarwin isn't required and the screen contention issues between X and Aqua are eliminated. I still cannot get rootless X running flawlessly (the window borders disappear and the menu characters are wrong and unreadable) with XFree86 4.1 though it sort of works :-(.=20 While the learning curve is a little steep (no worse than Tkinter though), it uses the full capability of Java as far as I can tell. Once you understand the syntax to call Java from Jython, you have all of Java available as far as I can tell so far. I can use GridBagLayout (as well as the other layout managers) and the full suite of Swing components. I have created event listeners for lsits, button, windows, etc.--so it really is pretty complete implementation. Of course you can run plain Python through as well. Documentation is sparse ( I hope to contribute in someway soon), but the sig archives are very helpful. Full Python support is incomplete, particularly where C code is involved, Numeric for instance (although someone has a JNumrice prot in Java of Numeric that is supposed to be good). Serial port access or env vars require JNI.=20 One can also call Java from Jython including jars and invoke Jython from Java. One can also include a single Python program in a jar along with Java that is the first thing invoked. As Java support is strengthened on OSX (I've uncovered a few cosmetic bugs but no show-stoppers yet), Jython may prove to be the most portable way to use Python most of the time (some Java limitations like no direct access to env do get in the way sometimes). Overall though I use Jython more than Python now, particularly since I can call JavaBeans=20 and jars from Jython. It isn't a perfect replacement (there never is) but if Tkinter/X is problematic for you, have a look you might be pleasantly surprised. Of course the IDE for Python is useless, but I like it nonetheless. http://www.jython.org Jython-users@lists.sourceforge.net = 1A1A,1A1A,FFFFhttp://lists.sourceforge.ne= t/lists/listinfo/jython-users = --Apple-Mail-289481326-1-- From trace@reinventnow.com Wed Jul 4 21:38:00 2001 From: trace@reinventnow.com (tracy s. ruggles) Date: Wed, 04 Jul 2001 15:38:00 -0500 Subject: [Pythonmac-SIG] "Bad marshal data" on startup... Message-ID: Hi, I'm Python-less right now and my life seems so totally meaningless! :-) My Python IDE won't start-up for either 2.0 or 2.1. I even tried re-installing 2.1 to clean up the installation. But, every time, I get this traceback: Traceback (most recent call last): File "theGarden:Python 2.0:Mac:Tools:IDE:PythonIDE.py", line 41, in ? import PythonIDEMain File "theGarden:Python 2.0:Mac:Tools:IDE:PythonIDEMain.py", line 254, in ? PythonIDE() File "theGarden:Python 2.0:Mac:Tools:IDE:PythonIDEMain.py", line 16, in __init__ Wapplication.Application.__init__(self, 'Pide') File "theGarden:Python 2.0:Mac:Tools:IDE:Wapplication.py", line 18, in __init__ FrameWork.Application.__init__(self) File "thegarden:python 2.0:mac:lib:FrameWork.py", line 105, in __init__ self.makemenubar() File "theGarden:Python 2.0:Mac:Tools:IDE:Wapplication.py", line 247, in makemenubar self.makeusermenus() File "theGarden:Python 2.0:Mac:Tools:IDE:PythonIDEMain.py", line 101, in makeusermenus prefs = self.getprefs() File "theGarden:Python 2.0:Mac:Tools:IDE:Wapplication.py", line 377, in getprefs return MacPrefs.GetPrefs(self.preffilepath) File "theGarden:Python 2.0:Mac:Tools:IDE:MacPrefs.py", line 106, in GetPrefs preffile = PrefFile(path, creator) File "theGarden:Python 2.0:Mac:Tools:IDE:MacPrefs.py", line 53, in __init__ prefdict = marshal.load(open(self.__path, 'rb')) ValueError: bad marshal data .. The interpreter will start-up fine, but I've become so dependent on the IDE that I can't imagine working with just the interpreter anymore. Has this happened to anyone else and how do I get the IDE back?!? Thanks, Tracy -- Tracy S. Ruggles :: trace@reinventnow.com :: 512/858.2280 "RHUBARB. / Rhubarb is susan not susan not seat in bunch toys not wild and laughable not in little places not in neglect and vegetable not in fold coal age not please." -- Gertrude Stein From jack@oratrix.nl Wed Jul 4 22:00:49 2001 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 04 Jul 2001 23:00:49 +0200 Subject: [Pythonmac-SIG] "Bad marshal data" on startup... In-Reply-To: Message by "tracy s. ruggles" , Wed, 04 Jul 2001 15:38:00 -0500 , Message-ID: <20010704210054.0BFEADA740@oratrix.oratrix.nl> Recently, "tracy s. ruggles" said: > Hi, I'm Python-less right now and my life seems so totally meaningless! :-) Well, I think we can solve that one (the python-less one, not the meaningless bit:-) > File "theGarden:Python 2.0:Mac:Tools:IDE:PythonIDEMain.py", line 101, in > makeusermenus > prefs = self.getprefs() > File "theGarden:Python 2.0:Mac:Tools:IDE:Wapplication.py", line 377, in > getprefs > return MacPrefs.GetPrefs(self.preffilepath) > File "theGarden:Python 2.0:Mac:Tools:IDE:MacPrefs.py", line 106, in > GetPrefs > preffile = PrefFile(path, creator) > File "theGarden:Python 2.0:Mac:Tools:IDE:MacPrefs.py", line 53, in > __init__ > prefdict = marshal.load(open(self.__path, 'rb')) > ValueError: bad marshal data Your IDE preferences have become corrupted. The workaround is easy: remove them. They're in System Folder:Preferences:Python somewhere. Why your preferences have become corrupt is a mystery to me, I haven't heard of this happening before. Just, could you arm the IDE against this with a try/except? -- 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 trace@reinventnow.com Wed Jul 4 22:39:24 2001 From: trace@reinventnow.com (tracy s. ruggles) Date: Wed, 04 Jul 2001 16:39:24 -0500 Subject: [Pythonmac-SIG] Re: "Bad marshal data" on startup... In-Reply-To: Message-ID: Well, I just trashed the Python preferences folder in the system folder, reinstalled and everything is fine. Does anybody know what happened? --t on 7/4/01 3:38 PM, tracy s. ruggles at trace@reinventnow.com wrote: > Hi, I'm Python-less right now and my life seems so totally meaningless! :-) > > My Python IDE won't start-up for either 2.0 or 2.1. I even tried > re-installing 2.1 to clean up the installation. But, every time, I get this > traceback: > > Traceback (most recent call last): > File "theGarden:Python 2.0:Mac:Tools:IDE:PythonIDE.py", line 41, in ? > import PythonIDEMain > File "theGarden:Python 2.0:Mac:Tools:IDE:PythonIDEMain.py", line 254, in ? > PythonIDE() > File "theGarden:Python 2.0:Mac:Tools:IDE:PythonIDEMain.py", line 16, in > __init__ > Wapplication.Application.__init__(self, 'Pide') > File "theGarden:Python 2.0:Mac:Tools:IDE:Wapplication.py", line 18, in > __init__ > FrameWork.Application.__init__(self) > File "thegarden:python 2.0:mac:lib:FrameWork.py", line 105, in __init__ > self.makemenubar() > File "theGarden:Python 2.0:Mac:Tools:IDE:Wapplication.py", line 247, in > makemenubar > self.makeusermenus() > File "theGarden:Python 2.0:Mac:Tools:IDE:PythonIDEMain.py", line 101, in > makeusermenus > prefs = self.getprefs() > File "theGarden:Python 2.0:Mac:Tools:IDE:Wapplication.py", line 377, in > getprefs > return MacPrefs.GetPrefs(self.preffilepath) > File "theGarden:Python 2.0:Mac:Tools:IDE:MacPrefs.py", line 106, in GetPrefs > preffile = PrefFile(path, creator) > File "theGarden:Python 2.0:Mac:Tools:IDE:MacPrefs.py", line 53, in __init__ > prefdict = marshal.load(open(self.__path, 'rb')) > ValueError: bad marshal data > > .. > > The interpreter will start-up fine, but I've become so dependent on the IDE > that I can't imagine working with just the interpreter anymore. Has this > happened to anyone else and how do I get the IDE back?!? > > Thanks, > Tracy > > > -- > Tracy S. Ruggles :: trace@reinventnow.com :: 512/858.2280 > > "RHUBARB. / Rhubarb is susan not susan not seat in bunch toys not wild and > laughable not in little places not in neglect and vegetable not in fold coal > age not please." -- Gertrude Stein > -- Tracy S. Ruggles :: trace@reinventnow.com :: 512/858.2280 "RHUBARB. / Rhubarb is susan not susan not seat in bunch toys not wild and laughable not in little places not in neglect and vegetable not in fold coal age not please." -- Gertrude Stein From jack@oratrix.nl Wed Jul 4 23:08:51 2001 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 05 Jul 2001 00:08:51 +0200 Subject: [Pythonmac-SIG] Filename encodings on the Mac Message-ID: <20010704220856.8D172DA740@oratrix.oratrix.nl> In the process of getting better unicode support I'm now looking at converting unicode strings to 8-bit strings correctly for filenames. Python has hooks to do this, but I must say I'm rather unsure how MacOS handles encodings. If I create a disk on a macroman system and then bring it to a macgreek system, what will happen to my filenames? Is it only the current script/language setting that influences how filenames are interpreted, or does the disk (filename?) actually store the fact that it was created on a macroman system? -- 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 just@letterror.com Thu Jul 5 07:53:31 2001 From: just@letterror.com (Just van Rossum) Date: Thu, 5 Jul 2001 08:53:31 +0200 Subject: [Pythonmac-SIG] "Bad marshal data" on startup... In-Reply-To: <20010704210054.0BFEADA740@oratrix.oratrix.nl> Message-ID: <20010705085340-r01010600-4e472829@194.94.211.197> Jack Jansen wrote: > Just, could you arm the IDE against this with a try/except? I guess that would be a good thing. Still: it seems a *very* rare thing... Or at least it has _never_ happended to me in all those years of developing and using the IDE, and I hardly ever erase the IDE prefs. I use different Python versions (1.5.1 -> 2.2a0), and all IDE's use the same prefs file: I've never seen a problem. Just From kp87@lycos.com Thu Jul 5 13:34:07 2001 From: kp87@lycos.com (kevin parks) Date: Thu, 05 Jul 2001 21:34:07 +0900 Subject: [Pythonmac-SIG] Syntax coloring, etc. Message-ID: Hi. I am using Python 2.1 on OS 9.1 (also under X, but right now only experimentally) I was wondering how does one get the syntax coloring and other such niceties of the IDLE to show up in the Mac IDE? Is there some module that has to be imported to turn it on? I don't own Pepper or BBedit (only the lite version, which is free) and cannot buy either as i live in Korea and have no credit card. I was hoping that there was still a way to get the Mac IDE suped up a bit with some extra niceties. Any tips on making the Mac IDE more... uhm.. pleasant like the UNIX and Windoze IDEs (IDLE and the PythonWin package doodad). cheers, -kevin-- kp87@lycos.com ps. I am also, incidentally, trying to get the hang of list comprehensions, which is a new language construct for Python 2.x. If anyone knows any really clear & basic toots on this aspect of the language i would love to know. As this query is off topic, perhaps off-list is better. Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ From trace@reinventnow.com Thu Jul 5 15:00:10 2001 From: trace@reinventnow.com (tracy s. ruggles) Date: Thu, 05 Jul 2001 09:00:10 -0500 Subject: [Pythonmac-SIG] "Bad marshal data" on startup... In-Reply-To: <20010705085340-r01010600-4e472829@194.94.211.197> Message-ID: I can't think of anything that I've done recently that might have corrupted the prefs file, except for running Norton Disk Doctor and having it fix all the "tiny" problems it finds like modification dates and bundle bits and whatnot. Though, I wouldn't imagine it would actually corrupt a file. Maybe it did... --T on 7/5/01 1:53 AM, Just van Rossum at just@letterror.com wrote: > Jack Jansen wrote: > >> Just, could you arm the IDE against this with a try/except? > > I guess that would be a good thing. Still: it seems a *very* rare thing... Or > at > least it has _never_ happended to me in all those years of developing and > using > the IDE, and I hardly ever erase the IDE prefs. I use different Python > versions > (1.5.1 -> 2.2a0), and all IDE's use the same prefs file: I've never seen a > problem. > > Just > From jwblist@olympus.net Thu Jul 5 16:51:44 2001 From: jwblist@olympus.net (John W Baxter) Date: Thu, 5 Jul 2001 08:51:44 -0700 Subject: [Pythonmac-SIG] "Bad marshal data" on startup... In-Reply-To: References: Message-ID: At 9:00 -0500 7/5/2001, tracy s. ruggles wrote: >I can't think of anything that I've done recently that might have corrupted >the prefs file, except for running Norton Disk Doctor and having it fix all >the "tiny" problems it finds like modification dates and bundle bits and >whatnot. Though, I wouldn't imagine it would actually corrupt a file. >Maybe it did... I gave up letting Norton "fix" bundle bits and the like many years ago, when I noted that Norton was "fixing" files of new varieties fresh off Apple's installs. My feeling was that Apple probably shipped (most of) the files the way they intended them to be. This coincided roughly with the conversion of the Peter Norton Group into just another part of Symantec (they had survived pretty much intact for a couple of years and had still done good work even under Symantec). --john -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From Aureli.Soria_Frisch@ipk.fhg.de Thu Jul 5 18:20:26 2001 From: Aureli.Soria_Frisch@ipk.fhg.de (Aureli Soria Frisch) Date: Thu, 5 Jul 2001 19:20:26 +0200 Subject: [Pythonmac-SIG] Plotting with gnuplot iunder MacPython In-Reply-To: Message-ID: Hi, I am using MacPython 2.0 and Gnuplot.py version 1.5 (based on Gnuplot 3.7.1a). It seems that the number of plots per window (plot + replot) is limited to 4, although the number of point styles is 6 (checked with the function test on the gnupplot console). Moreover, when putting a legend (with the option title) this number is reduced to 2. I have tried to increase the memory of Gnuplot, but nothing changed. Can someone tell something about these? Thanks in advance, Aureli ################################# Aureli Soria Frisch Fraunhofer IPK Dept. Pattern Recognition post: Pascalstr. 8-9, 10587 Berlin, Germany e-mail:aureli@ipk.fhg.de fon: +49 30 39006-150 fax: +49 30 3917517 ################################# From kp87@lycos.com Fri Jul 6 08:32:33 2001 From: kp87@lycos.com (kevin parks) Date: Fri, 06 Jul 2001 16:32:33 +0900 Subject: [Pythonmac-SIG] batch convert line endings Message-ID: What are people using to batch convert folders full of text files that may have DOS or UNIX line endings to Mac line endings? I was using Cyclone, but it is a pain in the butt as it prompts for each file and also it does a lot more than convert line endings so it is not really optimized just for that. I would love a little droplet like Drop•BB or Drop RENAME, etc. that i could put on my desk top and then drag and drop the folder on to it and have all the files changed to Mac line endings. Of course, Mac to UNIX aor DOS line endings would be good too! in case you wanted to send a folder of stuff from your MAC to a Windoze or UNIX user. cheers, -kp-- Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ From mjb@thp.Uni-Koeln.DE Fri Jul 6 09:10:25 2001 From: mjb@thp.Uni-Koeln.DE (MichaelJ Barber) Date: Fri, 6 Jul 2001 10:10:25 +0200 (MEST) Subject: [Pythonmac-SIG] batch convert line endings In-Reply-To: Message-ID: On Fri, 6 Jul 2001, kevin parks wrote: > What are people using to batch convert folders full of text files > I use something called "Odd Jobs" to do this. It's a shareware program that lets you create little file-processing "joblets" (droplets) to do a variety of tasks. Several joblets come with Odd Jobs and it is pretty easy to make new joblets. A joblet to convert line endings to Mac format is included, and can be easily modified to make joblets converting to Unix and DOS formats. I have no idea how well Odd Jobs works under OS X, if at all. I have used it without problems under OS 8.1 and OS 8.6 (mostly the latter). No connection to the author of Odd Jobs, just a satisfied user of some of his software. You can get it at . From jack@oratrix.nl Fri Jul 6 09:44:33 2001 From: jack@oratrix.nl (Jack Jansen) Date: Fri, 06 Jul 2001 10:44:33 +0200 Subject: [Pythonmac-SIG] The Official MacPython LineEnding Converter Competition In-Reply-To: Message by "kevin parks" , Fri, 06 Jul 2001 16:32:33 +0900 , Message-ID: <20010706084434.11347303181@snelboot.oratrix.nl> > What are people using to batch convert folders full of text files that = may > have DOS or UNIX line endings to Mac line endings? This question is asked *so* often, that I hereby declare started The Official MacPython LineEnding Converter Competition The winning applet will be included prominently in the next MacPython = distribution, with the author's name featuring in the "thanks" list. The = author will also receive 1 (one) free copy of MacPython, in addition to = eternal fame. Entries should at least - have a decent UI. This means either an applet with a nice icon, or a pl= ugin = for IDE. - allow folders to be dropped on them (or be selected, if an IDE plugin),= = recursively converting files - give a report of what they did (which files they converted) and optiona= lly = run in "dry run" mode where they only show what they would like to do - be safe, i.e. not remove the original before the new copy is safely on = disk, = not mistreat non-text files, etc. - come with source. *Readable* source. Extra points if the source is so = readable that the script can go straight into the "examples" section. There's of course lots of nifty things that can gain you extra points, su= ch as = an option to do only .py files or all text files, an option to set the = creator/type for .py files, an option to convert back to unix/dos endings= , etc. Entries should be sent to the list, and the whole list will judge which s= cript = wins. If there's a tie the list maintainer (indeed, me:-) gets the tiebre= aking = vote. Entries should be in by August 1. -- 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 moehl@akaflieg.extern.tu-berlin.de Fri Jul 6 11:49:35 2001 From: moehl@akaflieg.extern.tu-berlin.de (Torsten Sadowski) Date: Fri, 6 Jul 2001 12:49:35 +0200 (CEST) Subject: [Pythonmac-SIG] Filename encodings on the Mac In-Reply-To: <20010704220856.8D172DA740@oratrix.oratrix.nl> Message-ID: I would suspect that MacOS does not differentiate between systems. I once installed a hungarian system and before the installation I had very strange filenames. It seems, MacOS just uses its own 8bit encoding and ignores everything else. Torsten From richard@richardgordon.net Fri Jul 6 14:35:08 2001 From: richard@richardgordon.net (Richard Gordon) Date: Fri, 6 Jul 2001 09:35:08 -0400 Subject: [Pythonmac-SIG] batch convert line endings In-Reply-To: References: Message-ID: At 4:32 PM +0900 7/6/01, kevin parks wrote: >What are people using to batch convert folders full of text files >that may have DOS or UNIX line endings to Mac line endings? hi- If you just want something simple and fast, the script below works for me and will run thru a folder structure recursively. A few notes: * It saves each original file by appending a ~ to the name, then blows the original away once the conversion is complete. This is lame and came about because I was having trouble overwriting the original directly and was in a hurry to get something working. * I am running it by launching with the option key down and feeding in the pathname to the base folder; it would be better if it gave you a get folder dialog should sys.arg[1] be missing. This is easy using macfs.GetDirectory('Folder to search:'), I just never got around to it. * Converting this to an application/applet will let you do the drag & drop if you prefer that. * Strictly unix and/or windoze -> Mac conversion. Somebody else posted a script here a while back that went in any direction and, as I recall, didn't permanently convert anything, but converted endings on the fly as needed- seems like the idea was to import it as a module, then feed input files thru it into the main script that did whatever you were trying to do, tho I never tried it and could be wrong about that. * Email tends to hose up indentation, so if this doesn't run check the whitespace. Have fun. __________________ #!/usr/bin/env python import sys, os from time import time start = time() indir = sys.argv[1:] fcount = 0 def strip(f): global fcount zap = 0 infh = open(f, 'rb').read() os.rename(f, f +'~') outfh = open(f, 'wb') if infh.find('\r\n') != -1: outfh.write(infh.replace('\n','')) zap = 1 elif infh.find('\n') != -1: outfh.write(infh.replace('\n','\r')) zap = 1 else: pass outfh.close() if zap > 0: os.remove(f +'~') fcount = fcount + 1 return def run(d): names = os.listdir(d) for name in names: f = d + ':' + name if os.path.isfile(f): if os.path.splitext(f)[1]=='.py': strip(f) else: run(f) for arg in indir: run(arg) stop = time() elapsed = stop-start print "Changed %d files in %d seconds" % (fcount, elapsed) #eof Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From owen@astro.washington.edu Fri Jul 6 18:20:19 2001 From: owen@astro.washington.edu (Russell E Owen) Date: Fri, 6 Jul 2001 10:20:19 -0700 Subject: [Pythonmac-SIG] batch convert line endings In-Reply-To: References: Message-ID: One utility that works is "Change Type and Creator", also called=20 "ctc". It's free and should be available from the usual Mac archives,=20 though it's old. If you have trouble finding it, let me know and I'll=20 email you a copy. Despite the name it include EOL conversion as an option. However, you cannot create "droplets" that do just a specific task.=20 Each time you drop a set of files you get to pick your conversion. -- Russell At 4:32 PM +0900 7/6/01, kevin parks wrote: >What are people using to batch convert folders full of text files=20 >that may have DOS or UNIX line endings to Mac line endings? I was=20 >using Cyclone, but it is a pain in the butt as it prompts for each=20 >file and also it does a lot more than convert line endings so it is=20 >not really optimized just for that. I would love a little droplet=20 >like Drop=EFBB or Drop RENAME, etc. that i could put on my desk top=20 >and then drag and drop the folder on to it and have all the files=20 >changed to Mac line endings. Of course, Mac to UNIX aor DOS line=20 >endings would be good too! in case you wanted to send a folder of=20 >stuff from your MAC to a Windoze or UNIX user. From richard@richardgordon.net Fri Jul 6 23:39:38 2001 From: richard@richardgordon.net (Richard Gordon) Date: Fri, 6 Jul 2001 18:39:38 -0400 Subject: [Pythonmac-SIG] [OT] Python & MySQL Interaction Message-ID: Since I've never even seen a binary of MySQLdb for the Mac and I am using linux for web stuff anyway, this is off topic but I thought you might be interested in a searchable version of "The Devil's Dictionary" by Ambrose Bierce that I published on my website using python and MySQL purely for the hell of it. Apart from providing the opportunity to experience Bierce's peculiar brand of dripping sarcasm, I've included a link to the source code at the bottom of http://richardgordon.net/new/dictionary.html if you should be curious about how this stuff works. I personally have little use for MySQL and would much prefer PostgreSQL, but my web host has other thoughts on the subject and, in any case, the drill is pretty much the same as far as the python interface goes. Enjoy it, ignore it, whatever. I welcome any criticisms, but have not bothered to bullet-proof this against some fairly obvious web attacks since I was disclosing the source anyway, so please don't trash the server even if you know how. Thanks. Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From chrishbarker@home.net Sat Jul 7 00:50:29 2001 From: chrishbarker@home.net (Chris Barker) Date: Fri, 06 Jul 2001 16:50:29 -0700 Subject: [Pythonmac-SIG] The Official MacPython LineEnding Converter Competition References: <20010706084434.11347303181@snelboot.oratrix.nl> Message-ID: <3B464EC5.91D48333@home.net> Jack Jansen wrote: > There's of course lots of nifty things that can gain you extra points, such as > an option to do only .py files or all text files, an option to set the > creator/type for .py files, an option to convert back to unix/dos endings, etc. Another very nifty option would be to include indentation conversion: The removal of any mixed tab+spaces indentation, and perhaps conversion to all tabs or all spaces. The "Official" Standard now is all spaces, but all tabs works much better in the IDE, and most Mac Editors, so that's what I use on the Mac. -Chris -- Christopher Barker, Ph.D. ChrisHBarker@home.net --- --- --- http://members.home.net/barkerlohmann ---@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Oil Spill Modeling ------ @ ------ @ ------ @ Water Resources Engineering ------- --------- -------- Coastal and Fluvial Hydrodynamics -------------------------------------- ------------------------------------------------------------------------ From mday@mac.com Sun Jul 8 02:15:44 2001 From: mday@mac.com (Mark Day) Date: Sat, 07 Jul 2001 18:15:44 -0700 Subject: [Pythonmac-SIG] Filename encodings on the Mac In-Reply-To: <20010704220856.8D172DA740@oratrix.oratrix.nl> Message-ID: on 7/4/01 3:08 PM, Jack Jansen at jack@oratrix.nl wrote: > In the process of getting better unicode support I'm now looking at > converting unicode strings to 8-bit strings correctly for filenames. > > Python has hooks to do this, but I must say I'm rather unsure how > MacOS handles encodings. If I create a disk on a macroman system and > then bring it to a macgreek system, what will happen to my filenames? > Is it only the current script/language setting that influences how > filenames are interpreted, or does the disk (filename?) actually store > the fact that it was created on a macroman system? HFS volumes store filenames as a sequence of one to 31 bytes. There is no encoding stored with the name. How those bytes are interpretted is up to the application. HFS Plus volumes store filenames as a sequence of one to 255 16-bit Unicode characters. The catalog record contains a text encoding hint that suggests a Mac text encoding that will preserve the filename bytes when using the HFS APIs (eg., HCreate and PBGetCatInfo). The File Manager maintains a default text encoding which it uses as a default when it needs to convert input names to or from Unicode. This default encoding is usually the text encoding associated with the Finder's view font, but Installer can change the default encoding when installing a localized OS (so that the encodings stored on an HFS Plus volume are correct). Suppose you're running Mac OS 9 or earlier, and Finder's view font is a MacRoman font (such as Geneva). Create or rename a file or folder in the Finder. On an HFS volume, those characters you typed are converted to bytes using the MacRoman encoding; those bytes are stored in the catalog. On an HFS Plus volume, those bytes get converted to Unicode using the MacRoman encoding, and the text encoding hint is set to MacRoman. Note that MacRoman uses one byte per character, and all 256 byte values represent a valid character in the encoding. Now suppose you change the view font to Osaka. The text encoding associated with Osaka is MacJapanse, so the File Manager's default encoding is set to MacJapanese. When the Finder displays an HFS filename, the string of bytes on disk are returned unchanged by PBGetCatInfo, and Finder displays them as if they are in MacJapanese encoding (regardless of the encoding used when the name was created or renamed!). On an HFS Plus volume, the PBGetCatInfo call converts the Unicode on disk to a string of bytes based on the text encoding stored in that catalog record, and Finder displays those bytes as if they are in MacJapanese. Finder in Mac OS 9 and earlier does not use the HFS Plus APIs except for copying files, so it doesn't know the text encoding hint associated with the name. Note that MacJapanese uses either one or two bytes per character, and that some sequences of bytes do not result in valid MacJapanese characters. As it happens, plain old ASCII is a subset of all of the Mac encodings. If you created a name using MacRoman, and it contains non-ASCII characters (such as accented characters), those non-ASCII characters may or may not result in valid (meaningful) Japanese characters. Typcially the non-ASCII character and the following (MacRoman) character are converted to a single (two-byte) MacJapanese character. If you created the filename using MacJapanese, the MacJapanese characters would be converted to a sequence of bytes on HFS, or to Unicode and a MacJapanese text encoding hint. If you switch to MacRoman, the File Manager returns the same sequence of bytes, and non-ASCII characters from the MacJapanese name get displayed as two characters (the first one being non-ASCII). The Mac OS X Finder uses the HFS Plus APIs (eg., FSGetCatalogInfo), so it uses Unicode when calling the File Manager or displaying names. On HFS Plus volumes, that Unicode is passed back and forth essentially unchanged (Unicode allows the same string to be encoded using different sequences of Unicode code points, and HFS Plus always stores names on disk in one canonical form). On HFS volumes, those Unicode strings are converted to a (single) Mac encoding when being stored, and converted from a Mac encoding to Unicode when coming back from the File Manager. Remember that a Unicode string can contain characters from multiple languages, and it may be impossible to convert it to a string in any single Mac encoding. Hope this helps. If you have more questions (and I'm sure you will!), let me know. -Mark From jack@oratrix.nl Sun Jul 8 21:56:53 2001 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 08 Jul 2001 22:56:53 +0200 Subject: [Pythonmac-SIG] Filename encodings on the Mac In-Reply-To: Message by Mark Day , Sat, 07 Jul 2001 18:15:44 -0700 , Message-ID: <20010708205658.EEADADA741@oratrix.oratrix.nl> Mark, thanks, that was very helpful! I think that this means that the solution I've just implemented (when you pass a unicode string where an 8-bit string is expected we convert with to the encoding of the current system font) is probably the best we can do. Unicode characters that are representable in the current encoding are passed through unscathed, and we can't do any better as the APIs underlying Python open() and friends (libc fopen(), in this case) don't allow us to do any better. But there's still a problem with the multibyte system fonts, I think. If MacPython knows there's no Python unicode codec for the current encoding it pretends that 8bit characters are MacRoman. So, passing a correct unicode Japanese filename to open() will cause it to fail if there are non-ascii characters in there: the Python unicode->macroman converter will complain that the characters are not available in the macroman set. Returning MacRoman is my guess, the alternative is returning "ascii", which will only allow 7bit characters. If people using multibyte systems (or single-byte systems for an encoding for which no Python unicode codec yet exists) feel that returning ascii would be a better idea: let me know. Or better, let's discuss this on the mailing list. It must be possible to create a multibyte MacJapanese <-> Unicode codec with the Python unicode infrastructure: after all there's a utf-8 codec too, and that's also a multibyte encoding. But I'm completely out of my water here. If someone wants to create one and contribute it I'll gladly try and have it incorporated in the standard distribution, and I can put people into contact with the Python unicode gurus, but that's about as much as I can promise. -- 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 Sun Jul 8 22:35:15 2001 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 08 Jul 2001 23:35:15 +0200 Subject: [Pythonmac-SIG] Anyone using mfs_GetFSSpecFSSpec? Message-ID: <20010708213520.8DB0BDA741@oratrix.oratrix.nl> Has anyone written extension modules that use mfs_GetFSSpecFSSpec directly? You shouldn't (PyMac_GetFSSpec is the right way to get an FSSpec), and I'm replacing it with another routine, but it would be 10 seconds work to keep it for backward compatibility if anyone wants it, so speak up now if you do. -- 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 kp87@lycos.com Mon Jul 9 11:50:02 2001 From: kp87@lycos.com (parks kevin) Date: Mon, 09 Jul 2001 19:50:02 +0900 Subject: [Pythonmac-SIG] executing scripts on OS X Message-ID: I am trying to get python going on my OS X partition. I was able to make a text file called hello.py and put in it the revolutionary and complex bit of code !#/usr/local/bin/python print "hello, fool!" Now when i did: % python hello.py everything was dandy. however i did the CHMOD bit to make the file executable and the tried sh-banging it % hello.py nothing. just hello.py: Command not found. i also tried : !#/usr/bin/python !#/usr/bin/env python but no go! Is there a Python env variable or something that needs to be set or a path modification that i have missed? obviously python is on my path since i can get the interpreter. Sorry about this, I used to have a NeXT machine (*sigh*) and haven't used UNIX since then. Much is the same, But almost as much is different. tcsh i wildly different. I don't understand the new system of startup files. in the old days you had .login .logout and .tcshrc. Now there is a boat load of start-up files in a global + user muckable system, with links and pointers everywhere. Add to this mess that Apple (Unlike NeXT) treats us like babies and only allows us to muck with invisibles via the shell. (open -a TextEdit foo.py never works for me for some reason) and wouldn't you know it the csh/vi part of my brain has been accidentally erased. cheers, -kevin Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ From jacobkm@cats.ucsc.edu Mon Jul 9 12:11:21 2001 From: jacobkm@cats.ucsc.edu (Jacob Kaplan-Moss) Date: Mon, 9 Jul 2001 12:11:21 +0100 Subject: [Pythonmac-SIG] executing scripts on OS X In-Reply-To: References: Message-ID: At 7:50 PM +0900 7/9/01, parks kevin wrote: [snip] >Now when i did: > >% python hello.py > >everything was dandy. > >however i did the CHMOD bit to make the file executable and the >tried sh-banging it > >% hello.py > >nothing. just hello.py: Command not found. Try: % ./hello.py Why? Under a *nix, you've got to give a full path for any command. So if the file "hello.py" is in a directory that you have in your PATH (i.e. /usr/bin or something) it will work just fine, but since (I'm assuming) hello.py is not in your PATH, you need to tell the shell where that file is. Hope that helps, -j From jack@oratrix.nl Mon Jul 9 13:10:56 2001 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 09 Jul 2001 14:10:56 +0200 Subject: [Pythonmac-SIG] executing scripts on OS X In-Reply-To: Message by "parks kevin" , Mon, 09 Jul 2001 19:50:02 +0900 , Message-ID: <20010709121057.0CFDD303181@snelboot.oratrix.nl> Jacob's reply is also correct, in a way, but it doesn't address the exact problem, which is: > !#/usr/local/bin/python You have ! and # reversed. Try #!/usr/local/bin/python and everything should be fine. -- 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 kp87@lycos.com Mon Jul 9 13:29:32 2001 From: kp87@lycos.com (parks kevin) Date: Mon, 09 Jul 2001 21:29:32 +0900 Subject: [Pythonmac-SIG] executing scripts on OS X Message-ID: oh, sorry i mistyped in the e-mail message (should have copied). The scripts itself is #! correct. but still no go. On Mon, 09 Jul 2001 14:10:56 Jack Jansen wrote: >Jacob's reply is also correct, in a way, but it doesn't address the exact >problem, which is: > >> !#/usr/local/bin/python > >You have ! and # reversed. Try #!/usr/local/bin/python and everything should >be fine. >-- Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ From richard@richardgordon.net Mon Jul 9 14:40:32 2001 From: richard@richardgordon.net (Richard Gordon) Date: Mon, 9 Jul 2001 09:40:32 -0400 Subject: [Pythonmac-SIG] executing scripts on OS X In-Reply-To: References: Message-ID: At 9:29 PM +0900 7/9/01, parks kevin wrote: >oh, sorry i mistyped in the e-mail message (should have copied). The >scripts itself is #! correct. but still no go. Are you sure that python is installed in /usr/local/bin ? I don't know too much about OS X, but I would assume that if you do whereis python from the command line, you can confirm this. Alternatively, using #!/usr/bin/env python in your script usually works. Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From kp87@lycos.com Mon Jul 9 17:27:49 2001 From: kp87@lycos.com (parks kevin) Date: Tue, 10 Jul 2001 01:27:49 +0900 Subject: [Pythonmac-SIG] setting tcsh path in OS X.bloat Message-ID: I am sorry if this is too off topic, if so i apologize. I find the tcsh configuration on Mac OS X to be very very confusing. First there are the sort of global system-wide defaults for the tcsh. These would be in /etc. As in /etc/csh.cshrc /etc/csh.csh.login /etc/csh.logout In the old days these might actually be expected to contain data or instructions. That wasn't convoluted enough so now these files reference something else: [localhost:/etc] kevin% more csh* :::::::::::::: csh.cshrc :::::::::::::: source /usr/share/init/tcsh/rc :::::::::::::: csh.login :::::::::::::: source /usr/share/init/tcsh/login :::::::::::::: csh.logout :::::::::::::: source /usr/share/init/tcsh/logout but if you go there you are greeted by more than login, logout and rc 8 -r--r--r-- 1 root wheel 952 Feb 17 12:48 README 8 -r--r--r-- 1 root wheel 892 Feb 17 12:48 aliases 24 -r--r--r-- 1 root wheel 9366 Feb 17 12:48 completions 8 -r--r--r-- 1 root wheel 433 Feb 17 12:48 environment 8 -r--r--r-- 1 root wheel 695 Feb 17 12:48 login 8 -r--r--r-- 1 root wheel 395 Feb 17 12:48 logout 8 -r--r--r-- 1 root wheel 1938 Feb 17 12:48 rc 8 -r--r--r-- 1 root wheel 2400 Feb 17 12:48 tcsh.defaults ok, it is easy enough to know what these are for. We've finally actually gotten to the defaults for the tcsh files. And we have a really shitty README to boot, one that is as terse as a man page (read: not for human beans) and unlike most unix man pages, totally useless and incomprehenable (UNIX man pages are like 97% useless). Reading the really unreadble README file we learn that we are supposed to customize our tcsh by creating a ~/Library/init/tcsh dir and the following files: aliases.mine - shell aliases completions.mine - completions environment.mine - environment rc.mine - run commands path - command search path We learn almost nothing else. The fool who wrote the README expects us to read the usr/share/init/tcsh/ and figure it out. Since i am also a fool and a technically challeged one at that i am at a loss as to how to _*ADD*_ to my path and not just clobber it. Additionally putting junk in path does nothing. Infact a look at /usr/share/init/tcsh/login reveals: ## # Read user's login ## if (-r "${tcsh_initdir}/login.mine") then source "${tcsh_initdir}/login.mine" endif Which leads me to believe that the ~/Library/init/tcsh/path file should be called ~/Library/init/tcsh//login.mine. Low and behold, this doesn't work either. I want (like freaking crazy) to be able execute scripts in various dirs without having to type the whole path. I want to say: kevin% hello.py and not kevin% ~/freakinpath/reallylongpath/killmepleasepath/godimissmyNeXT/hello.py But to do this i need to edit (or really append or extend) my path, how on god's green earth do you do this in OS X.bloat? Thanks "i miss windowshading like crazy-ily yours" -kevin-- Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ From andy@reportlab.com Mon Jul 9 17:55:10 2001 From: andy@reportlab.com (Andy Robinson) Date: Mon, 9 Jul 2001 17:55:10 +0100 Subject: [Pythonmac-SIG] Confused Mac Newbie Message-ID: Just ported a customer application to the Mac, a platform about which I know next to nothing. This is a clean installation of Python 2.1 on Mac OS 9.1. The command line apps work fine, but when I try to do anything with Tkinter I get this: > Traceback (most recent call last): > File "S9916:Applications:Python 2.1:Pmw:Pmw_0_8_5:demos:AboutDialog.py", > line 7, in ? > import Tkinter > File "s9916:applications:python 2.1:lib:lib-tk:Tkinter.py", line 35, in > ? > import _tkinter # If this fails your Python may not be configured for > Tk > ImportError: Tkinter not supported under Carbon (yet). > We aren't running OS X! Does anyone else have this problem? Is there a known problem with Tkinter on Python 2.1. Apologies if this is an FAQ - I just joined the SIG. Andy Robinson CEO and Chief Architect, ReportLab Inc. From chrishbarker@home.net Mon Jul 9 18:18:20 2001 From: chrishbarker@home.net (Chris Barker) Date: Mon, 09 Jul 2001 10:18:20 -0700 Subject: [Pythonmac-SIG] setting tcsh path in OS X.bloat References: Message-ID: <3B49E75C.828278C9@home.net> parks kevin wrote: > I am sorry if this is too off topic, if so i apologize. I'll keep it going anyway... someone yell if you want us to stop. I've only played a littel with OS X, but as a long time Linux user I may be able to help out some here. >I find the tcsh configuration on Mac OS X to be very very confusing. YOW! what a nighmare, but it looks to me like the real problem is documentation, not the wet-up, it looks like it's actually a pretty nifty set up, as long as you know where you need to go to change things. > how to _*ADD*_ to my path and not just clobber it. usually this is done with a line like: set PATH=$PATH:/new/dir/here or set PATH=/new/dir/here:$PATH the $PATH gives you the existing path, and you can then just add on. > I want (like freaking crazy) to be able execute scripts in various dirs without having to type the whole path. I want to say: > > kevin% hello.py > > and not > > kevin% ~/freakinpath/reallylongpath/killmepleasepath/godimissmyNeXT/hello.py > > But to do this i need to edit (or really append or extend) my path, how on god's green earth do you do this in OS X.bloat? You should be careful about this anyway. I don't know if you are an old DOS/Windows user, but the practice of putting executables anywhere you want, and then adding the dir to the PATH results in a mess, and is not the Unix way. In Unix, there are a small set of places that stuff you want to run are put. On lInux, anyway, these are: \bin : core system programs \sbin : system adminstation programs, usually not on a normal users PATH \usr\bin : most programs installed by the native system installer \usr\local\bin: programs installed by the user There may be a few others, like /usr/X11R6/bin for X-windows stuff. I don't know what the OS X standards are, but it is a really good idea to stick to them, whatever they are. Any program you write yourself (or just install yourself) should go into /usr/local/bin. You don't need to put the whole program there. If it is a liitle program or simple script, I usually just put it there. If it is a more comlicated set-up, you can put the rest of it in its own directory: /usr/local/myprogram, and then put a symbolic link into /usr/local/bin. The other option is to put the various parts of your program into the classic places: /usr/local/lib, /usr/local/share, etc. (Python is put into /usr/local/lib/python2.1 on my system). Personally, I think that's ugly: why should Python be in lib? The Python headers go into /usr/local/include, which makes some sense at least. On the old Mac, there is no path, as there is no command line. There is no standard place for anything outside the system folder, so people end up putting aliases to programs on their desktop (or in the launcher) so that you don't have to go hunt all over the sytem to find a program and start it. This is analogous to putting a symbolic link in /usr/local/bin. Some people do want their current working directory to be in the PATH (as that is how this thread started) this was always the case on DOS, but is not with Unix. You can add it to your path: set PATH = ./:$PATH This is considered dangerous in the Unix community in general. I'm not sure why, but I stick with the standard just type the ./ when I want to run a script in my current directory. > "i miss windowshading like crazy-ily yours" Does OS X not windowshade? This just confirms my feeling that OS X is just a poor imitation of Linux with KDE, and some extra eye candy. Good luck, and welcome to Unix! -Chris -- Christopher Barker, Ph.D. ChrisHBarker@home.net --- --- --- http://members.home.net/barkerlohmann ---@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Oil Spill Modeling ------ @ ------ @ ------ @ Water Resources Engineering ------- --------- -------- Coastal and Fluvial Hydrodynamics -------------------------------------- ------------------------------------------------------------------------ From gandreas@delver.com Mon Jul 9 18:09:26 2001 From: gandreas@delver.com (Glenn Andreas) Date: Mon, 9 Jul 2001 12:09:26 -0500 Subject: [Pythonmac-SIG] setting tcsh path in OS X.bloat In-Reply-To: <3B49E75C.828278C9@home.net> References: <3B49E75C.828278C9@home.net> Message-ID: >Some people do want their current working directory to be in the PATH >(as that is how this thread started) this was always the case on DOS, >but is not with Unix. You can add it to your path: > >set PATH = ./:$PATH > >This is considered dangerous in the Unix community in general. I'm not >sure why, but I stick with the standard just type the ./ when I want to >run a script in my current directory. This is because if you download anything from the net, it would be trivial for somebody to add a scripted called "ls" or "cd" into that archive, then you'd do something simple like: tar -xvf evilfile.tar cd evildir ls and suddenly be executing the "ls" script that came from the evil archive which, besides performing a "real" ls to show you what files (minus their own scripts) it could then modify all of your files, take over your computer, send your credit card information to Elbonia, cause flooding in your basement, and make your cat/dog's hair fall out. Glenn Andreas gandreas@delver.com Author of Macintosh games: Theldrow 2.3, Blobbo 1.0.2, Cythera 1.0.2 Be good, and you will be lonesome From owen@astro.washington.edu Mon Jul 9 18:09:55 2001 From: owen@astro.washington.edu (Russell E Owen) Date: Mon, 9 Jul 2001 10:09:55 -0700 Subject: [Pythonmac-SIG] Confused Mac Newbie In-Reply-To: References: Message-ID: For MacOS 9, you have a choice of running MacPython using Carbon or Classic. Only Classic supports Tkinter. To run using Classic double-click the application "ConfigurePythonClassic". If you've not found the release notes, I suggest a careful read -- see "Relnotes" in the "Relnotes" folder. Best of luck with the Mac port. Tkinter has some quirks under the Mac (as noted in the release notes). In particular: - run your app by dragging it onto PythonInterpreter (do NOT use Python IDE for Tkinter applications) - file events are broken - your application may not yield many CPU cycles to background apps - custom Menus may be flaky (I've never gotten them to work reliably) Regards, -- Russell >...> ImportError: Tkinter not supported under Carbon (yet). > >We aren't running OS X! Does anyone else have this problem? >Is there a known problem with Tkinter on Python 2.1... From doug@sonosphere.com Mon Jul 9 18:42:21 2001 From: doug@sonosphere.com (Doug Wyatt) Date: Mon, 9 Jul 2001 10:42:21 -0700 Subject: [Pythonmac-SIG] executing scripts on OS X In-Reply-To: Message-ID: I've found that a common gotcha is that to run the Unix-style Python from the OS X terminal, the script must be saved with Unix line endings (i.e. \n not \r). Doug On Monday, July 9, 2001, at 04:11 AM, Jacob Kaplan-Moss wrote: > At 7:50 PM +0900 7/9/01, parks kevin wrote: > [snip] >> Now when i did: >> >> % python hello.py >> >> everything was dandy. >> >> however i did the CHMOD bit to make the file executable and the tried >> sh-banging it >> >> % hello.py >> >> nothing. just hello.py: Command not found. > > > Try: > > % ./hello.py > > Why? > > Under a *nix, you've got to give a full path for any command. So if > the file "hello.py" is in a directory that you have in your PATH (i.e. > /usr/bin or something) it will work just fine, but since (I'm assuming) > hello.py is not in your PATH, you need to tell the shell where that > file is. > > Hope that helps, > > -j > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -- Doug Wyatt work: dwyatt@apple.com personal: doug@sonosphere.com http://www.sonosphere.com "It is a miracle that curiosity survives formal education." -- Albert Einstein From jwblist@olympus.net Mon Jul 9 19:11:56 2001 From: jwblist@olympus.net (John W Baxter) Date: Mon, 9 Jul 2001 11:11:56 -0700 Subject: [Pythonmac-SIG] executing scripts on OS X In-Reply-To: References: Message-ID: At 19:50 +0900 7/9/2001, parks kevin wrote: >I am trying to get python going on my OS X partition. I was able to make a >text file called hello.py and put in it the revolutionary and complex bit >of code > >!#/usr/local/bin/python >print "hello, fool!" > > >Now when i did: > >% python hello.py > >everything was dandy. > >however i did the CHMOD bit to make the file executable and the tried >sh-banging it > >% hello.py > >nothing. just hello.py: Command not found. >i also tried : > >!#/usr/bin/python >!#/usr/bin/env python Two things: 1. I hope you mean #! not !#. And I think you do, because the latter gives a traceback when I use python hello.py 2. On my machine, python as a command is a link: lrwxr-xr-x 1 root wheel 25 Jun 22 18:08 /usr/bin/python -> /usr/local/bin/python.exe which python will give you a starting point. This is a "straight" install of the regular Python distribution, not MacPython. --John -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From kp87@lycos.com Mon Jul 9 19:50:29 2001 From: kp87@lycos.com (parks kevin) Date: Tue, 10 Jul 2001 03:50:29 +0900 Subject: [Pythonmac-SIG] Re: executing scripts on OS X Message-ID: I created a dir called ~/scripts. I stuck my little hello.py file: #!/usr/bin/env python print "hello, fool!" Now the python binary is in my path already. i added the scripts folder to my path (by adding my ~/Library/init/tcsh/path file and putting in that file: setenv PATH "$PATH ~/scripts:~/apps" if i type in my prompt setenv, it dumps my env settings and i can see /usr/local/bin and all the usual paths, plus th paths i have added: ~/scripts:~/apps. I stuck a binary in there just as a sanity check so my path is 100% good to go. I go to my prompt and type % cd ~/scripts % hello.py and guess what?! Nothing still command not found. If i type: % ~/scripts/hello.py It is ok. So, what gives? I thought that there was no more set PYTHONPATH? So no matter what you do you must always give the full path to execute a script? -kp-- At least i figured out how to ammend my path. Thanks to the help of MR. Barker though i would still like to know why the full path is required despite the setenv path additions to the startups. Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ From kp87@lycos.com Mon Jul 9 20:00:51 2001 From: kp87@lycos.com (parks kevin) Date: Tue, 10 Jul 2001 04:00:51 +0900 Subject: [Pythonmac-SIG] Re: executing scripts on OS X Message-ID: *** > Try: > > % ./hello.py > > Why? > > Under a *nix, you've got to give a full path for any > command. So if > the file "hello.py" is in a directory that you have in > your PATH > (i.e. /usr/bin or something) it will work just fine, > but since (I'm > assuming) hello.py is not in your PATH, you need to > tell the shell > where that file is. also: > > Jacob's reply is also correct (refering to above) *** the file hello.py is in a directory that is in my path and so is python and my sh-bang is correct and CHMOD is groovy. BUT... seems that you still have to give the full path. God only knows why. Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ From tony@metanet.com Mon Jul 9 20:10:20 2001 From: tony@metanet.com (Tony Lownds) Date: Mon, 9 Jul 2001 12:10:20 -0700 Subject: [Pythonmac-SIG] Re: executing scripts on OS X In-Reply-To: References: Message-ID: > >the file hello.py is in a directory that is in my path and so is >python and my sh-bang is correct and CHMOD is groovy. > >BUT... seems that you still have to give the full path. >God only knows why. In tcsh you must run "rehash" after changing the PATH for it to take effect. Perhaps that is why. -Tony From richard@richardgordon.net Mon Jul 9 20:28:10 2001 From: richard@richardgordon.net (Richard Gordon) Date: Mon, 9 Jul 2001 15:28:10 -0400 Subject: [Pythonmac-SIG] Re: executing scripts on OS X In-Reply-To: References: Message-ID: At 12:10 PM -0700 7/9/01, Tony Lownds wrote: >In tcsh you must run "rehash" after changing the PATH for it to take >effect. Perhaps that is why. You might also need to chmod the directory as well as the script file. Otherwise, I don't know why it isn't working- this doesn't seem to be a problem with mkLinux. Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From andy@reportlab.com Mon Jul 9 20:57:29 2001 From: andy@reportlab.com (Andy Robinson) Date: Mon, 9 Jul 2001 20:57:29 +0100 Subject: [Pythonmac-SIG] Confused Mac Newbie In-Reply-To: Message-ID: > For MacOS 9, you have a choice of running MacPython using Carbon or > Classic. Only Classic supports Tkinter. To run using Classic > double-click the application "ConfigurePythonClassic". Thanks. I guess that explains it! Until now I (and everyone at that customer site) thought Carbon started with OS X Andy From kp87@lycos.com Mon Jul 9 21:54:14 2001 From: kp87@lycos.com (parks kevin) Date: Tue, 10 Jul 2001 05:54:14 +0900 Subject: [Pythonmac-SIG] Re: executing scripts on OS X Message-ID: Re: executing scripts on OS X funny thing is that if you su root and do it the script acts as expected. Just type hello.py at the prompt without the path and the script executes just like a real operating system for big boys and girls. Is this Apple's way of saying unless it is applescript don't script on your macintosh? NeXT was never this restrictive you could even see all your invisible files in the browser (it wasn't the finder then, a finder is something that finds things, like grep or sherlock). [localhost:~] kevin% su root [localhost:/Users/kevin] root# cd bin [localhost:/Users/kevin/bin] root# ls hello.py [localhost:/Users/kevin/bin] root# hello.py hello fool yo mama So what does this mean? Still user error? Thanks for indulging me my queries! I promise to lurk again soon. This is a great list thanks to everyone! If there are actually any people on this list who are running OS X (seems to be more linux than OS X here these days!) and can figure out what is up, it would be good to know. -kevin parks seoul, korea --- kp87@lycos.com Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ From richard@richardgordon.net Mon Jul 9 23:35:49 2001 From: richard@richardgordon.net (Richard Gordon) Date: Mon, 9 Jul 2001 18:35:49 -0400 Subject: [Pythonmac-SIG] Re: executing scripts on OS X In-Reply-To: References: Message-ID: At 5:54 AM +0900 7/10/01, parks kevin wrote: >funny thing is that if you su root and do it the script acts as expected. Sounds like a permissions issue. How are you doing the chmod? I generally use chmod 0755 scriptname.py Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From doug@sonosphere.com Tue Jul 10 00:50:08 2001 From: doug@sonosphere.com (Doug Wyatt) Date: Mon, 9 Jul 2001 16:50:08 -0700 Subject: [Pythonmac-SIG] Re: executing scripts on OS X In-Reply-To: Message-ID: <20C93BA2-74C5-11D5-9A8E-00039301A6E6@wyatdo.apple.com> --Apple-Mail-4--764460665 Content-Transfer-Encoding: 7bit Content-Type: text/plain; format=flowed; charset=us-ascii On Monday, July 9, 2001, at 01:54 PM, parks kevin wrote: > Re: executing scripts on OS X > > funny thing is that if you su root and do it the script acts as > expected. Just type hello.py at the prompt without the path and the > script executes just like a real operating system for big boys and > girls. Is this Apple's way of saying unless it is applescript don't > script on your macintosh? Still sounds like a path/rehash problem ... > NeXT was never this restrictive you could even see all your invisible > files in the browser (it wasn't the finder then, a finder is something > that finds things, like grep or sherlock). There is a way (please don't ask me, I don't know what it is) to see the Unixy files/directories in the Finder. > Thanks for indulging me my queries! I promise to lurk again soon. This > is a great list thanks to everyone! If there are actually any people on > this list who are running OS X (seems to be more linux than OS X here > these days!) and can figure out what is up, it would be good to know. I live on X and run Python scripts on the command line frequently. Doug -- Doug Wyatt work: dwyatt@apple.com personal: doug@sonosphere.com http://www.sonosphere.com "It's kind of fun to do the impossible." -- Walt Disney --Apple-Mail-4--764460665 Content-Transfer-Encoding: 7bit Content-Type: text/enriched; charset=us-ascii On Monday, July 9, 2001, at 01:54 PM, parks kevin wrote: Re: executing scripts on OS X funny thing is that if you su root and do it the script acts as expected. Just type hello.py at the prompt without the path and the script executes just like a real operating system for big boys and girls. Is this Apple's way of saying unless it is applescript don't script on your macintosh? Still sounds like a path/rehash problem ... NeXT was never this restrictive you could even see all your invisible files in the browser (it wasn't the finder then, a finder is something that finds things, like grep or sherlock). There is a way (please don't ask me, I don't know what it is) to see the Unixy files/directories in the Finder. Thanks for indulging me my queries! I promise to lurk again soon. This is a great list thanks to everyone! If there are actually any people on this list who are running OS X (seems to be more linux than OS X here these days!) and can figure out what is up, it would be good to know. I live on X and run Python scripts on the command line frequently. Doug 0000,0000,DEB7 -- Doug Wyatt work: dwyatt@apple.com personal: doug@sonosphere.com http://www.sonosphere.com "It's kind of fun to do the impossible." -- Walt Disney --Apple-Mail-4--764460665-- From mday@mac.com Tue Jul 10 00:59:44 2001 From: mday@mac.com (Mark Day) Date: Mon, 9 Jul 2001 16:59:44 -0700 Subject: [Pythonmac-SIG] Filename encodings on the Mac In-Reply-To: <20010708205658.EEADADA741@oratrix.oratrix.nl> Message-ID: <7824DF26-74C6-11D5-A3F6-00039303AF92@daylight.apple.com.apple.com> On Sunday, July 8, 2001, at 01:56 PM, Jack Jansen wrote: > But there's still a problem with the multibyte system fonts, I think. > If MacPython knows there's no Python unicode codec for the current > encoding it pretends that 8bit characters are MacRoman. So, passing a > correct unicode Japanese filename to open() will cause it to fail if > there are non-ascii characters in there: the Python unicode->macroman > converter will complain that the characters are not available in the > macroman set. Returning MacRoman is my guess, the alternative is > returning "ascii", which will only allow 7bit characters. If people > using multibyte systems (or single-byte systems for an encoding for > which no Python unicode codec yet exists) feel that returning ascii > would be a better idea: let me know. Or better, let's discuss this on > the mailing list. 7-bit ASCII is a subset of all of the Mac encodings. And ASCII is represented the same way in all Mac encodings (as the single byte values 0-127). So, if you can convert the Unicode to 7-bit ASCII, you can pass that ASCII into the open() call regardless of the current default encoding or font. Using Unicode->MacRoman when the current encoding isn't MacRoman can lead to gibberish in the name, or errors from open(). Byte values 128-255 mean different things in different Mac encodings. In MacRoman, they are individual non-ASCII characters. In other encodings, they may be invalid (the other encodings don't always use all possible byte values), they may be different characters than the MacRoman characters with the same byte value, or they may be a part of a two-byte character. If you don't have a codec for the current encoding, and the Unicode won't convert to 7-bit ASCII, then you should probably raise an error (rather than generate the wrong filename). > It must be possible to create a multibyte MacJapanese <-> Unicode > codec with the Python unicode infrastructure: after all there's a > utf-8 codec too, and that's also a multibyte encoding. But I'm > completely out of my water here. If someone wants to create one and > contribute it I'll gladly try and have it incorporated in the standard > distribution, and I can put people into contact with the Python > unicode gurus, but that's about as much as I can promise. Yeah, it should be possible. Note that a UTF-8 <-> UTF-16 conversion can be a very simple algorithmic conversion that doesn't require you to actually understand the characters being converted. And if I remember correctly, anything that can be represented in UTF-16 can be represented in UTF-8, and vice versa. Unfortunately, I only know enough about Unicode to be dangerous (and to call the Mac OS Unicode Converter from inside the File Manager). I could probably supply some code snippets to show one way to call the Unicode Converter. And I could probably put people in contact with the Apple folks who do the Unicode Converter and Text Encoding Converter (maybe even facilitate getting some tables for the conversions). But I haven't looked into the Python Unicode stuff at all. -Mark From Damon Butler Tue Jul 10 19:05:12 2001 From: Damon Butler (Damon Butler) Date: 10 Jul 01 13:05:12 -0500 Subject: [Pythonmac-SIG] RE: SRE errors with IDE, addendum Message-ID: <3B3BEEB8000015EA@impmail.impinet.com> (added by impmail.impinet.com) Hi, Just, About a week ago you helped solve a problem with the MacPy IDE that = involved my use of pre vs. the expected use of sre. A quick refresher... > TypeError: pcre_compile() argument 1 must be string without null bytes, = not > string Ah, this seems due to the conversion from regex to re. Apparently, sre = allows null bytes in pattern strings, but pre doesnt :-(. As a workaround, you = could patch PyFontify: import re becomes: import sre re =3D sre The fix worked, in that the IDE would run (I used Python 2.0 syntax, = however: "import sre as re"). But I did run across other errors related to = same when accessing particular features of the IDE, most prominently the = Module Browser. Thought you might like to know that, for anyone else who wishes to use pre = as a matter of course over the broken sre, the following modules also = ought to be patched in a similar fashion: - PyBrowser.py - PyDocSearch.py - PyEdit.py WSocket.py also has a reference to "re" (which on my system will call up = pre), but that doesn't appear to cause any problems. Damon Butler ------------ Impressions Book and Journal Services, Inc. (608)244-6218 dbutler@impressions.com From Benjamin.Schollnick@usa.xerox.com Tue Jul 10 20:12:09 2001 From: Benjamin.Schollnick@usa.xerox.com (Schollnick, Benjamin) Date: Tue, 10 Jul 2001 15:12:09 -0400 Subject: [Pythonmac-SIG] Idle? On the mac? Message-ID: Has anyone used IDLE on the macintosh? I've been messing with it today under Win NT, and been pleasantly suprised... On the Mac (Python 2.0, OS 9.1), I'm getting a ConfigParser.NoOptionError warning, presumably it's attempting to load a INI file (or the such), and failing... Is Idle being supported on the Mac? - Benjamin From just@letterror.com Tue Jul 10 20:19:13 2001 From: just@letterror.com (Just van Rossum) Date: Tue, 10 Jul 2001 21:19:13 +0200 Subject: [Pythonmac-SIG] RE: SRE errors with IDE, addendum In-Reply-To: <3B3BEEB8000015EA@impmail.impinet.com> (added by impmail.impinet.com) Message-ID: <20010710211923-r01010700-4611e5ca-0910-010c@213.84.27.177> --1591280-2295726080-3203788763=:9001 Content-Type: text/plain; Charset=US-ASCII Content-Transfer-Encoding: 7bit Damon Butler wrote: > The fix worked, in that the IDE would run (I used Python 2.0 syntax, however: > "import sre as re"). But I did run across other errors related to same when > accessing particular features of the IDE, most prominently the Module Browser. > > Thought you might like to know that, for anyone else who wishes to use pre as > a matter of course over the broken sre, the following modules also ought to be > patched in a similar fashion: > > - PyBrowser.py > - PyDocSearch.py > - PyEdit.py > > WSocket.py also has a reference to "re" (which on my system will call up pre), > but that doesn't appear to cause any problems. PyEdit's use of regexes was broken in more than one way: I've been committing some changes to CVS, and will commit more later. The other problems can be fixed by changing "" to raw r"" strings. I'll commit those also. I've appended a PyFontify.py (which I'll also commit to CVS shortly) which works both with pre and sre, yet doesn't import either: it simply uses re again. Just --1591280-2295726080-3203788763=:9001 Content-Type: application/octet-stream; Name="PyFontify.py.sit"; X-Mac-Type="53495435"; X-Mac-Creator="53495421" Content-Transfer-Encoding: base64 Content-Disposition: attachment; Filename="PyFontify.py.sit" U3R1ZmZJdCAoYykxOTk3LTE5OTggQWxhZGRpbiBTeXN0ZW1zLCBJbmMuLCBodHRw Oi8vd3d3LmFsYWRkaW5zeXMuY29tL1N0dWZmSXQvDQoaAAUQAAAJFAAAAHIAAQAA AHK8jA2lpVJlc2VydmVkpaUApaWlpQEAADwAELdUGha3cSFdAAAAAAAAAAAAAAAA AAxQ4QAAEMgAAAdzAAAAAA8AUHlGb250aWZ5LnB5AAFk6FRFWFRQaWRlAQABQACB AAAAAAAAAAAAAIAAAAAAAAAAAAACJQAAAMEAAAAADwBCwdTPl4+jUqH771VHRrpK 74T6gNSzw6emQnHVzMKqPjfhiyaDnQFadUTJv/lW2zSn4IGnJpHyaDywUK9NfC8A U7DCkH1H6pfWRwxRsAVCIGWnCkkGo0t4KfJEW6OxdfGSBTS7MGW/hWwt4mA26atT V4rwQJHbaQww0V7W9WgLIFUPpiS24aYV48t5rgjaIluo+XcKwxS9V05/aFG4j6mM mecI56D+7JnHHAfyGu8Gao6uMObdYiZcY8bIAdH1N33AQsHUj7vjIbctp/C8UyoM 4joBsyZCDf9kvDpYCIStslGpKxUAMDyPsSmU0BZXdo87ClZ88zL4PqMm5ixQil0L j3Bh+BBoHCEb4ChWEe5WIWTDty7sFWqlLBcCcVFCcapiSOv+0qv4GroZM1NyPcNc YlYlzgagmh6No4huSPYJPMg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KtObWBFpQQAq02 Lw0rDo3DdygZyFEldQnWIMNp6lioW1mkKQP9ehz1egCdtMIu0D9TJMWMS3CGjpj7 Imo6JZHnZDTJAsNREsmAyT+ZybpdR9CPv7GNjGm4reQEGwXn6PaPAq9ZZyKCyN1M CUrB0hDDz6OURpkCPa/h3sEuTcmmfS+nUeVF90bZOmqJJoRXrDtpXD/8oKFRkcyT EMZ3KYYykkYJi1Uqn4/gO/XdBmA= --1591280-2295726080-3203788763=:9001-- From kp87@lycos.com Tue Jul 10 20:48:17 2001 From: kp87@lycos.com (kevin parks) Date: Wed, 11 Jul 2001 04:48:17 +0900 Subject: [Pythonmac-SIG] setting search path on OS 9 behind $(PYTHON) Message-ID: Back on OS 9 for a stretch... Heres a question. I usually for one reason or another have to reinstall my system. I have had the ultimate nightmare of trashing my Python folder and reinstalling only to realize that i had something in the scripts folder that i should have copied, before wiping the disk. Therefore i dislike ever putting (or having to put) and of my scripts in my Python folder. IDE be damned. However i have no idea how to set the path in the EditPythonPrefs doohickey to anything other than $(PYTHON):something:foobar lets say i have three disks sys apps stuff and i want to make a folder called scripts on another disk, or even if i put my scripts on sys with my python distribution, but put it not in the Python 2.1 folder but a folder "behind" (as in not down the Python 2.1 folder's path) how do i specify that in the EditPythonPrefs thingy? i tried: :sys:scripts and also: ::sys:scripts Nothing works. I really really really really want to get my scripts someplace safe so that when i upgrade to Python 2.2 or whathave you i don't erase my code. The EditPythonPrefs has no example of how to do this all the paths start from the Python folder like so: $(PYTHON) $(PYTHON):Mac:PlugIns $(PYTHON):Mac:Lib $(PYTHON):Mac:Lib:lib-toolbox $(PYTHON):Mac:Lib:lib-scriptpackages $(PYTHON):Lib $(PYTHON):Extensions:img:Mac $(PYTHON):Extensions:img:Lib $(PYTHON):Extensions:Imaging:PIL $(PYTHON):Lib:lib-tk Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ From owen@astro.washington.edu Tue Jul 10 21:09:29 2001 From: owen@astro.washington.edu (Russell E Owen) Date: Tue, 10 Jul 2001 13:09:29 -0700 Subject: [Pythonmac-SIG] setting search path on OS 9 behind $(PYTHON) In-Reply-To: References: Message-ID: >lets say i have three disks >sys >apps >stuff > >and i want to make a folder called scripts on another disk, or even >if i put my scripts on sys with my python distribution, but put it >not in the Python 2.1 folder but a folder "behind" (as in not down >the Python 2.1 folder's path) how do i specify that in the >EditPythonPrefs thingy?... I believe the correct notation for absolute paths on the Mac is to start with the disk name, hence try: sys:scripts -- Russell From jack@oratrix.nl Tue Jul 10 21:15:51 2001 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 10 Jul 2001 22:15:51 +0200 Subject: [Pythonmac-SIG] setting search path on OS 9 behind $(PYTHON) In-Reply-To: Message by "kevin parks" , Wed, 11 Jul 2001 04:48:17 +0900 , Message-ID: <20010710201557.2CB8B23FC3@oratrix.oratrix.nl> Recently, "kevin parks" said: > Back on OS 9 for a stretch... Heres a question. I usually for one reason or a > nother have to reinstall my system. I have had the ultimate nightmare of tras > hing my Python folder and reinstalling only to realize that i had something i > n the scripts folder that i should have copied, before wiping the disk. There > fore i dislike ever putting (or having to put) and of my scripts in my Python > folder. IDE be damned. However i have no idea how to set the path in the Edi > tPythonPrefs doohickey to anything other than $(PYTHON):something:foobar Simple enough: just type the full pathname and don't start with $(PYTHON). The $(PYTHON) bit is replaced by the pathname of the Python home folder early during startup. So you could simply type "Macintosh HD:My Python Scripts:" into the text field to have that folder added to your sys.path. -- 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 lmeyn@mail.arc.nasa.gov Tue Jul 10 21:56:00 2001 From: lmeyn@mail.arc.nasa.gov (Larry Meyn) Date: Tue, 10 Jul 2001 13:56:00 -0700 Subject: [Pythonmac-SIG] setting search path on OS 9 behind $(PYTHON) In-Reply-To: References: Message-ID: I had the same desire to protect files while allowing easy Python upgrades. I used to use aliased folders, but they broke after Python 1.5.2. Now I use double colons as shown in the the following lines to specify folders in the parent folder containing Python: $(PYTHON)::packages $(PYTHON)::PythonProjects At 4:48 AM +0900 7/11/01, kevin parks wrote: >Back on OS 9 for a stretch... Heres a question. I usually for one reason or another have to reinstall my system. I have had the ultimate nightmare of trashing my Python folder and reinstalling only to realize that i had something in the scripts folder that i should have copied, before wiping the disk. Therefore i dislike ever putting (or having to put) and of my scripts in my Python folder. IDE be damned. However i have no idea how to set the path in the EditPythonPrefs doohickey to anything other than $(PYTHON):something:foobar > >lets say i have three disks >sys >apps >stuff > >and i want to make a folder called scripts on another disk, or even if i put my scripts on sys with my python distribution, but put it not in the Python 2.1 folder but a folder "behind" (as in not down the Python 2.1 folder's path) how do i specify that in the EditPythonPrefs thingy? i tried: > >:sys:scripts >and also: > >::sys:scripts > >Nothing works. I really really really really want to get my scripts someplace safe so that when i upgrade to Python 2.2 or whathave you i don't erase my code. > >The EditPythonPrefs has no example of how to do this all the paths start from the Python folder like so: > >$(PYTHON) >$(PYTHON):Mac:PlugIns >$(PYTHON):Mac:Lib >$(PYTHON):Mac:Lib:lib-toolbox >$(PYTHON):Mac:Lib:lib-scriptpackages >$(PYTHON):Lib >$(PYTHON):Extensions:img:Mac >$(PYTHON):Extensions:img:Lib >$(PYTHON):Extensions:Imaging:PIL >$(PYTHON):Lib:lib-tk > > > > > >Get 250 color business cards for FREE! >http://businesscards.lycos.com/vp/fastpath/ > >_______________________________________________ >Pythonmac-SIG maillist - Pythonmac-SIG@python.org >http://mail.python.org/mailman/listinfo/pythonmac-sig -- ------------------------------------------------------------------ Larry Meyn Aerospace Operations Modeling Office M/S 210-10 Phone: (650) 604-5038 NASA Ames Research Center FAX: (650) 604-0222 Moffett Field, CA 94035-1000 email: lmeyn@mail.arc.nasa.gov ------------------------------------------------------------------ From jschmitt@vmlabs.com Wed Jul 11 05:31:32 2001 From: jschmitt@vmlabs.com (John Schmitt) Date: Tue, 10 Jul 2001 21:31:32 -0700 Subject: [Pythonmac-SIG] FW: New project: anygui Message-ID: <4197FA5DD22AD5118ADE00805F6FA62F45AD@eden.vmlabs.com> Any Mac people participating here? http://aspn.activestate.com/ASPN/Mail/Browse/Threaded/anygui-devel -----Original Message----- From: Magnus Lie Hetland [mailto:mlh@idi.ntnu.no] Sent: Thursday, June 28, 2001 2:27 PM To: python-list@python.org Subject: New project: anygui Hi! This is an attempt to revive the efforts of making a "standard" Python GUI. I realise that standardising one as preferable to others might not be desirable, and that is not the purpose of this project. The purpose is to build a pure Python package called anygui which will function in a manner similar to anydbm in that it will look for existing backends, and use what is available. A simple API must be decided on which will be compatible with all back-end candidates, somewhat in the spirit of Sping and Piddle. Therefore, this will not be mean as a replacement for these back-ends, merely a simple front-end. I suggest using Greg Ewing's Python GUI API as a starting-point: http://www.cosc.canterbury.ac.nz/~greg/python_gui/ For a first release, a subset may be usable. Backends that (at least) should be supported: - Tkinter - wxPython - Java (AWT and/or Swing) ... and hopefully many others. (Those of you out there who have a package you love may want to step up and make it compatible with anygui... :) Greg is himself working on an X-windows implementation of the API. The project is available at: http://sourceforge.net/projects/anygui A mailing-list called anygui-devel has been set up and should be activated within a matter of hours. All developers and other interested individuals are welcome. The GUI SIG is no more - but it is my opinion that Python needs a standard GUI package, even if it is a simple one (perhaps _especially_ if it is a simple one). -- Magnus Lie Hetland http://www.hetland.org "Reality is that which, when you stop believing in it, doesn't go away." -- Philip K. Dick -- http://mail.python.org/mailman/listinfo/python-list From wwwjessie@21cn.com Thu Jul 12 11:01:51 2001 From: wwwjessie@21cn.com (wwwjessie@21cn.com) Date: Thu, 12 Jul 2001 18:01:51 +0800 Subject: [Pythonmac-SIG] =?gb2312?B?xvPStcnPzfijrNK7sr21vc67KFlvdXIgb25saW5lIGNvbXBhbnkp?= Message-ID: <34f1601c10ab9$abf2d410$9300a8c0@ifood1gongxing> This is a multi-part message in MIME format. ------=_NextPart_000_34F17_01C10AFC.BA161410 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base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UwtPiMjAwzfK0zim99MPcway906OszOG438LyvNK6zbnLv823w87K wb+jrLaoxtrK1bW90rzKsw0KxrfW0Ln6zfjM4bmptcS/zbun0OjH87rNssm5utDFz6Khow0KDQoN Cg0KN9TCMzDI1cewyerH67KiuLa/7sq508PSvM34zaijrMzYsfDTxbvdvNszODAw1KovxOqjrNT5 y83M9cLrueO45rKiw+K30dTayrPGt9eo0rXU09a+v6+1x7mpo6zH86OstPrA7aOsus/X99DFz6IN Cs/rwcu94rj8tuA/IKGhx+vBqs+1o7ogc2FsZXNAaWZvb2QxLmNvbSA8bWFpbHRvOnNhbGVzQGlm b29kMS5jb20+DQqhobXnu7CjujA3NTUtMzc4NjMwOaGhoaHP+srbsr/J8tChveMNCrvyILfDzsrO 0sPHtcTN+NKzIDxodHRwOi8vd3d3Lmlmb29kMS5jb20vYWJvdXR1cy9vdXJzZXJ2aWNlcy9jcHNl cnZpY2UuYXNwPg0KOnd3dy5pZm9vZDEuY29tDQoNCrvY1rSjqMfrtKvV5qO6MDc1NS0zMjM5MDQ3 u/K3orXn19PTyrz+o7ogc2FsZXNAaWZvb2QxLmNvbSA8bWFpbHRvOnNhbGVzQGlmb29kMS5jb20+ IKOpDQoNCqH1ILG+uavLvrbUzfjVvrao1sa40NDLyKShoaGhICAgICAgICAgICAgICAgICAgICAg ofUgsb65q8u+ttTSvM34zai3/s7xuNDQy8ikDQoNCrmry77D+7PGo7pfX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX1/Bqs+1yMujul9fX19fX19fX19fX19fX19fXw0K X19fX18gDQoNCrXnu7Cjul9fX19fX19fX19fX19fX19fX19fX7Sr1eajul9fX19fX19fX19fX19f X19fX19fX19FLW1haWyjul9fX19fX19fX19fX19fX18NCl9fX19fXyANCg0K ------=_NextPart_000_34F17_01C10AFC.BA161410 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: base64 PEhUTUw+DQo8SEVBRD4NCjxUSVRMRT5VbnRpdGxlZCBEb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ttTN+NW+tqjWxrjQ 0MvIpKGhoaEmbmJzcDsmbmJzcDsgJm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7 Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7IA0KJm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7 Jm5ic3A7IKH1ILG+uavLvrbU0rzN+M2ot/7O8bjQ0MvIpDwvRk9OVD48L1A+PFAgQ0xBU1M9TXNv Tm9ybWFsIFNUWUxFPSdsaW5lLWhlaWdodDoyMC4wcHQnPjxGT05UIFNJWkU9IjIiPrmry77D+7PG o7pfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1/Bqs+1yMujul9f X19fX19fX19fX19fX19fX19fX19fIA0KPEJSPiA8QlI+ILXnu7Cjul9fX19fX19fX19fX19fX19f X19fX7Sr1eajul9fX19fX19fX19fX19fX19fX19fX19FLW1haWyjul9fX19fX19fX19fX19fX19f X19fX18gDQo8L0ZPTlQ+PC9QPjxQIENMQVNTPU1zb05vcm1hbCBTVFlMRT0nbGluZS1oZWlnaHQ6 MjAuMHB0Jz48L1A+PC9URD48L1RSPjwvVEFCTEU+IA0KPC9CT0RZPg0KPC9IVE1MPg0K ------=_NextPart_000_34F17_01C10AFC.BA161410-- From Y.Benita@pharm.uu.nl Thu Jul 12 17:39:21 2001 From: Y.Benita@pharm.uu.nl (Yair Benita) Date: Thu, 12 Jul 2001 18:39:21 +0200 Subject: [Pythonmac-SIG] Compiling mxTextTools for the MAC Message-ID: I am trying to install Biopython on the Mac. mxTextTools is essential for Biopython and thus I am trying to compile it. It has a setup.py file and when trying to build the extensions with distutils I get: distutils.errors.DistutilsPlatformError: Can only make SHARED_LIBRARY or SHARED_OBJECT targets on the Mac I guess that means you have to compile manually but I have no clue how to build the project in CodeWarrior and what target to set. I do have access to the *.c and *.h files needed. Did anyone compiled mxTextTools before? Any idea how to import the c extension project into codewarrior? Yair From jack@oratrix.nl Thu Jul 12 23:06:41 2001 From: jack@oratrix.nl (Jack Jansen) Date: Fri, 13 Jul 2001 00:06:41 +0200 Subject: [Pythonmac-SIG] Compiling mxTextTools for the MAC In-Reply-To: Message by Yair Benita , Thu, 12 Jul 2001 18:39:21 +0200 , Message-ID: <20010712220646.B35D8162E06@oratrix.oratrix.nl> Recently, Yair Benita said: > I am trying to install Biopython on the Mac. > mxTextTools is essential for Biopython and thus I am trying to compile it. > It has a setup.py file and when trying to build the extensions with > distutils I get: > distutils.errors.DistutilsPlatformError: Can only make SHARED_LIBRARY or > SHARED_OBJECT targets on the Mac If someone wants to look into adding the missing functionality to macpython-distutils that would be very welcome. Don't count on me doing it within a reasonably short time, there's far too many things on my todo list already. Here's some hints for when someone wants to tackle it, and I'll always be happy to supply more info, of course. The main body of works is to get mkcwproject to create the CodeWarrior project file. If you look in :Mac:Lib:mkcwproject:template-ppc or ...-carbon you'll see that there's a set of xml files there. These files are templates, and they contain various %(name)s constructs. These %()s escapes are filled in by the driver (cwxmlgen.py), all the .xml files except the toplevel one, template.prj.xml, are then again stored into strings, the %(tmp_xxxx)s ones, and finally template.prj.xml is shoved through this whole process. The difficult bit is figuring out what needs to go into the various .xml bits. The best route (what I did for the template-carbon, which is newer than template-ppc) is to manually create a project for the sort of target you need, let's say a classic ppc application. You save this project as an xml file. Next, you copy an existing template to template-ppc-application, modify mkcwproject to know about the new template, and present mkcwproject with the input that should eventually result in the same project file as what you manually created in the step above. Compare this generated XML file with the XML file you saved from the manually generated correct project and you should be able (with some gnashing of teeth) to modify the template-ppc-application files to suit your needs. Oh yes, what may help a bit too is to first update the existing template to what your current version of CodeWarrior generates. That should be fairly easy (save the generated project as XML again and compare the generated XML with the generated-opened-and-saved-as-xml file. All in all it's not for the faint of heart, but it should be doable if someone sets their mind to 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 hoefler@typography.com Fri Jul 13 00:26:42 2001 From: hoefler@typography.com (Jonathan Hoefler) Date: Thu, 12 Jul 2001 19:26:42 -0400 Subject: [Pythonmac-SIG] QuickTime Musical Instruments? Message-ID: <200107122326.TAA04456@newman.concentric.net> Hello everyone, Just van Rossum suggested I join the list to ask about some non-typographic Python things*. Today, I'm wondering whether there's any facility for operating QuickTime Musical Instruments from within Python -- if anyone has any experience with this, I'd love to learn more about it. *By way of introduction, I'm a typeface designer who came to Python a few years ago through RoboFog. (While I do a lot of scripting, I'm most definitely a newbie, so please be gentle, and forgive any clay-footed blunders!) I look forward to seeing what everyone's up to. Regards, Jonathan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . New address >> The Hoefler Type Foundry 212 777 6640 x202 611 Broadway, Room 608 212 777 6684 (fax) New York, NY 10012-2608 www.typography.com From bobsavage@mac.com Fri Jul 13 12:16:55 2001 From: bobsavage@mac.com (Bob Savage) Date: Fri, 13 Jul 2001 04:16:55 -0700 Subject: [Pythonmac-SIG] setting tcsh path in OS X.bloat In-Reply-To: Message-ID: <200107131116.EAA26022@smtpout.mac.com> On Monday, July 9, 2001, at 09:27 AM, parks kevin wrote: > Reading the really unreadble README file we learn that we are supposed > to customize our tcsh by creating a ~/Library/init/tcsh dir and the > following files: > > aliases.mine - shell aliases > completions.mine - completions > environment.mine - environment > rc.mine - run commands > path - command search path I think this is an elegant mechanism for providing site-wide defaults that are easily supplemented by the user. If you want to learn how to use the tcsh there is a good book from O'Reilly on the subject. Bob From Y.Benita@pharm.uu.nl Fri Jul 13 15:46:09 2001 From: Y.Benita@pharm.uu.nl (Yair Benita) Date: Fri, 13 Jul 2001 16:46:09 +0200 Subject: [Pythonmac-SIG] Compiling mxTextTools for the MAC In-Reply-To: <20010712220646.B35D8162E06@oratrix.oratrix.nl> Message-ID: on 13/7/2001 0:06, Jack Jansen at jack@oratrix.nl wrote: > > Recently, Yair Benita said: >> I am trying to install Biopython on the Mac. >> mxTextTools is essential for Biopython and thus I am trying to compile it. >> It has a setup.py file and when trying to build the extensions with >> distutils I get: >> distutils.errors.DistutilsPlatformError: Can only make SHARED_LIBRARY or >> SHARED_OBJECT targets on the Mac > > If someone wants to look into adding the missing functionality to > macpython-distutils that would be very welcome. Don't count on me > doing it within a reasonably short time, there's far too many things > on my todo list already. > > Here's some hints for when someone wants to tackle it, and I'll always > be happy to supply more info, of course. > > The main body of works is to get mkcwproject to create the CodeWarrior > project file. If you look in :Mac:Lib:mkcwproject:template-ppc or > ...-carbon you'll see that there's a set of xml files there. These > files are templates, and they contain various %(name)s > constructs. These %()s escapes are filled in by the driver > (cwxmlgen.py), all the .xml files except the toplevel one, > template.prj.xml, are then again stored into strings, the %(tmp_xxxx)s > ones, and finally template.prj.xml is shoved through this whole > process. > > The difficult bit is figuring out what needs to go into the various > .xml bits. The best route (what I did for the template-carbon, which > is newer than template-ppc) is to manually create a project for the > sort of target you need, let's say a classic ppc application. You save > this project as an xml file. Next, you copy an existing template to > template-ppc-application, modify mkcwproject to know about the new > template, and present mkcwproject with the input that should > eventually result in the same project file as what you manually > created in the step above. > > Compare this generated XML file with the XML file you saved from the > manually generated correct project and you should be able (with some > gnashing of teeth) to modify the template-ppc-application files to > suit your needs. > > Oh yes, what may help a bit too is to first update the existing > template to what your current version of CodeWarrior generates. That > should be fairly easy (save the generated project as XML again and > compare the generated XML with the generated-opened-and-saved-as-xml > file. > > All in all it's not for the faint of heart, but it should be doable if > someone sets their mind to 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 > OK, I am not even going to pretend to be able to add functionality to macpython-distutils. I wish I had those skills, but I'm just not there yet. Is it possible, as a temporary solution, to generate the xml project file from the setup.py file and manually import it to codewarrior? Yair -- Yair Benita Pharmaceutical Proteomics Utrecht University From jack@oratrix.nl Fri Jul 13 23:47:31 2001 From: jack@oratrix.nl (Jack Jansen) Date: Sat, 14 Jul 2001 00:47:31 +0200 Subject: [Pythonmac-SIG] Compiling mxTextTools for the MAC In-Reply-To: Message by Yair Benita , Fri, 13 Jul 2001 16:46:09 +0200 , Message-ID: <20010713224736.51CED162E01@oratrix.oratrix.nl> > OK, I am not even going to pretend to be able to add functionality to > macpython-distutils. I wish I had those skills, but I'm just not there yet. > Is it possible, as a temporary solution, to generate the xml project file > from the setup.py file and manually import it to codewarrior? Well, what you could do is to manually (in codewarrior) create the project for the item that distutils complains about on the mac. Then build it yourself, and comment out the build instructions in setup.py. How feasible this is (and how easy) I don't really know without knowing the package.... -- 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 me@davidglasser.net Sat Jul 14 02:53:17 2001 From: me@davidglasser.net (David Glasser) Date: Fri, 13 Jul 2001 21:53:17 -0400 Subject: [Pythonmac-SIG] Installing pygame on MacPython classic Message-ID: So I wanted to play around with pygame on Mac. I go to pygame.org and download what is billed as "compiled python package directory, for macos classic". (I got the source too, although my C compilers are aging.) I unstuff it and am faced with five .py files (with matching .pyc's), a .ttf font, and a bunch of .slb's that have the suspicious string "carbon" in their name. I'm not sure how to install them (I guess I must have missed the "installing modules on MacPython docs"), and I'm not sure if this is even Classic. So where do I go from here? (Other than rebooting into LinuxPPC, which still isn't doing sound output on my poor little iMac DV.) --David Glasser me@davidglasser.net From delza@alliances.org Sat Jul 14 05:14:43 2001 From: delza@alliances.org (Dethe Elza) Date: Fri, 13 Jul 2001 21:14:43 -0700 Subject: [Pythonmac-SIG] Installing pygame on MacPython classic References: Message-ID: <3B4FC733.9060206@alliances.org> I don't have any answers, but I've got a big ME TOO for the interest. I've had PyGame sitting in my "Install this stuff" folder for a month or so now waiting for me to screw up the courage to figure out how to install the damn thing. Kinda takes away some of the benefit of python when it's that difficult %-) So, if anyone does have an answer, you'll have my gratitude in addition to David's. BTW, is there anywhere that Mac-specific python extensions are being archived, so we don't have to keep doing this song and dance? Not all of us keep up to date with CodeWarrior, or want to. If there isn't, is anyone interested in putting heads together to figure out where we should put one (an archive, that is). There's some interesting work going on in PythonLand about a CPAN for python, perhaps we can butt in there and insist that they include better support for Macs? --Dethe David Glasser wrote: > So I wanted to play around with pygame on Mac. I go to pygame.org and > download what is billed as "compiled python package directory, for macos > classic". (I got the source too, although my C compilers are aging.) I > unstuff it and am faced with five .py files (with matching .pyc's), a .ttf > font, and a bunch of .slb's that have the suspicious string "carbon" in > their name. I'm not sure how to install them (I guess I must have missed > the "installing modules on MacPython docs"), and I'm not sure if this is > even Classic. > > So where do I go from here? (Other than rebooting into LinuxPPC, which > still isn't doing sound output on my poor little iMac DV.) -- Dethe Elza (delza@burningtiger.com) Chief Mad Scientist Burning Tiger Technologies (http://burningtiger.com) From richard@richardgordon.net Sat Jul 14 06:11:08 2001 From: richard@richardgordon.net (Richard Gordon) Date: Sat, 14 Jul 2001 01:11:08 -0400 Subject: [Pythonmac-SIG] Installing pygame on MacPython classic In-Reply-To: <3B4FC733.9060206@alliances.org> References: <3B4FC733.9060206@alliances.org> Message-ID: At 9:14 PM -0700 7/13/01, Dethe Elza wrote: >BTW, is there anywhere that Mac-specific python extensions are being >archived, so we don't have to keep doing this song and dance? Not all >of us keep up to date with CodeWarrior, or want to. That would be very nice, indeed. I don't have CodeWarrior and don't want to have it and have never gotten anywhere trying to do anything with MrC in MPW. My efforts to compile stuff in VC++ on windoze generally succeed, but with lots of warnings, etc., and I find it remarkable that the only environment that I really feel comfortable in when wandering down this path is unix/linux given that it should be the most inherently hostile of the three. Anyway, there are lots of things that I have to run on linux or bsd because I can't compile them on a Mac- the MySQL and PostgreSQL modules come to mind immediately, but I don't think anything can be done about that since they require linking into the source for the database managers and neither one will run on a conventional Mac, ergo no source to link to. I am still giving OS X another 6-12 months to smooth out before messing with it, but have pretty much concluded that the lack of Mac-specific extensions is not going to be resolved until I move to OS X and, in effect, don't need to worry about them if GCC will run and sort things out in a mainstream kind of way. If it won't then, I don't know. Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From richard@richardgordon.net Sun Jul 15 08:11:47 2001 From: richard@richardgordon.net (Richard Gordon) Date: Sun, 15 Jul 2001 03:11:47 -0400 Subject: [Pythonmac-SIG] The Official MacPython LineEnding Converter Competition In-Reply-To: <20010706084434.11347303181@snelboot.oratrix.nl> References: <20010706084434.11347303181@snelboot.oratrix.nl> Message-ID: At 10:44 AM +0200 7/6/01, Jack Jansen wrote: >Entries should be sent to the list, and the whole list will judge which script >wins. If there's a tie the list maintainer (indeed, me:-) gets the tiebreaking >vote. > >Entries should be in by August 1. >-- Am I correct in believing that no entries have submitted thus far? If this doesn't "have legs" as a competitive challenge, perhaps it will go somewhere as a collaborative effort? The end product is certainly needed and I for one am not too ashamed to post my own meager efforts, have some genius tell me I should be using classes and show me how, have some ultra-genius tell him how badly he screwed the pooch and show both of us how, etc. Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From redbird@mac.com Sun Jul 15 17:10:41 2001 From: redbird@mac.com (Gordon Worley) Date: Sun, 15 Jul 2001 12:10:41 -0400 Subject: [Pythonmac-SIG] The Official MacPython LineEnding Converter Competition In-Reply-To: References: <20010706084434.11347303181@snelboot.oratrix.nl> Message-ID: At 3:11 AM -0400 7/15/01, Richard Gordon wrote: >At 10:44 AM +0200 7/6/01, Jack Jansen wrote: >>Entries should be sent to the list, and the whole list will judge >>which script >>wins. If there's a tie the list maintainer (indeed, me:-) gets the >>tiebreaking >>vote. >> >>Entries should be in by August 1. >>-- > >Am I correct in believing that no entries have submitted thus far? > >If this doesn't "have legs" as a competitive challenge, perhaps it >will go somewhere as a collaborative effort? The end product is >certainly needed and I for one am not too ashamed to post my own >meager efforts, have some genius tell me I should be using classes >and show me how, have some ultra-genius tell him how badly he >screwed the pooch and show both of us how, etc. I have something that kind of works, but it's a command line tool that I use to Unixify my files. I'm working on adding help and such so that it will be nice to use. I'll post it soon, but if someone wants to add a Mac interface and all that would be nice (before I post it I'll add in an option to Macify and even DOSify files and do the tab conversions, since that code can be found all over the place Online :-)). -- Gordon Worley `When I use a word,' Humpty Dumpty http://homepage.mac.com/redbird/ said, `it means just what I choose redbird@rbisland.cx it to mean--neither more nor less.' PGP: 0xBBD3B003 --Lewis Carroll From scott@griffitts.com Sun Jul 15 21:21:56 2001 From: scott@griffitts.com (Scott Griffitts) Date: Sun, 15 Jul 2001 15:21:56 -0500 Subject: [Pythonmac-SIG] newbie file path question Message-ID: How do I import a .py file outside of the Python directory? for example, if I want to import test1.py from the following path: HD:folder1:folder2:folder3:test.py how do I word the file path between import and test.py? Thanks, Scott From just@letterror.com Sun Jul 15 21:27:53 2001 From: just@letterror.com (Just van Rossum) Date: Sun, 15 Jul 2001 22:27:53 +0200 Subject: [Pythonmac-SIG] newbie file path question In-Reply-To: Message-ID: <20010715222800-r01010700-80f489a7-0910-010c@213.84.27.177> Scott Griffitts wrote: > How do I import a .py file outside of the Python directory? > > for example, if I want to import test1.py from the following path: > > HD:folder1:folder2:folder3:test.py > > how do I word the file path between import and test.py? You have to add HD:folder1:folder2:folder3: to the sys.path (the module search search path) default settings with EditPythonPrefs. Just add your folder path as a new line at the end (don't add $(PYTHON), as that's a magic prefix meaning the python installation folder). Just From jack@oratrix.nl Sun Jul 15 22:02:14 2001 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 15 Jul 2001 23:02:14 +0200 Subject: [Pythonmac-SIG] The Official MacPython LineEnding Converter Competition In-Reply-To: Message by Richard Gordon , Sun, 15 Jul 2001 03:11:47 -0400 , Message-ID: <20010715210219.78D1A162E05@oratrix.oratrix.nl> Recently, Richard Gordon said: > Am I correct in believing that no entries have submitted thus far? > > If this doesn't "have legs" as a competitive challenge, perhaps it > will go somewhere as a collaborative effort? Great idea! I'll extend the prize to "a free copy of MacPython to everyone who contributed":-) -- 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 Sun Jul 15 22:09:18 2001 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 15 Jul 2001 23:09:18 +0200 Subject: [Pythonmac-SIG] What if MacPython 2.1.1 contained some new features? Message-ID: <20010715210923.40F63162E06@oratrix.oratrix.nl> Folks, the official Python policy is that micro-versions contain only bug fixes and no new features. However, I'm a bit reluctant to search through all the checkins of the last couple of moths to see what is a bugfix and what is a new feature. So here's my question: would people object if MacPython 2.1.1 contained a few bits of new functionality? The new functionality would probably only be a couple of new modules, so I'm reasonably sure that it wouldn't break any existing code. -- 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 richard@richardgordon.net Sun Jul 15 23:16:37 2001 From: richard@richardgordon.net (Richard Gordon) Date: Sun, 15 Jul 2001 18:16:37 -0400 Subject: [Pythonmac-SIG] newbie file path question In-Reply-To: References: Message-ID: At 3:21 PM -0500 7/15/01, Scott Griffitts wrote: >How do I import a .py file outside of the Python directory? > >for example, if I want to import test1.py from the following path: > >HD:folder1:folder2:folder3:test.py > >how do I word the file path between import and test.py? Aside from Just's suggestion that you edit your preferences to include the desired path, you could temporarily append it to sys.path as follows: import sys sys.path.append('HD:folder1:folder2:folder3') import test1 Note that a trailing ":" is not necessary if you are going to do it this way and you do not include the .py extension in an import statement in any case. Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From wwwjessie@21cn.com Mon Jul 16 10:47:34 2001 From: wwwjessie@21cn.com (wwwjessie@21cn.com) Date: Mon, 16 Jul 2001 17:47:34 +0800 Subject: [Pythonmac-SIG] =?gb2312?B?tPPBrC0yMDAxxOq5+rzKwszJq8qzxrfT68jLwOC9ob+1sqnAwLvhKA==?= =?gb2312?B?QWdybyBBbm51YWwgTWVldGluZyBDaGluYSAyMDAxKQ0=?= Message-ID: <2d98201c10ddc$56e355f0$9300a8c0@ifood1gongxing> This is a multi-part message in MIME format. ------=_NextPart_000_2D983_01C10E1F.650695F0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 MjAwMcTq1tC5+rn6vMrFqdK1v8a8vMTqu+ENCrn6vMrCzMmryrPGt9PryMvA4L2hv7WyqcDAu+G8 sNGnyvXM1sLbu+ENCg0KCQ0K1bnG2qO6IAmhoTIwMDHE6jnUwjTI1S03yNUJDQq12LXjo7ogCaGh tPPBrNDHuqO74dW51tDQxAkNCtb3sOyjuiAJoaHW0LuqyMvD8bmyus25+sWp0rWyvw0KoaHW0Ln6 v8bRp7y8yvXQrbvhDQqhobTzwazK0MjLw/HV/riuDQoJDQqz0LDso7ogCaGh1tC5+sLMyavKs8a3 t6LVudbQ0MQNCqGh1tC5+sWp0ae74Q0KoaHW0Ln6wszJq8qzxrfQrbvhDQqhobTzwazK0MWp0rW+ 1g0KoaG088Gs0Me6o7vh1bnW0NDEDQoJDQrN+MLnt/7O8czhuanJzKO60rzKs8a31tC5+s34IGh0 dHA6Ly93d3cuaWZvb2QxLmNvbQ0KPGh0dHA6Ly93d3cuaWZvb2QxLmNvbS9pbmRleC5hc3A/ZnI9 cHl0aG9ubWFjLXNpZ0BweXRob24ub3JnPiAJDQogCQ0Kofogzai5/dK8yrPGt9bQufrN+LGow/uy ztW5o7q+xdXb08W73SixyMjnz9bT0MO/uPYgM00gWCAzTSC1xLHq17zVuc671K2821JNQjQ1MDCj rM2ouf3O0sPH1rvQ6Li2Uk1CNDA1MCmjrA0KsajD+73Y1rnI1cbaMjAwMcTqN9TCMjDI1SA8aHR0 cDovL2dyZWVuMjAwMS5pZm9vZDEuY29tL2Zyb20xLmFzcD4gDQqh+iC7ttOtIMPit9HXorLhIDxo dHRwOi8vd3d3Lmlmb29kMS5jb20vc2lnbnVwL3NldmFncmVlbS5hc3A+ILPJzqq5q8u+u+HUsaGj DQo31MIyMMjVx7DXorLho6zE+r2r1No31MIyNcjVx7DNqLn9tefX09PKvP63vcq9w+K30bvxtcMz MMz1ssm5utDFz6Khow0KyOe5+8T6srvP68rVtb3O0sPHtcTTyrz+o6zH6yDBqs+1ztLDxyA8bWFp bHRvOnVuc3Vic2NyaWJlQGlmb29kMS5jb20+IKOsztLDx9LUuvO9q7K71Nm3otPKvP64+MT6oaMN CrLp0a+juiBzYWxlc0BpZm9vZDEuY29tIDxtYWlsdG86c2FsZXNAaWZvb2QxLmNvbT4gIKGhoaG1 57uwo7owNzU1LTM3ODYzMDmhoc/6ytuyvw0KyfLQob3jILbFz8jJ+g0KDQoNCiANCg0Ku9gg1rQg o6jH67Sr1eajujA3NTUtMzIzOTA0N7vyILeitefX09PKvP6juiBzYWxlc0BpZm9vZDEuY29tIDxt YWlsdG86c2FsZXNAaWZvb2QxLmNvbT4NCqOpCQ0KofUgsb65q8u+09DS4s2ouf3SvMqzxrfW0Ln6 zfiyztW5IKGhoaEgofUgsb65q8u+xOK9+NK7sr3By73iuMOyqcDAu+GjrMfr0+vO0sPHwarPtQ0K DQq5q8u+w/uzxqO6X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18NCsGqz7XI y6O6X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXw0Ktee7sKO6X19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fXw0KtKvV5qO6X19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fXw0KRS1tYWlso7pfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fDQoJDQogCQ0KIAkNCiAJDQogCQ0KIAkNCg== ------=_NextPart_000_2D983_01C10E1F.650695F0 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: base64 PGh0bWw+DQo8aGVhZD4NCjx0aXRsZT5VbnRpdGxlZC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0zNzg2MzA5oaHP+srbsr8gyfLQ ob3jILbFz8jJ+jxicj48L2ZvbnQ+PC9wPjxwPiZuYnNwOzwvcD48L3RkPjwvdHI+PHRyPjx0ZCBo ZWlnaHQ9IjMwIiBjb2xzcGFuPSIyIiBhbGlnbj0iQ0VOVEVSIj48Zm9udCBzaXplPSIyIj48Yj67 2CANCta0IKOox+u0q9Xmo7owNzU1LTMyMzkwNDe78iC3orXn19PTyrz+o7ogPGEgaHJlZj0ibWFp bHRvOnNhbGVzQGlmb29kMS5jb20iPnNhbGVzQGlmb29kMS5jb208L2E+IA0Ko6k8L2I+PC9mb250 PjwvdGQ+PC90cj48dHI+PHRkIGhlaWdodD0iMTIiIGNvbHNwYW49IjIiPjxmb250IHNpemU9IjIi PqH1ILG+uavLvtPQ0uLNqLn90rzKs8a31tC5+s34ss7VuSANCqGhoaEgofUgsb65q8u+xOK9+NK7 sr3By73iuMOyqcDAu+GjrMfr0+vO0sPHwarPtTxicj48YnI+uavLvsP7s8ajul9fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fPGJyPsGqz7XIy6O6X19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fXzxicj48L2ZvbnQ+PGZvbnQgc2l6ZT0iMiI+tee7sKO6X19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXzxicj60q9Xmo7pfX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fPGJyPkUtbWFpbKO6X19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fXzxicj48L2ZvbnQ+PC90ZD48L3RyPjx0cj48dGQgaGVpZ2h0PSIxMiIgY29s c3Bhbj0iMiIgYWxpZ249IkxFRlQiPiZuYnNwOzwvdGQ+PC90cj48dHI+PHRkIGhlaWdodD0iMTIi IGNvbHNwYW49IjIiIGFsaWduPSJMRUZUIj4mbmJzcDs8L3RkPjwvdHI+PHRyPjx0ZCBoZWlnaHQ9 IjEyIiBjb2xzcGFuPSIyIiBhbGlnbj0iTEVGVCI+Jm5ic3A7PC90ZD48L3RyPjwvdGFibGU+PC90 ZD48L3RyPjx0cj48dGQ+Jm5ic3A7PC90ZD48L3RyPjx0cj48dGQ+Jm5ic3A7PC90ZD48L3RyPjwv dGFibGU+PC9kaXY+DQo8L2JvZHk+DQo8L2h0bWw+DQo= ------=_NextPart_000_2D983_01C10E1F.650695F0-- From Y.Benita@pharm.uu.nl Mon Jul 16 17:39:13 2001 From: Y.Benita@pharm.uu.nl (Yair Benita) Date: Mon, 16 Jul 2001 18:39:13 +0200 Subject: [Pythonmac-SIG] Compiling shared library modules Message-ID: Well, after struggling with mxTextTools for a while I found the problem. Some systems required the shared library modules to be executable. Just to save some work the developers make them executable without checking what system is used. On the Mac it immediately fails. distutils.errors.DistutilsPlatformError: Can only make SHARED_LIBRARY or SHARED_OBJECT targets on the Mac I used the debugger to find the executable configuration and made it shared library. Now it works. Maybe it can help you guys with other modules that have the same problem. Yair -- Yair Benita Pharmaceutical Proteomics Utrecht University From draayer@surfglobal.net Tue Jul 17 07:11:27 2001 From: draayer@surfglobal.net (Dean Draayer) Date: Tue, 17 Jul 2001 02:11:27 -0400 Subject: [Pythonmac-SIG] Re: newbie file path question Message-ID: On Sun, 15 Jul 2001 18:16:37 -0400, Richard Gordon wrote: > Aside from Just's suggestion that you edit your preferences to > include the desired path, you could temporarily append it to > sys.path as follows: > > import sys > sys.path.append('HD:folder1:folder2:folder3') > import test1 Or let the IDE do it for you with a GetDirectory call. I like to put the following scripts in the Python IDE Scripts folder (set via menu Python > Preferences > Set Scripts folder...): #---------- # Script: "Add Folder to Search Path.py" import macfs import sys (f,OK) = macfs.GetDirectory("Select a folder to add to sys.path:") if OK: f = f.as_pathname() sys.path.insert(0,f) # put at front of the search path #---------- #---------- # Script: "Show Search Path.py" from sys import path print "sys.path:" for p in path: print "\t%s" % p #---------- I like to put ':' as the first item in my global IDE/Interpreter search path. When a script is saved as an applet or application, this will refer to the folder containing it. But when editing the script in Python IDE, ':' refers to the IDE's parent folder. (I don't like to litter the global IDE/Interpreter paths with my individual project folders.) "Add Folder to Search Path.py" provides a quick-and-dirty way to get the applet-to-be's parent in the search path while working on it in the IDE. Dean Draayer From desoi@mac.com Tue Jul 17 22:44:13 2001 From: desoi@mac.com (John DeSoi) Date: Tue, 17 Jul 2001 17:44:13 -0400 Subject: [Pythonmac-SIG] Embedding question Message-ID: Hi, I'm interested in taking on an embedding project. I have successfully started Python from my application using the PyMac_Initialize() call in the shared library. The problem is that I need to control all of the window creation in my application and as soon as I call PyMac_Initialize() the console window is created. Is there a way to initialize and use Python without the console window? I could find anything in the examples or documentation. Thanks, John DeSoi, Ph.D. From kp87@lycos.com Wed Jul 18 03:02:25 2001 From: kp87@lycos.com (kevin parks) Date: Wed, 18 Jul 2001 11:02:25 +0900 Subject: [Pythonmac-SIG] packages Message-ID: how do you install packages on Mac OS 9.x? I am looking to install the following package called pmask http://pythonsound.sourceforge.net/pmask/ it has a setup.py, which if i run i get a funny dialog box asking for commands. I hit just took a guess and said install and the thing ran a while and then a traceback error. Anyone ever run pmask on this list? Is the package broken? or is my brain broken? cheers, -kp-- ps. How do you uninstall a package that you don't want. I am hating packages already. Why can't it just be a module like pretty much everything else? Who needs that much structure? Ugh! (i am sure all you package lovers will set me straight and tell me how useful they are). I just want this one to work! Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ From Y.Benita@pharm.uu.nl Wed Jul 18 08:21:55 2001 From: Y.Benita@pharm.uu.nl (Yair Benita) Date: Wed, 18 Jul 2001 09:21:55 +0200 Subject: [Pythonmac-SIG] packages In-Reply-To: Message-ID: on 18/7/2001 4:02, kevin parks at kp87@lycos.com wrote: > how do you install packages on Mac OS 9.x? > > I am looking to install the following package > called pmask > > http://pythonsound.sourceforge.net/pmask/ > > it has a setup.py, which if i run i get a funny dialog box asking for > commands. I hit just took a guess and said install and the thing ran a while > and then a traceback error. Anyone ever run pmask on this list? Is the package > broken? or is my brain broken? > > > cheers, > -kp-- > > ps. How do you uninstall a package that you don't want. > > I am hating packages already. Why can't it just be a module like pretty much > everything else? Who needs that much structure? Ugh! (i am sure all you > package lovers will set me straight and tell me how useful they are). I just > want this one to work! > > > > > Get 250 color business cards for FREE! > http://businesscards.lycos.com/vp/fastpath/ > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > Dear Kevin, The nice thing about these packages are that they are platform independent. They were probably not designed for the Mac but with some effort we can use them. In the "funny" window you should select build. Then a folder "build" will appear in the same location as the setup.py file and all the files will be generated there. Try to do it in two steps: Build_py copies only python files to the build folder (which should not fail) and Build_ext will build only the extensions (which will probably fail). Theoretically, once the build is successful, the install command moves the files to the correct location inside the python folder. I'm not sure it works on the Mac, I copy everything manually (into the site-packages folder). The biggest problem is to get the extensions compiled. I don't know your package but I hope its not too difficult in your case. A good place to start is Jack Jansen's instructions on building python from source. It helped me a lot. Yair -- Yair Benita Pharmaceutical Proteomics Utrecht University From kp87@lycos.com Wed Jul 18 16:36:11 2001 From: kp87@lycos.com (kevin parks) Date: Thu, 19 Jul 2001 00:36:11 +0900 Subject: [Pythonmac-SIG] scripts on 9.x Message-ID: One thing that i have never been able to figure out is how to execute scripts on Mac. Particularly scripts that expect input or output from the stdin/out. You see so many scripts these days and i plan to do more scripting and less work in the interpreter myself now that i have OS X running smoothly. For example, from the useless python site i find a script like this. Do i have to put in the if __name__ == '__main__': finout() trick and run as main or iin the interpreter or is there someway to run it as is. I thought that you could just run it by dropping it on the interpreter, getting a dialog box., but i am guessing that this doesn't work as this script expects redirect or pipes from the Unix command line. Sorry for all the questions, i only have a few weeks of freedom from my job and i really want to get up to speed with python and running under X with the Unix install and the present Mac OS 9 distribution (which i see is now comes in a carbon flavor) Thanks for enduring my queries! -kevin parks seoul, korea #!/usr/bin/env python # # Count the number of lines, characters, words, and occurences of each word in a # file. A word is delimted by whitespace and punctuation (as defined by the # builting string.whitespace and string.punctuation variables). # import sys import string import re # initialize the counters linecount = 0 charcount = 0 wordcount = 0 # this is where I will store the total count of each word words = { } # iterate over each line on stdin for line in sys.stdin.readlines() : linecount += 1 charcount += len( line ) # remove leading and trailing whitespace line = string.strip( line ) # split the string into a list of words # a word is delimited by whitespace or punctuation for word in re.split( "[" + string.whitespace + string.punctuation + "]+" , line ) : # make the word lower case word = string.lower( word ) # check to make sure the string is considered a word if re.match( "^[" + string.lowercase + "]+$" , word ) : wordcount += 1 # if the word has been found before, increment its count # otherwise initialize its count to 1 if words.has_key( word ) : words[ word ] += 1 else : words[ word ] = 1 # Now print out the results of the count: print print "Number of lines:" , linecount print "Total word count:" , wordcount print "Total character count:" , charcount print # print each word and its count in sorted order sorted_word_list = words.keys() sorted_word_list.sort() for word in sorted_word_list : print word , ":" , words[ word ] Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ From rbl@hal.cwru.edu Wed Jul 18 17:41:12 2001 From: rbl@hal.cwru.edu (Robin B. Lake) Date: Wed, 18 Jul 2001 12:41:12 -0400 (EDT) Subject: [Pythonmac-SIG] Python IDE does not play well with Netscape 6 Message-ID: <200107181641.MAA09406@hal.cwru.edu> Setup: Mac G3, 160 MB RAM, OS 8.6, Python 2.0, Python IDE Situation: with Netscape 6.1 Preview Release 1 launched, launch Python IDE. Get message : ImportError: List.ppc.slb: too many files open Quit Netscape and Python IDE launches fine. Any clues? Thanks, Rob Lake lake@cwru.edu From richard@richardgordon.net Wed Jul 18 18:04:27 2001 From: richard@richardgordon.net (Richard Gordon) Date: Wed, 18 Jul 2001 13:04:27 -0400 Subject: [Pythonmac-SIG] scripts on 9.x In-Reply-To: References: Message-ID: At 12:36 AM +0900 7/19/01, kevin parks wrote: One thing that i have never been able to figure out is how to execute scripts on Mac. Particularly scripts that expect input or output from the stdin/out. You see so many scripts these days and i plan to do more scripting and less work in the interpreter myself now that i have OS X running smoothly. For example, from the useless python site i find a script like this. The Mac specifics are rather well documented and you might want to take a look at http://www.python.org/doc/current/mac/argv.html and the other sections that relate to your questions. Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From mday@apple.com Wed Jul 18 18:22:57 2001 From: mday@apple.com (Mark Day) Date: Wed, 18 Jul 2001 10:22:57 -0700 Subject: [Pythonmac-SIG] Python IDE does not play well with Netscape 6 Message-ID: <8796D589-7BA1-11D5-8A53-00039303AF92@apple.com> From: Mark Day Date: Wed Jul 18, 2001 10:21:14 AM US/Pacific To: "Robin B. Lake" Subject: Re: [Pythonmac-SIG] Python IDE does not play well with Netscape 6 On Wednesday, July 18, 2001, at 09:41 AM, Robin B. Lake wrote: > Mac G3, 160 MB RAM, OS 8.6, Python 2.0, Python IDE > with Netscape 6.1 Preview Release 1 launched, launch Python IDE. Get message : > ImportError: List.ppc.slb: too many files open Like it says, the OS can't open any more files. Under Mac OS 8.6 and earlier, only 348 files can be opened. A default install of the OS will use 100-150 of those. User-installed fonts use more of them. Open applications and documents use more. In particular, shared libraries keep files open (so the library can be memory mapped). So, importing more Python modules uses up more open files. And Netscape 6.1 probably has a lot of shared libraries itself. You may be able to reduce the problem by getting rid of fonts you don't use. You can also disable extensions, control panels, etc. that you don't use. You can also upgrade to Mac OS 9 (and the free updates to 9.0.4 or 9.1). In Mac OS 9, you can have up to 8169 open files. -Mark From richard@richardgordon.net Wed Jul 18 18:31:20 2001 From: richard@richardgordon.net (Richard Gordon) Date: Wed, 18 Jul 2001 13:31:20 -0400 Subject: [Pythonmac-SIG] Python IDE does not play well with Netscape 6 In-Reply-To: <200107181641.MAA09406@hal.cwru.edu> References: <200107181641.MAA09406@hal.cwru.edu> Message-ID: At 12:41 PM -0400 7/18/01, Robin B. Lake wrote: >Setup: > >Mac G3, 160 MB RAM, OS 8.6, Python 2.0, Python IDE > >Situation: > >with Netscape 6.1 Preview Release 1 launched, launch Python IDE. >Get message : >ImportError: List.ppc.slb: too many files open > >Quit Netscape and Python IDE launches fine. I suppose it could be several things, but here's my guess: I think that until OS 9, the MacOS had an internal limit of 248 open files. Running under OS 8.6 with Eudora and a few other things open, I'm usually in the 130+ range and it appears that the IDE opens about 4 files while Mozilla .9 opens about 14 (browser only, no mail or news, etc.), so you wouldn't think that this would be a big issue unless you had a lot of other stuff up as well. But my recollection is that if you have virtual memory on, the file count more or less doubles which could put you over the limit pretty quickly. I don't have enough free space to turn on VM now to confirm this, but you might disable it if you are using it and see if that helps any. Alsoft has a free control strip utility called Open File Count that you can chase down if this proves to be something that you need to keep an eye on. Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From kp87@lycos.com Wed Jul 18 18:35:32 2001 From: kp87@lycos.com (kevin parks) Date: Thu, 19 Jul 2001 02:35:32 +0900 Subject: [Pythonmac-SIG] scripts on 9.x Message-ID: Ah! http://www.python.org has been updated! (April 2001) I hadn't noticed that. I always assumed that any recent mac specifics were in the distribution (those 2 old dusty files you get ) Python 2.1:Mac:Demo:index.html & Python 2.1:Mac/Demo/using.html Why these are in a folder called "demo" i'll never know! Nevertheless as you point out much good info can be had now at http://www.python.org/doc/current/mac/using.html Yes, RTFM! thanks! thanks thanks! --- kp87@lycos.com Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ From chrishbarker@home.net Wed Jul 18 21:50:24 2001 From: chrishbarker@home.net (Chris Barker) Date: Wed, 18 Jul 2001 13:50:24 -0700 Subject: [Pythonmac-SIG] scripts on 9.x References: Message-ID: <3B55F690.4493D18D@home.net> kevin parks wrote: > Python 2.1:Mac:Demo:index.html > & > Python 2.1:Mac/Demo/using.html > > Why these are in a folder called "demo" i'll never know! Nevertheless as you point out much good info can be had now at > > http://www.python.org/doc/current/mac/using.html Note that the stuff in there was put together pretty quickly, and is pretty limited. I was frustrated with the out of data MacPython docs, so T took a little time to re-structure and add to them (with help from a number of folks on this mailing list) just before the 2.0 release. I would love for there to be much more in the "official" docs. There is a bunch of stuff in Python 2.1:Mac:Demo: that could be used as a start for what to add to the doc. I know that Fred Drake, the keeper of the official docs, would love to see the Macintosh section improved as well. If anyone wants to work on part of it, I'd be glad to help, and act as coordinator again. Please contribute!!! -Chris -- Christopher Barker, Ph.D. ChrisHBarker@home.net --- --- --- http://members.home.net/barkerlohmann ---@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Oil Spill Modeling ------ @ ------ @ ------ @ Water Resources Engineering ------- --------- -------- Coastal and Fluvial Hydrodynamics -------------------------------------- ------------------------------------------------------------------------ From chrishbarker@home.net Wed Jul 18 21:53:36 2001 From: chrishbarker@home.net (Chris Barker) Date: Wed, 18 Jul 2001 13:53:36 -0700 Subject: [Pythonmac-SIG] MacPython Modules archive References: <3B4FC733.9060206@alliances.org> Message-ID: <3B55F750.FCD00165@home.net> Dethe Elza wrote: > BTW, is there anywhere that Mac-specific python extensions are being > archived, so we don't have to keep doing this song and dance? Not all > of us keep up to date with CodeWarrior, or want to. If there isn't, > is anyone interested in putting heads together to figure out where we > should put one (an archive, that is). There's some interesting work > going on in PythonLand about a CPAN for python, perhaps we can butt > in there and insist that they include better support for Macs? There is a lot of talk about a CPyAN, we'll see what happens. In the meantime, I am taking a simpler approach, and putting together a simple achive of commonly used modules, and I would LOVE to have the Mac well represented there. I will do what I can on my own, but It would be great to have someone volunteer to be in change of collecting and testing the Mac modules. Any volunteers?? -Chris -- Christopher Barker, Ph.D. ChrisHBarker@home.net --- --- --- http://members.home.net/barkerlohmann ---@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Oil Spill Modeling ------ @ ------ @ ------ @ Water Resources Engineering ------- --------- -------- Coastal and Fluvial Hydrodynamics -------------------------------------- ------------------------------------------------------------------------ From jack@oratrix.nl Wed Jul 18 21:51:42 2001 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 18 Jul 2001 22:51:42 +0200 Subject: [Pythonmac-SIG] Python IDE does not play well with Netscape 6 In-Reply-To: Message by Richard Gordon , Wed, 18 Jul 2001 13:31:20 -0400 , Message-ID: <20010718205147.9ADC3162E09@oratrix.oratrix.nl> Thanks to Richard and Mark for providing the explanation of this problem, and I'd merely like to throw in a request: if MacPython keeps more files open than it should please let me know. The only things it should keep open are the dynamically loaded modules plus a few minor things like the IDE resource file. If large amounts of, say, .pyc files remain open there is indeed a problem with MacPython. -- 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 Jul 18 21:57:32 2001 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 18 Jul 2001 22:57:32 +0200 Subject: [Pythonmac-SIG] scripts on 9.x In-Reply-To: Message by "kevin parks" , Thu, 19 Jul 2001 02:35:32 +0900 , Message-ID: <20010718205737.D1982162E09@oratrix.oratrix.nl> Recently, "kevin parks" said: > Why these are in a folder called "demo" i'll never know! Nevertheless as you > point out much good info can be had now at Ah, simple, because the first thing I put into that folder was a demo. And then the demo was documented. And then more demos and docs were added. And then it stopped, more-or-less:-( If you (or someone else) would like to take on reorganising the Demo folder: please do so! Chris Barker and some others did a valiant job at getting the mac lib docsection in a better shape, but the stuff in Demo is definitely long due for an overhaul too. It's currently little more than an unorganized pile of things that I really _must_ say somewhere... -- 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 richard@richardgordon.net Thu Jul 19 06:09:33 2001 From: richard@richardgordon.net (Richard Gordon) Date: Thu, 19 Jul 2001 01:09:33 -0400 Subject: [Pythonmac-SIG] Now this is pretty cool... Message-ID: hi I don't know if many of you have occasion to do battle with win2k, but I just noticed that aside from the usual stuff about 'type "license" to read the license' that prints to the screen when you first launch the interpreter, in the ActiveState Python 2.1 build it also mentions "help." Lo and behold, those guys have developed a really nice man (unix) style online help system that covers reserved words, modules, etc. If you seek help on a particular module, it outputs what appears to be a lot more than just the usual doc string stuff. There is also a topic list, but mine isn't working because I haven't set a PYTHONDOC variable yet (and didn't even know that there was one). Anyway, I wonder what the odds are of getting something like this into the Mac (or even the unix) versions of python? I know that you can already learn a lot by browsing modules in IDE or IDLE, but there are lots of times that I prefer to use the interpreter for various reasons and it would be nice to get into a documentation system without having to leave it. Disclaimer: Yes, I know windoze blows, M$ is trying to hijack python, perl and now tcl, etc., but the fact is that the ActiveState guys do a nice job- at least it's entirely possible thanks mainly to them to do anything on a windoze box in python that you could do in VB and, realities being as they are, I am grateful for their efforts. Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From Y.Benita@pharm.uu.nl Thu Jul 19 09:52:19 2001 From: Y.Benita@pharm.uu.nl (Yair Benita) Date: Thu, 19 Jul 2001 10:52:19 +0200 Subject: [Pythonmac-SIG] os.pipe() Message-ID: I use a module which uses os.pipe(). Its not available on the Mac for some reason. The library file just describes it as creating a pipe and returning two file descriptor for reading and writing. Any idea what to do on the Mac? Is it simply two handles to two files? Yair -- Yair Benita Pharmaceutical Proteomics Utrecht University From jack@oratrix.nl Thu Jul 19 10:20:16 2001 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 19 Jul 2001 11:20:16 +0200 Subject: [Pythonmac-SIG] os.pipe() In-Reply-To: Message by Yair Benita , Thu, 19 Jul 2001 10:52:19 +0200 , Message-ID: <20010719092017.0B8DA303181@snelboot.oratrix.nl> > I use a module which uses os.pipe(). Its not available on the Mac for some > reason. The library file just describes it as creating a pipe and returning > two file descriptor for reading and writing. Any idea what to do on the Mac? > Is it simply two handles to two files? A pipe is an operating system construct, and one that MacOS (9 or earlier) doesn't have, so that's what MacPython doesn't have it. If you haven't seen pipes before they're probably best visualised as a serial line, but going between two processes on the same machine in stead of between two machines. Pipes can sometimes be simulated by letting the first process write a file, and then reading it by the second process after the first one terminates. Another (often better) option is to use sockets. -- 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 Y.Benita@pharm.uu.nl Thu Jul 19 10:36:23 2001 From: Y.Benita@pharm.uu.nl (Yair Benita) Date: Thu, 19 Jul 2001 11:36:23 +0200 Subject: [Pythonmac-SIG] os.pipe() In-Reply-To: <20010719092017.0B8DA303181@snelboot.oratrix.nl> Message-ID: on 19/7/2001 11:20, Jack Jansen at jack@oratrix.nl wrote: >> I use a module which uses os.pipe(). Its not available on the Mac for some >> reason. The library file just describes it as creating a pipe and returning >> two file descriptor for reading and writing. Any idea what to do on the Mac? >> Is it simply two handles to two files? > > A pipe is an operating system construct, and one that MacOS (9 or earlier) > doesn't have, so that's what MacPython doesn't have it. > > If you haven't seen pipes before they're probably best visualised as a serial > line, but going between two processes on the same machine in stead of between > two machines. > > Pipes can sometimes be simulated by letting the first process write a file, > and then reading it by the second process after the first one terminates. > Another (often better) option is to use sockets. > -- > 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 > > > I was wondering what the os.pipe() code look like. I downloaded the python2.1 source code again and could not find that function in the os.py file. Any idea where it hides? Yair -- Yair Benita Pharmaceutical Proteomics Utrecht University From jack@oratrix.nl Thu Jul 19 11:06:43 2001 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 19 Jul 2001 12:06:43 +0200 Subject: [Pythonmac-SIG] os.pipe() In-Reply-To: Message by Yair Benita , Thu, 19 Jul 2001 11:36:23 +0200 , Message-ID: <20010719100643.D763D303181@snelboot.oratrix.nl> > I was wondering what the os.pipe() code look like. I downloaded the > python2.1 source code again and could not find that function in the os.py > file. Any idea where it hides? The os module (:Lib:os.py) is a bit magic, in that it imports everything from an underlying module that is suystem dependent. If you look at it you'll see at some point elif 'mac' in _names: ... from mac import * and there's similar code for other platforms. Or in other words: most of the functionality for the os modules comes from the builtin module "mac", which lives (in a source distribution) in :Mac:Modules:macmodule.c. On Unix it'll come from the "posix" module, which lives in Modules/posixmodule.c, etc. Inspecting macmodule.c you'll see that there's no pipe() function. Inspecting posixmodule.c you'll see that the pipe() function does little more than calling the operating system pipe() call. -- 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 richard@richardgordon.net Thu Jul 19 13:20:49 2001 From: richard@richardgordon.net (Richard Gordon) Date: Thu, 19 Jul 2001 08:20:49 -0400 Subject: [Pythonmac-SIG] Now this is pretty cool... Message-ID: At 12:15 PM +0100 7/19/01, Jacob Kaplan-Moss wrote: >Actually, I don't think that the "help" function is specific to >ActiveState; it's part of Ka-Ping Yee's PyDoc module, which AFAIK is >included with Python 2.0 and above. > >It's really awesome; try this: > >>>>from pydoc import help >>>>import MacOS >help(MacOS) hey, you're right. I was already aware of PyDoc, but didn't know that this was part of it. Thanks a lot. >In general, typing "help(obj)" will give info about the object, be >it a function, class, module, etc. If you just type "help" it will >enter the interactive help mode, which is also really cool. > >If you want "help" to be available all the time, add "from pydoc >import help" to your site.py. > >Jack -- Do you think this should be done by default? If the default >site.py was modified to include this the import and a message was >added to the startup string, then this would mimic the (quite >helpful) ActiveState way of doing things. I would second this suggestion. This is too useful to be turned off by default. Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From redbird@rbisland.cx Thu Jul 19 02:18:44 2001 From: redbird@rbisland.cx (Gordon Worley) Date: Wed, 18 Jul 2001 21:18:44 -0400 Subject: [Pythonmac-SIG] cheol (Content entry, sort of) Message-ID: Okay, I promised, and thus I deliver. :-) Below is my command line tool for changing the line ending characters in text files. It supports regular expression pattern matching since I'm not sure how well regular shell pattern expansion would work when converted to work on Classic as well as OS X. As you might have guessed, this is a command line tool (since I don't use MacPython anymore, just Python on OS X), so if you want an interface someone else is going to have to do it. Also, I decided not to include en/detabbing, since this is a line ending changer and it wouldn't be very Unixy if I started adding all sorts of features willy nilly (in fact, I think I'm going to take out the pattern matching when I officially release a version of this on my Web site since it's just there to make it easy to add a Mac interface to). Oh, also, someone might want to improve the converting to dos line endings, since it will screw up the file if you type 'cheol -d dos_file.txt' (but I rarely need to convert to dos line endings so I just don't worry about it). Finally, some of the variable names suck, and I know it, but that's just me being a BOFH so that I will be assured to win all future contests that want to use this code. ;-P Oh, and as far as help, man page forthcoming. ;^) cheol.py: #!/usr/bin/python """ cheol: change end of line character Copyright (C) 2000-2001 Gordon Worley This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. For a copy of the GNU General Public License, visit or write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330, Boston, MA 02111-1307, USA. To contact me, please visit my Web site at or e-mail me at . #history #0.3 added help and ability to convert to mac and dos. Name changed to cheol.py from unixify.pl. #0.1 added recursion, uses Jurgen Hermann's FileMorpher #0.0 just converts the given files """ __version__ = "cheol 0.3, Copyright Gordon Worley via the GNU GPL.\nType -h for help" #fn = filename #this first part is not by me, but put right in this code #so that everything can stay in one file :-) #by Jurgen Hermann, from ASPN import os, string def replaceFile(oldname, newname): """ Rename file 'oldname' to 'newname'. """ if os.name == 'nt' and os.path.exists(oldname): # POSIX rename does an atomic replace, WIN32 rename does not. :-( try: os.remove(newname) except OSError, exc: import errno if exc.errno != errno.ENOENT: raise exc # rename it os.rename(oldname, newname) class FileMorpher: """ A class that enables a client to securely update an existing file, including the ability to make an automated backup version. """ def __init__(self, filename, **kw): """ The constructor takes the filename and some options. backup -- boolean indicating whether you want a backup file (default is yes) """ self.filename = filename self.do_backup = kw.get('backup', 0) self.stream = None self.basename, ext = os.path.splitext(self.filename) def __del__(self): if self.stream: # Remove open temp file self.__close() os.remove(self.__tempfile()) def __tempfile(self): return self.basename + ".tmp" def __close(self): """ Close temp stream, if open. """ if self.stream: self.stream.close() self.stream = None def load(self): """ Load the content of the original file into a string and return it. All I/O exceptions are passed through. """ file = open(self.filename, "rt") try: content = file.read() finally: file.close() return content def save(self, content): """ Save new content, using a temporary file. """ file = self.opentemp() file.write(content) self.commit() def opentemp(self): """ Open a temporary file for writing and return an open stream. """ assert not self.stream, "Write stream already open" self.stream = open(self.__tempfile(), "wt") return self.stream def commit(self): """ Close the open temp stream and replace the original file, optionally making a backup copy. """ assert self.stream, "Write stream not open" # close temp file self.__close() # do optional backup and rename temp file to the correct name if self.do_backup: replaceFile(self.filename, self.basename + ".bak") replaceFile(self.__tempfile(), self.filename) #end part not by me #begin part by me import re def convert(fn, pattern, mode, is_recv): if is_recv: if os.path.isdir(fn) and not os.path.islink(fn): fns = os.listdir(fn) for afn in fns: convert(os.path.join(fn, afn), pattern, mode, is_recv) if re.match(pattern, fn) and not os.path.isdir(fn): f = FileMorpher(fn) temp = f.load() if mode == 1: temp = string.replace(temp, '\n\r', '\n') temp = string.replace(temp, '\r', '\n') elif mode == 0: temp = string.replace(temp, '\n\r', '\r') temp = string.replace(temp, '\n', '\r') elif mode == 2: #this code could be dangerous, but I don't do these #conversions often enough to care :-P temp = string.replace(temp, '\r', '\n') temp = string.replace(temp, '\n', '\n\r') stream = f.opentemp() stream.write(temp) f.commit() help = """\ cheol: Converts EOL characters %s [options] options -r : recursive -m : macify line endings -u : unixify line endings -d : dosify line endings -p : apply only to filenames matching -h : print help path is a file or directory """ if __name__ == '__main__': import sys, getopt opts, args = getopt.getopt(sys.argv[1:], "hmudrp:") mode = 1 #default is unix, 0 is mac, 2 is dos is_recv = 0 #is recursive pattern = "" for opt in opts: if opt[0] == "-r": is_recv = 1 elif opt[0] == "-p": pattern = opt[1] elif opt[0] == "-m": mode = 0; elif opt[0] == "-u": mode = 1; elif opt[0] == "-d": mode = 2; elif opt[0] == "-h": print help % sys.argv[0] sys.exit(0) if not args: print __version__ for arg in args: convert(arg, pattern, mode, is_recv); -- Gordon Worley `When I use a word,' Humpty Dumpty http://homepage.mac.com/redbird/ said, `it means just what I choose redbird@rbisland.cx it to mean--neither more nor less.' PGP: 0xBBD3B003 --Lewis Carroll From jack@oratrix.nl Thu Jul 19 21:50:01 2001 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 19 Jul 2001 22:50:01 +0200 Subject: [Pythonmac-SIG] cheol (Content entry, sort of) In-Reply-To: Message by Gordon Worley , Wed, 18 Jul 2001 21:18:44 -0400 , Message-ID: <20010719205006.36BDD14A259@oratrix.oratrix.nl> Gordon, I'm a bit worried about the GPL license, that will probably make it impossible to include it in the distribution, because there's a firm statement from the BDFL that Python is Open Source, and GPL-compatible Open Source at that, but not GPL itself. And, for one, if Python was GPL it would mean that I myself couldn't use Python to create our GRiNS multimedia authoring system... -- 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 Thu Jul 19 21:46:05 2001 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 19 Jul 2001 22:46:05 +0200 Subject: [Pythonmac-SIG] Now this is pretty cool... In-Reply-To: Message by Richard Gordon , Thu, 19 Jul 2001 08:20:49 -0400 , Message-ID: <20010719204610.E9473DA747@oratrix.oratrix.nl> Recently, Richard Gordon said: > >Jack -- Do you think this should be done by default? If the default > >site.py was modified to include this the import and a message was > >added to the startup string, then this would mimic the (quite > >helpful) ActiveState way of doing things. > > I would second this suggestion. This is too useful to be turned off by defaul > t. I think I would prefer it if IDE provided a hook into this, or if someone donated an IDE script for this (how about something that looks up help on the current selection, and if there is no selection shows a dialog box in which you can type the thing you want to look up?). I don't like adding too much to site.py because (a) PythonInterpreter shouldn't really be used interactively (even though I do it all the time:-), IDE should be used for that and (b) site.py also gets loaded by every script, and all this stuff will make all scripts start up slower. -- 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 Thu Jul 19 22:26:38 2001 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 19 Jul 2001 23:26:38 +0200 Subject: [Pythonmac-SIG] Need help with CFM fragment version numbers Message-ID: <20010719212643.D6E06DA747@oratrix.oratrix.nl> If someone can help me with the following that'd be nice. What I finally wanted to do for MacPython 2.1.1 is use the CFM fragment version numbers is make PythonCore backward compatible to 2.1 extension modules. How I thought this worked is by setting the "old definition" and "current version" numbers to the current (2.1.1) version number and setting the "old implementation" to the old (2.1) number. Unfortunately this doesn't work. A previously linked PythonInterpreter refused to load PythonCore, while my understanding was that it should. Before I break things, can someone help me with this? Even if it doesn't make it into 2.1.1 I'd like to provide this functionality in the future. To be completely clear, what I want to attain is: - Extension modules linked against 2.1 will continue to work for 2.1.1. - Extension modules linked against 2.1.1 will require 2.1.1. -- 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 redbird@rbisland.cx Thu Jul 19 23:21:45 2001 From: redbird@rbisland.cx (Gordon Worley) Date: Thu, 19 Jul 2001 18:21:45 -0400 Subject: [Pythonmac-SIG] cheol (Content entry, sort of) In-Reply-To: <20010719205006.36BDD14A259@oratrix.oratrix.nl> References: <20010719205006.36BDD14A259@oratrix.oratrix.nl> Message-ID: At 10:50 PM +0200 7/19/01, Jack Jansen wrote: >Gordon, >I'm a bit worried about the GPL license, that will probably make it >impossible to include it in the distribution, because there's a firm >statement from the BDFL that Python is Open Source, and GPL-compatible >Open Source at that, but not GPL itself. > >And, for one, if Python was GPL it would mean that I myself couldn't use >Python to create our GRiNS multimedia authoring system... Okay then, let's change it. I'm going to have another version done later tonight/early tomorrow and I'm going to break it down into one version that can be called from a Mac interface and one that is a command line tool (basically, I'll take in or out the pattern matching). At that time, I'll change the license. Um, what would be good? Python license okay (and if so can I just say that it's under the Python license or is there something fuller that I can put in)? Also, I just noticed I made a typo in the subject line. Oh well, I guess it will be staying there, since I don't want to screw up threading. ;-) -- Gordon Worley `When I use a word,' Humpty Dumpty http://homepage.mac.com/redbird/ said, `it means just what I choose redbird@rbisland.cx it to mean--neither more nor less.' PGP: 0xBBD3B003 --Lewis Carroll From richard@richardgordon.net Fri Jul 20 00:25:54 2001 From: richard@richardgordon.net (Richard Gordon) Date: Thu, 19 Jul 2001 19:25:54 -0400 Subject: [Pythonmac-SIG] Now this is pretty cool... In-Reply-To: <20010719204610.E9473DA747@oratrix.oratrix.nl> References: <20010719204610.E9473DA747@oratrix.oratrix.nl> Message-ID: At 10:46 PM +0200 7/19/01, Jack Jansen wrote: >I don't like adding too much to site.py because (a) PythonInterpreter >shouldn't really be used interactively (even though I do it all the >time:-), IDE should be used for that and (b) site.py also gets loaded >by every script, and all this stuff will make all scripts start up >slower. hmm, well I see your point about the speed issue. As far as the IDE goes, I don't mind using it at all and that's probably where this stuff should go, but there are times when it's just simpler to launch the interpreter and quickly test some things. Out of curiosity, where does site.py figure into things when you build a standalone app? I guess what I'm really asking is how much baggage gets left behind when you create an application? I've only built one standalone and never bothered to benchmark it versus the .pyc version and was just wondering whether the actual impact on performance is significant. Thanks. Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From rbl@hal.cwru.edu Fri Jul 20 13:23:10 2001 From: rbl@hal.cwru.edu (Robin B. Lake) Date: Fri, 20 Jul 2001 08:23:10 -0400 (EDT) Subject: [Pythonmac-SIG] Problem with urllib.openurl() Message-ID: <200107201223.IAA20772@hal.cwru.edu> On a Mac G3, OS 8.6, Python 2.0. For some time now, I've been using the myfile=urllib.openurl('URL path') construct to suck data files off the Web. Now I'm trying to use it to get both historical and real-time snapshots of stock portfolio prices. The historical data comes thru just fine, in that the Web site offers a "Download" button that sends it over as a comma-delimited file. The real-time data, however, does not make it into the Python-created file "myfile". I get HTML stuff showing in that file, but no data. I suspect that the problem arises in the Web site's use of cgi-bin to create the price table on the fly. Anyone have similar experiences? Is there a work-around? Thank you, Robin Lake lake@cwru.edu From jack@oratrix.nl Fri Jul 20 14:17:44 2001 From: jack@oratrix.nl (Jack Jansen) Date: Fri, 20 Jul 2001 15:17:44 +0200 Subject: [Pythonmac-SIG] Problem with urllib.openurl() In-Reply-To: Message by "Robin B. Lake" , Fri, 20 Jul 2001 08:23:10 -0400 (EDT) , <200107201223.IAA20772@hal.cwru.edu> Message-ID: <20010720131744.D5D12303181@snelboot.oratrix.nl> > For some time now, I've been using the myfile=urllib.openurl('URL path') > construct to suck data files off the Web. Now I'm trying to use it to > get both historical and real-time snapshots of stock portfolio prices. > [...] > The real-time data, however, does not make it into the Python-created > file "myfile". I get HTML stuff showing in that file, but no data. I > suspect that the problem arises in the Web site's use of cgi-bin to > create the price table on the fly. CGI or not on the server side shouldn't be a problem. A couple of things that would be a problem: - If the data isn't normally displayed as-is but interpreted by, say, a java applet or a plugin or something. The "html stuff" you mention could well be something that starts the plugin. It might even be java or javascript code that gets the data. Why not post the html code here? - There is a small possibility that the server-side looks at the browser type you're using and returns different info for explorer and netscape. If it only recognizes those two it could be that it returns nothing if your browser is not one of those. I've seen webpages do this:-( And, of course, urllib is neither Netscape nor Explorer. -- 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 Jul 20 15:57:25 2001 From: tom@othermedia.com (tom smith) Date: Fri, 20 Jul 2001 15:57:25 +0100 Subject: [Pythonmac-SIG] Reload() not working? In-Reply-To: <20010720131744.D5D12303181@snelboot.oratrix.nl> Message-ID: I'm not sure but in Carbon Python reload(module) doesn't seem to work. Or is it me? Am I right? I'm making changes in a module that don't seem to make any difference. Thanks Tom From tom@othermedia.com Fri Jul 20 14:28:41 2001 From: tom@othermedia.com (tom smith) Date: Fri, 20 Jul 2001 14:28:41 +0100 Subject: [Pythonmac-SIG] Problem with urllib.openurl() In-Reply-To: <200107201223.IAA20772@hal.cwru.edu> Message-ID: > > On a Mac G3, OS 8.6, Python 2.0. > > For some time now, I've been using the myfile=urllib.openurl('URL path') > construct to suck data files off the Web. Now I'm trying to use it to > get both historical and real-time snapshots of stock portfolio prices. There is also the problem of urllib.read() not getting all the data on macs in particular... Jack gave me a snippet that helped... def read_url_old(url): try: u = urllib.urlopen(url) rv = '' newdata = u.read() while newdata: rv = rv + newdata try: newdata = u.read() except: #print "error in read_url(" + url +")" raise u.close() return rv Then there also is the problem that timeouts aren't handled by urllib, I've found that botlib.py is quite useful. Drop it in your pythonpath and then... Import botlib def read_url(url, timeout=10.0): bot = botlib.UniBot() data = '' data = bot.fetch(url, timeout) data = botlib.strip_header(data) return data If it is the problem with the browser, then writing the header line shouldn't be too hard, but I haven't got round to doing that yet. Hope this helps tom -- tom smith | tom@othermedia.com http://www.othermedia.com/blog tel 020 8541 5355 | fax 020 8541 5507 11 penrhyn road, kingston-upon-thames, london KT1 2BZ From redbird@rbisland.cx Fri Jul 20 18:51:58 2001 From: redbird@rbisland.cx (Gordon Worley) Date: Fri, 20 Jul 2001 13:51:58 -0400 Subject: [Pythonmac-SIG] cheol (version 0.5) Message-ID: Okay, here is the latest version. This one will follow symlinks and prints verbose messages if you want (they aren't very pretty, but they get the info out there). Also, I put it under the Python License, version 2.1, but since I've never used this license before, I hope I've done it the right way. Now, it still needs a Mac interface if this is going to be really useful (for example, as it stands you can't use this in Classic). So, someone, please, let's collaborate. I'll help you make the modifications to do pattern matching if needed, but I'll leave the GUI up to you. I'm serious here, I'm not going to do the GUI myself, so either someone else does it or it won't get done at all. On a side note, this code is pretty much complete, aside from maybe a better dosification algorithm (viz. a safe one) and cleaner verbosity. Oh, finally, on tab conversions, the string objects have an expandtab method if I'm reading the documentation correctly, and a very simple regular expression should be able to detab, so maybe tomorrow I'll have a chtab program ready (it will basically be this code, but the part that changes line endings will change tabs instead). #!/usr/bin/env python """ cheol: change end of line character Copyright (C) 2000-2001 Gordon Worley This program is free software; you can redistribute it and/or modify it under the terms of the Python License, version 2.1. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Python License, version 2.1 for more details. For a copy of the Python License, version 2.1, visit . To contact me, please visit my Web site at or e-mail me at . #history 0.5 - added support for following links and verbosity. Lot of work. 0.3.5 - removed pattern matching since not unixy 0.3 - added help and ability to convert to mac and dos. Name changed to cheol.py from unixify.pl. 0.1 - added recursion, uses Jurgen Hermann's FileMorpher 0.0 - just converts the given files """ __version__ = "cheol 0.5, Copyright 2000-2001 Gordon Worley via the Python License, version 2.1.\nType -h for help" #fn = filename #this first part is not by me, but put right in this code #so that everything can stay in one file :-) #by Jurgen Hermann, from Python Cookbook (ASPN) import os, string def replaceFile(oldname, newname): """ Rename file 'oldname' to 'newname'. """ if os.name == 'nt' and os.path.exists(oldname): # POSIX rename does an atomic replace, WIN32 rename does not. :-( try: os.remove(newname) except OSError, exc: import errno if exc.errno != errno.ENOENT: raise exc # rename it os.rename(oldname, newname) class FileMorpher: """ A class that enables a client to securely update an existing file, including the ability to make an automated backup version. """ def __init__(self, filename, **kw): """ The constructor takes the filename and some options. backup -- boolean indicating whether you want a backup file (default is yes) """ self.filename = filename self.do_backup = kw.get('backup', 0) self.stream = None self.basename, ext = os.path.splitext(self.filename) def __del__(self): if self.stream: # Remove open temp file self.__close() os.remove(self.__tempfile()) def __tempfile(self): return self.basename + ".tmp" def __close(self): """ Close temp stream, if open. """ if self.stream: self.stream.close() self.stream = None def load(self): """ Load the content of the original file into a string and return it. All I/O exceptions are passed through. """ file = open(self.filename, "rt") try: content = file.read() finally: file.close() return content def save(self, content): """ Save new content, using a temporary file. """ file = self.opentemp() file.write(content) self.commit() def opentemp(self): """ Open a temporary file for writing and return an open stream. """ assert not self.stream, "Write stream already open" self.stream = open(self.__tempfile(), "wt") return self.stream def commit(self): """ Close the open temp stream and replace the original file, optionally making a backup copy. """ assert self.stream, "Write stream not open" # close temp file self.__close() # do optional backup and rename temp file to the correct name if self.do_backup: replaceFile(self.filename, self.basename + ".bak") replaceFile(self.__tempfile(), self.filename) #end part not by me #begin part by me def convert(fn, mode, is_recv, follow_links, verbose): if is_recv: if os.path.isdir(fn) and not os.path.islink(fn): if verbose: print "%s/:" % fn os.chdir(fn) fns = os.listdir("./") for afn in fns: convert(afn, mode, is_recv, follow_links, verbose) os.chdir("..") if verbose: print "../:" elif os.path.isdir(fn) and os.path.islink(fn) and os.path.islink(fn) <= follow_links: jfn = os.readlink(fn) if verbose: print "%s/ (%s/):" % (fn, jfn) fns = os.listdir(fn) for afn in fns: convert(os.path.join(jfn, afn), mode, is_recv, follow_links, verbose) if verbose: print "../:" if not os.path.isdir(fn): if os.path.islink(fn) and os.path.islink(fn) <= follow_links: tmp = fn fn = os.readlink(fn) if verbose: print "converting %s (%s)" % (tmp, fn) elif verbose: print "converting %s" % fn f = FileMorpher(fn) temp = f.load() if mode == 1: temp = string.replace(temp, '\n\r', '\n') temp = string.replace(temp, '\r', '\n') elif mode == 0: temp = string.replace(temp, '\n\r', '\r') temp = string.replace(temp, '\n', '\r') elif mode == 2: #this code could be dangerous, but I don't do these #conversions often enough to care :-P temp = string.replace(temp, '\r', '\n') temp = string.replace(temp, '\n', '\n\r') stream = f.opentemp() stream.write(temp) f.commit() help = """\ cheol: Converts EOL characters %s [options] options: -r : recursive -l : follow links -v : verbose -m : macify line endings -u : unixify line endings -d : dosify line endings -h : print help path is a file or directory """ if __name__ == '__main__': import sys, getopt try: opts, args = getopt.getopt(sys.argv[1:], "hlvmudr") except: print "That's not an option. Type -h for help." sys.exit(1) mode = 1 #default is unix, 0 is mac, 2 is dos is_recv = 0 #default isn't recursive follow_links = 0 #default don't follow links verbose = 0 for opt in opts: if opt[0] == "-r": is_recv = 1 elif opt[0] == "-l": follow_links = 1 elif opt[0] == "-v": verbose = 1 elif opt[0] == "-m": mode = 0; elif opt[0] == "-u": mode = 1; elif opt[0] == "-d": mode = 2; elif opt[0] == "-h": print help % sys.argv[0] sys.exit(0) if not args: print __version__ for arg in args: convert(arg, mode, is_recv, follow_links, verbose) -- Gordon Worley `When I use a word,' Humpty Dumpty http://homepage.mac.com/redbird/ said, `it means just what I choose redbird@rbisland.cx it to mean--neither more nor less.' PGP: 0xBBD3B003 --Lewis Carroll From jwblist@olympus.net Fri Jul 20 23:02:08 2001 From: jwblist@olympus.net (John W Baxter) Date: Fri, 20 Jul 2001 15:02:08 -0700 Subject: [Pythonmac-SIG] Problem with urllib.openurl() In-Reply-To: <20010720131744.D5D12303181@snelboot.oratrix.nl> References: <20010720131744.D5D12303181@snelboot.oratrix.nl> Message-ID: At 15:17 +0200 7/20/2001, Jack Jansen wrote: >And, of course, urllib is >neither Netscape nor Explorer. Given the number of sites which insist on sniffing the browser, the ability to lie about browser type might be a nice enhancement to urllib. But that's not a Mac thing. --John -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From redbird@rbisland.cx Sat Jul 21 03:13:07 2001 From: redbird@rbisland.cx (Gordon Worley) Date: Fri, 20 Jul 2001 22:13:07 -0400 Subject: [Pythonmac-SIG] cheol 0.5.1 and chtab 0.1 Message-ID: Okay, below is the diff file between cheol 0.5 and 0.5.1 so you can patch the source I sent out earlier. Basically, it just adds support for long options (like --help) after reading up on getopt a little more. Also, chtab is out. It's basically cheol with the important parts changed to convert tabs/spaces instead of line endings. Also, sorry about the largeness of these posts. I'll just do diff files from now on and sometime next week I'll have both these scripts posted on my Web site. Actually, now that I think about it, chtab could probably be a diff on cheol. :-) Oh well. If anyone has feature ideas, please, send them my way (but keep in mind these are Unixy utility programs, so don't ask for them to clean the kitchen sink). I think there may be a feature or two that could be added to chtab, but I'm not sure what, since I got it to do the conversions I would want it to do. cheol0.5-0.5.1.diff: 22a23 > 0.5.1 - added support for long (--) options 31c32 < __version__ = "cheol 0.5, Copyright 2000-2001 Gordon Worley via the Python License, version 2.1.\nType -h for help" --- > __version__ = "cheol 0.5.1, Copyright 2000-2001 Gordon Worley via >the Python License, version 2.1.\nType -h for help" 195,198c196,199 < -m : macify line endings < -u : unixify line endings < -d : dosify line endings < -h : print help --- > -m, --mac : macify line endings > -u, --unix : unixify line endings > -d, --dos : dosify line endings > -h, --help : print help 199a201,202 > > run with no options or args for version string 205c208 < opts, args = getopt.getopt(sys.argv[1:], "hlvmudr") --- > opts, args = getopt.getopt(sys.argv[1:], "hlvmudr", >("help", "mac", "unix", "dos")) 220c223 < elif opt[0] == "-m": --- > elif opt[0] == "-m" or opt[0] == "--mac": 222c225 < elif opt[0] == "-u": --- > elif opt[0] == "-u" or opt[0] == "--unix": 224c227 < elif opt[0] == "-d": --- > elif opt[0] == "-d" or opt[0] == "--dos": 226c229 < elif opt[0] == "-h": --- > elif opt[0] == "-h" or opt[0] == "--help": 232c235 < convert(arg, mode, is_recv, follow_links, verbose) \ No newline at end of file --- > convert(arg, mode, is_recv, follow_links, verbose) chtab 0.1: #!/usr/bin/env python """ chtab: tabs to spaces and spaces to tabs Copyright (C) 2000-2001 Gordon Worley This program is free software; you can redistribute it and/or modify it under the terms of the Python License, version 2.1. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Python License, version 2.1 for more details. For a copy of the Python License, version 2.1, visit . To contact me, please visit my Web site at or e-mail me at . #history 0.1 - fixed regexen 0.0 - based on cheol.py, but puts in regexen to convert tabs/spaces """ __version__ = "chtab 0.1, Copyright 2000-2001 Gordon Worley via the Python License, version 2.1.\nType -h for help" #fn = filename #this first part is not by me, but put right in this code #so that everything can stay in one file :-) #by Jurgen Hermann, from Python Cookbook (ASPN) import os, string def replaceFile(oldname, newname): """ Rename file 'oldname' to 'newname'. """ if os.name == 'nt' and os.path.exists(oldname): # POSIX rename does an atomic replace, WIN32 rename does not. :-( try: os.remove(newname) except OSError, exc: import errno if exc.errno != errno.ENOENT: raise exc # rename it os.rename(oldname, newname) class FileMorpher: """ A class that enables a client to securely update an existing file, including the ability to make an automated backup version. """ def __init__(self, filename, **kw): """ The constructor takes the filename and some options. backup -- boolean indicating whether you want a backup file (default is yes) """ self.filename = filename self.do_backup = kw.get('backup', 0) self.stream = None self.basename, ext = os.path.splitext(self.filename) def __del__(self): if self.stream: # Remove open temp file self.__close() os.remove(self.__tempfile()) def __tempfile(self): return self.basename + ".tmp" def __close(self): """ Close temp stream, if open. """ if self.stream: self.stream.close() self.stream = None def load(self): """ Load the content of the original file into a string and return it. All I/O exceptions are passed through. """ file = open(self.filename, "rt") try: content = file.read() finally: file.close() return content def save(self, content): """ Save new content, using a temporary file. """ file = self.opentemp() file.write(content) self.commit() def opentemp(self): """ Open a temporary file for writing and return an open stream. """ assert not self.stream, "Write stream already open" self.stream = open(self.__tempfile(), "wt") return self.stream def commit(self): """ Close the open temp stream and replace the original file, optionally making a backup copy. """ assert self.stream, "Write stream not open" # close temp file self.__close() # do optional backup and rename temp file to the correct name if self.do_backup: replaceFile(self.filename, self.basename + ".bak") replaceFile(self.__tempfile(), self.filename) #end part not by me #begin part by me import re def convert(fn, mode, is_recv, follow_links, verbose, tab_width, all): if is_recv: if os.path.isdir(fn) and not os.path.islink(fn): if verbose: print "%s/:" % fn os.chdir(fn) fns = os.listdir("./") for afn in fns: convert(afn, mode, is_recv, follow_links, verbose, tab_width, all) os.chdir("..") if verbose: print "../:" elif os.path.isdir(fn) and os.path.islink(fn) and os.path.islink(fn) <= follow_links: jfn = os.readlink(fn) if verbose: print "%s/ (%s/):" % (fn, jfn) fns = os.listdir(fn) for afn in fns: convert(os.path.join(jfn, afn), mode, is_recv, follow_links, verbose, tab_width, all) if verbose: print "../:" if not os.path.isdir(fn): if os.path.islink(fn) and os.path.islink(fn) <= follow_links: tmp = fn fn = os.readlink(fn) if verbose: print "converting %s (%s)" % (tmp, fn) elif verbose: print "converting %s" % fn f = FileMorpher(fn) temp = f.load() if mode == 0: if all: temp = re.sub(r" {" + `tab_width` + r"}", r"\t", temp) else: patt = re.compile(r"^ {" + `tab_width` + r"}", re.M) temp, count = patt.subn(r"\t", temp) i = 1 while count > 0: subpatt = re.compile(r"^\t{" + `i` + r"} {" + `tab_width` + r"}", re.M) temp, count = subpatt.subn("\t"*(i+1), temp) i += 1 elif mode == 1: temp = temp.expandtabs(tab_width) stream = f.opentemp() stream.write(temp) f.commit() help = """\ chtab: En/detabs files %s [options] options: -r : recursive -l : follow links -v : verbose -e, --entab : turn spaces into tabs (default) -d, --detab : turn tabs into spaces -t : number of spaces per tab (default is 4) -a : act on all spaces (works with --entab, default is to just affect those spaces at the beginning of lines) -h, --help : print help path is a file or directory run with no options or args for version string """ if __name__ == '__main__': import sys, getopt try: opts, args = getopt.getopt(sys.argv[1:], "ahlvedrt:", ("entab", "detab", "help")) except: print "That's not an option. Type -h for help." sys.exit(1) mode = 0 #default is to entab all = 0 #default is to just do tabs at start of lines tab_width = 4 is_recv = 0 #default isn't recursive follow_links = 0 #default don't follow links verbose = 0 for opt in opts: if opt[0] == "-r": is_recv = 1 elif opt[0] == "-a": all = 1 elif opt[0] == "-l": follow_links = 1 elif opt[0] == "-v": verbose = 1 elif opt[0] == "-t": tab_width = int(opt[1]) elif opt[0] == "-e" or opt[0] == "--entab": mode = 0; elif opt[0] == "-d" or opt[0] == "--detab": mode = 1; elif opt[0] == "-h" or opt[0] == "--help": print help % sys.argv[0] sys.exit(0) if not args: print __version__ for arg in args: convert(arg, mode, is_recv, follow_links, verbose, tab_width, all) -- Gordon Worley `When I use a word,' Humpty Dumpty http://homepage.mac.com/redbird/ said, `it means just what I choose redbird@rbisland.cx it to mean--neither more nor less.' PGP: 0xBBD3B003 --Lewis Carroll From redbird@mac.com Sat Jul 21 15:56:39 2001 From: redbird@mac.com (Gordon Worley) Date: Sat, 21 Jul 2001 10:56:39 -0400 Subject: [Pythonmac-SIG] [offtopic] e-mail woes Message-ID: Um, I know I just posted saying to e-mail me if you had some reasonable feature requests for cheol and chtab, but it seems that things with .cx have messed up again. We've been having trouble for about a month now, but nic.cx seemed to get e-mail working again for a little bit, but yesterday it went down again. :-( Anyway, the point is you can send those feature requests/bug reports/flames ;-) to redbird@mac.com. -- Gordon Worley `When I use a word,' Humpty Dumpty http://homepage.mac.com/redbird/ said, `it means just what I choose redbird@rbisland.cx it to mean--neither more nor less.' PGP: 0xBBD3B003 --Lewis Carroll From draayer@surfglobal.net Sat Jul 21 22:14:21 2001 From: draayer@surfglobal.net (Dean & Yang Draayer) Date: Sat, 21 Jul 2001 17:14:21 -0400 Subject: [Pythonmac-SIG] Re: Now this is pretty cool... Message-ID: > I think I would prefer it if IDE provided a hook into this, or if > someone donated an IDE script for this (how about something that looks > up help on the current selection, and if there is no selection shows a > dialog box in which you can type the thing you want to look up?). I came up with the following script that seems to work well in the Scripts menu of Python IDE. #============================================= # 'Online Help....py' # # Provides access to the on-line help # generated by the pydoc module. # # This script is intended for use in the # Python IDE Scripts menu (MacPython only). #============================================= if sys.platform != 'mac': sys.exit("This script works only in MacPython.") if __name__ == '__main__': from EasyDialogs import AskString from pydoc import Helper import sys helper = Helper(sys.stdin, sys.stdout) topic = AskString('Help topic:', '') if topic != None: # user didn't cancel if topic == '': helper.intro() else: helper.help(topic) #=== end 'Online Help....py' === It doesn't do the 'current selection' trick - not yet anyway. I'll look into adding this feature. If this works to everyone's satisfaction, it might be a good idea to incorporate this in the Help menu instead of the Scripts menu. One minor annoyance: when the AskString dialog comes up, the cursor remains a watch cursor. It really should revert to an arrow cursor. Cheers, Dean Draayer draayer@surfglobal.net From draayer@surfglobal.net Sat Jul 21 22:14:26 2001 From: draayer@surfglobal.net (Dean & Yang Draayer) Date: Sat, 21 Jul 2001 17:14:26 -0400 Subject: [Pythonmac-SIG] Re: batch convert line endings Message-ID: > What are people using to batch convert folders full of text files > that may have DOS or UNIX line endings to Mac line endings? I was > using Cyclone, but it is a pain in the butt as it prompts for each > file and also it does a lot more than convert line endings so it > is not really optimized just for that. I would love a little > droplet like Drop=EFBB or Drop RENAME, etc. that i could put on my > desk top and then drag and drop the folder on to it and have all > the files changed to Mac line endings. Of course, Mac to UNIX aor > DOS line endings would be good too! in case you wanted to send a > folder of stuff from your MAC to a Windoze or UNIX user. > > cheers, > -kp-- I use the following script, saved as an applet. It only supports conversion to Mac-style endings. It handles drag-and-drop from the Finder nicely - any combination of files and folders can be dropped on= it. If double-clicked, it prompts for a file to convert. Folders are traversed recursively. Only files of type 'TEXT' are examined, and= only those showing non-Mac line endings are actually modified - their= pathnames are printed so you can see which ones were changed. Modification= dates are preserved. Mixed-style line endings with the same file are= handled - i.e. the conversion decision is made on a line-by-line basis, rather= than based on the first line only. The entire file is read into memory in= one fell swoop, so large files will be skipped if there's not enough= memory. BEWARE - the original files are overwritten without backing them up! (This really needs to be fixed.) Use at your own risk! #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D # MacLineEndings.py # Author: Dean Draayer # Date: 16 June 2000 #------------------------------------------------------- # Converts TEXT files to use mac-style line endings. # CRLF pairs and lone LFs are changed to CRs. # Usage: Drop folders and individual files on the applet # to convert them. Folders are walked recursively. #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D import string from os import path from sys import argv, exit from macfs import FSSpec, StandardGetFile #--- globals --- numItems =3D 0 # count of number of files actually modified CR =3D chr(13) LF =3D chr(10) CRLF =3D CR + LF def handleNoArgs(): (fs, OK) =3D StandardGetFile() if OK: # user selected something return [fs.as_pathname()] # simulate a one-arg drop else: exit() # user cancelled def startUp(theArgs): print "Running %s..." % path.split(argv[0])[1] def finishUp(theArgs): print "...done. Modified %d files." % numItems def doArg(anArg): if path.isdir(anArg): path.walk(anArg, doArg_aux, None) else: doItem(anArg) def doArg_aux(arg, parPath, fNames): for fName in fNames: doItem(path.join(parPath, fName)) def doItem(aPath): global numItems if path.isdir(aPath): return fs =3D FSSpec(aPath) (fCreat, fType) =3D fs.GetCreatorType() if (fType <> 'TEXT'): return fp =3D open(aPath, 'rb') try: try: data =3D fp.read() finally: fp.close() except MemoryError: from MacOS import SysBeep SysBeep() print "*** FILE TOO BIG! *** Ignoring", aPath return if (string.find(data, LF) =3D=3D -1): # nothing to do if there= are no LFs return print aPath # Note: It's important to replace CRLFs before LFs!!! data =3D string.replace(data, CRLF, CR) data =3D string.replace(data, LF, CR) savedDates =3D fs.GetDates() # preserve modification date fp =3D open(aPath, 'wb') try: fp.write(data) finally: fp.close() fs.SetDates(savedDates[0], savedDates[1], savedDates[2]) numItems =3D numItems + 1 def run(theArgs =3D None): global numItems numItems =3D 0 if not theArgs: theArgs =3D handleNoArgs() # handle no-argument situation startUp(theArgs) # perform pre-processing map(doArg, theArgs) # process each argument finishUp(theArgs) # perform post-processing if __name__ =3D=3D "__main__": run(argv[1:]) #=3D=3D=3D end MacLineEndings.py =3D=3D=3D Sorry about the length of this post! Dean Draayer draayer@surfglobal.net From draayer@surfglobal.net Sun Jul 22 04:45:41 2001 From: draayer@surfglobal.net (Dean Draayer) Date: Sat, 21 Jul 2001 23:45:41 -0400 Subject: [Pythonmac-SIG] Saving from the PythonInterpeter.out window Message-ID: How does one save the contents of the PythonInterpreter.out window? There's a File>Save command, but it doesn't bring up a dialog to let me say where to save it - and I can't find where/whether it actually does save it. It would be nice to have a Save As... command instead. (I may be imagining this, but I have a vague impression that the interpreter DID used to bring up a save dialog.) Dean Draayer From draayer@surfglobal.net Sun Jul 22 04:45:45 2001 From: draayer@surfglobal.net (Dean Draayer) Date: Sat, 21 Jul 2001 23:45:45 -0400 Subject: [Pythonmac-SIG] sys.exit() and Python IDE Message-ID: When a script running in the IDE calls sys.exit(), the IDE puts up a traceback. I don't think it should, since sys.exit() is an "accepted" way to terminate. In particular, a script run from the Scripts menu must either avoid using sys.exit() or else risk terminating with a traceback even if all went according to plan. To be in line with the description of the SystemExit exception in Python Library Reference, it seems that IDE should wrap its script-running code within a try-except block, perhaps somewhat like: try: # 'run script' code here except SystemExit, arg: if arg.code != None and type(arg.code) != type(0): sys.stderr.write("%s\n" % arg) pass Should something like this be done? Or do people WANT to get the traceback when sys.exit() is encountered in the IDE? Dean Draayer From just@letterror.com Sun Jul 22 10:26:04 2001 From: just@letterror.com (Just van Rossum) Date: Sun, 22 Jul 2001 11:26:04 +0200 Subject: [Pythonmac-SIG] sys.exit() and Python IDE In-Reply-To: Message-ID: <20010722113512-r01010700-6c05faf9-0910-010c@213.84.27.177> Dean Draayer wrote: > Should something like this be done? Your proposal soulds reasonable. If you look at PyEdit.py: KeyboardInterrupt errors are already silenced in much the same way. > Or do people WANT to get the > traceback when sys.exit() is encountered in the IDE? I guess the reason I've never fixed this is because I *never* use sys.exit() or raise SystemExit: I simply consider it bad style... Just From tjlahey@cgl.uwaterloo.ca Sun Jul 22 17:30:39 2001 From: tjlahey@cgl.uwaterloo.ca (Tim Lahey) Date: Sun, 22 Jul 2001 12:30:39 -0400 Subject: [Pythonmac-SIG] Python.framework under OS X Message-ID: <20010722163056.GTQ10608.tomts6-srv.bellnexxia.net@localhost> All, I've had the concept of python as a framework percolating in my head for some time now and I'd like to share some ideas for feedback. 1. Build the core python distribution as a framework to be placed in /Library/Frameworks. Allows for easy installation and accessible for all Applications. 2. Set the PYTHONPATH to search the ~/Library/Python then /Library/Python for additional modules. Basically, they would act as local and global site-packages directories. 3. Create a command-line executable in /usr/local/bin to work like the current interpreter. 4. Create a PythonInterpreter View Interface Builder Pallet so applications can embed the interpreter inside the application along with a place for user interaction. 5. Develop a Aqua-based GUI interface. Given the problems people have had using PyObjC we may want to use Carbon. Interface Builder supports Carbon so, people could layout their UI using IB. 6. Being porting some of the other python modules to the new UI. I'm thinking of various ones such as PIL and PyOpenGL. What does everyone think ? This is sort of part of my grand dream of developing a python-based MATLAB replacement for OS X. Unfortunately, I won't be able to contribute much until September as I first have to finish my coding for my thesis. I'm not sure how much help I can be on the first three parts as my knowledge of the guts of python is minimal but, I'm willing to help as much as I can and I can certainly help with 4, 5, and 6. Cheers, Tim Lahey From hummelsean@mac.com Sun Jul 22 21:52:11 2001 From: hummelsean@mac.com (Sean Hummel) Date: Sun, 22 Jul 2001 13:52:11 -0700 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: <20010722163056.GTQ10608.tomts6-srv.bellnexxia.net@localhost> Message-ID: I've been thinking about this too. However I thought possibly a better mechanism would be to make Python a Scripting Component, so that anywhere you could use Applescript, you could instead use Python. I think this would be easier for a lot of reasons, primarily because it is so easy to support Applescript in your applications. I like your mechanism too, but it seems it would require a lot of work. (Of course so does a scripting component.) Perhaps both types of solutions are needed, because applications tend to vary so much. > From: Tim Lahey > Date: Sun, 22 Jul 2001 12:30:39 -0400 > To: pythonmac-sig@python.org > Subject: [Pythonmac-SIG] Python.framework under OS X > > All, > > I've had the concept of python as a framework percolating in my > head for some time now and I'd like to share some ideas for > feedback. > > 1. Build the core python distribution as a framework to be placed > in /Library/Frameworks. Allows for easy installation and > accessible for all Applications. > > 2. Set the PYTHONPATH to search the ~/Library/Python then > /Library/Python for additional modules. Basically, they would > act as local and global site-packages directories. > > 3. Create a command-line executable in /usr/local/bin to work > like the current interpreter. > > 4. Create a PythonInterpreter View Interface Builder Pallet so > applications can embed the interpreter inside the application > along with a place for user interaction. > > 5. Develop a Aqua-based GUI interface. Given the problems > people have had using PyObjC we may want to use Carbon. > Interface Builder supports Carbon so, people could layout > their UI using IB. > > 6. Being porting some of the other python modules to the new > UI. I'm thinking of various ones such as PIL and PyOpenGL. > > What does everyone think ? This is sort of part of my grand > dream of developing a python-based MATLAB replacement > for OS X. > > Unfortunately, I won't be able to contribute much until September > as I first have to finish my coding for my thesis. I'm not sure how > much help I can be on the first three parts as my knowledge of the > guts of python is minimal but, I'm willing to help as much as I can > and I can certainly help with 4, 5, and 6. > > Cheers, > > Tim Lahey > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From jack@oratrix.nl Sun Jul 22 22:11:47 2001 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 22 Jul 2001 23:11:47 +0200 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: Message by Sean Hummel , Sun, 22 Jul 2001 13:52:11 -0700 , Message-ID: <20010722211152.E526C14B62D@oratrix.oratrix.nl> I'm working on more-or-less what Tim suggests, I'll answer his message fuller later this evening (or week), I'd like to finsih 2.1.1 first (announcement later tonight, hopefully). Making Python a scripting component is something I looked into a couple of years ago (maybe even in the 68k days) but I gave up because at that time scripting components had to be in Yet Another Funny Shared Library Format. I don't remember the format (ASLM? Component Manager? Apple is now to about its tenth format, unless we count cdefs and chooser plugins too, which would make it 20 or so) but insofar as I was able to understand the documentation there were enough limitations in the format that I didn't see an easy way to do Python in it. If that has changed, and if you can load PythonCore from a scripting component it shouldn't be all that difficult to create a stub component that calls the relevant parts of PythonCore. -- 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 Sun Jul 22 23:02:16 2001 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 23 Jul 2001 00:02:16 +0200 Subject: [Pythonmac-SIG] MacPython 2.1.1 final candidate 1 available Message-ID: <20010722220221.F118C14B62D@oratrix.oratrix.nl> Folks, the first Final Candidate (and hopefully the last) for MacPython 2.1.1 is available in http://www.cwi.nl/ftp/jack/python/mac/newer/ (or in ftp://ftp.cwi.nl/pub/jack/python/mac/newer/ which is the same place thru ftp). This is a bugfix release only, so there's really no reason not to switch. At least: that's what you're going to find out for me in the next few days:-) Aside from all the fixes to the core (see www.python.org for those) the main mac-spcific fixes are - sys.path doesn't lose it's case anymore. Moreover, the problems people had with non-ascii characters in their path should be either solved or at least (for the Japanese, I'm afraid) result in an error message. If people can try non-ascii chars (esp. Japanese or another non-8-bit charset) in their path I'd be delighted to hear the results. - MacOS 8 users should be able to use IDE (and the Fm module) again. Please don't advertise this distribution too wide, as I had to use the Oratrix Vise license for it (my MacPython free Vise license had expired and I haven't received a new one yet, the final distribution will have to wait until it comes in, I'm afraid). -- 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 jwblist@olympus.net Mon Jul 23 05:46:40 2001 From: jwblist@olympus.net (John W Baxter) Date: Sun, 22 Jul 2001 21:46:40 -0700 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: References: Message-ID: At 13:52 -0700 7/22/2001, Sean Hummel wrote: >I've been thinking about this too. However I thought possibly a better >mechanism would be to make Python a Scripting Component, so that anywhere >you could use Applescript, you could instead use Python. I think this >would be easier for a lot of reasons, primarily because it is so easy to >support Applescript in your applications. The attempt to do this with MacPerl failed (Python may be more amenable to it). And I have no idea what complexities there are in Mac OS X--actually it could be easier in Mac OS X. --John -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From jwblist@olympus.net Mon Jul 23 05:50:55 2001 From: jwblist@olympus.net (John W Baxter) Date: Sun, 22 Jul 2001 21:50:55 -0700 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: <20010722211152.E526C14B62D@oratrix.oratrix.nl> References: <20010722211152.E526C14B62D@oratrix.oratrix.nl> Message-ID: At 23:11 +0200 7/22/2001, Jack Jansen wrote: >I don't remember the format (ASLM? Component >Manager? Component manager. Which while older than ASLM (it appeared with QuickTime in System 6 time) has outlasted ASLM (Open Transport was recently (finally) rewritten away from ASLM). Mac OS X is a different ballgame...I don't know whether Component Manager found its way in or was replaced. --john -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From jack@oratrix.nl Mon Jul 23 09:39:25 2001 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 23 Jul 2001 10:39:25 +0200 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: Message by John W Baxter , Sun, 22 Jul 2001 21:46:40 -0700 , Message-ID: <20010723083929.57AEA303181@snelboot.oratrix.nl> > The attempt to do this with MacPerl failed (Python may be more amenable to it). John, do you know why it failed? Or do you know people who were involved, or mailing list archives, etc? -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From jack@oratrix.nl Mon Jul 23 09:59:48 2001 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 23 Jul 2001 10:59:48 +0200 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: Message by Tim Lahey , Sun, 22 Jul 2001 12:30:39 -0400 , <20010722163056.GTQ10608.tomts6-srv.bellnexxia.net@localhost> Message-ID: <20010723085948.E2C75303181@snelboot.oratrix.nl> Ok, time for some detailed discussion. > 1. Build the core python distribution as a framework to be placed > in /Library/Frameworks. Allows for easy installation and > accessible for all Applications. One problem here is that /Library/Frameworks/Python will look different from what unix-pythoneers are used to. It'll be similar, but different. I'd like to know whether its possible to but a "normal" python installation in here (say, in /Library/Frameworks/Python.framework/python) and put the framework mumbojumbo in symlinks. Hmm, yes, the existing frameworks already do that, so symlinking should be fine. Does anyone know what the minimum contents of a framework are? Also, the only way I've found to create frameworks is through Project Builder. Is there a command line program to do it as well, or should I hand-craft it? > 2. Set the PYTHONPATH to search the ~/Library/Python then > /Library/Python for additional modules. Basically, they would > act as local and global site-packages directories. I think I'd prefer the global site-packages to live in Lib/site-packages in /Library/Framework/Python.framework/ just so we're not accused of changing things without reason (by the rest of the unix-pythoneers). The ~/Library/Python idea I like. > 3. Create a command-line executable in /usr/local/bin to work > like the current interpreter. Yep. > 4. Create a PythonInterpreter View Interface Builder Pallet so > applications can embed the interpreter inside the application > along with a place for user interaction. Oops, buzzword overload. I know the various words, but the stringing together doesn't result in added meaning. Could you expand on this a bit? > 5. Develop a Aqua-based GUI interface. Given the problems > people have had using PyObjC we may want to use Carbon. > Interface Builder supports Carbon so, people could layout > their UI using IB. I think we can do it so that people could do both, but initially I think Carbon is the way to go. I have most of the MacPython toolbox modules ported (at least: they compile and import), I'm working on the few basic necesseties we need to put Carbon and BSD together (FSRefs, CFString and friends) and on replacements for things we're going to lose (MLTE to replace Waste; that is, unless someone wants to invest some time into getting Waste to run under Mach-O Carbon. This would be *very* welcome as lack of Waste is the main thing that stops us from starting on IDE). > 6. Being porting some of the other python modules to the new > UI. I'm thinking of various ones such as PIL and PyOpenGL. PIL should be trivial, PyOpenGL also not too difficult. Most of what I've done so far is in the repository already, the one exception being the setup.py file (which will build all the toolbox modules and such). I can mail it to people who want to play with this stuff, and I'll also try and think of a way to put it into the repository without overmuch bothering people who use OSX as a unix box. -- 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 Aureli.Soria_Frisch@ipk.fhg.de Mon Jul 23 10:35:55 2001 From: Aureli.Soria_Frisch@ipk.fhg.de (Aureli Soria Frisch) Date: Mon, 23 Jul 2001 11:35:55 +0200 Subject: [Pythonmac-SIG] Reload() not working? In-Reply-To: References: <20010720131744.D5D12303181@snelboot.oratrix.nl> Message-ID: At 15:57 Uhr +0100 20.07.2001, tom smith wrote: >I'm not sure but in Carbon Python reload(module) doesn't seem to work. Or is >it me? > >Am I right? I'm making changes in a module that don't seem to make any >difference. I have a similar problem when defining a class. If I run the script and then change some method, doing reload() does not actualize the method. However I only suppose that I am using Carbon Python... What does it mean? Using MacPython with the CarbonLib installed in the computer, or is it something more? Sorry about this basic non-understanding... Regards ################################# Aureli Soria Frisch Fraunhofer IPK Dept. Pattern Recognition post: Pascalstr. 8-9, 10587 Berlin, Germany e-mail:aureli@ipk.fhg.de fon: +49 30 39006-150 fax: +49 30 3917517 ################################# From jack@oratrix.nl Mon Jul 23 11:05:54 2001 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 23 Jul 2001 12:05:54 +0200 Subject: [Pythonmac-SIG] Reload() not working? In-Reply-To: Message by Aureli Soria Frisch , Mon, 23 Jul 2001 11:35:55 +0200 , Message-ID: <20010723100622.B17B0303181@snelboot.oratrix.nl> > I have a similar problem when defining a class. If I run the script and > then change some method, doing reload() does not actualize the method. Note that this is expected behaviour. If you create an object with the old module and then reload the module the old object will still refer to the old module. If you think about how Python objects work this is no more than logical: there's no way Python can go into the object and change its class (and thereby its methods) on the fly. Only newly created objects will get the new class and methods. If I'm misunderstanding you and objects that are created after you've reloaded the module also see the old method then that's indeed a bug, so please let me know. Tom: could it be that this is your problem too? -- 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 doug@sonosphere.com Mon Jul 23 12:23:09 2001 From: doug@sonosphere.com (Doug Wyatt) Date: Mon, 23 Jul 2001 07:23:09 -0400 Subject: [Pythonmac-SIG] Re: Component Mgr (was: Python.framework under OS X) In-Reply-To: Message-ID: <18B743BB-7F5D-11D5-A7B9-00039301A6E6@> On Monday, July 23, 2001, at 12:50 AM, John W Baxter wrote: > At 23:11 +0200 7/22/2001, Jack Jansen wrote: >> I don't remember the format (ASLM? Component >> Manager? > > Component manager. Which while older than ASLM (it appeared with > QuickTime > in System 6 time) has outlasted ASLM (Open Transport was recently > (finally) > rewritten away from ASLM). > > Mac OS X is a different ballgame...I don't know whether Component > Manager > found its way in or was replaced. Everything in /System/Library/Components contains Components; the Component Manager is part of the CarbonCore subframework of CoreServices. Doug -- Doug Wyatt work: dwyatt@apple.com (CoreAudio) personal: doug@sonosphere.com http://www.sonosphere.com "When you discard arrogance, complexity, and a few other things that get in the way, sooner or later you will discover that simple, childlike, and mysterious secret known to those of the Uncarved Block: Life is Fun." -- The Tao of Pooh From Benjamin.Schollnick@usa.xerox.com Mon Jul 23 12:55:48 2001 From: Benjamin.Schollnick@usa.xerox.com (Schollnick, Benjamin) Date: Mon, 23 Jul 2001 07:55:48 -0400 Subject: [Pythonmac-SIG] Reload() not working? Message-ID: If memory serves me correctly, I believe this is normal behavior? I remember reading somewhere that Reload() actually reloads the module in memory, but does not "overwrite" existing objects, variables, etc. In other words, if you were to erase the object that you are using, and then do a reload, then recreate the object, you should see the updated module. I haven't tried this myself, so take it with a grain of salt... - Benjamin -----Original Message----- From: Aureli Soria Frisch [mailto:Aureli.Soria_Frisch@ipk.fhg.de] Sent: Monday, July 23, 2001 5:36 AM To: tom smith Cc: Jack Jansen; pythonmac-sig@python.org Subject: Re: [Pythonmac-SIG] Reload() not working? At 15:57 Uhr +0100 20.07.2001, tom smith wrote: >I'm not sure but in Carbon Python reload(module) doesn't seem to work. Or is >it me? > >Am I right? I'm making changes in a module that don't seem to make any >difference. I have a similar problem when defining a class. If I run the script and then change some method, doing reload() does not actualize the method. However I only suppose that I am using Carbon Python... What does it mean? Using MacPython with the CarbonLib installed in the computer, or is it something more? Sorry about this basic non-understanding... Regards ################################# Aureli Soria Frisch Fraunhofer IPK Dept. Pattern Recognition post: Pascalstr. 8-9, 10587 Berlin, Germany e-mail:aureli@ipk.fhg.de fon: +49 30 39006-150 fax: +49 30 3917517 ################################# _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig From doug@sonosphere.com Mon Jul 23 13:09:53 2001 From: doug@sonosphere.com (Doug Wyatt) Date: Mon, 23 Jul 2001 08:09:53 -0400 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: <20010723085948.E2C75303181@snelboot.oratrix.nl> Message-ID: <9F79FBFA-7F63-11D5-A7B9-00039301A6E6@> On Monday, July 23, 2001, at 04:59 AM, Jack Jansen wrote: > Ok, time for some detailed discussion. > >> 1. Build the core python distribution as a framework to be placed >> in /Library/Frameworks. Allows for easy installation and >> accessible for all Applications. > > One problem here is that /Library/Frameworks/Python will look different > from > what unix-pythoneers are used to. It'll be similar, but different. I'd > like to > know whether its possible to but a "normal" python installation in here > (say, > in /Library/Frameworks/Python.framework/python) and put the framework > mumbojumbo in symlinks. Hmm, yes, the existing frameworks already do > that, so > symlinking should be fine. > > Does anyone know what the minimum contents of a framework are? Probably just Versions/A/Resources/Info.plist and the executable. > Also, the only way I've found to create frameworks is through Project > Builder. > Is there a command line program to do it as well, or should I > hand-craft it? You can build frameworks manually, one file at a time. There's the requisite file and folder structure including the executable which is simply a dynamic library. You can snoop on how Project Builder does its work by turning on the detailed log level preference (under Building). Doug -- Doug Wyatt work: dwyatt@apple.com (CoreAudio) personal: doug@sonosphere.com http://www.sonosphere.com "There is real magic in enthusiasm. It spells the difference between mediocrity and accomplishment." -- Norman Vincent Peale -- Doug Wyatt work: dwyatt@apple.com (CoreAudio) personal: doug@sonosphere.com http://www.sonosphere.com "to be nobody but yourself in a world which is doing its best night and day to make you like everybody else means to fight the hardest battle any human being can fight and never stop fighting." -- e. e. cummings From Aureli.Soria_Frisch@ipk.fhg.de Mon Jul 23 15:47:12 2001 From: Aureli.Soria_Frisch@ipk.fhg.de (Aureli Soria Frisch) Date: Mon, 23 Jul 2001 16:47:12 +0200 Subject: [Pythonmac-SIG] Reload() not working? In-Reply-To: <20010723100622.B17B0303181@snelboot.oratrix.nl> References: Message by Aureli Soria Frisch , Mon, 23 Jul 2001 11:35:55 +0200 , Message-ID: At 12:05 Uhr +0200 23.07.2001, Jack Jansen wrote: >Note that this is expected behaviour. If you create an object with the old >module and then reload the module the old object will still refer to the old >module. If you think about how Python objects work this is no more than >logical: there's no way Python can go into the object and change its class >(and thereby its methods) on the fly. Only newly created objects will get the >new class and methods. Ok! The methods are actualized when the new object is created after the reload(). Thanks! ################################# Aureli Soria Frisch Fraunhofer IPK Dept. Pattern Recognition post: Pascalstr. 8-9, 10587 Berlin, Germany e-mail:aureli@ipk.fhg.de fon: +49 30 39006-150 fax: +49 30 3917517 ################################# From moehl@akaflieg.extern.tu-berlin.de Mon Jul 23 19:29:10 2001 From: moehl@akaflieg.extern.tu-berlin.de (Torsten Sadowski) Date: Mon, 23 Jul 2001 20:29:10 +0200 (CEST) Subject: [Pythonmac-SIG] Howto set CW command line option? Message-ID: Hi, I=B4m trying to build wxpython and for this I need to set "-bool on" and "-prefix wx_cw.h". Which distutils variable is the one to use? I had no success with "defines" and "cflags" so far.=20 -Torsten P.S. wxpython compiles in major parts. Maybe it will work. From jwblist@olympus.net Mon Jul 23 21:09:29 2001 From: jwblist@olympus.net (John W Baxter) Date: Mon, 23 Jul 2001 13:09:29 -0700 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: <20010723083929.57AEA303181@snelboot.oratrix.nl> References: <20010723083929.57AEA303181@snelboot.oratrix.nl> Message-ID: At 10:39 +0200 7/23/2001, Jack Jansen wrote: >> The attempt to do this with MacPerl failed (Python may be more amenable >>to it). > >John, >do you know why it failed? Or do you know people who were involved, or mailing >list archives, etc? This is back in what counts as pre-history in computer terms. All I can see in the email I have readily archived is that mention of the OSA component form had ceased--in places like release announcements--by November of 1997. The work was undertaken by Matthias Neeracher (the Jack Jansen of MacPerl, as you know). I remember some use-at-your-own risk releases (which proved too risky for me), and then a quiet period, and then abandonment. But I don't remember details. --John -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From sdm7g@virginia.edu Mon Jul 23 21:26:16 2001 From: sdm7g@virginia.edu (Steven D. Majewski) Date: Mon, 23 Jul 2001 16:26:16 -0400 (EDT) Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: <20010722163056.GTQ10608.tomts6-srv.bellnexxia.net@localhost> Message-ID: What benefit do you see in packaging python into a framework ? I can see the benefit of packaging it into an application bundle with a local framework for python libs: simple drag and drop install, among other things -- but what benefit do you get from a library framework ? ( When this discussion came up last time, it was asked if you could share private frameworks from an application bundle: I believe so, but I haven't got around to verifying this. ) -- Steve Majewski From sdm7g@virginia.edu Mon Jul 23 21:46:59 2001 From: sdm7g@virginia.edu (Steven D. Majewski) Date: Mon, 23 Jul 2001 16:46:59 -0400 (EDT) Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: <20010722163056.GTQ10608.tomts6-srv.bellnexxia.net@localhost> Message-ID: On Sun, 22 Jul 2001, Tim Lahey wrote: > 5. Develop a Aqua-based GUI interface. Given the problems > people have had using PyObjC we may want to use Carbon. > Interface Builder supports Carbon so, people could layout > their UI using IB. I've had pyobjc on the back burner for several reasons -- some personal, but also to wait until I got a look at Guido's new solution to the Class/Type unification. One of the problems was that the bridge translated python objects to and from objective-c objects, but didn't bridge python Classes or class instances transparently, so you couldn't, for example, create a subclass of a AppKit class in Python and pass it back to objective-c or IB. This could have been fixed by using extension classes, but it didn't seem worth the bother if all of those interfaces and API were about to change. ( 2.2a is out now, and Guido has written up a doc that's a little more HOW-TO than the PEP's. ) Pyobjc is going to get rewritten around this new scheme. The other problem with pyobjc was that we never had many developers or users working on it, doing bug reports, writing examples and docs. I'm aware of *MY* problems in using pyobjc, but I'm not aware that many people even tried it. Did you ever try the HelloWorld script ? -- Steve Majewski From draayer@surfglobal.net Mon Jul 23 22:18:04 2001 From: draayer@surfglobal.net (Dean Draayer) Date: Mon, 23 Jul 2001 17:18:04 -0400 Subject: [Pythonmac-SIG] findertools problems Message-ID: 1. In findertools.py, the movetotrash() function throws up an error: NameError: global name 'findertools' is not defined Should 'findertools.' be removed from the last line? def movetotrash(path): """move the object to the trash""" fss = macfs.FSSpec(path) trashfolder = macfs.FSSpec(macfs.FindFolder(fss.as_tuple()[0], 'trsh', 0) + ("",)).as_pathname() findertools.move(path, trashfolder) 2. When I do: import finder I get back: SystemError: NULL result without error in call_object Now perhaps finder isn't the module I should be importing (Finder is probably what I need), but the SystemError is troubling. Something isn't quite right here. 3. Can anyone suggest a "proper" way to make a temporary backup of files? Unfortunately, the shutil functions don't preserve resources, type/creator, etc., so that's no good. So I've fallen back on findertools.copy(). This has some drawbacks: (i) it's slow; (ii) it won't let one specify a filename; (iii) it apparently won't let me make the copy in the system's Temporary Items folder (maybe due to invisibility?), e.g.: >>> findertools.copy('myFile.py', tempfile.tempdir) Traceback (most recent call last): File "", line 1, in ? File "manfred:dev:python 2.1:mac:lib:findertools.py", line 62, in copy return finder.duplicate(src_fss, to=dst_fss) File "manfred:dev:python 2.1:mac:lib:li b-scriptpackages:Finder:Standard_Suite.py", line 206, in duplicate raise aetools.Error, aetools.decodeerror(_arguments) aetools.Error: (32768029, 'Illegal seek', ObjectSpecifier('****', 'fss ', FSSpec((-1, 2, 'Temporary Items')))) On the other hand, I've been able to make a folder (via os.mkdir()) within Temporary Items and use findertools.copy() to make the copies into that folder. So this provides some kind of workaround, but should we really be getting this Traceback? Dean From deirdre@deirdre.net Mon Jul 23 22:21:44 2001 From: deirdre@deirdre.net (Deirdre Saoirse Moen) Date: Mon, 23 Jul 2001 14:21:44 -0700 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: References: Message-ID: >On Sun, 22 Jul 2001, Tim Lahey wrote: > >> 5. Develop a Aqua-based GUI interface. Given the problems >> people have had using PyObjC we may want to use Carbon. >> Interface Builder supports Carbon so, people could layout >> their UI using IB. > > I've had pyobjc on the back burner for several reasons -- >some personal, but also to wait until I got a look at Guido's >new solution to the Class/Type unification. One of the problems >was that the bridge translated python objects to and from >objective-c objects, but didn't bridge python Classes or class >instances transparently, so you couldn't, for example, create >a subclass of a AppKit class in Python and pass it back to >objective-c or IB. > > This could have been fixed by using extension classes, but it >didn't seem worth the bother if all of those interfaces and API >were about to change. ( 2.2a is out now, and Guido has written >up a doc that's a little more HOW-TO than the PEP's. ) Yay. > Pyobjc is going to get rewritten around this new scheme. Yay! > The other problem with pyobjc was that we never had many developers >or users working on it, doing bug reports, writing examples and >docs. I'm aware of *MY* problems in using pyobjc, but I'm not aware >that many people even tried it. Did you ever try the HelloWorld >script ? I'd use it more if it seemed like it could be used for more. Naturally, this becomes a cart/horse problem. -- _Deirdre Stash-o-Matic: http://weirdre.com http://deirdre.net "Cannot run out of time.... Is infinite time. You... are finite.... Zathrus... is finite. This... is wrong tool!" -- Zathrus From tjlahey@cgl.uwaterloo.ca Mon Jul 23 23:15:02 2001 From: tjlahey@cgl.uwaterloo.ca (Tim Lahey) Date: Mon, 23 Jul 2001 18:15:02 -0400 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: <20010723085948.E2C75303181@snelboot.oratrix.nl> Message-ID: <20010723221526.TYYH3894.tomts7-srv.bellnexxia.net@localhost> On Monday, July 23, 2001, at 04:59 AM, Jack Jansen wrote: > > Ok, time for some detailed discussion. > >> 1. Build the core python distribution as a framework to be placed >> in /Library/Frameworks. Allows for easy installation and >> accessible for all Applications. > > One problem here is that /Library/Frameworks/Python will look different > from > what unix-pythoneers are used to. It'll be similar, but different. I'd > like to > know whether its possible to but a "normal" python installation in here > (say, > in /Library/Frameworks/Python.framework/python) and put the framework > mumbojumbo in symlinks. Hmm, yes, the existing frameworks already do > that, so > symlinking should be fine. As for the structure of the framework, I'm more than willing to defer to others. The main reason I see for a framework is the ease of installation and inclusion with an application. I'd rather not hide things in /usr/local/lib/pythonx.x, it doesn't really fit with the general OS X philosophy. > >> 2. Set the PYTHONPATH to search the ~/Library/Python then >> /Library/Python for additional modules. Basically, they would >> act as local and global site-packages directories. > > I think I'd prefer the global site-packages to live in > Lib/site-packages in > /Library/Framework/Python.framework/ just so we're not accused of > changing > things without reason (by the rest of the unix-pythoneers). The > ~/Library/Python idea I like. The only problem I have with this is that it means that the contents of the framework will be exposed and edited by the users. > >> 4. Create a PythonInterpreter View Interface Builder Pallet so >> applications can embed the interpreter inside the application >> along with a place for user interaction. > > Oops, buzzword overload. I know the various words, but the stringing > together > doesn't result in added meaning. Could you expand on this a bit? Basically, I want a IB widget that one can add to their application that provides an interpreter view. This would allow one to customise the relative to the application, some might want the interpreter in a separate window, others at the bottom of a main window. > I think we can do it so that people could do both, but initially I think > Carbon is the way to go. I have most of the MacPython toolbox modules > ported > (at least: they compile and import), I'm working on the few basic > necesseties > we need to put Carbon and BSD together (FSRefs, CFString and friends) > and on > replacements for things we're going to lose (MLTE to replace Waste; > that is, > unless someone wants to invest some time into getting Waste to run under > Mach-O Carbon. This would be *very* welcome as lack of Waste is the > main thing > that stops us from starting on IDE). The way I see things is that people will have two ways of building a UI for their application: 1. In python, using a wrapper around Carbon calls. 2. In Cocoa/Carbon, with python embedded in the application, but not creating the UI. I think both have their place. One way of doing an IDE for OS X python would be the second. > >> 6. Being porting some of the other python modules to the new >> UI. I'm thinking of various ones such as PIL and PyOpenGL. > > PIL should be trivial, PyOpenGL also not too difficult. PIL shouldn't be too bad using either method of making a UI, PyOpenGL wouldn't be difficult to use with python embedded in a Cocoa app, I'm not sure about through Carbon. > > Most of what I've done so far is in the repository already, the one > exception > being the setup.py file (which will build all the toolbox modules and > such). I > can mail it to people who want to play with this stuff, and I'll also > try and > think of a way to put it into the repository without overmuch bothering > people > who use OSX as a unix box. I'll take a stab at things, although I generally use OS X as a UNIX with a nice GUI. Cheers, Tim Lahey tjlahey@cgl.uwaterloo.ca From tjlahey@cgl.uwaterloo.ca Mon Jul 23 23:20:59 2001 From: tjlahey@cgl.uwaterloo.ca (Tim Lahey) Date: Mon, 23 Jul 2001 18:20:59 -0400 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: Message-ID: <20010723222126.CHMF3306.tomts8-srv.bellnexxia.net@localhost> Steve, The advantage I see of the framework, is that it simplifies installation and provides a central point for many apps to link against. If it was part of an application, Python.app say, in order to link against it, one would need to find out where Python.app was located on the particular machine. If we standardise on /Library/Frameworks which seems to be the logical choice, all applications that utilise Python would know where it is. If every application embeds the framework, that can be a lot of wasted disk space. After all, don't we want lots of applications that use python? Cheers, Tim Lahey tjlahey@cgl.uwaterloo.ca On Monday, July 23, 2001, at 04:26 PM, Steven D. Majewski wrote: > > What benefit do you see in packaging python into a framework ? > > I can see the benefit of packaging it into an application bundle > with a local framework for python libs: simple drag and drop > install, among other things -- but what benefit do you get from > a library framework ? > > ( When this discussion came up last time, it was asked if you could > share private frameworks from an application bundle: I believe so, > but I haven't got around to verifying this. ) > > -- Steve Majewski > From tjlahey@cgl.uwaterloo.ca Mon Jul 23 23:26:31 2001 From: tjlahey@cgl.uwaterloo.ca (Tim Lahey) Date: Mon, 23 Jul 2001 18:26:31 -0400 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: Message-ID: <20010723222700.UCKI3894.tomts7-srv.bellnexxia.net@localhost> On Monday, July 23, 2001, at 04:46 PM, Steven D. Majewski wrote: > > On Sun, 22 Jul 2001, Tim Lahey wrote: > >> 5. Develop a Aqua-based GUI interface. Given the problems >> people have had using PyObjC we may want to use Carbon. >> Interface Builder supports Carbon so, people could layout >> their UI using IB. > > I've had pyobjc on the back burner for several reasons -- > some personal, but also to wait until I got a look at Guido's > new solution to the Class/Type unification. One of the problems > was that the bridge translated python objects to and from > objective-c objects, but didn't bridge python Classes or class > instances transparently, so you couldn't, for example, create > a subclass of a AppKit class in Python and pass it back to > objective-c or IB. > > This could have been fixed by using extension classes, but it > didn't seem worth the bother if all of those interfaces and API > were about to change. ( 2.2a is out now, and Guido has written > up a doc that's a little more HOW-TO than the PEP's. ) > > Pyobjc is going to get rewritten around this new scheme. > > The other problem with pyobjc was that we never had many developers > or users working on it, doing bug reports, writing examples and > docs. I'm aware of *MY* problems in using pyobjc, but I'm not aware > that many people even tried it. Did you ever try the HelloWorld > script ? > > -- Steve Majewski > Steve, Yes, I tried a few things using PyObjC and although it worked for some things, manipulations of the UI were not its strong suit. Also, using Cocoa, there is a lot of work to be done to create a UI if one doesn't use NIBs and I couldn't get the NIBs to load through PyObjC. The work is simpler using Carbon at the moment. If you and Bill B. manage to get NIBs loading through PyObjC, that's great because I like the Cocoa API but it isn't Python-friendly at the moment. Cheers, Tim Lahey tjlahey@cgl.uwaterloo.ca From jack@oratrix.nl Tue Jul 24 09:35:42 2001 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 24 Jul 2001 10:35:42 +0200 Subject: [Pythonmac-SIG] Howto set CW command line option? In-Reply-To: Message by Torsten Sadowski , Mon, 23 Jul 2001 20:29:10 +0200 (CEST) , Message-ID: <20010724083543.4CFFC303181@snelboot.oratrix.nl> > I=B4m trying to build wxpython and for this I need to set "-bool on" an= d > "-prefix wx_cw.h". Which distutils variable is the one to use? I had no= > success with "defines" and "cflags" so far. = I assume that you're talking about OS9 or earlier here. The flags you spe= cify = are completely new to me, but I do know there's a CodeWarrior option "boo= l = support" and an option "prefix file", that you might want to set to these= = values. However, I'm not aware of a command-line version of CodeWarrior (= or do = the CW compilers also run under the MPW shell?). Anyway, distutils currently has no support for setting these options, but= it = would be not too difficult to add them. The best way may be to add suppor= t for = a "command line" to :Mac:Lib:mkcwproj, and there use AppleEvents to chang= e the = settings in the project. In other words: first generate the project file = as it = is done now (with default values for bool support and prefix file), then = loop = through the "command line" and change any option settings that are in the= re. If this isn't enough help let me know. I have preciously little time, but= I = guess wxPython is important enough that I'll just push some other things = out a = bit. -- 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 Jul 24 09:38:11 2001 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 24 Jul 2001 10:38:11 +0200 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: Message by John W Baxter , Mon, 23 Jul 2001 13:09:29 -0700 , Message-ID: <20010724083823.B72BC303181@snelboot.oratrix.nl> > >do you know why it failed? Or do you know people who were involved, or mailing > >list archives, etc? > > This is back in what counts as pre-history in computer terms. All I can > see in the email I have readily archived is that mention of the OSA > component form had ceased--in places like release announcements--by > November of 1997. Ah, nevermind, I misunderstood you. I thought that the attempt to turn Perl into an OSX framwork had failed. I know that turning Perl into an OSA component failed, that - together with my hunch that Component Mgr wasn't good enough for MacPython - made me decide not to pursue the subject. -- 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 Jul 24 10:04:41 2001 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 24 Jul 2001 11:04:41 +0200 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: Message by "Steven D. Majewski" , Mon, 23 Jul 2001 16:26:16 -0400 (EDT) , Message-ID: <20010724090441.86AF7303181@snelboot.oratrix.nl> > > > > What benefit do you see in packaging python into a framework ? > > I can see the benefit of packaging it into an application bundle > with a local framework for python libs: simple drag and drop > install, among other things -- but what benefit do you get from > a library framework ? My thinking is now somewhat along the following lines for how Python will look on OSX (note that this is unix-Python, what is now MacPython may continue to live alongside this for a while, or even be incorporated into it). 1) In /Library/Framework there's a Python.framework. This will look a lot like a standard Apple framework bundle, but it's really only a lot of symlinks around a normal Unix Python tree (as would be found in /usr/local/python), somewhere down in /Library/Framework/Python.framework/Versions/2.2/Resources/py thon . Maybe the last directory should move one level up, I'm not sure (comments?). I think that if a user has no admin privileges they could install all this in ~/Library/Framework and it would still work. Also, when Apple starts shipping Python with OSX 10.3 (half a :-) they can put it in /System/Library/Frameworks. 2) In /usr/local/bin there's a symlink "python" to /Library/Framework/Python.framework/Versions/2.2/Resources/python/bin/python. This makes commandline Python completely happy. Actually, maybe the link should go to /Library/Framework/Python.framework/python, with that in turn linking to the path above, so that installing Python 2.3 will automatically make the /usr/local script point to the right place. 3) In /Applications there's a Python.app application bundle. This has all the a small executable, the icon and plist mumbojumbo, and that's probably all. It is probably the same main program as what was used to create the commandline interpreter deep down the framework specified in (1), but this time it is linked against the whole framework in stead of against the python shared library only. Hmm, on second thoughts it might be a slightly different main program, see below. 4) If the main program above checks for a "PYC " resource and runs that (just like MacPython does nowadays) if it exists we can use something similar to the old MacPyhton scheme for createing applets. Just copy the /Applications/Python.app bundle, drop a PYC resource file in its Resources folder and off you go. Ok, lots of verbiage but still no answer to your question:-) Two advantages to using a library framework. Easy applets (point 4 above) and also easy creation of extension modules and easy embedding of Python (simply link against Python.framework). The latter needs a little reorganisation (like, python/Mac/Include should move to Python/Include/Mac, probably) but we're almosty there. -- 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 Jul 24 12:42:39 2001 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 24 Jul 2001 13:42:39 +0200 Subject: [Pythonmac-SIG] findertools problems In-Reply-To: Message by Dean Draayer , Mon, 23 Jul 2001 17:18:04 -0400 , Message-ID: <20010724114239.ECC43303181@snelboot.oratrix.nl> > > 1. In findertools.py, the movetotrash() function throws up an error: > NameError: global name 'findertools' is not defined > Should 'findertools.' be removed from the last line? Yep, that's the right fix. Thanks! > 2. When I do: > import finder > I get back: > SystemError: NULL result without error in call_object I can't repeat this (with the current CVS sources). Could you try again to see that it's no freak incident? If it isn't: please try again with "trace import statements" on and let me know the results. > 3. Can anyone suggest a "proper" way to make a temporary backup of > files? > Unfortunately, the shutil functions don't preserve resources, > type/creator, > etc., so that's no good. So I've fallen back on findertools.copy(). I think macostools.copy() is what you want to use here. A lot of the findertools methods have a counterpart in macostools, but where findertools calls on the finder macostools does it itself. -- 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 Jul 24 12:59:37 2001 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 24 Jul 2001 13:59:37 +0200 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: Message by Tim Lahey , Mon, 23 Jul 2001 18:15:02 -0400 , <20010723221526.TYYH3894.tomts7-srv.bellnexxia.net@localhost> Message-ID: <20010724115937.B7999303181@snelboot.oratrix.nl> > As for the structure of the framework, I'm more than willing to defer to > others. The > main reason I see for a framework is the ease of installation and > inclusion with > an application. I'd rather not hide things in /usr/local/lib/pythonx.x, > it doesn't > really fit with the general OS X philosophy. Yep, fully agreed. > > I think I'd prefer the global site-packages to live in > > Lib/site-packages in > > /Library/Framework/Python.framework/ just so we're not accused of > > changing > > things without reason (by the rest of the unix-pythoneers). The > > ~/Library/Python idea I like. > > The only problem I have with this is that it means that the contents of > the framework > will be exposed and edited by the users. Hmm, yes, that's right. And it shouldn't be too difficult to explain distutils that site-python is in a different place on OSX. On the other hand, there's still the problem that this will be unfamiliar to people with a unix background, and I think that keeping the unixheads happy is a good thing (especially if it can lure people over to the Mac!). Ah, I think I see a showstopper for the /Library/Python idea: there's no version control in there, whereas in /Library/Framework/Python.framework there is. And version control is important to distutils-based packages, as they may contain dynamically loadable modules. Hmm, but for pure-Python packages /Library/Python may well be the better place.... I'm not sure yet, any other views are welcome... > >> 4. Create a PythonInterpreter View Interface Builder Pallet so > >> applications can embed the interpreter inside the application > >> along with a place for user interaction. > > > > Oops, buzzword overload. I know the various words, but the stringing > > together > > doesn't result in added meaning. Could you expand on this a bit? > > Basically, I want a IB widget that one can add to their application that > provides > an interpreter view. This all sounds like magic to me. What is an IB widget? Do I understand that I can extend IB? How? > The way I see things is that people will have two ways of building a UI > for their > application: > > 1. In python, using a wrapper around Carbon calls. > 2. In Cocoa/Carbon, with python embedded in the application, but not > creating > the UI. Is there a way we could emulate the magic that IB does for Cocoa for Objective-C and Java? In my opionion Python is a language that could potentially be much better integrated with IB than Objective-C (I've never tried Java yet). For one, the "generate source files" could simply output readonly files that contain base classes that you then import and subclass in your own Python class. This gets rid of the problem that you have can't really press the "generate" button for ObjC after you've modified the sources (unless you're willing to risk your code disappearing). (In the paragraphs above I'm assuming that Steven will get the Python<->ObjC bridge working). > I think both have their place. One way of doing an IDE for OS X python > would be > the second. Yes, but an easier way would be to take the existing IDE and pack it up as an application using the Python.framework. The main body of work here is either porting Waste or replacing it by MLTE. The other modules it needs all run (well, compile:-) under MachO-Python already. Of course there's more work, but that's only minor things. -- 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 Jul 24 13:04:11 2001 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 24 Jul 2001 14:04:11 +0200 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: Message by Jack Jansen , Tue, 24 Jul 2001 11:04:41 +0200 , <20010724090441.86AF7303181@snelboot.oratrix.nl> Message-ID: <20010724120411.F0B28303181@snelboot.oratrix.nl> Following up to myself with another thought: > 4) If the main program above checks for a "PYC " resource and runs that (just > like MacPython does nowadays) if it exists we can use something similar to the > old MacPyhton scheme for createing applets. Just copy the > /Applications/Python.app bundle, drop a PYC resource file in its Resources > folder and off you go. ... And maybe BuildApplication is just as simple. Do all the steps above, and finally dump a copy of /Library/Frameworks/Python.framework into the SharedFrameworks folder in the applet bundle. Would that work? -- 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 tjlahey@cgl.uwaterloo.ca Tue Jul 24 13:23:14 2001 From: tjlahey@cgl.uwaterloo.ca (Tim Lahey) Date: Tue, 24 Jul 2001 08:23:14 -0400 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: <20010724115937.B7999303181@snelboot.oratrix.nl> Message-ID: <20010724122339.BRNZ29255.tomts13-srv.bellnexxia.net@localhost> On Tuesday, July 24, 2001, at 07:59 AM, Jack Jansen wrote: > >>> I think I'd prefer the global site-packages to live in >>> Lib/site-packages in >>> /Library/Framework/Python.framework/ just so we're not accused of >>> changing >>> things without reason (by the rest of the unix-pythoneers). The >>> ~/Library/Python idea I like. >> >> The only problem I have with this is that it means that the contents of >> the framework will be exposed and edited by the users. > > Hmm, yes, that's right. And it shouldn't be too difficult to explain > distutils > that site-python is in a different place on OSX. > > On the other hand, there's still the problem that this will be > unfamiliar to > people with a unix background, and I think that keeping the unixheads > happy is > a good thing (especially if it can lure people over to the Mac!). > > Ah, I think I see a showstopper for the /Library/Python idea: there's no > version control in there, whereas in > /Library/Framework/Python.framework there > is. And version control is important to distutils-based packages, as > they may > contain dynamically loadable modules. Good point, I'm more than willing to defer to others on this point. > > Hmm, but for pure-Python packages /Library/Python may well be the better > place.... I'm not sure yet, any other views are welcome... > >>>> 4. Create a PythonInterpreter View Interface Builder Palette so >>>> applications can embed the interpreter inside the application >>>> along with a place for user interaction. >> >> Basically, I want a IB widget that one can add to their application >> that >> provides an interpreter view. > > This all sounds like magic to me. What is an IB widget? Do I understand > that I > can extend IB? How? Yes, one can extend IB to some extent. When I'm talking about an IB widget, I'm talking about one of the items on the Cocoa/Carbon Views palette that users use to build their UI. So, one can add their own items to it. Hmm, it appears that only Cocoa allows this at the moment (When you start IB there is a list of different items to build, one is an IB Palette). The IB Palette is based upon a Cocoa class that the user has written. > >> The way I see things is that people will have two ways of building a UI >> for their >> application: >> >> 1. In python, using a wrapper around Carbon calls. >> 2. In Cocoa/Carbon, with python embedded in the application, but not >> creating the UI. > > Is there a way we could emulate the magic that IB does for Cocoa for > Objective-C and Java? > > In my opionion Python is a language that could potentially be much > better > integrated with IB than Objective-C (I've never tried Java yet). For > one, the > "generate source files" could simply output readonly files that contain > base > classes that you then import and subclass in your own Python class. > This gets > rid of the problem that you have can't really press the "generate" > button for > ObjC after you've modified the sources (unless you're willing to risk > your > code disappearing). > > (In the paragraphs above I'm assuming that Steven will get the > Python<->ObjC > bridge working). > I'm not sure, I don't think so at the moment. Something to ask on the Project Builder mailing list, I think. One way to emulate it would be to have a tool that takes the generated .m files and converts them to PyObjC. Either that or builds them from the NIB files. I don't think this can be done with the existing Interface Builder. Cheers, Tim Lahey tjlahey@cgl.uwaterloo.ca From gherman@darwin.in-berlin.de Tue Jul 24 13:22:42 2001 From: gherman@darwin.in-berlin.de (Dinu Gherman) Date: Tue, 24 Jul 2001 14:22:42 +0200 Subject: [Pythonmac-SIG] Python.framework under OS X References: <20010724115937.B7999303181@snelboot.oratrix.nl> Message-ID: <3B5D6892.4C2F1C81@darwin.in-berlin.de> Jack Jansen wrote: > > > Basically, I want a IB widget that one can add to their application that > > provides > > an interpreter view. > > This all sounds like magic to me. What is an IB widget? Do I understand that I > can extend IB? How? You can write your own palletes or what they are called, basically some kind of bundles, that you can extend IB's capabilities with. Just drag them in the appropriate folder and all of a sudden you could have a pallete con- taining one widget representing a whole Python inter- preter or other components you've written, graphical or not. Then you can happily start wiring these graphically. It's very intuitive and has been there for about ten years, now. > Is there a way we could emulate the magic that IB does for Cocoa for > Objective-C and Java? > > In my opionion Python is a language that could potentially be much better > integrated with IB than Objective-C (I've never tried Java yet). For one, the > "generate source files" could simply output readonly files that contain base > classes that you then import and subclass in your own Python class. This gets > rid of the problem that you have can't really press the "generate" button for > ObjC after you've modified the sources (unless you're willing to risk your > code disappearing). Some of this must have been solved before by a company called TipTop.com (I've asked about them here before, but got no response). Unfortunately, they don't quite seem to exist anymore or just don't respond to email re- quests. Maybe someone in Bolder, CO, could try and knock at their door? Regards, Dinu From jack@oratrix.nl Tue Jul 24 13:50:12 2001 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 24 Jul 2001 14:50:12 +0200 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: Message by Tim Lahey , Tue, 24 Jul 2001 08:23:14 -0400 , <20010724122339.BRNZ29255.tomts13-srv.bellnexxia.net@localhost> Message-ID: <20010724125013.2AA72303181@snelboot.oratrix.nl> > Yes, one can extend IB to some extent. When I'm talking about an IB > widget, > I'm talking about one of the items on the Cocoa/Carbon Views palette > that users > use to build their UI. So, one can add their own items to it. Hmm, it > appears > that only Cocoa allows this at the moment (When you start IB there is a > list of > different items to build, one is an IB Palette). The IB Palette is based > upon a > Cocoa class that the user has written. KOOOOOOOOOOOOLLLLL!!!!! Huhhuh.. huhhuh.. That's a nice feature, indeed. But I can see that it would only work for Cocoa. At least: I can see that you can only create the IB widgets with Cocoa, as such an IB widget seems a lot easier to realise in Cocoa. I think we should leave this one for later, though, for now I would be happy enough if we could (in order of percieved difficulty) - Use IB to create Carbon-based interfaces - Use IB to create Cocoa-based interfaces - Make Python a first-class IB citizen. Or, at least, an almost-first-class citizen, if we can get there by decoding the .nib and .xib files. Alternatively we could try to decode the .m file into a .py file, but I think I would prefer the .nib/.xib. -- 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 Layne.Bilyeu@robbstucky.net Tue Jul 24 18:46:56 2001 From: Layne.Bilyeu@robbstucky.net (AdvertisingDept) Date: Tue, 24 Jul 2001 13:46:56 -0400 Subject: [Pythonmac-SIG] Off subject? can OSX developer tools be used to create "Classic" Message-ID: Two (2) Possibly Off-Group questions (1) Can MacOSX developer tools be used to create "Classic" Carbon apps that will run on macs NOT running OSX? (ProjectBuilder, InterfaceBuilder, etc...) I've been skimming the Learning Cocoa, Learning Carbon books but they take the point of view that everyone is currently running MacOSX and "Classic" is a dead legacy. Unfortunately, I need my python code running NOW with a Mac GUI interface, on real trusted MacOS with real trusted applications. We use MacOS 8.6 and probably will continue to do so until apps for 4-color print work become trustworthy on MacOSX. (QuarkXpress/In-Design, Illustrator/Freehand, (any)Font Manager, Photoshop/GIMP, Acrobat, Postscript RIPs) I'll be moving to osX eventually; but for now I need something that works in the Legacy "Classic" environment. (2) I've got some python objects & methods. What can / should I be using to "Build" my app's interface? Start learning ResEdit, Project/Interface Builder, or hope that somebody who can afford all that CodeWarrior entails will release a runtime of a stable wxpython for "Classic" before it really is a Legacy platform? Thanks Lane From moehl@akaflieg.extern.tu-berlin.de Tue Jul 24 19:41:38 2001 From: moehl@akaflieg.extern.tu-berlin.de (Torsten Sadowski) Date: Tue, 24 Jul 2001 20:41:38 +0200 (CEST) Subject: [Pythonmac-SIG] Howto set CW command line option? In-Reply-To: <20010724083543.4CFFC303181@snelboot.oratrix.nl> Message-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---1786631133-82518146-996000098=:1735 Content-Type: TEXT/PLAIN; charset=US-ASCII Ok, command line options is not the right word. It is necessary to set the prefixname variable in mwerkscompiler.py and to enable bool support. For the adventurous I attached a changed setup.py, helpers.cpp and helpers.h which replace the files in wxpython (Compact Pro should open with Stuffit Exp). First you have to compile wxwindows 2.3.1 which should work without major problems. Just read install.txt. Then duplicate the wxPython:src:gtk folder and rename it "mac". Copy image.cpp from the msw folder to the mac folder. Next open setup.py and change WX_ROOT_FOLDER and libs to your need. Run setup.py and as soon as CW responds to the outside world open the target settings panel C/C++ Language and enable bool support and change the prefix file to "wx/wx_cw.h" If anyone knows how to suppress the Illegal implicit const/volatile pointer conversion warning I would appreciate a hint. Compile again and see what compiles. Torsten ---1786631133-82518146-996000098=:1735 Content-Type: APPLICATION/octet-stream; name="setup_etc.cpt" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="setup_etc.cpt" AQE9zwAAVGNvV2doaHh3iIgAAIAAAABwAFiHAABgAIAAgHAAAAAABgAGiHYH hgB3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OCbgEAWwznPAAGAAABmgAAgqIAAAFMAAAfXQloZWxwZXJzLmgBAAA4 z1RFWFRDV0lFtyoGxreCNwYBALjy2igABgAAAZoAAQK5AAABgQAAGhM= ---1786631133-82518146-996000098=:1735-- From sdm7g@Virginia.EDU Tue Jul 24 21:00:14 2001 From: sdm7g@Virginia.EDU (Steven D. Majewski) Date: Tue, 24 Jul 2001 16:00:14 -0400 (EDT) Subject: [Pythonmac-SIG] Off subject? can OSX developer tools be used to create "Classic" In-Reply-To: Message-ID: On Tue, 24 Jul 2001, AdvertisingDept wrote: > Two (2) Possibly Off-Group questions I don't think these are off topic on this list. > Can MacOSX developer tools be used to create "Classic" Carbon apps that > will run on > macs NOT running OSX? (ProjectBuilder, InterfaceBuilder, etc...) All of the unix/gcc/gnu based development tools on macosx read or write mach-o format object files. That means, at least for now, that even if you write portable Carbon source code, the resulting image will only run on OSX, not Classic ( OS 8|9 ). I don't have the latest CodeWarrior, but I believe that it can handle both PEF/CFM (the classic object formats) and mach-o. Nib files *are* supported in Carbon, so you should be able to use InterfaceBuilder Nibs on either OSX or Classic -- but you would have to build the classic app with CW. I don't know any reason why filters couldn't be written to convert object file formats, or a new backend written for gcc+ld to write PEF/CFM objects for Classic, but I haven't heard that any such tools are in the works from Apple or anyone else. (I'm sure Apple doesn't want to step on Metrowerks toes too much!) > I've been skimming the Learning Cocoa, Learning Carbon books > but they take the point of view that everyone > is currently running MacOSX and "Classic" is a dead legacy. Carbon's the transition strategy mainly because it's supported on OS9.X and, I think, Back to 8.5 or 8.6 at least, with CarbonLib. > Unfortunately, I need my python code running NOW > with a Mac GUI interface, > on real trusted MacOS with real trusted applications. > We use MacOS 8.6 and probably will continue to do so > until apps for 4-color print work become trustworthy on MacOSX. > (QuarkXpress/In-Design, Illustrator/Freehand, (any)Font Manager, > Photoshop/GIMP, Acrobat, Postscript RIPs) > > I'll be moving to osX eventually; but for now I need something > that works in the Legacy "Classic" environment. Then you ought to be targeting Carbon, but using CodeWarrior to compile binaries that will run on both OSX and OS8 + 9. > (2) > I've got some python objects & methods. > What can / should I be using to "Build" my app's interface? > > Start learning ResEdit, Project/Interface Builder, or hope that > somebody who can afford all that CodeWarrior entails > will release a runtime of a stable wxpython for "Classic" > before it really is a Legacy platform? Well -- "Classic" may become a legacy platform sometime in the future -- sort of like 68K support -- it's been there until OSX, but increasingly less used, and by the time it was dropped in OSX, there's little or no demand for it. Carbon, on the other hand, will be supported for the forseeable future. At some point, it may become "legacy" in the sense that they will eventually stop releasing new versions of CarbonLib for "Classic" pre-OSX systems. If your interested in portability across MacOS releases rather than cross system portability across Windows,Unix,Mac -- then I would just use the Carbon interfaces (probably thru W.py and Framework.py) and, if you're developing on OSX, experiment with using IB Nibs in place of ResEdit. -- Steve Majewski From sdm7g@Virginia.EDU Tue Jul 24 21:52:42 2001 From: sdm7g@Virginia.EDU (Steven D. Majewski) Date: Tue, 24 Jul 2001 16:52:42 -0400 (EDT) Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: <3B5D6892.4C2F1C81@darwin.in-berlin.de> Message-ID: On Tue, 24 Jul 2001, Dinu Gherman wrote: > You can write your own palletes or what they are called, > basically some kind of bundles, that you can extend IB's > capabilities with. Just drag them in the appropriate > folder and all of a sudden you could have a pallete con- > taining one widget representing a whole Python inter- > preter or other components you've written, graphical or > not. Then you can happily start wiring these graphically. > It's very intuitive and has been there for about ten > years, now. > > > Is there a way we could emulate the magic that IB does for Cocoa for > > Objective-C and Java? Documentation and methods to support other languages in IB is something that has been promised by Apple on the macosx-dev list. I don't know if it's just a matter of documenting how they added Java runtime support, or if they need to generalize those API's before documenting them. I've downloaded the last developer update, but most of the NSNibConnector docs are still "Description forthcoming" . ( There are some docs on the NSNibAwakening protocol. ) -- Steve Majewski From sdm7g@Virginia.EDU Tue Jul 24 22:00:17 2001 From: sdm7g@Virginia.EDU (Steven D. Majewski) Date: Tue, 24 Jul 2001 17:00:17 -0400 (EDT) Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: <20010724090441.86AF7303181@snelboot.oratrix.nl> Message-ID: I'm not convinced that packaging Python in a Library framework accomplishes those goals as well as packaging in into an .App bundle, but I'm not against the effort -- particularly as the same sort of changes will be needed for either. For example, we're probably going to want resources to be searched for in: Applet's bundle, Python.app bundle, Python lib framework bundle, other frameworks ... etc. where not all of those ( No applet bundle if you haven't created one, no Python.App if you're running from unix command line, etc. ) -- Steve Majewski From Layne.Bilyeu@robbstucky.net Tue Jul 24 23:20:11 2001 From: Layne.Bilyeu@robbstucky.net (AdvertisingDept) Date: Tue, 24 Jul 2001 18:20:11 -0400 Subject: [Pythonmac-SIG] Off subject? can OSX developer tools be used to create "Classic" Message-ID: >All of the unix/gcc/gnu based development tools on macosx >read or write mach-o format object files. That means, >at least for now, that even if you write portable Carbon source code, >the resulting image will only run on OSX, not Classic ( OS 8|9 ). >> I'll be moving to osX eventually; but for now I need something >> that works in the Legacy "Classic" environment. >Then you ought to be targeting Carbon, but using CodeWarrior to >compile binaries that will run on both OSX and OS8 + 9. BUMMER!!!! So for the "hobbyist" newbie, just beginning to learn programming; (not already an experienced Mac programmer with such tools); if you want to write python applications for what is currently stable and deFacto - MacOS 8.X-9.x, the python "Build Application" applet plus ResEdit are the only resort? (ouch! what a run-on sentence.) Thanks Lane Boring Personal Details Follow --------------------------------------------------------------------------- -- I don't have CodeWarrior, (no funds! just my free time) I don't know enough to figure out translation of CodeWarrior-centric details into MPW. (Never used MPW or CodeWarrior) (I'm a graphic artist who just happened to take fortran77 & Pascal for fun.) I started learning Python because: 1) It costs nothing to use. 2) It is open source. 3) It costs nothing for the documentation. 3) It makes much more sense than AppleScript should you decide to read any nonAppleScript "programming" book. 4) It costs nothing for support, and this list is much more responsive than any "Company's Product Support" has ever been. 5) It was touted as the best place for a complete programming newbie to start. I've reached the point where it's time to progress past scripts and make a full Mac application (the event model). I'm just trying to figure out where I should be learning next. From jwblist@olympus.net Wed Jul 25 04:51:30 2001 From: jwblist@olympus.net (John W Baxter) Date: Tue, 24 Jul 2001 20:51:30 -0700 Subject: [Pythonmac-SIG] Python.framework under OS X In-Reply-To: <20010724083823.B72BC303181@snelboot.oratrix.nl> References: <20010724083823.B72BC303181@snelboot.oratrix.nl> Message-ID: At 10:38 +0200 7/24/2001, Jack Jansen wrote: >> >do you know why it failed? Or do you know people who were involved, or >>mailing >> >list archives, etc? >> >> This is back in what counts as pre-history in computer terms. All I can >> see in the email I have readily archived is that mention of the OSA >> component form had ceased--in places like release announcements--by >> November of 1997. > >Ah, nevermind, I misunderstood you. I thought that the attempt to turn Perl >into an OSX framwork had failed. I know that turning Perl into an OSA >component failed, that - together with my hunch that Component Mgr wasn't good >enough for MacPython - made me decide not to pursue the subject. AARGH...Baxter messes up again by misreading a message. Sorry for the misdirection! --John -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From jack@oratrix.nl Wed Jul 25 12:52:14 2001 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 25 Jul 2001 13:52:14 +0200 Subject: [Pythonmac-SIG] Off subject? can OSX developer tools be used to create "Classic" In-Reply-To: Message by "Steven D. Majewski" , Tue, 24 Jul 2001 16:00:14 -0400 (EDT) , Message-ID: <20010725115214.BD50A303181@snelboot.oratrix.nl> > I don't know any reason why filters couldn't be written to convert > object file formats, or a new backend written for gcc+ld to write > PEF/CFM objects for Classic, but I haven't heard that any such tools > are in the works from Apple or anyone else. (I'm sure Apple doesn't > want to step on Metrowerks toes too much!) If I understand correctly it's not only the object file format that is different but also the subroutine calling conventions. At least, I think that that is what all the OSX CFM<->MachO glue stuff is converting. -- 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 doug@sonosphere.com Wed Jul 25 15:27:13 2001 From: doug@sonosphere.com (Doug Wyatt) Date: Wed, 25 Jul 2001 07:27:13 -0700 Subject: [Pythonmac-SIG] Off subject? can OSX developer tools be used to create "Classic" In-Reply-To: <20010725115214.BD50A303181@snelboot.oratrix.nl> Message-ID: <23E286D0-8109-11D5-A0B7-00039301A6E6@> On Wednesday, July 25, 2001, at 04:52 AM, Jack Jansen wrote: >> I don't know any reason why filters couldn't be written to convert >> object file formats, or a new backend written for gcc+ld to write >> PEF/CFM objects for Classic, but I haven't heard that any such tools >> are in the works from Apple or anyone else. (I'm sure Apple doesn't >> want to step on Metrowerks toes too much!) > > If I understand correctly it's not only the object file format that is > different but also the subroutine calling conventions. At least, I > think that > that is what all the OSX CFM<->MachO glue stuff is converting. The function calling conventions look pretty darned similar. First argument and return value is r3, second argument is r4, etc. I think the differences have more to do with CFM's assumptions about RTOC, which comes into play with UPP's etc ... Doug -- Doug Wyatt work: dwyatt@apple.com (CoreAudio) personal: doug@sonosphere.com http://www.sonosphere.com "Premature optimization is the root of all evil." -- Knuth From jack@oratrix.nl Wed Jul 25 16:32:09 2001 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 25 Jul 2001 17:32:09 +0200 Subject: [Pythonmac-SIG] Off subject? can OSX developer tools be used to create "Classic" In-Reply-To: Message by Doug Wyatt , Wed, 25 Jul 2001 07:27:13 -0700 , <23E286D0-8109-11D5-A0B7-00039301A6E6@> Message-ID: <20010725153209.8F76E303181@snelboot.oratrix.nl> > The function calling conventions look pretty darned similar. First > argument and return value is r3, second argument is r4, etc. > > I think the differences have more to do with CFM's assumptions about > RTOC, which comes into play with UPP's etc ... Yep, you're completely right. The calling sequence is more-or-less dictated by the PPC architecture, it's this RTOC business that's different. -- 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 landauer@apple.com Wed Jul 25 17:58:38 2001 From: landauer@apple.com (Doug Landauer) Date: Wed, 25 Jul 2001 09:58:38 -0700 Subject: [Pythonmac-SIG] CFM vs mach-o In-Reply-To: <20010725153209.8F76E303181@snelboot.oratrix.nl> Message-ID: <4AF2D852-811E-11D5-915D-0050E42E7B62@apple.com> --Apple-Mail-1-593249237 Content-Transfer-Encoding: 7bit Content-Type: text/plain; format=flowed; charset=us-ascii >> I think the differences have more to do with CFM's assumptions about >> RTOC, which comes into play with UPP's etc ... Here's a two-cent summary "for the rest of us", as far as I understand it: Filters between the object and executable file formats wouldn't be that difficult; the main intractable difference is that the models that these two worlds use in order to make code position-independent are too different: the compilers generate quite different code to access any static data. In mach-o, code is made position-independent by setting up a "PIC base" register, near the start of any function. (This is done via a call to the next instruction, in effect loading a register with a known address that's near the start of the function.) Then, any static "nearby" data referenced by this function is referenced relative to the PIC base, and the code and data for the function sorta stay together. Weird glue is generated for references to data that lives farther away (extern stuff, outside of this object file). In CFM, there is no PIC base. Instead, any static data is referenced through a "table-of-contents" (TOC). In this model, compilers will generate a "reload-the-TOC-register" after any external call, since any such call might be to a code fragment that uses a different TOC. The linker can often optimize those reloads by replacing them with NO-OPs. -- Approximately, -- Doug L. --Apple-Mail-1-593249237 Content-Transfer-Encoding: 7bit Content-Type: text/enriched; charset=us-ascii I think the differences have more to do with CFM's assumptions about RTOC, which comes into play with UPP's etc ... Here's a two-cent summary "for the rest of us", as far as I understand it:0000,63D6,124D Filters between the object and executable file formats wouldn't be that difficult; the main intractable difference is that the models that these two worlds use in order to make code position-independent are too different: the compilers generate quite different code to access any static data. In mach-o, code is made position-independent by setting up a "PIC base" register, near the start of any function. (This is done via a call to the next instruction, in effect loading a register with a known address that's near the start of the function.) Then, any static "nearby" data referenced by this function is referenced relative to the PIC base, and the code and data for the function sorta stay together. Weird glue is generated for references to data that lives farther away (extern stuff, outside of this object file). In CFM, there is no PIC base. Instead, any static data is referenced through a "table-of-contents" (TOC). In this model, compilers will generate a "reload-the-TOC-register" after any external call, since any such call might be to a code fragment that uses a different TOC. The linker can often optimize those reloads by replacing them with NO-OPs. -- Approximately, -- Doug L. --Apple-Mail-1-593249237-- From jack@oratrix.nl Thu Jul 26 12:08:43 2001 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 26 Jul 2001 13:08:43 +0200 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available Message-ID: <20010726110848.7348A15F45D@oratrix.oratrix.nl> Folks, there's a 2.1.1c2 installer available in http://www.cwi.nl/ftp/jack/python/mac/newer . I think this is complete, but please try it. And I mean that: the c1 installer was tested by exactly one person (at least, that's how much feedback I got), and there were serious problems with it (Python didn't work on MacOS 8, and the active installer was broken). I'd like to have some reasonable quality control on MacPython, but I can't do that without your help... As with the c1 installer: feedback from people using MacOS 8 and from people using non-western MacOS versions is especially solicited. -- 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 owen@astro.washington.edu Thu Jul 26 16:18:10 2001 From: owen@astro.washington.edu (Russell E Owen) Date: Thu, 26 Jul 2001 08:18:10 -0700 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available In-Reply-To: <20010726110848.7348A15F45D@oratrix.oratrix.nl> References: <20010726110848.7348A15F45D@oratrix.oratrix.nl> Message-ID: 2.1.1c2 again ran fine on my 466MHz G4 running MacOS 9.1 (USA). I ran the standard tests on Classic and Carbon using PythonInterpreter with no change to the memory partition. Classic: 107 tests OK. 2 tests failed: test_longexp test_zlib. Carbon: 106 tests OK. 3 tests failed: test_longexp test_sha test_zlib I ran the active installer this time (though I usually use the full) since you said it was giving problems in the previous 2.1.1 candidate. Some tiny cosmetic things which might be worth fixing someday, not necessarily for 2.1.1: - after the installer finishes, it launches ConfigurePythonCarbon, which takes a VERY long time to come to the front and then sits there silently doing something for several minutes (this is on a 466MHz G4 with plenty of RAM, so I wonder what it's like on an older machine). During this time a user might think the computer had hung. I'm very puzzled by this delay, as simply launching ConfigurePython(either) directly is really fast. It's as if VISE is taking way too much CPU time to allow ConfigurePythonCarbon to run normally. Anyway, after that everything is fine -- ConfigurePythonCarbon rebuilds the applets fairly quickly (though not as fast as usual), with an explanatory dialog box and a progress bar, so it's obvious things are happening.... - Then it puts up a dialog box about how the next step may take several minutes. That dialog box is amusing on my machine, because as as soon as I click "OK" the process finishes -- no time is taken at all for that step. By the way, this behavior (ConfigurePythonCaronb really slow to launch, fine afterwards, no time for the last step). is unchanged since 2.1 or 2.0 - the initial active installer screen still says this is the first version to use an active installer. -- Russell >Folks, >there's a 2.1.1c2 installer available in >http://www.cwi.nl/ftp/jack/python/mac/newer . I think this is >complete, but please try it. From p.oberndoerfer@urheberrecht.org Thu Jul 26 21:46:44 2001 From: p.oberndoerfer@urheberrecht.org (Pascal Oberndoerfer) Date: Thu, 26 Jul 2001 22:46:44 +0200 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available Message-ID: [PPC 7600/132; 80MB; MacOS 8.6; CarbonLib 1.2.5] I used the active installer for the first time. Everything seems to have been installed fine. Unfortunately I was not able to locate the python script which performs all the test. Give me a hint? Pascal From jack@oratrix.nl Thu Jul 26 22:14:30 2001 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 26 Jul 2001 23:14:30 +0200 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available In-Reply-To: Message by Russell E Owen , Thu, 26 Jul 2001 08:18:10 -0700 , Message-ID: <20010726211435.AEFA415F45B@oratrix.oratrix.nl> Recently, Russell E Owen said: > Some tiny cosmetic things which might be worth fixing someday, not > necessarily for 2.1.1: > - after the installer finishes, it launches ConfigurePythonCarbon, > which takes a VERY long time to come to the front and then sits there > silently doing something for several minutes (this is on a 466MHz G4 > with plenty of RAM, so I wonder what it's like on an older machine). > During this time a user might think the computer had hung. I'm very > puzzled by this delay, as simply launching ConfigurePython(either) > directly is really fast. It's as if VISE is taking way too much CPU > time to allow ConfigurePythonCarbon to run normally. This delay is very weird. Sometimes I see it, sometimes I don't. I hadn't noticed it showing up before running ConfigurePythonCarbon myself, only at the very end. According to the Mindvision people the delay is actually in the finder, which is creating icon positions or somesuch for all the files that have just been dumped on the disk. Something I thought of earlier this week iss that the deciding factor for delay/no delay may be whether file sharing is enabled. I've noticed in other situations (like when I'm building the Python distribution) that copying large numbers of files is significantly slower (as in 5-10 times slower) if file sharing is enabled. I think I'll leave it as-is for 2.1.1, and for 2.2 I'll post the dialog a bit earlier. > - the initial active installer screen still says this is the first > version to use an active installer. Ah, thanks, I'll fix this. -- 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 Thu Jul 26 22:16:09 2001 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 26 Jul 2001 23:16:09 +0200 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available In-Reply-To: Message by "Pascal Oberndoerfer" , Thu, 26 Jul 2001 22:46:44 +0200 , Message-ID: <20010726211614.64F7315F45B@oratrix.oratrix.nl> Recently, "Pascal Oberndoerfer" said: > > [PPC 7600/132; 80MB; MacOS 8.6; CarbonLib 1.2.5] Did you try the Carbon version only, or also the classic version? If you could do the latter too (if you didn't do so already) that would be very welcome! > I used the active installer for the first time. Everything seems to have > been installed fine. > > Unfortunately I was not able to locate the python script which performs > all the test. Give me a hint? Start the interpreter and type >>> import test.autotest -- 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 Thu Jul 26 22:34:09 2001 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 26 Jul 2001 23:34:09 +0200 Subject: [Pythonmac-SIG] Re: MacPython 2.1.1c2 install problems In-Reply-To: Message by Tim Lahey , Thu, 26 Jul 2001 12:32:48 -0400 , <20010726163312.SRNO23576.tomts8-srv.bellnexxia.net@localhost> Message-ID: <20010726213415.2356E15F45B@oratrix.oratrix.nl> Tim, I'm cc-ing the list, in the hope someone there has a clue. Hope you don't mind... Recently, Tim Lahey said: > Jack, > > I tried the active installer under OS X and everything installed fine > until I went to > run ConfigurePythonCarbon. It errored out trying to write to my OS X > system folder > a from :Mac:Lib:macostools.py line 89, > ofp = open(dstfss.as_pathname(),'wb') > > IOError: [Errno 13] Permission denied: > 'OSX:System:Library:CFMSupport:PythonCoreCarbon 2.1.1c2' Hmm, for some reason on your machine it tries to install PythonCoreCarbon in the system domain (xxx:System:Library:CFMSupport) in stead of in the local machine domain (xxx:Library:CFMSupport). That you don't have write permission in the system domain is to be expected: the stuff in here is supposed to be modified only by Apple, and they "enforce" that by not having the root user enabled by default. The question is: why does it try to install in the system domain? Hmm, what ConfigurePython tries to do is first FindFolder(kLocalDomain, kSharedLibrariesFolderType, 1) and if that fails it tries again with kOnSystemDisk as the first parameter. The third parameter is the "create if it doesn't exist" option. So, what happens to you could happen if (a) you don't have a /Library/CFMSupport and (b) you don't have the permission to create one. Do you have administrator permissions? For this release of MacPython you need that, and I must say I never tested what happens if you don't, but it could well be this. I'll try so later tonight. -- 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 cwebster@nevada.edu Thu Jul 26 22:40:26 2001 From: cwebster@nevada.edu (Corran Webster) Date: Thu, 26 Jul 2001 14:40:26 -0700 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available In-Reply-To: <20010726211614.64F7315F45B@oratrix.oratrix.nl> References: <20010726211614.64F7315F45B@oratrix.oratrix.nl> Message-ID: > > Unfortunately I was not able to locate the python script which performs >> all the test. Give me a hint? > >Start the interpreter and type > >>> import test.autotest Running the test on CarbonPython 2.1.1c2 on a G4, 540 MHz, OS 9.1, using the interpreter (not the IDE) I'm getting _really_ odd behaviour. It runs fine unless I switch another application to being the frontmost one. When I do, the Python script crashes, sometimes with a KeyboardInterrupt exception, and sometimes with _no_ explanation about the exception raised, for example: Python 2.1.1c2 (#96, Jul 25 2001, 23:07:15) [CW CARBON GUSI2 THREADS] on mac Type "copyright", "credits" or "license" for more information. >>> import test.autotest test_grammar test_opcodes test_operations test_builtin test_exceptions test_types test_MimeWriter test_StringIO test___all__ Traceback (most recent call last): File "", line 1, in ? File "Macintosh HD:Applications (Mac OS 9):Python 2.1.1:Lib:test:autotest.py", line 6, in ? regrtest.main() File "Macintosh HD:Applications (Mac OS 9):Python 2.1.1:Lib:test:regrtest.py", line 137, in main ok = runtest(test, generate, verbose, quiet, testdir) File "Macintosh HD:Applications (Mac OS 9):Python 2.1.1:Lib:test:regrtest.py", line 251, in runtest __import__(test, globals(), locals(), []) >>> This seems to be a problem with the interpreter, rather than the test suite, since I can get the same error as follows: >>> for i in xrange(10000000L): ... pass ... Traceback (most recent call last): File "", line 2, in ? KeyboardInterrupt >>> There isn't any problem with the IDE as far as I can tell. Regards, Corran From jack@oratrix.nl Thu Jul 26 22:48:20 2001 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 26 Jul 2001 23:48:20 +0200 Subject: [Pythonmac-SIG] Re: MacPython 2.1.1c2 install problems In-Reply-To: Message by Jack Jansen , Thu, 26 Jul 2001 23:34:09 +0200 , <20010726213415.2356E15F45B@oratrix.oratrix.nl> Message-ID: <20010726214825.2885115F45B@oratrix.oratrix.nl> Recently, Jack Jansen said: > Do you have administrator permissions? For this release of MacPython > you need that, and I must say I never tested what happens if you > don't, but it could well be this. I'll try so later tonight. What I get as non-privileged user is permission denied when it tries to create the interpreter. But that may be because I had installed Python previously, so the /Library/CFMSupport folder already existed. Anyway: if someone feels the urge to fix the installation process for non-privileged users: be my guest. The easiest is probably to simply detect the situation and post a message "you can't install Python as a nonpriv user", but better would be a dialog saying "better install it as privileged" and if the user still wants to install put Python in their private Application folder (hmm, no, it'll be there already, Vise will have taken care of that) and don't copy PythonCore. -- 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 Thu Jul 26 22:55:37 2001 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 26 Jul 2001 23:55:37 +0200 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available In-Reply-To: Message by Corran Webster , Thu, 26 Jul 2001 14:40:26 -0700 , Message-ID: <20010726215542.7218D15F45B@oratrix.oratrix.nl> Recently, Corran Webster said: > Running the test on CarbonPython 2.1.1c2 on a G4, 540 MHz, OS 9.1, > using the interpreter (not the IDE) I'm getting _really_ odd > behaviour. It runs fine unless I switch another application to being > the frontmost one. When I do, the Python script crashes, sometimes > with a KeyboardInterrupt exception, [...] Hey! This is an error for which I still warn in the release notes, but that I haven't seen in a long time. I've tried to repeat it based on your recipe but I can't. So, I guess either the application you're switching to is important (which one was it? more than one?) or something else in the environment. I'm trying at home now (iMac G3 400Mhz, OS 9.1) but I think I myself only saw the problem on my work machine (G4, 450Mhz, OS 9.0.4 or 9.1). I can hardly imagine that the CPU type is to blame, though... Maybe other people could also try this, and see whether we can nail it down? If this is the same problem I saw it should also be there in 2.1. -- 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 mday@mac.com Thu Jul 26 23:12:14 2001 From: mday@mac.com (Mark Day) Date: Thu, 26 Jul 2001 15:12:14 -0700 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available In-Reply-To: Message-ID: <4485DC7F-8213-11D5-8CB4-00039303AF92@apple.com> On Thursday, July 26, 2001, at 02:40 PM, Corran Webster wrote: > It runs fine unless I switch another application to being the frontmost > one. When I do, the Python script crashes, sometimes with a > KeyboardInterrupt exception, and sometimes with _no_ explanation about > the exception raised, for example: I had something similar happen in the Carbon IDE on 9.1 (installed via the active installer). While test.autotest was running, I tried clicking on Finder's desktop. It didn't switch out, so I clicked in the menu bar, window title bar, and maybe a few other places. When it got to the end of the test, the Python output window came up with a message (Doh! Forgot to save it off.) and suddenly, I had two sets of menus. The normal menus were followed by another Apple menu (in about the middle of the menu bar), File, Edit, Python, and Windows. I quit the IDE and tried to reproduce it, but haven't been successful yet. A few of the tests fail due to memory problems. Bumping up the default partition size fixed all but test_longexp. This happened with 2.1, and I think you mentioned on your web page that the memory errors were to be expected (on Mac OS 8/9 at least). I'm in the middle of trying Mac OS X 10.0.4 and Mac OS 8.1 right now. -Mark From owen@astro.washington.edu Thu Jul 26 23:33:45 2001 From: owen@astro.washington.edu (Russell E Owen) Date: Thu, 26 Jul 2001 15:33:45 -0700 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available In-Reply-To: References: <20010726211614.64F7315F45B@oratrix.oratrix.nl> Message-ID: I haven't seen this, at least yet. I ran my earlier tests at least partly in the background, but I didn't switch out right away. So I had another go at it... I repeated the test, as follows (G4 466, MacOS 9.1. MacPython 2.1.1c2 with default memory partitions): - run ConfigurePythonCarbon - run PythonInterpreter - import test.autotest - switch to Eudora as soon as I saw "test_grammar it ran fine. 106 tests OK. 3 tests failed: test_longexp test_sha test_zlib. Good luck tracking this down. I hope it's not one of those nebulous "corrupted prefs files causing random damage" type things (well, it'd be nice if it wasn't Python, but it'd also be nice to have an explanation and be able to do something about it). Macs certainly aren't the most stable machines around. I get occasional crashes -- often in Finder when using cmd-delete to trash files or cmd-D to duplicate them. It was even worse when I left my SanDick compact flash reader card in. Heck, I can't even reliably boot with the shift key down -- a problem I suspect may be due to my Apple-supplied SCSI card. One could make a whole religion around this stuff ("pray to the god ROM and he will send you system stability"). I hope Mac OS X is more reliable (I'm not quite ready to switch), but it sure seems like features trump stability at Apple and Micro$oft. Regards, -- Russell >Running the test on CarbonPython 2.1.1c2 on a G4, 540 MHz, OS 9.1, >using the interpreter (not the IDE) I'm getting _really_ odd >behaviour. It runs fine unless I switch another application to >being the frontmost one. When I do, the Python script crashes, >sometimes with a KeyboardInterrupt exception, and sometimes with >_no_ explanation about the exception raised... From cwebster@nevada.edu Fri Jul 27 00:55:13 2001 From: cwebster@nevada.edu (Corran Webster) Date: Thu, 26 Jul 2001 16:55:13 -0700 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available In-Reply-To: <20010726215542.7218D15F45B@oratrix.oratrix.nl> References: <20010726215542.7218D15F45B@oratrix.oratrix.nl> Message-ID: At 11:55 PM +0200 26/7/01, Jack Jansen wrote: >Recently, Corran Webster said: >> Running the test on CarbonPython 2.1.1c2 on a G4, 540 MHz, OS 9.1, >> using the interpreter (not the IDE) I'm getting _really_ odd >> behaviour. It runs fine unless I switch another application to being >> the frontmost one. When I do, the Python script crashes, sometimes >> with a KeyboardInterrupt exception, [...] > >Hey! This is an error for which I still warn in the release notes, but >that I haven't seen in a long time. ...which serves me right for not reading release notes, right ;) However, now I can't seem to reproduce the error any more. Between my previous message and this one I used Python 2.1 a bit for some Numeric stuff, and other than that didn't touch Python. I didn't reboot or anything like that. I tried running configurePythonCarbon again to see if that would re-introduce the error, but it had no effect. However, I do notice that the Apple Menu has double copies of all menu items in the interpreter. It's also there in 2.1. I guess it shows you how much I use the Interpreter... >I've tried to repeat it based on your recipe but I can't. So, I guess >either the application you're switching to is important (which one was >it? more than one?) It happened with Eudora, Finder and Mozilla (I tried all to see if it was just Eudora). I also had iTunes and Stickies running, but didn't try to switch to either of those. > or something else in the environment. I'm trying >at home now (iMac G3 400Mhz, OS 9.1) but I think I myself only saw the >problem on my work machine (G4, 450Mhz, OS 9.0.4 or 9.1). I can hardly >imagine that the CPU type is to blame, though... For what it's worth, I have several versions of Python currently installed on the machine - 1.5.2, 2.0, 2.1b1 (which I really should get rid of) and 2.1, but I've only been using 2.1 recently. I haven't noticed anything like this on my B&W G3 at home, but it's running OS X. I haven't tried 2.1.1 on it either. >Maybe other people could also try this, and see whether we can nail it >down? If this is the same problem I saw it should also be there in 2.1. Nope, but I didn't try it until just now. I'll try rebooting and see if anything changes. Regards, Corran From landauer@apple.com Fri Jul 27 03:47:23 2001 From: landauer@apple.com (Doug Landauer) Date: Thu, 26 Jul 2001 19:47:23 -0700 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available In-Reply-To: <20010726110848.7348A15F45D@oratrix.oratrix.nl> Message-ID: On Thursday, July 26, 2001, at 04:08 AM, Jack Jansen wrote: > Folks, > there's a 2.1.1c2 installer available in > http://www.cwi.nl/ftp/jack/python/mac/newer . I think this is > complete, but please try it. > And I mean that: the c1 installer was tested by exactly one person (at > least, that's how much feedback I got) ... I have an old 8500 running Mac OS 9.0.4. The installer seemed to work fine. The tests run ok (Note: The ReadMe says that three tests will fail, including test_sha. The first time I ran it, I think test_sha either didn't fail, or the test harness didn't detect its failure. Couldn't reproduce: test_sha failed as advertised, next time I ran it.) Had a hell of a time getting any of my scripts working; I guess they ended up, at some point, getting Unix line-endings on them, and the PythonInterpreter appears to still be unable to deal with that sort of file. Pity... The symptom is rather unfriendly: the python interpreter seems to want to run the script, it throws up an interaction window, and then says "". Once past that, the other (simple) scripts I tried seemed to work fine. -- Doug From mis@creazone.com Fri Jul 27 04:24:42 2001 From: mis@creazone.com (Michal Seta) Date: Thu, 26 Jul 2001 23:24:42 -0400 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available In-Reply-To: Message-ID: MacOS 9.1, iMac 350Mhz, 128M ram, Install went fine. No hungups (appleshare/file sharing was not enabled). some tests failed: --- snip --- test test_zlib crashed -- exceptions.MemoryError: 106 tests OK. 3 tests failed: test_longexp test_socket test_zlib 30 tests skipped: test_al test_bsddb test_cd test_cl test_crypt test_dbm test_dl test_fcntl test_fork1 test_gc test_gl test_grp test_imgfile test_largefile test_linuxaudiodev test_locale test_mmap test_nis test_openpty test_poll test_popen2 test_pty test_pwd test_signal test_socketserver test_sunaudiodev test_sundry test_timing test_winreg test_winsound >>> cheers. ./MiS From alczj@yahoo.es Fri Jul 27 10:03:49 2001 From: alczj@yahoo.es (Alfonso Baciero) Date: Fri, 27 Jul 2001 02:03:49 -0700 (PDT) Subject: [Pythonmac-SIG] Bug in Lib/EasyDialogs.py Message-ID: <20010727090349.20035.qmail@web5205.mail.yahoo.com> I found a bug in EasyDialogs in Python 2.1: Line 280 in EasyDialogs.py (method "_update" in the class "ProgressBar") is wrong: self.d.DragWindow(where, screenbounds) It should be: self.w.DragWindow(where, screenbounds) This bug produces an error when you try to move a ProgressBar window. Sincerely, Alfonso. P.S. I reported this bug to jack@cwi.nl but I have checked that the bug continues in the SourceForge CVS repository. P.P.S. I tried to find a diff program for macintosh, but I couldn´t (I found source files to compile with MPW, but they were very old). Any suggestion? __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ From jack@oratrix.nl Fri Jul 27 10:23:24 2001 From: jack@oratrix.nl (Jack Jansen) Date: Fri, 27 Jul 2001 11:23:24 +0200 Subject: [Pythonmac-SIG] Bug in Lib/EasyDialogs.py In-Reply-To: Message by Alfonso Baciero , Fri, 27 Jul 2001 02:03:49 -0700 (PDT) , <20010727090349.20035.qmail@web5205.mail.yahoo.com> Message-ID: <20010727092324.903FC303181@snelboot.oratrix.nl> > I found a bug in EasyDialogs in Python 2.1: > = > Line 280 in EasyDialogs.py (method "_update" in the > class "ProgressBar") is wrong: > = > self.d.DragWindow(where, screenbounds) > = > It should be: > = > self.w.DragWindow(where, screenbounds) > = > This bug produces an error when you try to move a > ProgressBar window. Thanks! I've put the fix in the repository. > P.S. I reported this bug to jack@cwi.nl but I have > checked that the bug continues in the SourceForge CVS > repository. Oops... I don't remember seeing the message, so I guess it came by at an = inopportune moment, sorry... -- 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 csmith@blakeschool.org Sat Jul 28 00:47:24 2001 From: csmith@blakeschool.org (Christopher Smith) Date: Fri, 27 Jul 2001 18:47:24 -0500 Subject: [Pythonmac-SIG] IDLE on Mac Message-ID: Two things that I noticed in IDLE (2.1, not 2.1.1): 1) the shift-cmd-] adds a # to the line, but shift-cmd-[ doesn't remove it. Is there a way to remove the #'s? 2) is there a graceful way to just stop in the middle of your program. I've been using input() and when prompted just press return which brings up the error window which I then close. It's less than elegant. /c From basicprinting@earthlink.net Sat Jul 28 04:03:57 2001 From: basicprinting@earthlink.net (basicprinting@earthlink.net) Date: Fri, 27 Jul 2001 23:03:57 -0400 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 on OS8.6 Message-ID: <200107280303.UAA23784@snipe.mail.pas.earthlink.net> The Official Jack Jansen MacPython Website still insists "There are no current beta distributions." #You might get more flies if you bother to bait the trap. Installation of MacPython 2.1.1c2 on OS8.6 went successfully. Most of the items in Mac:Lib:test failed, crashed, whatever All of the samples in Mac:Demo:waste suffered from 'zombie' windows that refuse to dissapear once you close them. Double-Click PythonInterpreterClassic and it whines: File "Net:Applications:Python 2.1.1:PythonInterpreterClassic", line 1 Joy!peffpwpc ^ SyntaxError: invalid syntax This is surprising to me, considering this machine is only running circa 8.6 code. (Excepting the 2.1.1c2 install) (True or False): A Mac without CarbonLib installed is considered Classic? (True or False): To run a Python interpreter on an non-carbon mac you run PythonInterpreterClassic? and what the heck is that icon on the Classic Interpreter? Double-Click PythonInterpreter and it launches successfully >>> import test.autotest 4 tests failed: test_longexp test_sha test_socket test_zlib many items were skipped because there were no modules named blah, & blah1, & blah2... From kp87@lycos.com Sat Jul 28 05:51:31 2001 From: kp87@lycos.com (kevin parks) Date: Sat, 28 Jul 2001 13:51:31 +0900 Subject: [Pythonmac-SIG] diff Message-ID: The best thing that i could find was in the "find differences" menu in BBedit. It is not in BBedit lite, only in the full version. Toast has a compare menu, but it only compares the items in a simple way, telling you if they are the same or not. In OS X (or at least on the NeXT) there used to be an app called page merger which was an IB examples app that was actually quite useful, but then if you were on OS X you'd have the UNIX diff going in the shell, i presume. cheers, -kp-- Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ From draayer@surfglobal.net Sat Jul 28 09:07:45 2001 From: draayer@surfglobal.net (Dean & Yang Draayer) Date: Sat, 28 Jul 2001 04:07:45 -0400 Subject: [Pythonmac-SIG] Syntax error bug in Python IDE Message-ID: In a new Python IDE editing window, type just 'return'. Then hit the Run button. I get the following traceback: ---------- Traceback (most recent call last): File "Manfred:Dev:Python 2.1:Mac:Tools:IDE:Wtraceback.py", line 41, in traceback self.syntaxerror() File "Manfred:Dev:Python 2.1:Mac:Tools:IDE:Wtraceback.py", line 59, in syntaxerror charno = charno - 1 TypeError: unsupported operand type(s) for - ---------- Of course, this should give a syntax error (try it in the Python Interpreter window to see the correct traceback). But it seems the charno variable isn't set right when the IDE wants to report the error. Dean From csmith@blakeschool.org Sat Jul 28 19:23:48 2001 From: csmith@blakeschool.org (Christopher Smith) Date: Sat, 28 Jul 2001 13:23:48 -0500 Subject: [Pythonmac-SIG] using IDLE and changing variables In-Reply-To: References: Message-ID: Hi, One thing that has been discussed recently on Tutor is the fact that when you make changes to a module that you are importing, the changes won't be recognized unless you force a reload e.g., reload(mylibs). So the reload() takes care of that. My question concerns now the change of variables within a definition/program. Let's say at one point you had a variable x defined and you used it in several places. Then you change the variable from x to y but forget to change it everywhere. IDLE (at least from what I've seen) does not warn about the uninitialized variable. Is this just tough-luck-you-should-have-used-find-and-replace or is there some way to make sure this doesn't happen (other than quitting and restarting)? I guess what I'm looking for is something like BASIC's "new" command that flushes out everything of the session and begins fresh. /c From csmith@blakeschool.org Sat Jul 28 19:28:18 2001 From: csmith@blakeschool.org (Christopher Smith) Date: Sat, 28 Jul 2001 13:28:18 -0500 Subject: [Pythonmac-SIG] Re: Syntax error bug in Python IDE In-Reply-To: References: Message-ID: >In a new Python IDE editing window, type just 'return'. Then hit the >Run button. I get the following traceback: > >---------- >Traceback (most recent call last): > File "Manfred:Dev:Python 2.1:Mac:Tools:IDE:Wtraceback.py", line 41, >in traceback > self.syntaxerror() > File "Manfred:Dev:Python 2.1:Mac:Tools:IDE:Wtraceback.py", line 59, >in syntaxerror > charno = charno - 1 >TypeError: unsupported operand type(s) for - >---------- > >Of course, this should give a syntax error (try it in the Python >Interpreter window to see the correct traceback). But it seems the >charno variable isn't set right when the IDE wants to report the error. Oooh have I seen this recently. It happens when I do something like write f(i)=something when I should have written f[i]=something. I wish for a syntax error report in this situation, too. I'll try keep track of such an occurence that might help in debugging. /c From dgoodger@bigfoot.com Sat Jul 28 21:13:07 2001 From: dgoodger@bigfoot.com (David Goodger) Date: Sat, 28 Jul 2001 16:13:07 -0400 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available In-Reply-To: <20010726110848.7348A15F45D@oratrix.oratrix.nl> Message-ID: MacOS 8.6, CarbonLib 1.3.1, PowerMac 7100/66* 2.1.1c2 installed fine, seems to run fine. I ran test.autotest and got the expected result, ran the unittests from my own projects without surprise. Looks good! * Can anybody spare a machine? Contribution to a good cause (see links below). I'm serious! -- David Goodger dgoodger@bigfoot.com Open-source projects: - Python Docstring Processing System: http://docstring.sourceforge.net - reStructuredText: http://structuredtext.sourceforge.net - The Go Tools Project: http://gotools.sourceforge.net From jwblist@olympus.net Sat Jul 28 21:30:51 2001 From: jwblist@olympus.net (John W Baxter) Date: Sat, 28 Jul 2001 13:30:51 -0700 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available In-Reply-To: <20010726110848.7348A15F45D@oratrix.oratrix.nl> References: <20010726110848.7348A15F45D@oratrix.oratrix.nl> Message-ID: At 13:08 +0200 7/26/2001, Jack Jansen wrote: >Folks, >there's a 2.1.1c2 installer available in >http://www.cwi.nl/ftp/jack/python/mac/newer . I think this is >complete, but please try it. > >And I mean that: the c1 installer was tested by exactly one person (at >least, that's how much feedback I got),... I installed on (US English) Mac OS 9.1 on My Dual 533 (384 meg). This is the Mac OS 9.1 partition which is *not* used with Classic under Mac OS X. I used the full installer. I had no problems...I was able to induce the tests which crash in "small" memory not to crash by stretching my virtual memory and giving the interpreter 400,000K. I haven't yet tried anything useful. MacPython had not been installed on this partition previously. I've installed "mainline" Python 2.1 under Mac OS X...I don't have a need to also install MacPython there...or at least I don't yet know I have a need. So I haven't tried that. --John >_______________________________________________ >Pythonmac-SIG maillist - Pythonmac-SIG@python.org >http://mail.python.org/mailman/listinfo/pythonmac-sig -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From jack@oratrix.nl Sun Jul 29 21:54:22 2001 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 29 Jul 2001 22:54:22 +0200 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 on OS8.6 In-Reply-To: Message by basicprinting@earthlink.net , Fri, 27 Jul 2001 23:03:57 -0400 , <200107280303.UAA23784@snipe.mail.pas.earthlink.net> Message-ID: <20010729205427.7B95715F46D@oratrix.oratrix.nl> Recently, basicprinting@earthlink.net said: > The Official Jack Jansen MacPython Website still insists > "There are no current beta distributions." > #You might get more flies if you bother to bait the trap. Nope, I don't want outsiders at the moment, due to the fact that I'm making semi-legal use of the installer until I get a new key from Mindvision. So it's just you pythonmac-sig folks... > Installation of MacPython 2.1.1c2 on OS8.6 went successfully. > > > Most of the items in Mac:Lib:test > failed, crashed, whatever Hmm, that folder should probably go. None of these scripts have ever been updated since first written. I'll add a readme to explain this. > All of the samples in Mac:Demo:waste > suffered from 'zombie' windows > that refuse to dissapear once you close them. Ouch! And so do the TE samples and the new MLTE sample. Could someone with an original 2.1 installed please check this, to see whether it's a new bug for 2.1.1 or an old one that is in 2.1 already? > Double-Click PythonInterpreterClassic and it whines: > File "Net:Applications:Python 2.1.1:PythonInterpreterClassic", line > 1 > Joy!peffpwpc > ^ > SyntaxError: invalid syntax This is not surprising: you shouldn't double-click PythonInterpreterClassic or PythonInterpreterCarbon. They are byuilding-blcosk used when ConfigurePythonOneortheother creates PythonInterpreter. But, I agree that it may be surprising to you, the end-user. And even if it isn't surprising the error message won't win a prize:-) I'll try to do something about it. > and what the heck is that icon on the Classic Interpreter? It is an almost-finished application, with a bit of scaffolding in front of it, and it's being painted. > Double-Click PythonInterpreter and it launches successfully > >>> import test.autotest > 4 tests failed: test_longexp test_sha test_socket test_zlib This is the bottom line: your installation works as expected. Thanks for the feedback, I'll incorporate it for the final 2.1.1 release, -- 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 richard@richardgordon.net Mon Jul 30 00:44:53 2001 From: richard@richardgordon.net (Richard Gordon) Date: Sun, 29 Jul 2001 19:44:53 -0400 Subject: [Pythonmac-SIG] Help me waste some time? Message-ID: In the course of cleaning out some forgotten folders, I came across a script that some guy posted to the MacPerl list a few years ago that was wonderfully irritating because it made the Mac yodel. To avoid doing what I was supposed to be doing, I started exploring the possibilities of converting this into macpython, but got stuck pretty quickly trying to find something that equates to the perl Speech module. I found some sound and soundmanager stuff, but couldn't find anything about speech as such and am fuzzy about where to begin. If someone could point me in the right direction, I'd appreciate it. The original script written in the High Martian that is perl is below. If you happen to have a copy of MacPerl around, it should play ok. #!perl # "MacPerl Yodels" v1.0 # by David Seay # use Mac::Speech; $channel[0] = NewSpeechChannel($Voice{'Cellos'}) or die $^E; $pitch1 = 68; $pitch2 = $pitch1 + 7; $pause = .05; for $note (0..7) { SetSpeechPitch $channel[0], $pitch1; SpeakText $channel[0], "a"; select(undef, undef, undef, $pause); SetSpeechPitch $channel[0], $pitch2; SpeakText $channel[0], "e"; select(undef, undef, undef, $pause); } SetSpeechPitch $channel[0], $pitch1 + 4; SpeakText $channel[0], "who"; while (SpeechBusy()) {} DisposeSpeechChannel $channel[0] if $channel[0]; Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From jwblist@olympus.net Mon Jul 30 04:44:37 2001 From: jwblist@olympus.net (John W Baxter) Date: Sun, 29 Jul 2001 20:44:37 -0700 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 on OS8.6 In-Reply-To: <20010729205427.7B95715F46D@oratrix.oratrix.nl> References: <20010729205427.7B95715F46D@oratrix.oratrix.nl> Message-ID: Jack, what is supposed to happen when running the full 2.1.1c2 installer in Mac OS X 10.0.4 (I decided to go ahead)? What did happen at the end was the warning about ConfigurePythonCarbon probably not working. Right...it didn't work. But my attempt to run it by hand left its splash window on screen for a long time, with seemingly no action. It did much the same when I tried running it under Mac OS 9 (booted into the "reserved for Classic" Mac OS 9.1 which shares the Mac OS X partition). After some false starts running the incomplete pseudo-application (with results which now don't matter...thanks for the explanation), and some time away from the machine, I have now run the interpreter, getting: Python 2.1.1c2 (#96, Jul 25 2001, 23:07:15) [CW CARBON GUSI2 THREADS] on mac Type "copyright", "credits" or "license" for more information. >>> import sys >>> print sys.path ['', 'Blake:Applications:Python 2.1.1', 'Blake:Applications:Python 2.1.1:Mac:PlugIns', 'Blake:Applications:Python 2.1.1:Mac:Lib', 'Blake:Applications:Python 2.1.1:Mac:Lib:lib-toolbox', 'Blake:Applications:Python 2.1.1:Mac:Lib:lib-scriptpackages', 'Blake:Applications:Python 2.1.1:Lib', 'Blake:Applications:Python 2.1.1:Extensions:img:Mac', 'Blake:Applications:Python 2.1.1:Extensions:img:Lib', 'Blake:Applications:Python 2.1.1:Extensions:Imaging:PIL', 'Blake:Applications:Python 2.1.1:Lib:lib-tk', 'Blake:Applications:Python 2.1.1:Lib:site-packages', 'Blake:Applications:Python 2.1.1:lib:site-packages:Numeric'] >>> Is it likely that the configuration is roughly right? Or do I need to do some hand adjusting? The autotest went well, in terms of results, EXCEPT that I find the failure of test_bufio surprising: test_bufio test test_bufio failed -- Expected '1234x' got '' [test_threadedtempfile managed to show 130% CPU usage in top (Dual 533...1 processor fully used == 100%)...highest I've happened to see). Hmmm...perhaps the tests don't go fine: in a second attempt (restarted the PythonInterpreter and redid import test.autotest), the testing seems to have hung with the last report being test___all__ It did that for a while the first time, but started moving on when I put another window in front and then brought PythonInterpreter.out to the front again. Trying to bring up the PythonInterpreter window during the seeming pause was frustrating: the menu would not remain pulled down. Finally it did, and Quit made the .out window go away but left the PythonInterpreter as the front application. Loading Force Quit caused an "unexpectedly quit" message for PythonInterpreter. 108 tests OK. 1 test failed: test_bufio 30 tests skipped: test_al test_bsddb test_cd test_cl test_crypt test_dbm test_dl test_fcntl test_fork1 test_gc test_gl test_grp test_imgfile test_largefile test_linuxaudiodev test_locale test_mmap test_nis test_openpty test_poll test_popen2 test_pty test_pwd test_signal test_socketserver test_sunaudiodev test_sundry test_timing test_winreg test_winsound >>> -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA From jack@oratrix.nl Mon Jul 30 09:04:18 2001 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 30 Jul 2001 10:04:18 +0200 Subject: [Pythonmac-SIG] Help me waste some time? In-Reply-To: Message by Richard Gordon , Sun, 29 Jul 2001 19:44:53 -0400 , Message-ID: <20010730080418.B81AE303181@snelboot.oratrix.nl> > In the course of cleaning out some forgotten folders, I came across a > script that some guy posted to the MacPerl list a few years ago that > was wonderfully irritating because it made the Mac yodel. To avoid > doing what I was supposed to be doing, I started exploring the > possibilities of converting this into macpython, but got stuck pretty > quickly trying to find something that equates to the perl Speech > module. Try the "macspeech" module. It's only available under the classic PPC model, it hasn't been ported to Carbon (yet?). There used to be a demo with it that would read out the script to Monty Python and the Holy Grail, with different voices selected for the different actors, but I'm afraid it has been lost in the mist of 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 alan.gauld@bt.com Mon Jul 30 10:21:58 2001 From: alan.gauld@bt.com (alan.gauld@bt.com) Date: Mon, 30 Jul 2001 10:21:58 +0100 Subject: [Pythonmac-SIG] RE: [Tutor] using IDLE and changing variables Message-ID: <5104D4DBC598D211B5FE0000F8FE7EB20E66BE26@mbtlipnt02.btlabs.bt.co.uk> > when you make changes to a module that you are importing, > the changes won't be recognized unless you force a reload Correct, at the interactive prompt. > Let's say at one point you had a variable x defined > and you used it in several places. Then you change > the variable from x to y but forget to change it > everywhere. That'd be a programmer error in every environment I've ever used. Some language compilers will tell you if you remove the original declaration/definition of the variable (x in your case) and then try to use it. Python will warn you in some situations. But it has nothing to do with IDLE per se, it's all to do with Python itself. > I guess what I'm looking for is something like BASIC's "new" > command that flushes out everything of the session and begins > fresh. The interactive prompt doesn't have that feature but working in IDLE the best thing IMHO is simply to create a new file using File|New... The >>> prompt is great for playing with ideas but if its more than a few lines of code I prefer to work in a file and edit/save/run - even if the file is just a throw-away like tmp.py of foo.py or whatever. Alan G From just@letterror.com Mon Jul 30 13:00:08 2001 From: just@letterror.com (Just van Rossum) Date: Mon, 30 Jul 2001 14:00:08 +0200 Subject: [Pythonmac-SIG] Darwin Python: how to enable zlib? Message-ID: <20010730140014-r01010700-79179a89-0910-010c@10.0.0.2> I've just succesfully compiled and installed Python under Darwin once again, but zlib has not been built. Do I have to install the zlib sources? I thought they came with the OSX dev tools, but I'mnot sure. Does anyone know the magic incantations? Thanks. Just From p.oberndoerfer@urheberrecht.org Mon Jul 30 13:09:03 2001 From: p.oberndoerfer@urheberrecht.org (Pascal Oberndoerfer) Date: Mon, 30 Jul 2001 14:09:03 +0200 Subject: [Pythonmac-SIG] MacPython 2.1.1c2 available Message-ID: >> [PPC 7600/132; 80MB; MacOS 8.6; CarbonLib 1.2.5] > > Did you try the Carbon version only, or also the classic version? If > you could do the latter too (if you didn't do so already) that would > be very welcome! Both, see below. >> I used the active installer for the first time. Everything seems to have >> been installed fine. >> >> Unfortunately I was not able to locate the python script which performs >> all the test. Give me a hint? > > Start the interpreter and type >>>> import test.autotest Thank you. Here are the results: 1) Classic Python 2.1.1c2 (#96, Jul 25 2001, 23:04:16) [CW PPC GUSI2 THREADS] on mac Type "copyright", "credits" or "license" for more information. >>> import test.autotest [...] 107 tests OK. 2 tests failed: test_longexp test_zlib 30 tests skipped: test_al test_bsddb test_cd test_cl test_crypt test_dbm test_dl test_fcntl test_fork1 test_gc test_gl test_grp test_imgfile test_largefile test_linuxaudiodev test_locale test_mmap test_nis test_openpty test_poll test_popen2 test_pty test_pwd test_signal test_socketserver test_sunaudiodev test_sundry test_timing test_winreg test_winsound 2) Carbon Python 2.1.1c2 (#96, Jul 25 2001, 23:07:15) [CW CARBON GUSI2 THREADS] on mac Type "copyright", "credits" or "license" for more information. >>> import test.autotest [...] 106 tests OK. 3 tests failed: test_longexp test_sha test_zlib 30 tests skipped: test_al test_bsddb test_cd test_cl test_crypt test_dbm test_dl test_fcntl test_fork1 test_gc test_gl test_grp test_imgfile test_largefile test_linuxaudiodev test_locale test_mmap test_nis test_openpty test_poll test_popen2 test_pty test_pwd test_signal test_socketserver test_sunaudiodev test_sundry test_timing test_winreg test_winsound -- Pascal Oberndoerfer Institut fuer Urheber- und Medienrecht Wiss. Mitarbeiter Salvatorplatz 1 Rechtsanwalt D - 80333 Muenchen Tel. +49 89 291954-70 mailto:pob@urheberrecht.org Fax: +49 89 291954-80 http://www.urheberrecht.org From just@letterror.com Mon Jul 30 13:25:49 2001 From: just@letterror.com (Just van Rossum) Date: Mon, 30 Jul 2001 14:25:49 +0200 Subject: [Pythonmac-SIG] Darwin Python: Bus error with sockets Message-ID: <20010730142552-r01010700-62f56fe9-0910-010c@10.0.0.2> Python was built from current CVS: [localhost:~/python] just% python Python 2.2a0 (#1, 07/30/01, 13:21:09) [GCC Apple DevKit-based CPP 6.0alpha] on darwin1 Type "help", "copyright", "credits" or "license" for more information. >>> from socket import * >>> s = socket(AF_INET, SOCK_STREAM) >>> s.connect(("www.letterror.com", 80)) Bus error [localhost:~/python] just% Could this have anything to do with the recently added IPv6 support? Just From richard@richardgordon.net Mon Jul 30 13:35:25 2001 From: richard@richardgordon.net (Richard Gordon) Date: Mon, 30 Jul 2001 08:35:25 -0400 Subject: [Pythonmac-SIG] Help me waste some time? In-Reply-To: <20010730080418.B81AE303181@snelboot.oratrix.nl> References: <20010730080418.B81AE303181@snelboot.oratrix.nl> Message-ID: At 10:04 AM +0200 7/30/01, Jack Jansen wrote: >Try the "macspeech" module. It's only available under the classic PPC model, >it hasn't been ported to Carbon (yet?). oh yeah, thanks. Sorry I guess I forgot to look in Plugins. Kind of odd that you have to reference voices by integer rather than name, isn't it? Otherwise, it looks like it will do pretty much the same as the perl implementation, so I'll have to play with this some. Thanks again. Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From jack@oratrix.nl Mon Jul 30 14:06:05 2001 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 30 Jul 2001 15:06:05 +0200 Subject: [Pythonmac-SIG] Help me waste some time? In-Reply-To: Message by Richard Gordon , Mon, 30 Jul 2001 08:35:25 -0400 , Message-ID: <20010730130605.CBF0A303181@snelboot.oratrix.nl> > Kind of > odd that you have to reference voices by integer rather than name, > isn't it? I think this was the very first MacPython extension module I wrote, basically to learn the process (back in the days when Guido himself still did MacPython maintainance). I'm not sure when it was written, but the initial checkin is from october 1994. So it predates the toolbox modules by half a year or so. The only two older mac modules I could find are gestalt and MacOS. -- 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 p.oberndoerfer@urheberrecht.org Mon Jul 30 18:05:39 2001 From: p.oberndoerfer@urheberrecht.org (Pascal Oberndoerfer) Date: Mon, 30 Jul 2001 19:05:39 +0200 Subject: [Pythonmac-SIG] Re: MacPython 2.1.1c2 available Message-ID: > Did you try the Carbon version only, or also the classic version? If > you could do the latter too (if you didn't do so already) that would > be very welcome! > Meanwhile I also installed a copy on an "older" G3, 128 MB, MacOS 8.6, no CarbonLib available. Everything seems alright: Python 2.1.1c2 (#96, Jul 25 2001, 23:04:16) [CW PPC GUSI2 THREADS] on mac Type "copyright", "credits" or "license" for more information. >>> import test.autotest [...] 106 tests OK. 3 tests failed: test_longexp test_sha test_zlib 30 tests skipped: test_al test_bsddb test_cd test_cl test_crypt test_dbm test_dl test_fcntl test_fork1 test_gc test_gl test_grp test_imgfile test_largefile test_linuxaudiodev test_locale test_mmap test_nis test_openpty test_poll test_popen2 test_pty test_pwd test_signal test_socketserver test_sunaudiodev test_sundry test_timing test_winreg test_winsound -- Pascal Oberndoerfer Institut fuer Urheber- und Medienrecht Wiss. Mitarbeiter Salvatorplatz 1 Rechtsanwalt D - 80333 Muenchen Tel. +49 89 291954-70 mailto:pob@urheberrecht.org Fax: +49 89 291954-80 http://www.urheberrecht.org From scott@griffitts.com Tue Jul 31 17:23:53 2001 From: scott@griffitts.com (Scott Griffitts) Date: Tue, 31 Jul 2001 11:23:53 -0500 Subject: [Pythonmac-SIG] Re: MacPython 2.1.1c2 Message-ID: This install gave me the same problems on my G3 running OS 9.1 that I had with 2.1. During the install I get a dialog prompt warning me of a preexisting preference file in the system folder. (This file didn't exist when I installed 2.1 and I trashed it when I installed 2.1.1) The dialog box gives you the option of continuing or quitting and rerunning configurecarbon. If I continue, the install appears to finish correctly. However, when running the IDE a second apple menu appears. When quitting the IDE the menu bar becomes filled with gibberish and then the finder crashes. If I choose to quit the install and rerun configurecarbon, the finder crashes. After reboot and running the IDE, it experiences the same menu bar/finder crash explained above. With both 2.1 and 2.1.1 I have completely removed the classic/carbon install and did a custom install of classic only and it works fine. From jack@oratrix.nl Tue Jul 31 23:00:22 2001 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 01 Aug 2001 00:00:22 +0200 Subject: [Pythonmac-SIG] Re: MacPython 2.1.1c2 In-Reply-To: Message by Scott Griffitts , Tue, 31 Jul 2001 11:23:53 -0500 , Message-ID: <20010731220027.86FF8162E15@oratrix.oratrix.nl> Scott, I have no idea what is causing your problems. They also seem to be unique (i.e. if anyone else sees something similar: please speak up!). Some wild guesses: - are you using Multiple Users? I've never tried this, and it could well make the install fail. Is anyone else using Multiple Users? - Are you running some virus-catching software that could cause this? - Running off a fileserver maybe, so Python has no permission to save the prefs file? - "Funny" (non-ascii) characters in your diskname? In the path to Python? Some other info that would be interesting: - Does the prefs file actually exist or is Python somhow only thinking that it exists? - Your Apple System Profile output could be handy. The second Apple Menu in the IDE, by the way, means that the IDE has crashed. Unfortunately this means you can't easily find out why it did so. Did the bare PythonInterpreter run OK? -- 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