From maccgi@bellsouth.net Thu Apr 1 13:38:58 1999 From: maccgi@bellsouth.net (Richard Gordon) Date: Thu, 1 Apr 1999 08:38:58 -0500 Subject: [Pythonmac-SIG] Over My Head Message-ID: I'm in over my head, but not like you may be thinking (at least for the purposes of this message). The short(er) version is that when Darwin was announced, I took a look at the pieces available for distribution and noticed that while Perl was included, Python was not. So, I wrote to Developer Feedback and pointed out this omission with a suggestion that they include Python in Darwin and in OS X Server if it has been omitted from the shipping product. In due course, I got a perfunctory thank you in reply, but then got another message yesterday from the Darwin Product Manager, Ernest Prabhakar , that invited me to submit a compatible version of Python that will run under Darwin because they hadn't had a chance to explore that. That's where the "over my head" part comes in since my knowlege of Python is pretty rudimentary at this point regardless of platform. I told him that I would pass this request on to you guys in the belief that somebody here was probably already playing with Darwin and that this was the most Mac-centric source of Python knowledge. So, there it is. It did not occur to me to mention to him that mkLinux DR3 ships with Python and maybe that version is already suitable for use with Darwin and/or MacOS X Server. Is that the quick fix or what? If so, I'll pass the info along and let them figure it out, but if not then could one of you guys who is willing to evangelize Python maybe get up with Ernie about this? Thanks. Richard Gordon -------------------- Gordon Consulting & Design Database Design/Scripting Languages mailto://maccgi@bellsouth.net 770.565.8267 From landauer@apple.com Thu Apr 1 17:53:05 1999 From: landauer@apple.com (Doug Landauer) Date: Thu, 1 Apr 1999 09:53:05 -0800 Subject: [Pythonmac-SIG] Over My Head In-Reply-To: Message-ID: > ... the Darwin Product Manager, Ernest > Prabhakar , that invited me to submit a > compatible version of Python that will run under Darwin because they > hadn't had a chance to explore that. Python 1.5.2b2 builds and works fine on current internal versions of Mac OS X Server. I'd sure like to see it get into the distributions. I'll forward your message to Wilfredo & the internal list and see if I can get some progress on this. My guess is that they wouldn't mant to put python into the system at least until python is no longer "beta". > ... could one of you guys who is willing to > evangelize Python maybe get up with Ernie about this? I'll keep bugging Wilfredo & Creed about it. Don't have much time to spend on that, though. :-( -- Doug Landauer Mac OS X Server Tools Group landauer@apple.com [Obj-]C/C++ Compiler From Catldy6565@aol.com Fri Apr 2 02:22:58 1999 From: Catldy6565@aol.com (Catldy6565@aol.com) Date: Thu, 1 Apr 1999 21:22:58 EST Subject: [Pythonmac-SIG] (no subject) Message-ID: <4cdaaa6f.24358402@aol.com> --part1_4cdaaa6f.24358402_boundary Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit --part1_4cdaaa6f.24358402_boundary Content-Type: text/plain; name="ELITES~1.TXT" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="ELITES~1.TXT" G - R - E - A - T OPPORTUNITIES We are a dynamic, small, but GROWING, Apple authorized dealer...we buy, sell= , lease, rent and repair new and used Macintosh computers. =20 We are moving to a new, larger and more visible store and are=20 URGENTLY in need of sales associates and technicians to staff the expanded f= acility. Applicants must be Mac advocates, must have owned/used a Mac for a= t least two years, and must be technically knowledgeable (degree not necessa= ry). There is flexibility in scheduling...the store will be open 7 days a w= eek...and you may have the opportunity to become a Mac certified technician!= =20 Send resumes to Michelle Souza, 10601 S. De Anza Blvd., Suite 305, Cupertino= , CA 95014-4451, or fax to Michelle at 408-257-8001.=20 --part1_4cdaaa6f.24358402_boundary-- From wilsona@earthlink.net Fri Apr 2 20:47:14 1999 From: wilsona@earthlink.net (Anthony L. Wilson) Date: Fri, 02 Apr 1999 15:47:14 -0500 Subject: [Pythonmac-SIG] Using Python or Java for data analysis(no flame wars please) Message-ID: <37052CD1.C31620EA@thinkapple.com> Hello, At this time I am posing a question to the readers/users/developers on these various newsgroups and mailing lists. At the moment I am contemplating development of a small - medium size application. I am contemplating using either Python or Java. I do not wish this to be flame war on which is a better language, but I would like some serious comments on aspects of each language as it applies to the application that I am trying to develop. My background consists of Fortran and C programming with some Python and Java. Why use Python or Java? Because I would to have the gui part and the platform portability given by the two(more on this later) along with learning a new language. i have used Python more so then Java. This has been on my Macintosh and Linux machine. Why Python? In using Python, I have found it to be simple to use and understand, yet powerful. With NumPy, for numerical extensions, and access to plotting libs like DISLIN, PLplot, PGplot, GNU plotutils, BLT, Gist, and Gnuplot OpenGL(based on website) Python presents several features that I would like to utilize. Along with the GUI frameworks that Python uses: Tkinter, wxPython, and PyGtk.The problem here is speed and cross platform( limitied plotting and GUI libs for Macintosh port of Python) Why Java? Java presents several areas that my be utilized with the main one being the new 2D API. It also has a standard built in GUI system. There are numerical facilities that will be useful. Plotting may be a problem, but once its implemented, it should run on any Java VM(right??). Why not do a mix? Use JPython. This is a thought that I am considering. Please give pros and cons based on criteria/feature list below. First, I will give a general overview of what I am thinking about. Anyone with pointers on something similar please let me know. I would hate to re-invent the wheel, unless I had to. Application Overview: I would like to develop a data analysis tool for viewing/manipulating circuit simulation data, i.e. a post processor. Basically, I need to be able to read-in/parse the data ( all 2-d data) which is in a general form produced by a simulation run( there is a common format for all SPICE simulators). The numbers will mostly be of type float, but may also be in engineering notation. I need to be able to plot the data( 2-d, lin-lin, log-lin, lin-log, log-log, and smith charts). I would also need to be able access the data for interactive analysis( fft, curve fitting, time series analysis, etc). I would also need access to the basic math and trig functions( +, -, *, / , ^, sin, cos, tan, asin, acos, atan, etc). This should all be implemented via a GUI front-end. If you are familiar with HSPICE(tm) or CADENCE Design Tools(tm), then this would be similar to their calculator tools. Basically I am looking at a graphing calculator with data analysis aspects with a GUI front-end. General Needs: ------------- GUI Support Numerial Support with analysis routines File I/O Support 2-D plotting support Targeted Platforms: Macintosh(PowerPC only) and Linux Current Machine Configurations: ------------------------ Mac OS 8.5 MRJ 2.1.1 and Metrowerks Codewarrior Pro 4 MacPython 1.5.1 w/ NumPy RedHat Linux 5.2 Linux Java SDK 1.1.7 from Blackdown.Org Python 1.5.1 w/ NumPy Feature List ---------- Things that I would appreciate some comments about in respect to Python and/or Java implementation. These are in order of importance. Please indicate which platform(Macintosh or Linux), if feature can only be implemented on that platform, and language implementation. 1). File Input parsing into some usable form 2). 2 -D plotting. This would also include interactive labeling and such. 3). X-Y labeling 4). GUI for the calculator front end 5). Numerical Analysis Support. for data processing 6). speed 7). Application delivery. Final product as an application for others to use. I know this is a bit much for a single person development, but I would like to take a shot at developing it using a language that can handle the task. I would definitely prefer not to have to start over in a new language half way through. At the moment, I am leaning towards using Java because of the cross platform and new 2D API support. But Python, I really like and its easier to program using Python. I would appreciate any comments on any aspect of this development. Please only serious commentary. I would like to use the best language for the job. Thanks very much. -anthony wilson http://home.earthlink.net/`wilsona mailto:wilsona@earthlink.net mailto:alwkappa@ThinkApple.com From savageb@pacbell.net Sat Apr 3 06:44:33 1999 From: savageb@pacbell.net (savageb) Date: Fri, 02 Apr 1999 22:44:33 -0800 Subject: [Pythonmac-SIG] MacOS X Server (was: Over My Head) Message-ID: <199904030644.WAA09523@mail-gw3.pacbell.net> I haven't had time to look at it in any detail, but MacOS X Server does ship with Python, although it is not installed by default. On the 3rd party CD there is a package from Tip Top Software called Objective-Everything. It installs Python. I took a quick look at it, and it seems like it does not include all the standard modules. I'll make a more complete report as soon as I can. Bob >> ... the Darwin Product Manager, Ernest >> Prabhakar , that invited me to submit a >> compatible version of Python that will run under Darwin because they >> hadn't had a chance to explore that. > > Python 1.5.2b2 builds and works fine on current internal > versions of Mac OS X Server. I'd sure like to see it get > into the distributions. I'll forward your message to > Wilfredo & the internal list and see if I can get some > progress on this. > > My guess is that they wouldn't mant to put python into the > system at least until python is no longer "beta". From wilsona@earthlink.net Fri Apr 2 20:47:14 1999 From: wilsona@earthlink.net (Anthony L. Wilson) Date: Fri, 02 Apr 1999 15:47:14 -0500 Subject: [Pythonmac-SIG] Using Python or Java for data analysis(no flame wars please) Message-ID: <37052CD1.C31620EA@thinkapple.com> Hello, At this time I am posing a question to the readers/users/developers on these various newsgroups and mailing lists. At the moment I am contemplating development of a small - medium size application. I am contemplating using either Python or Java. I do not wish this to be flame war on which is a better language, but I would like some serious comments on aspects of each language as it applies to the application that I am trying to develop. My background consists of Fortran and C programming with some Python and Java. Why use Python or Java? Because I would to have the gui part and the platform portability given by the two(more on this later) along with learning a new language. i have used Python more so then Java. This has been on my Macintosh and Linux machine. Why Python? In using Python, I have found it to be simple to use and understand, yet powerful. With NumPy, for numerical extensions, and access to plotting libs like DISLIN, PLplot, PGplot, GNU plotutils, BLT, Gist, and Gnuplot OpenGL(based on website) Python presents several features that I would like to utilize. Along with the GUI frameworks that Python uses: Tkinter, wxPython, and PyGtk.The problem here is speed and cross platform( limitied plotting and GUI libs for Macintosh port of Python) Why Java? Java presents several areas that my be utilized with the main one being the new 2D API. It also has a standard built in GUI system. There are numerical facilities that will be useful. Plotting may be a problem, but once its implemented, it should run on any Java VM(right??). Why not do a mix? Use JPython. This is a thought that I am considering. Please give pros and cons based on criteria/feature list below. First, I will give a general overview of what I am thinking about. Anyone with pointers on something similar please let me know. I would hate to re-invent the wheel, unless I had to. Application Overview: I would like to develop a data analysis tool for viewing/manipulating circuit simulation data, i.e. a post processor. Basically, I need to be able to read-in/parse the data ( all 2-d data) which is in a general form produced by a simulation run( there is a common format for all SPICE simulators). The numbers will mostly be of type float, but may also be in engineering notation. I need to be able to plot the data( 2-d, lin-lin, log-lin, lin-log, log-log, and smith charts). I would also need to be able access the data for interactive analysis( fft, curve fitting, time series analysis, etc). I would also need access to the basic math and trig functions( +, -, *, / , ^, sin, cos, tan, asin, acos, atan, etc). This should all be implemented via a GUI front-end. If you are familiar with HSPICE(tm) or CADENCE Design Tools(tm), then this would be similar to their calculator tools. Basically I am looking at a graphing calculator with data analysis aspects with a GUI front-end. General Needs: ------------- GUI Support Numerial Support with analysis routines File I/O Support 2-D plotting support Targeted Platforms: Macintosh(PowerPC only) and Linux Current Machine Configurations: ------------------------ Mac OS 8.5 MRJ 2.1.1 and Metrowerks Codewarrior Pro 4 MacPython 1.5.1 w/ NumPy RedHat Linux 5.2 Linux Java SDK 1.1.7 from Blackdown.Org Python 1.5.1 w/ NumPy Feature List ---------- Things that I would appreciate some comments about in respect to Python and/or Java implementation. These are in order of importance. Please indicate which platform(Macintosh or Linux), if feature can only be implemented on that platform, and language implementation. 1). File Input parsing into some usable form 2). 2 -D plotting. This would also include interactive labeling and such. 3). X-Y labeling 4). GUI for the calculator front end 5). Numerical Analysis Support. for data processing 6). speed 7). Application delivery. Final product as an application for others to use. I know this is a bit much for a single person development, but I would like to take a shot at developing it using a language that can handle the task. I would definitely prefer not to have to start over in a new language half way through. At the moment, I am leaning towards using Java because of the cross platform and new 2D API support. But Python, I really like and its easier to program using Python. I would appreciate any comments on any aspect of this development. Please only serious commentary. I would like to use the best language for the job. Thanks very much. -anthony wilson http://home.earthlink.net/`wilsona mailto:wilsona@earthlink.net mailto:alwkappa@ThinkApple.com From joe@strout.net Mon Apr 5 18:08:39 1999 From: joe@strout.net (Joseph J. Strout) Date: Mon, 5 Apr 1999 10:08:39 -0700 Subject: [Pythonmac-SIG] Using Python or Java for data analysis(no flame wars please) In-Reply-To: <37052CD1.C31620EA@thinkapple.com> Message-ID: I may be able to point out some very new and upcoming developments of which you are not aware. First is PIDDLE, a portable plug-in drawing module for Python. It is the first truely platform- and medium-independent drawing module available for Python. It's not quite done yet, but it will be done in the next few weeks. See: http://www.strout.net/python/piddle/ Second is a Python plotting package, tentatively named Graphite, which will be built on top of PIDDLE to provide both professional-level printed plots and interactive (onscreen) graphing. This is a 10-week project just now getting underway, and there are no public documents about it yet. However, I think it will be a very powerful and elegant plotting/graphing solution, and it does get you the cross-platform compatibility you seek. That still leaves other GUI elements like menus, buttons, etc., which PIDDLE does not handle. But if you use Tk, you can get fairly good GUI portability, and simply use Graphite via the Tk plug-in renderer for PIDDLE. Best regards, -- Joe Strout ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From cbarker@jps.net Mon Apr 5 21:40:26 1999 From: cbarker@jps.net (Chris Barker) Date: Mon, 05 Apr 1999 13:40:26 -0700 Subject: [Pythonmac-SIG] Re: Using Python or Java for data analysis References: <199904030602.BAA29297@python.org> Message-ID: <37091FBA.81B50B2F@jps.net> This is a reply to anthony wilson's request for comments. First a bit about where I am coming from: I have recently started using Python quite a bit, and like it a lot. I am hoping that I will eventually be able to use it for numerical analysis/number crunching in much the same way I use MATLAB now, except with the ability to distribute apps that are cross platform (Linux, Mac-OS, Windows, and plus ?) I have no experience with JAVA. First to address your questions, from the Python point of view: >1). File Input parsing into some usable form Python's string handling routines make this pretty easy, and I am starting to work on a file scanning module (something like MATLAB's fscanf) that would make it even easier (and faster). Let me know if you would like to work with me on this. >2). 2 -D plotting. This would also include interactive labeling and such. This is the tough one. I have yet to find a plotting package for Python that works on the Mac. There are a couple that look like they could be ported without much pain (Gist, for instance), but no one seems to have done this yet. I need this desperately! I am thinking about a writting a plotting package build on Tkinter's canvas, for maximum portability. Konrad Hinsen's TkPlotCanvas is a good start to this (it's in his Scientific package) Does anyone know the status of the SNOW project? >3). X-Y labeling see above >4). GUI for the calculator front end Tkinter would make this VERY easy. There are nifty GUI GUI-builders for JAVA that might make it even easier, but I've never tried them. >5). Numerical Analysis Support. for data processing NumPy has most (if not all) of what you need, and adding more would not be too hard. I think Python has a real advantage over JAVA here. >6). speed With NumPy, Python would be as fast as anything, at least for the number crunching which is probably the only thing that matters. Tkinter is plenty fast. >7). Application delivery. Final product as an application for others to >use. I'd like to see this easier to do with Python. You would probably have to distribute Python, and all the modules that you need with your app. This might make it a bit messier than it has to be. On Linux, yopu could make a rpm out of it, and it would be pretty easy. On the mac, you could make an installer that would be pretty easy, or even put everything you need into the Resource fork, and make it look like a stand alone app. >At the moment, I am leaning towards using Java because of the cross >platform and new 2D API support. But Python, I really like and its >easier to program using Python. Well, Python is pretty darn Cross Platform as well, with the exception of the plotting packages. Easier to program is worth a lot! >I would appreciate any comments on any aspect of this development. >Please only serious commentary. I would like to use the best language >for the job. Good idea! I'd like to add two points that I think make Python a better choice: 1) Scriptability. If your app will be only a "point and click" affair, JAVA may be a better choice, but if you use Python, you get a complete scripting/macro language in the package! My guess is that with the kind of analysis you are talking about, your users might very well want to enhance/extend the capabilities of your progam, and having the Python interpreter as part of your app would be a great way to do this. Note that if you were to write your app in C or C++, imbedding a Python interpretter would still be a great idea! 2) there are a lot of folks using Python for similar things already, so you would have a whole community of people (at least me, if no-one else!) that you could work with on at least the individual pieces of your program, such as the plotting routines, file I/O, and perhaps some numerical routines. You would also be contributing to a nobel effort! By the way, if you are thinking of going with JAVA, you could also consider just sticking with C++ and WX Windows. It's not "write once,run anywhere" but it could be "write once, compile anywhere" if you are carefull about it! Good luck, -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Tue Apr 6 02:03:07 1999 From: cbarker@jps.net (Chris Barker) Date: Mon, 05 Apr 1999 18:03:07 -0700 Subject: [Pythonmac-SIG] Bug in float() ?? References: <199904030602.BAA29297@python.org> Message-ID: <37095D4B.B0C8D224@jps.net> Hi, I spend a lot of time parsing out formatted text files, and have encountered the following problem: consider this code: import string line = '34.23, 45.43 , 987, 654 ' print line data = string.split(line,',') print data data = map(float,data) print data I run this on my Linux box, and it works just great: 34.23, 45.43 , 987, 654 ['34.23', ' 45.43 ', ' 987', ' 654 '] [34.23, 45.43, 987.0, 654.0] I run in on my Mac, and I get the following: 34.23, 45.43 , 987, 654 ['34.23', ' 45.43 ', ' 987', ' 654 '] Traceback (innermost last): File "", line 1, in ? File "Chris's Machine:Python 1.5.1:test_float.py", line 8, in ? data = map(float,data) ValueError: null byte in argument for float() Clearly, float() doesn't know what to do with the extra spaces that string.split() left in. I know I can just use string.strip() as well, but what bugs me is that I really need my code to be platform independent, so it's a real pain to have code that works on Linux not work on the Mac. By the way, What I really need is a smart and fast formatted file reader, something like MATLAB's fscanf. Anyone want to help me with that? -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From erik@letterror.com Tue Apr 6 09:37:10 1999 From: erik@letterror.com (Erik van Blokland) Date: Tue, 6 Apr 99 10:37:10 +0200 Subject: [Pythonmac-SIG] Bug in float() ?? Message-ID: <199904060836.KAA10869@kalvermarkt.denhaag.dataweb.net> -- Chris Barker, 4/6/99 03 03: >import string > >line = '34.23, 45.43 , 987, 654 ' >print line > >data = string.split(line,',') >print data > >data = map(float,data) >print data I don't think float() works on strings? Nothing to do with whitespace. There's a function in the string module to interpret strings and convert them to floats, atof. data = map(string.atof,data) print data > [34.23, 45.43, 987.0, 654.0] hope this helps. erik erik www.letterror.com From Jack.Jansen@cwi.nl Tue Apr 6 09:57:22 1999 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 06 Apr 1999 10:57:22 +0200 Subject: [Pythonmac-SIG] Over My Head In-Reply-To: Message by Doug Landauer , Thu, 1 Apr 1999 09:53:05 -0800 , Message-ID: Recently, Doug Landauer said: > Python 1.5.2b2 builds and works fine on current internal > versions of Mac OS X Server. I'd sure like to see it get > into the distributions. I'll forward your message to > Wilfredo & the internal list and see if I can get some > progress on this. > Doug, any special issues that are worth mentioning? If so, could you maybe write up a paragraph that I can put on the macpython homepage? Fi there are really no issues at all I'll just put in a one-liner saying that the standard distribution works out of the box. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From Jack.Jansen@cwi.nl Tue Apr 6 10:07:31 1999 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 06 Apr 1999 11:07:31 +0200 Subject: [Pythonmac-SIG] Using Python or Java for data analysis(no flame wars please) In-Reply-To: Message by "Anthony L. Wilson" , Fri, 02 Apr 1999 15:47:14 -0500 , <37052CD1.C31620EA@thinkapple.com> Message-ID: I think it's almost a toss-up whether to use Python or Java. JPython isn't an option for this problem, I think (it _is_ for many other problems), as it doesn't have the plethora of modules (like NumPy) that Python has. Python has NumPy as a strong point, and I don't know about similar packages for Java. Python has the Mac-implementation of Tkinter as a weak point, somehow Tk-applications always feel clunky on the mac (but then, Java applications aren't exactly first class Mac citizens either). On the rest of the questions the languages score about the same (although I don't know how easy it is to create applications from Java. For Python it is a simple drag-and-drop since 1.5.2b1). Maybe you should just pick the language you feel most comfortable with... -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From Jack.Jansen@cwi.nl Tue Apr 6 10:26:03 1999 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 06 Apr 1999 11:26:03 +0200 Subject: [Pythonmac-SIG] Re: Using Python or Java for data analysis In-Reply-To: Message by Chris Barker , Mon, 05 Apr 1999 13:40:26 -0700 , <37091FBA.81B50B2F@jps.net> Message-ID: Recently, Chris Barker said: > >7). Application delivery. Final product as an application for others to > >use. > > I'd like to see this easier to do with Python. *STILL* easier??!? You mean "drag and drop script onto BuildApplication" isn't easy enough?!??!?!? (seriously: since 1.5.2b1 this has indeed become simple drag and drop. Now if you'd have said this last year you would have been right, but not any more...:-) -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From Jack.Jansen@cwi.nl Tue Apr 6 10:56:56 1999 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 06 Apr 1999 11:56:56 +0200 Subject: [Pythonmac-SIG] Bug in float() ?? In-Reply-To: Message by Chris Barker , Mon, 05 Apr 1999 18:03:07 -0700 , <37095D4B.B0C8D224@jps.net> Message-ID: Recently, Chris Barker said: > line = '34.23, 45.43 , 987, 654 ' > print line > > data = string.split(line,',') > print data > > data = map(float,data) > print data [...] > I run in on my Mac, and I get the following: > > 34.23, 45.43 , 987, 654 > ['34.23', ' 45.43 ', ' 987', ' 654 '] > Traceback (innermost last): > File "", line 1, in ? > File "Chris's Machine:Python 1.5.1:test_float.py", line 8, in ? > data = map(float,data) > ValueError: null byte in argument for float() I can't repeat this on my machine. It may be a problem with 1.5.1 that has disappeared in 1.5.2b1, or it could be a 68k-specific problem (I only tested PPC Python, and you don't say which architecture you use). Could you try it with a newer Python, and give some more details on the machine if it is still broken? -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From david_ascher@yahoo.com Tue Apr 6 11:58:30 1999 From: david_ascher@yahoo.com (David Ascher) Date: Tue, 6 Apr 1999 03:58:30 -0700 (PDT) Subject: [Pythonmac-SIG] Re: [Matrix-SIG] Re: [Pythonmac-SIG] Using Python or Java for data analysis(no flame wars please) Message-ID: <19990406105830.24871.rocketmail@web603.mail.yahoo.com> --- Jack Jansen wrote: > I think it's almost a toss-up whether to use Python > or Java. JPython > isn't an option for this problem, I think (it _is_ > for many other > problems), as it doesn't have the plethora of > modules (like NumPy) > that Python has. > > Python has NumPy as a strong point, and I don't know > about similar > packages for Java. I would like to remind folks of Tim Hochberg's effort called JNumeric. I haven't heard much recently about it, but it's IMHO a very worthwhile project. Mailing list archives are at: http://www.egroups.com/list/jnumeric/ --david ascher _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From carrera@wing.net Tue Apr 6 14:35:07 1999 From: carrera@wing.net (Julio Carrerra) Date: Tue, 6 Apr 1999 09:35:07 -0400 (EDT) Subject: [Pythonmac-SIG] Bug in float() ?? In-Reply-To: <199904060836.KAA10869@kalvermarkt.denhaag.dataweb.net> Message-ID: I think that the problem is that float() is a function that turns a NUMBER into a float, not a STRING into a float. -Julio On Tue, 6 Apr 1999, Erik van Blokland wrote: > -- Chris Barker, 4/6/99 03 03: > > >import string > > > >line = '34.23, 45.43 , 987, 654 ' > >print line > > > >data = string.split(line,',') > >print data > > > >data = map(float,data) > >print data > > > I don't think float() works on strings? Nothing to do with whitespace. > There's a function in the string module to interpret strings and convert > them to floats, atof. > > data = map(string.atof,data) > > print data > > [34.23, 45.43, 987.0, 654.0] > > > hope this helps. > erik > > > erik > > www.letterror.com > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://www.python.org/mailman/listinfo/pythonmac-sig > > From wilsona@earthlink.net Tue Apr 6 15:43:51 1999 From: wilsona@earthlink.net (Anthony L. Wilson) Date: Tue, 06 Apr 1999 10:43:51 -0400 Subject: [Pythonmac-SIG] Python Data Analysis and Plotting Message-ID: <370A1DA7.CD01617@thinkapple.com> This is a follow-up message to the response to the topic "Using Python or Java for Data Analysis" It seems that there are two promising projects that may be of use for me: Snow and Piddle. I am glad to see some work is still on-going in this area. In looking at the other packages( http://www.python.org/topics/scicomp/plotting.html ), I could not find one that would fit the bill for running on both Linux and Mac OS. The main reason for inquiring about plotting and such, is to create a set of tools that would complement MacSpice( http://home.earthlink.net/~wilsona/macspice.html) for plotting data and producing presentation quality output. Yes, I know I could use Matlab, Igor Pro, IDL from Research Systems, Inc., or Excel( Arghh!!!), but I wanted something that would be portable across platforms (MacOS, Linux/Unix, Windows) as these are the machines I use most for my real work: circuit simulation, and freely available. Snow ------ It seems Snow, developed by David Ascher, is further along in development for producing output and backend renderers. Thanks for the pointer David( http://starship.python.net:9673/crew/da/Snow ). I liked the sample files. They seem to be able to produce the multiple formats that I am looking for with the multiple axis style. I will try to set this up on my Linux machine and test a few things. If this works, I'll look into setting it up on my Mac. The big hurdle for the Mac will be the use of PyPDF and PDFlib (http://www.ifconnection.de/~tm/software/pdflib/index.html ) that is used by Snow. Any one planning/doing/done work in this area?? Let me know. Questions on Snow: 1. any comments on pursuing this for the Mac? What do I need to set everything up? i.e. MacPython Source, PIL source, PDFlib source, extension module setup, etc. 2. Does Snow require PDFlib to produce GIF, JPEG, and PNG pictures or is this supported by PIL? Piddle ----- Piddle, developed by Joe Strout ( http://www.strout.net/python/piddle/ ) is taking a different approach by making an independent graphics layer that sits on top of the platform specific calls( i.e. backends ). I like this package because of the native calls and MacOS support. Being promoted as a package for producing 2-d graphics. With a plotting package, Graphite, just getting started, this has potential also. Also, due to having native calls, it is mentioned that there may be some capability for interaction by the user. This would be a plus. The capability to annotate after the plot is rendered would be a big plus. But there is only a Quickdraw backend available at the moment. I'll try this one after I look at Snow. Question on Piddle: 1. Any time frame on the other backends? 2. What are the requirements for Piddle? 3. What does Piddle use to produce its PDF output? Both packages have some, but not all (at the moment) of what I am looking for. It would be good to couple the two. Use Piddle as the generic graphics layer( for native on-Screen drawing ) and Snow as the backend for producing the multiple output. I doubt if this is possible in a merged development effort. But once Piddle is further along I plan to look at more closely. Thanks for reponses. -anthony wilson http://home.earthlink.net/~wilsona mailto:wilsona@earthlink.net mailto:alwkappa@ThinkApple.com From just@letterror.com Tue Apr 6 15:50:17 1999 From: just@letterror.com (Just van Rossum) Date: Tue, 6 Apr 1999 16:50:17 +0200 Subject: [Pythonmac-SIG] Bug in float() ?? In-Reply-To: References: <199904060836.KAA10869@kalvermarkt.denhaag.dataweb.net> Message-ID: At 9:35 AM -0400 4/6/99, Julio Carrerra wrote: >I think that the problem is that float() is a function that turns a NUMBER >into a float, not a STRING into a float. All lies... Since 1.5.1 int() and float() also take strings. I've been able to reproduce the bug with Python 1.5.1. Apparently it has been solved in 1.5.2bX. Just From joe@strout.net Tue Apr 6 16:16:19 1999 From: joe@strout.net (Joseph J. Strout) Date: Tue, 6 Apr 1999 08:16:19 -0700 Subject: [Pythonmac-SIG] Re: Python Data Analysis and Plotting In-Reply-To: <370A1DA7.CD01617@thinkapple.com> Message-ID: At 7:43 AM -0700 04/06/99, Anthony L. Wilson wrote: >Piddle >----- >Piddle, developed by Joe Strout ( http://www.strout.net/python/piddle/ ) To be fair, PIDDLE is being developed by a team of people. I'm merely hosting the web pages and writing the QuickDraw backend. >But there is only a Quickdraw backend available at the moment. The PostScript backend is also nearly done, and has replicated the sample outputs posted on the PIDDLE page, but I haven't linked it up yet. >Question on Piddle: >1. Any time frame on the other backends? In addition to the QuickDraw and PostScript backends, we have folks on the team working on Tk, Windows, and PDF backends. These should be done in the next week or two. >2. What are the requirements for Piddle? Python 1.5.2(b1), though that could be relaxed if necessary (we're using the new list .extend method in a place or two). That's all that is required to use Piddle with PostScript and PDF, I believe. The QuickDraw version requires QuickDraw; the Tk version requires Tkinter; the Windows version works only under Windows. Also planned, but not yet implemented, are a PIL version that draws directly to a PIL pixel map, and a GIF backend that writes to a GIF file (though you could do this via PIL, if we get that done first). >3. What does Piddle use to produce its PDF output? It writes PDF directly via its PDF backend. >Both packages have some, but not all (at the moment) of what I am >looking for. It would be good to couple the two. Use Piddle as the >generic graphics layer( for native on-Screen drawing ) and Snow as the >backend for producing the multiple output. David's involved in the development of PIDDLE, and I'm keeping up on the development of Snow, so it is indeed possible that these two will get together somehow. Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From david_ascher@yahoo.com Tue Apr 6 16:48:36 1999 From: david_ascher@yahoo.com (David Ascher) Date: Tue, 6 Apr 1999 08:48:36 -0700 (PDT) Subject: [Pythonmac-SIG] Re: Python Data Analysis and Plotting Message-ID: <19990406154836.22378.rocketmail@web604.mail.yahoo.com> --- "Anthony L. Wilson" wrote: > This is a follow-up message to the response to the topic "Using Python > or Java for Data Analysis" > > It seems that there are two promising projects that may be of use for > me: Snow and Piddle. I am glad to see some work is still on-going in > this area. In looking at the other packages( > http://www.python.org/topics/scicomp/plotting.html ), I could not find > one that would fit the bill for running on both Linux and Mac OS. The > main reason for inquiring about plotting and such, is to create a set of > tools that would complement MacSpice( > http://home.earthlink.net/~wilsona/macspice.html) for plotting data and > producing presentation quality output. Yes, I know I could use Matlab, > Igor Pro, IDL from Research Systems, Inc., or Excel( Arghh!!!), but I > wanted something that would be portable across platforms (MacOS, > Linux/Unix, Windows) as these are the machines I use most for my real > work: circuit simulation, and freely available. > > Snow > ------ > It seems Snow, developed by David Ascher, is further along in > development for producing output and backend renderers. Thanks for the > pointer David( http://starship.python.net:9673/crew/da/Snow ). I liked > the sample files. They seem to be able to produce the multiple formats > that I am looking for with the multiple axis style. I will try to set > this up on my Linux machine and test a few things. If this works, I'll > look into setting it up on my Mac. The big hurdle for the Mac will be > the use of PyPDF and PDFlib > (http://www.ifconnection.de/~tm/software/pdflib/index.html ) that is > used by Snow. Any one planning/doing/done work in this area?? Let me > know. I plan on replacing the use of PDFlib with PDFgen, a Python-only framework being developed by Andy Robinson. In fact I already have a back-end for Snow which uses PDFgen, but am waiting for release until PDFgen is upgraded to include such features as rotated text and color control. I don't expect this to be a long-term problem. In the meantime the PS/EPS back-end should work fine on the mac. > Questions on Snow: > 1. any comments on pursuing this for the Mac? What do I need to set > everything up? i.e. MacPython Source, PIL source, PDFlib source, > extension module setup, etc. It depends on which back-end you wish to use. For PS/EPS, all you should need is NumPy. For bitmap output, PIL binaries should be ok (but I don't know where they are -- you may need PIL 1.0b1 or later). For PDF, I'd recommend waiting until PDFgen is available. See comments below on a GUI/interactive version and the issues involved. > 2. Does Snow require PDFlib to produce GIF, JPEG, and PNG pictures or > is this supported by PIL? The latter. PIL is great. =) FYI#1: PIDDLE is quite promising -- I plan to provide a PIDDLE back-end to Snow at some point -- there are some things which Snow needs which Piddle doesn't provide in version 1.0 (such as arbitrary rotation of text and clipping), but that won't be a problem for many plots. In other words, Snow and Piddle aren't mutually incompatible, and Piddle is probably going to be a very good way to get Snow output on the mac (either the QD or Tkinter back-end to piddle). I'm willing to remove my back-ends and plug in Piddle if/when it's an appropriate replacement. I haven't yet started work on said back-end. (at this point, I think that there are enough back-ends for Snow to be a good proof-of- concept of the back-end architecture -- more urgent work lies elsewhere). FYI#2: There is a very undocumented Piddle-like set of classes in Snow, which has a similar approach but slightly different API, with more emphasis on multiple coordinate sets and "state-setting" objects, paths as 'higher-class' objects than in PIDDLE, etc. Not at all to claim that the code in popy.py and *Device.py in Snow is better than Piddle -- just a slightly different approach. FYI#3: on the GUI front I have an PyOpenGL back-end for snow which is not ready for distribution but which I've used in the past as part of a GUI for an interactive function plotter (shown at the last IPC conference), and I may add a Tkinter-only back-end if I can't fit the Piddle+Tk system in it neatly. My personal plans are to build up a GUI which uses Tkinter for buttons and menus and the like and to use PyOpenGL in a Tk window for the output/mouse input. I find OpenGL to be both fast and very high quality. The only problem with OpenGL is that there is currently no version of Togl (the OpenGL in a Tk widget widget) for the Mac. Also FYI -- simple back-ends like PDFgen, PIL, and PS, take about 2 hours to get 90% of the functionality. The part of the back-end which allows interactivity is not yet that well defined. The part of the back-end which knows about 3-D is nonexistent. Further along the way lie plans for a GUI based on Swing+Java2D (or maybe 3D) output on top of JPython. I'd be curious to hear of any progress in getting Snow to work on the Mac, and I'll try to help with such efforts, but I don't have access to a programming setup on the mac, and my Mac hacking days predate my Python era. --david PS: I am hoping to have quite a bit more time to devote to Snow in April/May. Expect to see the beginning of doc, code cleanup, and more graph types. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From w_keller@gmx.de Tue Apr 6 18:06:46 1999 From: w_keller@gmx.de (Wolfgang Keller) Date: Tue, 6 Apr 1999 19:06:46 +0200 Subject: [Pythonmac-SIG] mxDateTime precompiled binary? Message-ID: Hello, I was looking for an easy way to add/subtract/etc. date and time data and fund the mxDateTime module. But although a precompiled binary for PythonMac is mentioned on the WWW-site of the author, I couldn't find it... Am I just blind :-) or does it really not exist? If not, what could I use instead (I don't have Codewarrior to compile the sources myself)? All I need is to do basic operations (+, -, *, /, round, etc.) with date and time information efficiently. TIA, Regards, Wolfgang Keller Zu Risiken und Nebenwirkungen von Junkmail lesen Sie de.admin.net-abuse.mail und fragen sie Ihren Postmaster oder Provider From joe@strout.net Tue Apr 6 21:09:39 1999 From: joe@strout.net (Joseph J. Strout) Date: Tue, 6 Apr 1999 13:09:39 -0700 Subject: [Pythonmac-SIG] mxDateTime precompiled binary? In-Reply-To: Message-ID: I know it exists, because I'm the guy who compiled it. Oops, I volunteered to keep a list of Python extensions available for MacOS, didn't I? So I guess I can't fault you for not providing the URL... but I confess that I no longer have it handy. Anyway, I know Marc-Andre has the compiled mxDateTime extension for MacOS. I believe it's included in the main distribution (for 1.1 -- which he may or may not have released yet). If you still can't find it, contact him, and if he's no help contact me and I'll hassle him myself. ;) Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From w_keller@gmx.de Wed Apr 7 02:34:41 1999 From: w_keller@gmx.de (Wolfgang Keller) Date: Wed, 7 Apr 1999 03:34:41 +0200 Subject: [Pythonmac-SIG] PythonIDE - debugger problems Message-ID: Hello, and yet another question... :-) I'm currently playing around with the nntplib module, and when I tried to debug a script that, among others, fetches a full group list from my provider's newsserver, I found out that the debuger of the PythonIDE does not seem to 'like' tupels, lists, dictionaries, etc. with lots of items. Before the script fetches the list, starting up the debugger and stepping through the code goes instantly. But once I have the full list with > 10000 items assigned to a variable, it takes ages (several minutes for starting the debugger, each step, etc.). I guess that this is due to the fact that the browser panes display the values of all local and global variables (in my case, they are few, but large) all the time and update them at each step. If so, would there be any problem (apart from the fact that someone has to do it :-)) to change this behaviour to display only the name and type/class of the variables all the time and display the values of a selected variable only on request? For example, in a fourth pane on the right in the top row? Or am I comepletly missing the point and the slowdown I experience is due to /something completely different/? :-) TIA, regards, Wolfgang Keller Zu Risiken und Nebenwirkungen von Junkmail lesen Sie de.admin.net-abuse.mail und fragen sie Ihren Postmaster oder Provider From savageb@pacbell.net Wed Apr 7 05:47:04 1999 From: savageb@pacbell.net (savageb) Date: Tue, 06 Apr 1999 21:47:04 -0700 Subject: [Pythonmac-SIG] mxDateTime precompiled binary? Message-ID: <0F9S007M6YMH2C@mta2.snfc21.pbi.net> Wolfgang Keller : > I was looking for an easy way to add/subtract/etc. date and time data and > fund the mxDateTime module. But although a precompiled binary for PythonMac > is mentioned on the WWW-site of the author, I couldn't find it... Am I just > blind :-) or does it really not exist? I have been using mxDateTime ever since Joe Strout considerately compiled it. I think the website is a little confusing in the way it is phrased because it seems you are looking for a seperate package, but in fact the Mac binary is included in the regular archive. It works great! I really enjoy using it. It makes many things I do *much* easier. Thanks again, Joe! Bob From savageb@pacbell.net Wed Apr 7 06:02:08 1999 From: savageb@pacbell.net (savageb) Date: Tue, 06 Apr 1999 22:02:08 -0700 Subject: [Pythonmac-SIG] Drag & Drop (was: Using Python or Java for data analysis) Message-ID: <0F9S0075XZBL2C@mta2.snfc21.pbi.net> Jack Jansen : > > Recently, Chris Barker said: >> >7). Application delivery. Final product as an application for others to >> >use. >> >> I'd like to see this easier to do with Python. > > *STILL* easier??!? You mean "drag and drop script onto > BuildApplication" isn't easy enough?!??!?!? > > (seriously: since 1.5.2b1 this has indeed become simple drag and > drop. Now if you'd have said this last year you would have been right, > but not any more...:-) I had a wierd problem or two using the drag & drop method, so I just "Save as applet..." which works quite well. What I found was if I selected PowerPC only as the type of application to build, it just didn't work (if I remember it quit without any errors, but no application was built -- or it might have been an out of memory error). I might have had a problem with the FAT building method too, but I started "save as"-ing and never really went back. Bob From maccgi@bellsouth.net Wed Apr 7 18:57:56 1999 From: maccgi@bellsouth.net (Richard Gordon) Date: Wed, 7 Apr 1999 13:57:56 -0400 Subject: [Pythonmac-SIG] Python Distributables? In-Reply-To: <37091FBA.81B50B2F@jps.net> References: <199904030602.BAA29297@python.org> <37091FBA.81B50B2F@jps.net> Message-ID: [This is actually an offshoot from the "Using Python or Java for data analysis" thread- RG] At 13:40 -0700 4/5/1999, Chris Barker wrote: > >7). Application delivery. Final product as an application for others to > >use. > >I'd like to see this easier to do with Python. You would probably have >to distribute Python, and all the modules that you need with your >app. This might make it a bit messier than it has to be. On Linux, yopu >could make a rpm out of it, and it would be pretty easy. On the mac, you >could make an installer that would be pretty easy, or even put >everything you need into the Resource fork, and make it look like a >stand alone app. I am very interested in this aspect of Python, but am also very confused. I have a fairly small, single purpose app that I originally developed in Perl with the intent of selling it over the internet. I ultimately concluded that Perl was not the way to go with this because a) providing a GUI for Mac and Windows meant doing everything twice using dissimilar tools and b) Perl is too open to be of any use in a shareware application. So I got interested in Python because of tkinter and because I understood that distributables could be byte code compiled which would make it at least a little harder for some kid in a dorm room to rip me off. But I'm very fuzzy about what would be required in the actual distribution in order for it to run x-platform (I'm omitting Linux as a target because Linux users are unlikely to be very interested in paying for something that they could probably figure out on their own). Anyway, this is just a text manipulation utility and doesn't do anything especially elaborate, but would be of interest to anyone who has to import data into a database or spreadsheet and doesn't understand grep or is too lazy to develop their own solution (i.e., most Mac users and virtually all Windows users). Ideally, a distributable would use identical code (with some platform branching perhaps), would not require a full Python install, and would only include the bare essentials as far as modules are concerned. Any thoughts? Richard Gordon -------------------- Gordon Consulting & Design Database Design/Scripting Languages mailto://maccgi@bellsouth.net 770.565.8267 From just@letterror.com Wed Apr 7 19:12:47 1999 From: just@letterror.com (Just van Rossum) Date: Wed, 7 Apr 1999 20:12:47 +0200 Subject: [Pythonmac-SIG] Python Distributables? In-Reply-To: References: <37091FBA.81B50B2F@jps.net> <199904030602.BAA29297@python.org> <37091FBA.81B50B2F@jps.net> Message-ID: At 1:57 PM -0400 4/7/99, Richard Gordon wrote: >Ideally, a distributable would use identical code (with some platform >branching perhaps), would not require a full Python install, and >would only include the bare essentials as far as modules are >concerned. Any thoughts? Look at macfreeze and the BuildApplication applet in the 1.5.2b1 distribution. Just From Jack.Jansen@cwi.nl Wed Apr 7 21:19:12 1999 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Wed, 07 Apr 1999 22:19:12 +0200 Subject: [Pythonmac-SIG] Looking for hackers Message-ID: Folks, as you may be aware (or may not) I'm pretty busy lately with our internet-based multimedia editor GRiNS, which is of course 100% written in Python. As this is going to be commercial software we've come up with a key-protected license scheme, but of course every such scheme is only as good as whatever the author (i.e. me:-) thought of at the time. So, right now I'm looking around for hackers with a bit of free time to have a look at our licensing scheme to see if they can break into it. The grand prize (haha) is a free license to the GRiNS editor (which, of course, you'll need because I'll quickly plug any leaks you find). If anyone is interested in giving this a try please let me know, -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From joe@strout.net Wed Apr 7 21:12:46 1999 From: joe@strout.net (Joseph J. Strout) Date: Wed, 7 Apr 1999 13:12:46 -0700 Subject: [Pythonmac-SIG] next release? Message-ID: Jack, Just, & others who may be involved... any hint as to when the next release of MacPython is coming? My wife just downloaded the 1.5.2b1, and is exploring, but she keeps stumbling over errors in the IDE, omissions in the Mac toolbox files, etc., which have all been fixed internally but not released. In addition, the QuickDraw backend for PIDDLE more or less requires the latest version, since it refers to font constants etc. which are not included in 1.5.2b1. So I'm hoping to hear that there will be a 1.5.2b2 (or 1.5.2b1.1, whatever) very soon... Thanks, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From bsavage@stanford.edu Fri Apr 9 00:08:32 1999 From: bsavage@stanford.edu (Bob Savage) Date: Thu, 08 Apr 1999 16:08:32 -0700 Subject: [Pythonmac-SIG] MacOS X Server( was: Over My Head ) References: <0F9U003O9WFIPA@mta3.snfc21.pbi.net> Message-ID: <370D36F0.7937E339@stanford.edu> Recently there has been some discussion about using Python on MacOS X Server. I have just confirmed the version which ships on the third party CD is version 1.4 :( From john.michelsen@gte.net Sat Apr 10 19:32:43 1999 From: john.michelsen@gte.net (John Michelsen) Date: Sat, 10 Apr 1999 11:32:43 -0700 Subject: [Pythonmac-SIG] Multiple Document Interface Message-ID: <001b01be8380$86eec4c0$3036fdd0@computer> This is a multi-part message in MIME format. ------=_NextPart_000_0018_01BE8345.D9264AA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, I put a Multiple Document Interface script (MDI.py) at http://www2.zyvex.com/OpenChem/Widgets0.1.zip . I was wondering if anyone could send me a gif of what it looks like on=20 the Mac so that I could do some system specific code for the button icons.=20 Thanks, John ------=_NextPart_000_0018_01BE8345.D9264AA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi all,

I put a Multiple Document Interface script (MDI.py) = at
http://www2.zyvex.= com/OpenChem/Widgets0.1.zip=20 .
I was wondering if anyone could send me a gif of what it looks like = on=20
the Mac so that I could do some system specific
code for the = button=20 icons.

Thanks,
 
John
------=_NextPart_000_0018_01BE8345.D9264AA0-- From john.michelsen@gte.net Sat Apr 10 20:15:20 1999 From: john.michelsen@gte.net (John Michelsen) Date: Sat, 10 Apr 1999 12:15:20 -0700 Subject: [Pythonmac-SIG] Multiple Document Interface Message-ID: <009301be8386$7b1e6b40$3036fdd0@computer> This is a multi-part message in MIME format. ------=_NextPart_000_0090_01BE834B.CD1D7C00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable >Traceback (innermost last): >File "Chinacat:Users:Strout:data:Python = work:OpenChem:gui:Widgets:MDI.py", line 2, in ? >import Pmw, sys >ImportError: No module named Pmw Sorry, it also needs Pmw at: http://www.dscpl.com.au/pmw/ John ------=_NextPart_000_0090_01BE834B.CD1D7C00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
>Traceback (innermost=20 last):
>File "Chinacat:Users:Strout:data:Python=20 work:OpenChem:gui:Widgets:MDI.py", line 2, in ?
>import Pmw,=20 sys
>ImportError: No module named Pmw
 
Sorry, it also needs Pmw = at:
http://www.dscpl.com.au/pmw/
 
John
------=_NextPart_000_0090_01BE834B.CD1D7C00-- From jack@oratrix.nl Mon Apr 12 16:39:03 1999 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 12 Apr 1999 17:39:03 +0200 Subject: [Pythonmac-SIG] Call for contributions Message-ID: <19990412153903.5DE0E37956E@snelboot.oratrix.nl> Folks, as a 1.5.2 release is imminent I'd like to ask everyone who contributed stuff for the Mac:Contrib folder whether they have newer versions that they'd like to contribute for the next release. Also, anyone else who has stuff they'd like to include in the Contrib folder: please send it to me and I'll put it in the distribution. -- 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 jpaint@serv.net Mon Apr 12 17:40:56 1999 From: jpaint@serv.net (Jay Painter) Date: Mon, 12 Apr 1999 09:40:56 -0700 (PDT) Subject: [Pythonmac-SIG] Call for contributions (OSAm) In-Reply-To: <19990412153903.5DE0E37956E@snelboot.oratrix.nl> Message-ID: I'd like to get OSAm in Python 1.5.2; I'd also like to try to squash a very annoying bug that I had using it with Python 1.5.1. Whenever OSAm was running Applescript and I brought the Python window back to the top (activated) Python would lock up and I'd have to kill the process. I believe I'm doing the idle stuff right, but... I havn't tried OSAm with 1.5.2 betas yet. ----------------------------------------------------------------------- Jay Painter -- jpaint@serv.net -- jpaint@gimp.org -- jpaint@real.com http://www.serv.net/~jpaint/ From lmeyn@mail.arc.nasa.gov Wed Apr 14 00:10:59 1999 From: lmeyn@mail.arc.nasa.gov (Larry Meyn) Date: Tue, 13 Apr 1999 16:10:59 -0700 Subject: [Pythonmac-SIG] PythonIDE - Debugger Breakpoints Message-ID: Hello All, I've just upgraded to Mac Python 1.5.2b1 and I ran into problems with the PythonIDE debugger. When I set breakpoints and start execution, the breakpoints do not stop execution and the following error message is output for each breakpoint: "XXX Exception during debugger interaction. KeyError:" Furthermore, when I try to clear breakpoints I get the following message: "TypeError: too many arguments; expected 2, got 3" File "PyDebugger.py", line 563, in clear_break bdb.Bdb.clear_break(self, filename, lineno) Any help resolving this problem would be greatly appreciated. Larry Meyn From joe@strout.net Wed Apr 14 00:33:15 1999 From: joe@strout.net (Joseph J. Strout) Date: Tue, 13 Apr 1999 16:33:15 -0700 Subject: [Pythonmac-SIG] PythonIDE - Debugger Breakpoints In-Reply-To: Message-ID: IIRC, this was a bug in 1.5.2b1 and is fixed in the version to be released Real Soon Now. Along with a bunch of other bugs and feature omissions. So just keep your fingers crossed, send positive energy in the direction of Jack and Just, and hope they get us that release soon! =) Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From w_keller@gmx.de Thu Apr 15 21:49:09 1999 From: w_keller@gmx.de (Wolfgang Keller) Date: Thu, 15 Apr 1999 22:49:09 +0200 Subject: [Pythonmac-SIG] MetaKit for MacPython Message-ID: Jean-Claude Wippler has a beta of MetaKit for MacPython at http://www.equi4.com/metakit/mk4py/ The documentation is for 1.0 - for 1.1, it may be necessary to adjust the "load" command to use "Mk4py" (capitalized) It's 'work in progress', so he's looking for feedback and bugreports... :-) Regards, Wolfgang Keller Zu Risiken und Nebenwirkungen von Junkmail lesen Sie de.admin.net-abuse.mail und fragen sie Ihren Postmaster oder Provider From peter.sommerfeld@gmx.de Sun Apr 18 01:07:36 1999 From: peter.sommerfeld@gmx.de (Peter Sommerfeld) Date: Sun, 18 Apr 1999 02:07:36 +0200 Subject: [Pythonmac-SIG] Module cannot find shared lib Message-ID: Folks, I've downloaded Jean-Claude Wipplers MetaKit for Mac as binary because I have no newer Metrowerks There are 2 components which are installed as follows: - mk4py.PPC.shlb -> PlugIns - MSL RuntimePPC.DLL -> system extentions folder This works on Jean-Claud's Mac with MWPro installed. (DLL sounds like Windoz -- can that be ok ?). But I get (1.5.b1/MacOS 8.01): >>> import mk4py Traceback (innermost last): File "", line 1, in ? ImportError: MSL RuntimePPC++.DLL: The named library was not found. >>> On my side everything should be ok otherwise python wouldn't find PythonCore. Any idea ? thanx -- Peter From peter.sommerfeld@gmx.de Sun Apr 18 01:46:38 1999 From: peter.sommerfeld@gmx.de (Peter Sommerfeld) Date: Sun, 18 Apr 1999 02:46:38 +0200 Subject: [Pythonmac-SIG] Module cannot find shared lib (Follow up) Message-ID: Folks, sorry, skip the preceeding message. I've found the error. Obviously I've mixed up "MSL RuntimePPC++.DLL" with "MSL RuntimePPC.DLL". I saw it when I reread my message. Seems to be a good way of debugging, writing messages ;) sorry again -- Peter From joe@strout.net Mon Apr 19 21:27:54 1999 From: joe@strout.net (Joseph J. Strout) Date: Mon, 19 Apr 1999 13:27:54 -0700 Subject: [Pythonmac-SIG] Nav Services? Message-ID: I need to add Navigation Services to my Python app, and fast. Anybody have any advice for me? I know that 1.5.1b2 doesn't have built-in support for Navigation Services, but I'm hoping that somebody will tell me either (a) it can be done using calldll in a really easy manner, or (b) NavServices will be supported in the next MacPython release, which is coming out in the next two days. ;) Thanks, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From joe@strout.net Tue Apr 20 18:38:02 1999 From: joe@strout.net (Joseph J. Strout) Date: Tue, 20 Apr 1999 10:38:02 -0700 Subject: [Pythonmac-SIG] NavServices: getting there... Message-ID: Well, I have a file that defines a bunch of the Nav Services data structures, and manages to post the new Open File dialog! But now, I don't know what to do with the result. Nav returns its file list as an AEDesc, which I have separated into a descriptor type and handle: >>> reply.selDescriptorType 'list' >>> reply.selDataHandle 58302896L I know Python has the AE and aetools modules for dealing with AEDescs, but I can't figure out how to convert the type and handle (stored as a long int) above into an AEDesc which AE can deal with. It's almost there -- but AE.AECreateDesc requires a pointer, not a handle. I can't find any way to coerce an int to a handle, or even if I could, to convert a handle to a pointer. (Or, for that matter, to lock it as I probably should.) Any tips will be greatly appreciated (and rewarded by earlier release of my NavServices module!). Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From smith@oe.fau.edu Wed Apr 21 14:03:43 1999 From: smith@oe.fau.edu (Samuel Smith) Date: Wed, 21 Apr 1999 09:03:43 -0400 Subject: [Pythonmac-SIG] Tkinter questions Message-ID: I am just getting started using Python. Read the programming python book and much of the docs. I am investigating using python for both a univeristy research project and a commercial project. One of the issues is a cross platform GUI (linux,windows, mac) Looks like Tk is the likely candidate. I am impressed with the clean design of the Python language and can see a lot of potential for its use. I run a large research program at the University and I think we could seriously contribute to the Python community. However I need help understanding more about how well the Python open source support works. So far everything we have done is C (Unix Linux Windows VxWorks Qnx) In fact the QNX port for Python makes it something we can use for our autonomous underwater vehicles. Questions: Is there complete documentation for Tkinter someplace? ( I have read the html pages on pkware's web site its good but not complete) I found a lot of detail in a Tk book that is not apparent in the Tkinter docs ("Practical programming in Tcl and Tk). Is all of Tk supported ( I assume so but its not clear how or if Tkinter does some things) How extensive is the group of people supporting Tkinter? Is there a committment to continue to support Tk as the default GUI for Python like it is for TCL and Perl? I see references to several different Python applications that must use a GUI. How prevalent is Tkinter usage? Mac Tkinter Newbie problems: I am asking questions for the Mac mainly because 1) I prefer macs, if given a choice. 2) I am testing the waters for the activily level of the Python community, and it appears that mac support is weakest in Python so this is a worst case test. When I run the tutorial Tkinter examples in Mac Python I found the following problems: The python menubar gets replaced with a new menu bar who's menus apparently do nothing. I can't quit python once I close a Tkinter window (the Tkinter menu bar stays on the screen) The only way I could figure out to quit python was to do a sys.exit(). I bound sys.exit to my Tk quit button but that doesn't work for the close box on the window title bar. It seems that I should be able to close a Tk window without having to do a sys.exit() that kills python as well. Why does Tkinter put up a new menu bar by default and I do I disable it. (I suppose once I get far enough into Tk I can define my own menubar somehow and override it but it seems to me that by default Tkinter should do something friendly with the menu bar. I read the Tkinter.py file and could not find any code that creates this new menubar. Where is it made? in _tkinter? Tk docs refer to a resource file. How is this supported on the Mac. (Other platforms) I crashed my system a couple of times using Tk with the Mac IDE (Just Van Rossum's) Is this a serious incompatiblity problem or something that can be fixed with a little debugging) Appreciatively Sam, ********************************** Samuel M. Smith Ph.D. Associate Professor Director Advanced Marine Systems Lab **************(Dania Building)*********************** Institute for Ocean and Systems Engineering Florida Atlantic University Rm. 225 B, SeaTech Bldg. 101 North Beach Road, Dania, FL 33004 (voice) 954-924-7232 (secretary Paula) 954-924-7230 (fax) 954-924-7233 (email) smith@oe.fau.edu (web) http://www.oe.fau.edu ************** (Boca Raton Campus) ******************* Ocean Engineering Dept. Bldg. 36 Florida Atlantic University 777 Glades Rd, Boca Raton FL 33431 (voice) 561-297-3606 (reception) 561-297-3430 (fax) 561-297-3885 (email) smith@oe.fau.edu (web) http://www.oe.fau.edu *********************************** From jack@oratrix.nl Wed Apr 21 15:15:36 1999 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 21 Apr 1999 16:15:36 +0200 Subject: [Pythonmac-SIG] Tkinter questions In-Reply-To: Message by Samuel Smith , Wed, 21 Apr 1999 09:03:43 -0400 , Message-ID: <19990421141537.28ED6300F57@snelboot.oratrix.nl> Samuel, you should probably also ask your non-mac-specific Tkinter questions in the general Python mailinglist/newsgroup, where you have a much better chance of an answer. I'll stick to answering the mac things I know about: > The python menubar gets replaced with a new menu bar who's menus apparently > do nothing. This is a Tk problem, and I think there's little I can do about it. > I can't quit python once I close a Tkinter window (the Tkinter menu bar > stays on the screen) The only way I could figure out to quit python was to > do a sys.exit(). I bound sys.exit to my Tk quit button but that doesn't > work for the close box on the window title bar. There used to be a workaround for this, which re-installed the Python menubar. Unfortunately it stopped working some time in the past. I'll see whether I can do something about it. > Tk docs refer to a resource file. How is this supported on the Mac. (Other > platforms) Could you give me a pointer? I'm not familiar with what Tk calls resource files... > I crashed my system a couple of times using Tk with the Mac IDE (Just Van > Rossum's) Is this a serious incompatiblity problem or something that can be > fixed with a little debugging) This is an incompatability that is probably pretty difficult to fix. Both Tk and IDE fight over the eventloop, the menubar, window ownership and a few other things. It shouldn't crash your system, though, at most it should crash Python:-) -- 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 sdm7g@virginia.edu Wed Apr 21 21:24:06 1999 From: sdm7g@virginia.edu (Steven D. Majewski) Date: Wed, 21 Apr 1999 16:24:06 -0400 (EDT) Subject: [Pythonmac-SIG] Tkinter questions In-Reply-To: Message-ID: I haven't touched Tkinter on the Mac for a while -- I've been using EasyDialogs and other mac toolbox calls lately, but I didn't remember having such problems, so I gave it a try, and it seems to be really broken. What happened ? ( Did something happen, or am I mistakenly misremembering a 'golden age' when the demo's actually ran without crashing. ( Well -- most of them! ) ? ) On Wed, 21 Apr 1999, Samuel Smith wrote: > Mac Tkinter Newbie problems: > > I am asking questions for the Mac mainly because 1) I prefer macs, if given > a choice. 2) I am testing the waters for the activily level of the Python > community, and it appears that mac support is weakest in Python so this is > a worst case test. > > When I run the tutorial Tkinter examples in Mac Python I found the > following problems: > > The python menubar gets replaced with a new menu bar who's menus apparently > do nothing. > > I can't quit python once I close a Tkinter window (the Tkinter menu bar > stays on the screen) The only way I could figure out to quit python was to > do a sys.exit(). I bound sys.exit to my Tk quit button but that doesn't > work for the close box on the window title bar. > > > It seems that I should be able to close a Tk window without having to do a > sys.exit() that kills python as well. > > Why does Tkinter put up a new menu bar by default and I do I disable it. (I > suppose once I get far enough into Tk I can define my own menubar somehow > and override it but it seems to me that by default Tkinter should do > something friendly with the menu bar. > > I read the Tkinter.py file and could not find any code that creates this > new menubar. Where is it made? in _tkinter? > ---| Steven D. Majewski (804-982-0831) |--- ---| Department of Molecular Physiology and Biological Physics |--- ---| University of Virginia Health Sciences Center |--- ---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- Caldera Open Linux: "Powerful and easy to use!" -- Microsoft(*) (*) From sdm7g@virginia.edu Wed Apr 21 23:10:44 1999 From: sdm7g@virginia.edu (Steven D. Majewski) Date: Wed, 21 Apr 1999 18:10:44 -0400 (EDT) Subject: [Pythonmac-SIG] Tkinter questions In-Reply-To: Message-ID: As noted in previous message: I've been using native Mac toolbox lately and haven't been using Tkinter on mac for a while, but I dug out some old Tkinter code and tried it. It looks like this behaviour may be due to the changes in Tk 8.0.x to support Mac style menu's. I don't think the earlier versions behaved like this. It looks like when you create a Tk root: root = Tkinter.Tk() that Python's menu bar get's overwritten with Tk's menu default menu bar. If you look at the apple menu, just before that call, you have 'About Python', and right after, you have 'About Tcl & Tk' . The Tk menus, however, won't do anything until you run the mainloop: root.mainloop() Then, when you QUIT from the Tk menubar, the Python menubar reappears. However, the Python interpreter has terminated, so you can't type in the listener window, but you can QUIT the Python app, or select 'About Python' from the apple menu. Earlier versions of Tk didn't support the Mac style single menu bar -- you got a Tk style menu bars in each window. I didn't notice this problem in Wish, as there, as in Python, the default menu bar is the default unless you explicitly change it. In this case though, what we're getting is Python's default menubar (and behaviour) being replaced with Tk's default menubar. I don't yet know if there is a simple way around this problem. - Steve M. On Wed, 21 Apr 1999, Samuel Smith wrote: > Mac Tkinter Newbie problems: > > I am asking questions for the Mac mainly because 1) I prefer macs, if given > a choice. 2) I am testing the waters for the activily level of the Python > community, and it appears that mac support is weakest in Python so this is > a worst case test. > > When I run the tutorial Tkinter examples in Mac Python I found the > following problems: > > The python menubar gets replaced with a new menu bar who's menus apparently > do nothing. > > I can't quit python once I close a Tkinter window (the Tkinter menu bar > stays on the screen) The only way I could figure out to quit python was to > do a sys.exit(). I bound sys.exit to my Tk quit button but that doesn't > work for the close box on the window title bar. > > > It seems that I should be able to close a Tk window without having to do a > sys.exit() that kills python as well. > > Why does Tkinter put up a new menu bar by default and I do I disable it. (I > suppose once I get far enough into Tk I can define my own menubar somehow > and override it but it seems to me that by default Tkinter should do > something friendly with the menu bar. > > I read the Tkinter.py file and could not find any code that creates this > new menubar. Where is it made? in _tkinter? > > Tk docs refer to a resource file. How is this supported on the Mac. (Other > platforms) > > > I crashed my system a couple of times using Tk with the Mac IDE (Just Van > Rossum's) Is this a serious incompatiblity problem or something that can be > fixed with a little debugging) > ---| Steven D. Majewski (804-982-0831) |--- ---| Department of Molecular Physiology and Biological Physics |--- ---| University of Virginia Health Sciences Center |--- ---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- Caldera Open Linux: "Powerful and easy to use!" -- Microsoft(*) (*) From peter.sommerfeld@gmx.de Thu Apr 22 01:47:26 1999 From: peter.sommerfeld@gmx.de (Peter Sommerfeld) Date: Thu, 22 Apr 1999 02:47:26 +0200 Subject: [Pythonmac-SIG] Tkinter questions In-Reply-To: References: Message-ID: A wild guess (don't have TK installed) That looks like similar problems I had when running another event loop under the IDE, How about storing and restoring the menubar ? # store oldBar = Menu.GetMenuBar() # run TK # restore Menu.ClearMenuBar() Menu.SetMenuBar(oldBar) Menu.DrawMenuBar() -- Peter Steven D. Majewski wrote: >It looks like this behaviour may be due to the changes in Tk 8.0.x to >support Mac style menu's. I don't think the earlier versions behaved >like this. > >It looks like when you create a Tk root: > root = Tkinter.Tk() > >that Python's menu bar get's overwritten with Tk's menu default menu bar. >If you look at the apple menu, just before that call, you have 'About >Python', and right after, you have 'About Tcl & Tk' . > >The Tk menus, however, won't do anything until you run the mainloop: > root.mainloop() > >Then, when you QUIT from the Tk menubar, the Python menubar reappears. >However, the Python interpreter has terminated, so you can't type in >the listener window, but you can QUIT the Python app, or select 'About >Python' from the apple menu. From smith@oe.fau.edu Thu Apr 22 14:42:48 1999 From: smith@oe.fau.edu (Samuel Smith) Date: Thu, 22 Apr 1999 09:42:48 -0400 Subject: [Pythonmac-SIG] Re: Pythonmac-SIG digest, Vol 1 #166 - 5 msgs In-Reply-To: <199904220502.BAA14013@python.org> Message-ID: Jack >Samuel, >you should probably also ask your non-mac-specific Tkinter questions in the >general Python mailinglist/newsgroup, where you have a much better chance of >an answer. > >I'll stick to answering the mac things I know about: > >> The python menubar gets replaced with a new menu bar who's menus apparently >> do nothing. > >This is a Tk problem, and I think there's little I can do about it. > Are you the one who built the Python Mac Tk library? I have about 4 years experience programming the Mac toolbox. although it has been a few years since I had done any mac development so I am pretty rusty. If someone can point me in the right direction as to the process of porting Tk to python maybe I can help. It appears that Tk defaults to creating a menu bar etc. There are some issues with the programming model. The python interpreter is an application in its own right. If I run the tk gui should it be its own application or should it live within the interpreters application. >> I can't quit python once I close a Tkinter window (the Tkinter menu bar >> stays on the screen) The only way I could figure out to quit python was to >> do a sys.exit(). I bound sys.exit to my Tk quit button but that doesn't >> work for the close box on the window title bar. > >There used to be a workaround for this, which re-installed the Python >menubar. >Unfortunately it stopped working some time in the past. I'll see whether I >can >do something about it. > great > >> Tk docs refer to a resource file. How is this supported on the Mac. (Other >> platforms) > >Could you give me a pointer? I'm not familiar with what Tk calls resource >files... > quote from Prac. Prog. in TCL/TK " The resource database in maintained in main memory by the TK toolkit. On UNIX the database is initialized from the RESOURCE_MANAGER property on the root window or the .Xdefaults file in your home directory. On Windows and Macintosh there are a few resources added by the tk.tcl library file. Additional files can be explicitly loaded with the option readfile command and individual database entries are added with the option add Tcl command. " Basically it enables you to specify attributes for widgets in a resource file instead of hard coded. I would think that this behavior could be replicated using the native macintosh resource fork. I could find no reference to a similar "option readfile" command to get attributes from the resource database. >This is an incompatability that is probably pretty difficult to fix. Both Tk >and IDE fight over the eventloop, the menubar, window ownership and a few >other things. It shouldn't crash your system, though, at most it should crash >python I get (paraphrased) a python error that says something like " menu Id 254 already in use. fatal python error" and I have to reboot my mac to recover. Steven > >As noted in previous message: I've been using native Mac toolbox lately >and haven't been using Tkinter on mac for a while, but I dug out some >old Tkinter code and tried it. > >It looks like this behaviour may be due to the changes in Tk 8.0.x to >support Mac style menu's. I don't think the earlier versions behaved >like this. > >It looks like when you create a Tk root: > root = Tkinter.Tk() > >that Python's menu bar get's overwritten with Tk's menu default menu bar. >If you look at the apple menu, just before that call, you have 'About >Python', and right after, you have 'About Tcl & Tk' . yes thats what I get. > >The Tk menus, however, won't do anything until you run the mainloop: > root.mainloop() > >Then, when you QUIT from the Tk menubar, the Python menubar reappears. >However, the Python interpreter has terminated, so you can't type in >the listener window, but you can QUIT the Python app, or select 'About >Python' from the apple menu. > I can't quit from the tk menubar > Peter, >A wild guess (don't have TK installed) > >That looks like similar problems I had when running >another event loop under the IDE, How about storing >and restoring the menubar ? > I will try it. I thought there was probably some way to override the default menu bar creation. It just seemed that I should be able to run the hello world demo without crashing my system ># store >oldBar = Menu.GetMenuBar() > ># run TK > ># restore >Menu.ClearMenuBar() >Menu.SetMenuBar(oldBar) >Menu.DrawMenuBar() > >-- Peter ********************************** Samuel M. Smith Ph.D. Associate Professor Director Advanced Marine Systems Lab **************(Dania Building)*********************** Institute for Ocean and Systems Engineering Florida Atlantic University Rm. 225 B, SeaTech Bldg. 101 North Beach Road, Dania, FL 33004 (voice) 954-924-7232 (secretary Paula) 954-924-7230 (fax) 954-924-7233 (email) smith@oe.fau.edu (web) http://www.oe.fau.edu ************** (Boca Raton Campus) ******************* Ocean Engineering Dept. Bldg. 36 Florida Atlantic University 777 Glades Rd, Boca Raton FL 33431 (voice) 561-297-3606 (reception) 561-297-3430 (fax) 561-297-3885 (email) smith@oe.fau.edu (web) http://www.oe.fau.edu *********************************** From smith@oe.fau.edu Thu Apr 22 15:26:29 1999 From: smith@oe.fau.edu (Samuel Smith) Date: Thu, 22 Apr 1999 10:26:29 -0400 Subject: [Pythonmac-SIG] Tkinter questions Message-ID: Peter >From: Peter Sommerfeld >Subject: Re: [Pythonmac-SIG] Tkinter questions > >A wild guess (don't have TK installed) > >That looks like similar problems I had when running >another event loop under the IDE, How about storing >and restoring the menubar ? > ># store >oldBar = Menu.GetMenuBar() > ># run TK > ># restore >Menu.ClearMenuBar() >Menu.SetMenuBar(oldBar) >Menu.DrawMenuBar() This does not work. The system crashes when I call .mainloop(). I now can't get v 1.5.1 to work either it looks like it all depends on what menu ID python uses when it boots. If its the same one as Tk I get a crash. Python prints out this MenuID256 is already in use! Fatal Python error: Tcl/Tk panic It looks like the fix has to come in the c code for Tk Sam, ********************************** Samuel M. Smith Ph.D. Associate Professor Director Advanced Marine Systems Lab **************(Dania Building)*********************** Institute for Ocean and Systems Engineering Florida Atlantic University Rm. 225 B, SeaTech Bldg. 101 North Beach Road, Dania, FL 33004 (voice) 954-924-7232 (secretary Paula) 954-924-7230 (fax) 954-924-7233 (email) smith@oe.fau.edu (web) http://www.oe.fau.edu ************** (Boca Raton Campus) ******************* Ocean Engineering Dept. Bldg. 36 Florida Atlantic University 777 Glades Rd, Boca Raton FL 33431 (voice) 561-297-3606 (reception) 561-297-3430 (fax) 561-297-3885 (email) smith@oe.fau.edu (web) http://www.oe.fau.edu *********************************** From smith@oe.fau.edu Thu Apr 22 18:40:27 1999 From: smith@oe.fau.edu (Samuel Smith) Date: Thu, 22 Apr 1999 13:40:27 -0400 Subject: [Pythonmac-SIG] Tkinter questions In-Reply-To: <19990421141537.28ED6300F57@snelboot.oratrix.nl> References: Message by Samuel Smith , Wed, 21 Apr 1999 09:03:43 -0400 , Message-ID: >Samuel, >you should probably also ask your non-mac-specific Tkinter questions in the >general Python mailinglist/newsgroup, where you have a much better chance of >an answer. > >I'll stick to answering the mac things I know about: > >> The python menubar gets replaced with a new menu bar who's menus apparently >> do nothing. > >This is a Tk problem, and I think there's little I can do about it. I looked in the source distributed for tcl/tk and found this in one of the source files for Wish. void TkMacInitMenus( Tcl_Interp *interp) { gInterp = interp; /* * At this point, InitMenus() should have already been called. */ if (TkMacUseMenuID(256) != TCL_OK) { panic("Menu ID 256 is already in use!"); } tkAppleMenu = NewMenu(256, "\p\024"); if (tkAppleMenu == NULL) { panic("memory - menus"); } So tk has hard coded the use of a menuID that apparently is being used by the Python interpreter? Suggestions use a different menu id in python get rid of the code in tk the creates a menubar. I found this code fragment in _tkinter.c file in the Tkapp_New(screenName, baseName, className, interactive) function v->interp = Tcl_CreateInterp(); #if defined(macintosh) && TKMAJORMINOR >= 8000 /* This seems to be needed since Tk 8.0 */ ClearMenuBar(); TkMacInitMenus(v->interp); #endif So it looks like _tkinter is putting in the menu bar. I don't know all the ramifications of what _tkinter is doing. Just not calling TkMacInitMenus() might work? Anybody have any ideas. Still can't run Tkinter on the mac. Can you forward to Steen Lumholt? don't know his email. Sam ********************************** Samuel M. Smith Ph.D. Associate Professor Director Advanced Marine Systems Lab **************(Dania Building)*********************** Institute for Ocean and Systems Engineering Florida Atlantic University Rm. 225 B, SeaTech Bldg. 101 North Beach Road, Dania, FL 33004 (voice) 954-924-7232 (secretary Paula) 954-924-7230 (fax) 954-924-7233 (email) smith@oe.fau.edu (web) http://www.oe.fau.edu ************** (Boca Raton Campus) ******************* Ocean Engineering Dept. Bldg. 36 Florida Atlantic University 777 Glades Rd, Boca Raton FL 33431 (voice) 561-297-3606 (reception) 561-297-3430 (fax) 561-297-3885 (email) smith@oe.fau.edu (web) http://www.oe.fau.edu *********************************** From cmann@pobox.com Fri Apr 23 12:56:53 1999 From: cmann@pobox.com (Chris,Mann) Date: Fri, 23 Apr 1999 07:56:53 -0400 Subject: [Pythonmac-SIG] FTPing a mac file - loosing resource fork? Message-ID: <19990423191041.C55CF2651@smtp.pobox.com> Hello - I've just started using python, and the first thing I'm trying to do is write a little script that retrieves a mac file from an FTP site (it's actually a .sea file). Just when I thought I had everything working, I ran into a bit of a snag. I'm using the provided ftplib and everything seems to work fine, except that the file looses it's resource fork. Any ideas what I'm doing wrong? Here's the code (ftp_site is a dictionary of values that I pass in): def get_remote(self, ftp_site): # open a local file so we have something to write the ftp data to fileID = open(ftp_site['localdir'] + ftp_site['file'] , 'wb') from ftplib import FTP print 'Retrieving ' + ftp_site['file'] + ' to ' + ftp_site['localdir'] # open the site, set pasv transfer mode, and login ftp = FTP(ftp_site['host']) ftp.set_pasv(ftp_site['pasv']) ftp.login(ftp_site['user'], ftp_site['password']) # change to correct dir, check size, and retrieve ftp.cwd(ftp_site['remotedir']) if ftp.size(ftp_site['file']) <= 1000: # know file is always greater then a meg print 'The file appears to be corrupted' ftp.retrbinary('RETR ' + ftp_site['file'], fileID.write, 1024) # cleanup fileID.close() ftp.close() Also, is there a module to decode stuffit compressed files? I had thought about wrapping the stuffit expander OSAX into a module, but that seems a bit roundabout. thanks -chris From seanh@unforgettable.com Fri Apr 23 13:21:46 1999 From: seanh@unforgettable.com (Sean Hummel) Date: Fri, 23 Apr 1999 05:21:46 -0700 Subject: [Pythonmac-SIG] FTPing a mac file - loosing resource fork? In-Reply-To: <19990423191041.C55CF2651@smtp.pobox.com> Message-ID: The majority of the problem you are having is likely due to the fact that the file on the server was uploaded as a binary file. Not using one of the Macintosh flat file formats. (i.e. HQX or MacBinary) Thus the file on the server doesn't have a resource fork. When you upload the file, upload it as an "HQX" file, and use the Python "binhex" module to turn it back into a Macintosh file, after it is downloaded. As far as automatically "Unstuffing" the file, there are many routes, you could create an Applescript and tell "Stuffit Expander" to decompress the file. Or you could use the AE module to send appleevents directly to the Stuffit Expander module. On Fri, 23 Apr 1999 07:56:53 -0400 "Chris,Mann" wrote: > Hello - > I've just started using python, and the first thing I'm trying to do is > write a little script that retrieves a mac file from an FTP site (it's > actually a .sea file). > Just when I thought I had everything working, I ran into a bit of a > snag. I'm using the provided ftplib and everything seems to work fine, > except that the file looses it's resource fork. Any ideas what I'm doing > wrong? > > Here's the code (ftp_site is a dictionary of values that I pass in): > > def get_remote(self, ftp_site): > # open a local file so we have something to write the ftp data to > fileID = open(ftp_site['localdir'] + ftp_site['file'] , 'wb') > > from ftplib import FTP > > print 'Retrieving ' + ftp_site['file'] + ' to ' + ftp_site['localdir'] > > # open the site, set pasv transfer mode, and login > ftp = FTP(ftp_site['host']) > ftp.set_pasv(ftp_site['pasv']) > ftp.login(ftp_site['user'], ftp_site['password']) > # change to correct dir, check size, and retrieve > ftp.cwd(ftp_site['remotedir']) > if ftp.size(ftp_site['file']) <= 1000: # know file is always greater then > a meg > print 'The file appears to be corrupted' > ftp.retrbinary('RETR ' + ftp_site['file'], fileID.write, 1024) > # cleanup > fileID.close() > ftp.close() > > Also, is there a module to decode stuffit compressed files? I had thought > about wrapping the stuffit expander OSAX into a module, but that seems a bit > roundabout. > > thanks > -chris > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://www.python.org/mailman/listinfo/pythonmac-sig > ---------------------- Sean Hummel seanh@unforgettable.com From jarowl@excite.com Fri Apr 23 22:58:17 1999 From: jarowl@excite.com (Isaiah Wright) Date: Fri, 23 Apr 1999 14:58:17 PDT Subject: [Pythonmac-SIG] Join the Mailing list Message-ID: <924904697.15033.899@excite.com> I would like to join the mailing list for Mac users. Thank you, tom _______________________________________________________ Get your free, private email at http://mail.excite.com/ From jack@oratrix.nl Sun Apr 25 22:12:55 1999 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 25 Apr 1999 23:12:55 +0200 Subject: [Pythonmac-SIG] Re: Pythonmac-SIG digest, Vol 1 #166 - 5 msgs In-Reply-To: Message by Samuel Smith , Thu, 22 Apr 1999 09:42:48 -0400 , Message-ID: <19990425211300.9C59153A96@oratrix.oratrix.nl> Samuel, if you'd be willing to take over maintainance of Tkinter on the mac you would make me a very happy person. Tkinter is important, but MacPython is already taking more of my time than I can really afford, and as I don't use Tk regularly I can't really spend time on it at the moment. Everything you need to build it (from the version I used, 8.0) plus instructions are in the distribution, but my attempts to build more recent versions have failed in the short time I allowed myself for it. If you'd be willing to take this up you'd best wait for the next distribution, 1.5.2, due any day now, which has a new structure for plugin modules (which also makes it a lot easier for me to offload modules or module groups to other people, and for other people to distribute their own extension modules). -- 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 erik@letterror.com Thu Apr 29 13:18:42 1999 From: erik@letterror.com (Erik van Blokland) Date: Thu, 29 Apr 1999 14:18:42 +0200 Subject: [Pythonmac-SIG] Access to Gestalt? Message-ID: <199904291218.OAA09641@kalvermarkt.denhaag.dataweb.net> Is there a way to get access to gestalt information in python? The only gestalt related items I could find were a couple of generic system error codes. Erik van Blokland From jack@oratrix.nl Thu Apr 29 13:40:03 1999 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 29 Apr 1999 14:40:03 +0200 Subject: [Pythonmac-SIG] Access to Gestalt? In-Reply-To: Message by Erik van Blokland , Thu, 29 Apr 1999 14:18:42 +0200 , <199904291218.OAA09641@kalvermarkt.denhaag.dataweb.net> Message-ID: <19990429124003.8D597303121@snelboot.oratrix.nl> > Is there a way to get access to gestalt information in python? The only > gestalt related items I could find were a couple of generic system error > codes. There is a gestalt module, I think this should give a complete interface to gestalt (but I haven't used it in ages). -- 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 erik@letterror.com Thu Apr 29 16:04:45 1999 From: erik@letterror.com (Erik van Blokland) Date: Thu, 29 Apr 1999 17:04:45 +0200 Subject: [Pythonmac-SIG] Access to Gestalt? Message-ID: <199904291504.RAA13837@kalvermarkt.denhaag.dataweb.net> -- Jack Jansen, 4/29/99 14 40: >> Is there a way to get access to gestalt information in python? The only >> gestalt related items I could find were a couple of generic system error >> codes. > >There is a gestalt module, I think this should give a complete interface to >gestalt (but I haven't used it in ages). >-- Ai caramba! it's a built-in! that's why I couldn't find it.. Thanks! erik From Pieter Claerhout" Hello, I'm almost brand new to the world of Python. I use Python mainly on the Macintosh, but I can't seem to find a good book explaining how to program in Python on the Macintosh. Most of the stuff I find is either Unix-related of either Win-related. Does anyone has some suggestions for a good book (or a decent website). Thanks, Pieter [ Pieter Claerhout chill@mediaport.org ] From peter.sommerfeld@gmx.de Fri Apr 30 19:22:56 1999 From: peter.sommerfeld@gmx.de (Peter Sommerfeld) Date: Fri, 30 Apr 1999 20:22:56 +0200 Subject: [Pythonmac-SIG] Good book for learning Python on the Mac In-Reply-To: <002601be931a$2f477ec0$8b23cfc3@pc-werkstation> Message-ID: Pieter Claerhout wrote: >I'm almost brand new to the world of Python. I use Python mainly >on the Macintosh, but I can't seem to find a good book explaining >how to program in Python on the Macintosh. > >Most of the stuff I find is either Unix-related of either Win-related. >Does anyone has some suggestions for a good book (or a decent website). Pieter, there is no one I'm aware off. The best you probably can do is to get the informations from Inside Macintosh, to poke the python mac examples and libraries (Framwork.py) and post your questions to this list. MacPython + IDE is very comfortable to use so you can checkout everything without any harm. And the most toolbox calls are available. Here are the websites I occasionally use: apples tech info lib http://til.info.apple.com/ somewaht outdated but still usefull: http://www.mactech.com/articles/develop/index.html -- Peter