From dkb@netins.net Wed Jul 7 00:44:42 1999 From: dkb@netins.net (David) Date: Tue, 06 Jul 1999 18:44:42 -0500 Subject: [Pythonmac-SIG] Plugins and MacPython Message-ID: <378294E6.932C47B5@netins.net> Hello. I've just recently been interested in python on the mac and have been going through the MacPython source code to become familiar with it (in the hopes of helping with it). I have a question about plugins. What is the current situation with current shared library plugins working with future versions of MacPython? Will they need to be recompiled even if the Python API hasn't changed? It appears that macpython support resource based fragments? Looking through the mail list archive I've also seen some requests for a macpython specific web page. Does this exist yet? Thanks. David Bainbridge From maccgi@bellsouth.net Wed Jul 7 01:41:38 1999 From: maccgi@bellsouth.net (Richard Gordon) Date: Tue, 6 Jul 1999 20:41:38 -0400 Subject: [Pythonmac-SIG] An Odd Question... Message-ID: OK, I will risk being branded the list idiot if you will be patient enough to hear me out. What I want to know is whether it is possible to embed Perl in Python, Mac or otherwise? Or maybe I am just talking about calling Perl scripts from executing Python scripts? To answer the "why the hell would anyone want to do that?" question, I know more Perl than Python and have Perl running on web sites that people paid me $$$ to do. I don't actually hate Perl, but I prefer Python, and would like to migrate at least one of these to an all-Python system eventually so I can get someone to pay me $$$ to do a Python site. Not too surprisingly, I haven't found anything that will do something like a batch migration and nobody is going to pay me to reinvent the wheel, so this will have to be done over a period of time at my own expense (all the while overcoming the resistance of webmasters who are suspicious of Python because "there aren't many other Python programmers around here (Atlanta)." Additionally, I understand regex in Perl a lot better than I do in Python and, to this point at least, it appears to me that Perl's regex is stronger. Offsetting that entirely is the culture of the Perl community vs. the Python community, but it would still be nice to use some Perl selectively. Anyway, I hope that this isn't an overwhelmingly absurd question and, given the predominance of Perl in web things, I wouldn't think that I'm the first one to wonder about it. What I'm looking for is some general guidance about Python/Perl integration under both MacOS and *nix. Thanks. Richard Gordon -------------------- Gordon Consulting & Design Database Design/Scripting Languages mailto:richard@richardgordon.net http://www.richardgordon.net 770.971.6887 (voice) 770.216.1829 (fax) From joe@strout.net Wed Jul 7 03:17:32 1999 From: joe@strout.net (Joseph J. Strout) Date: Tue, 6 Jul 1999 19:17:32 -0700 Subject: [Pythonmac-SIG] Plugins and MacPython In-Reply-To: <378294E6.932C47B5@netins.net> Message-ID: At 4:44 PM -0700 7/6/99, David wrote: >Hello. I've just recently been interested in python on the mac and have >been going through the MacPython source code to become familiar with it >(in the hopes of helping with it). I have a question about plugins. >What is the current situation with current shared library plugins >working with future versions of MacPython? Hard to say. Current plug-ins will apparently need to be recompiled to work with the next release (if, in fact, the next release is ever released). >Looking through the mail list archive I've also seen some requests for a >macpython specific web page. Does this exist yet? No. I was supposed to be doing that, but I dropped the ball. If you want to pick it up, just say so! Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From dozier@abs.net Wed Jul 7 03:59:36 1999 From: dozier@abs.net (Bill Dozier) Date: Tue, 06 Jul 1999 22:59:36 -0400 Subject: [Pythonmac-SIG] Plugins and MacPython Message-ID: <199907070259.WAA06240@vwww1.abs.net> >From: "Joseph J. Strout" > > Hard to say. Current plug-ins will apparently need to be recompiled to > work with the next release (if, in fact, the next release is ever released). > Joe, are you being facetious, or is this, in fact possible? I've been lurking on the list hoping that someone would mention when a final 1.5.2 release would come out.... Bill From jack@oratrix.nl Wed Jul 7 09:44:15 1999 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 07 Jul 1999 10:44:15 +0200 Subject: [Pythonmac-SIG] Plugins and MacPython In-Reply-To: Message by "Bill Dozier" , Tue, 06 Jul 1999 22:59:36 -0400 , <199907070259.WAA06240@vwww1.abs.net> Message-ID: <19990707084416.09F2D303120@snelboot.oratrix.nl> > > are you being facetious, or is this, in fact possible? I've been lurking on > the list hoping that someone would mention when a final 1.5.2 release would > come out.... The next release will definitely be out. The point is that I'm horrendously busy, and apparently Just even more so. I'll try to get the ball rolling again... -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From jack@oratrix.nl Wed Jul 7 09:49:22 1999 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 07 Jul 1999 10:49:22 +0200 Subject: [Pythonmac-SIG] Plugins and MacPython In-Reply-To: Message by David , Tue, 06 Jul 1999 18:44:42 -0500 , <378294E6.932C47B5@netins.net> Message-ID: <19990707084923.19DDC303120@snelboot.oratrix.nl> > Hello. I've just recently been interested in python on the mac and have > been going through the MacPython source code to become familiar with it > (in the hopes of helping with it). I have a question about plugins. > What is the current situation with current shared library plugins > working with future versions of MacPython? Will they need to be > recompiled even if the Python API hasn't changed? It appears that > macpython support resource based fragments? As of 1.5.2 the version-number scheme of the library has been sanitized, and it is (in principle) possible to create modules that will be forward-compatible. In practice I think it'll still be necessary to recompile often, because the underlying CodeWarrior C library also changes, and it's definitely not safe to have an extension linked against one version of the C library and then embedded in a Python that uses another version. But we'll see.... > Looking through the mail list archive I've also seen some requests for a > macpython specific web page. Does this exist yet? The only thing we have is http://www.cwi.nl/~jack/macpython.html, but I have very little time to keep it up-to-date. What I would really like is if someone else out of this group sets up a starship account to act as a clearinghouse for everything macpython-related. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From jack@oratrix.nl Wed Jul 7 09:50:46 1999 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 07 Jul 1999 10:50:46 +0200 Subject: [Pythonmac-SIG] An Odd Question... In-Reply-To: Message by Richard Gordon , Tue, 6 Jul 1999 20:41:38 -0400 , Message-ID: <19990707085047.0224F303120@snelboot.oratrix.nl> > OK, I will risk being branded the list idiot if you will be patient > enough to hear me out. What I want to know is whether it is possible > to embed Perl in Python, Mac or otherwise? Or maybe I am just talking > about calling Perl scripts from executing Python scripts? My gut feeling is that this is imposible, because of the two runtime systems. On the other hand, TCL/TK has been neatly integrated in Python, so maybe it is doable after all. I don't see any mac-specific issues up front, so it might be worhtwhile to ask the general Python community whether someone has done any work on this. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From savageb@pacbell.net Thu Jul 8 05:02:26 1999 From: savageb@pacbell.net (savageb) Date: Wed, 07 Jul 1999 21:02:26 -0700 Subject: [Pythonmac-SIG] An Odd Question... Message-ID: <199907080402.VAA28492@mail-gw6.pacbell.net> > OK, I will risk being branded the list idiot if you will be patient > enough to hear me out. What I want to know is whether it is possible > to embed Perl in Python, Mac or otherwise? Or maybe I am just talking > about calling Perl scripts from executing Python scripts? If nothing else you could trigger a perl script from within Python - for example on *nix you could make an os.system call. As to the Mac, I started using python because I was using AppleScript to do some workflow automation and decided that if I could just write this one little section in Python it would be sooo much easier, and succesfully integrated a littled bit of Python by launching the script (tell the finder to open it and it runs). So it should be possible to do some stuff. good luck, Bob Savage From andres@corrada.com Thu Jul 8 07:17:42 1999 From: andres@corrada.com (Andres Corrada) Date: Thu, 08 Jul 1999 06:17:42 +0000 Subject: [Pythonmac-SIG] An Odd Question... References: Message-ID: <3784417F.918222AC@corrada.com> I also have taken the approach that Bob Savage mentioned. I used to work in a computing environment (Dragon Systems) where Perl was king. I started using Python by writing new managing scripts that called the Perl ones. This gave me a migration path that was painless. I started coding in 100% Python and I still used the old Perl scripts. My boss didn't care as long as I continued to be as productive as other Perl writers. ------------------------------------------------------- Andres Corrada-Emmanuel Email: andres@corrada.com Owner http://www.corrada.com/mamey Mamey Phone: (413) 587-9595 ------------------------------------------------------- From billpy@mousa.demon.co.uk Thu Jul 8 09:21:44 1999 From: billpy@mousa.demon.co.uk (Bill Bedford) Date: Thu, 8 Jul 1999 09:21:44 +0100 Subject: [Pythonmac-SIG] An Odd Question... In-Reply-To: Message-ID: <454484803737950077801@mousa.demon.co.uk> At 8:41 pm -0400 06/07/99, Richard Gordon wrote: >OK, I will risk being branded the list idiot if you will be patient >enough to hear me out. What I want to know is whether it is possible >to embed Perl in Python, Mac or otherwise? Or maybe I am just talking >about calling Perl scripts from executing Python scripts? > This was on c.l.py.a last night, seems to be what you are looking for > This is the first public announcement of a generalized extension which > lets you run Python scripts from Tcl, or Tcl from Perl, or any of the > other combinations. > > Minotaur works by loading the appropriate shared library into another > script language's context. So, for example, running Tcl from Python > means that the Python main program imports the Minotaur extension, which > in turn loads the Tcl libraries - thus Tcl becomes "embedded" into the > Python runtime environment (which is similar to embedding Tcl in a > normal C program). As involved as that sounds, performance is already > surprisingly good, and the capability is turning out to be quite useful. > > Minotaur 0.1 is an alpha level release, meaning: it works, aside from a > few quirks (see below), and bugs, but its API and implementation might > still change in incompatible ways in future releases. > > An example, embedding a Tcl script in Python: > import Minotaur > Minotaur.initTcl() > print Minotaur.Tcl("expr {1111 + 2222}") > Minotaur.Tcl(""" > set result "Tcl version [info patchlevel]" > Python "result = '$result'" > """) > print result > > As you can see, a value is returned either directly (only if it's an > integer), or by using a reverse embedding, i.e. executing a Python > statement from the embedded Tcl system. Also, this shows how tricky > quoting could get once you start mixing languages in this manner. And > last but not least, note that the different language contexts are > separate: the two "result" variables used above are not related in any > way (one for Tcl, one for Python). Also, Minotaur does not yet let you > share data, it merely lets you evaluate scripts (and copy things). > > Now the gotcha's, quite a list of them right now: > > - You need shared libraries to use Minotaur. Standard installations, > especially of Perl and Python, do not always include these. The > Minotaur homepage has some info on rebuilds you might need to do. > - Tcl/Python can call Perl but to get results back, I had to introduce > a secondary shared library, dynamically bound to the Perl runtime. > - There is currently no other interface than evaluating a single string. > Passing int/string/whatever args efficiently is planned for later. > - The Minotaur extension has only been tested for Linux and Windows, but > is built in a way which should also work on the Mac, and on all Unix > systems, even those which do not support back-linking in shared libs. > - Minotaur uses some global data; it's not yet re-entrant / thread-safe. > As a matter of fact, Minotaur is still totally ignorant of threads. > - I have not yet succeeded in getting Minotaur working on the Mac, and > ran into problems when trying to launch Tk from Python (Win/Linux). > - The current release does not include any Minotaur binaries, you may > have to do quite a bit of tweaking to get this stuff to work for you. > One of my plans is to substantially simplify deployment of all this. > > And here's the fun part of things: > > - Minotaur uses Forth as low-level "super-glue" language. This offers > the ability to deal with all the inevitable "impedance mismatches" > which will occur when crossing widely different software designs. > Also, this can be done without compilation (and often portably). > - Timing tests indicate that the overhead of calling through Minotaur > is very low, when the necessary symbol lookups are done in advance. > The C-based Forth in here uses pForth, and includes quite a bit of > standard ("ANS") Forth for now, though this may change in the future. > - The Minotaur extension is loadable from Perl, Python, and Tcl, 'cause > it exports initialization calls for each of them. This is essential, > since the embedded language needs to reopen the extension to gain > access to the same Forth context as the one which loaded it (this is > how each embedded language can call back into its parent context). > - Forth primitives have been defined which can open, lookup, and locate > routines exported from shared libraries. Due to the flexibility and > performance of Forth, everything else needed to embed one language in > the other is done in Forth, i.e. at run time. Forth has no idea that > it is being used to tie scripting languages together, for example. > - Minotaur, and these shared library access functions have been tested > on Linux, Windows, and Mac (partially). The Forth code needed to > implement such language bindings differs only in pathnames, so far. > - But this is only the tip of the iceberg, really. Proof-of-concept > bindings have also been created for Java, MS COM, Lua, ICI, and PHP. > > Minotaur is a spinoff of my long-term "TinyScript" project and is open > source, with a BSD-style license (do whatever you like with it, just > leave the copyright attributions intact, and don't sue me). Minotaur > was written to see how far one could go in bringing scripting worlds > together, and to help me tie my own extensions into a range of languages > without having to write a whole range of interfaces. It hasn't met this > goal yet, but my hope is that it will be of use to others and that a > number of language experts will extend and improve the mechanism so it > works well with all of them. > > Minotaur has sort of a homepage here: > http://mini.net/pub/ts2/minotaur.html > A mirror copy of my working area is being tracked here: > http://mini.net/pub/ts2/ (a.k.a. ftp://mini.net/pub/ts2/) > And a snapshots of the whole area was recently created as: > http://mini.net/pub/ts2-19990704.tar.gz > > There is no documentation, release 0.1 is a "use the source Luke" kind > of project, but if you would like to try this out - or better still: > participate in whatever way you like - feel free to subscribe to the > Minotaur mailing list, by sending an email to minotaur-add@mini.net. > There are a handful of subscribers now, with just a few outbursts of > discussions of where to take this, so far. Which, at this stage, is > still a very open-ended question, IMO. > > Comments, suggestions, praise, but especially offering to help with > whetever aspect of Minotaur you'd like to improve are most welcome. > Language and platform bashing - yawn - will be redirected to /dev/null. > If you wish to help lower language barriers, so that more code can be > re-used, more interfacing problems can be solved, and perhaps one day > even generic extensions can be written which serve multiple contexts, > please have a look at Minotaur and consider helping to make it happen. > > One interesting option, would be to create a binding in SWIG which > generates the low-level glue to Forth, as well as language-specific > wrappers. The key advantage is that this could let SWIG be used > entirely as a run-time tool, with no compiler/compilation in sight > (assuming the target library exists in shared library form, that is). > > -- Jean-Claude Wippler -- Bill Bedford billb@mousa.demon.co.uk "Luck is my middle name," he said, indistinctly. "Mind you, my first name is Bad." From jack@oratrix.nl Thu Jul 8 13:14:04 1999 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 08 Jul 1999 14:14:04 +0200 Subject: [Pythonmac-SIG] An Odd Question... In-Reply-To: Message by Bill Bedford , Thu, 8 Jul 1999 09:21:44 +0100 , <454484803737950077801@mousa.demon.co.uk> Message-ID: <19990708121405.1DA85303120@snelboot.oratrix.nl> Minotaur looks pretty neat! Maybe someone could pick it up and see how much work a Mac port would be? Jean Claude mentioned a couple of times that there shouldn't be any real problems... -- 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 maccgi@bellsouth.net Thu Jul 8 14:16:07 1999 From: maccgi@bellsouth.net (Richard Gordon) Date: Thu, 8 Jul 1999 09:16:07 -0400 Subject: [Pythonmac-SIG] An Odd Question... In-Reply-To: <3784417F.918222AC@corrada.com> References: <3784417F.918222AC@corrada.com> Message-ID: At 06:17 +0000 7/8/1999, Andres Corrada wrote: >I also have taken the approach that Bob Savage mentioned. I used to work in a >computing environment (Dragon Systems) where Perl was king. I started using >Python by writing new managing scripts that called the Perl ones. This gave me >a migration path that was painless. I started coding in 100% Python and I >still used the old Perl scripts. My boss didn't care as long as I continued to >be as productive as other Perl writers. Yes, I think that this will work out fine, if somewhat inefficiently vs. just being in perl or in python but not both. I'm a little fuzzy about how you pass parameters and retrieve results between python and perl, but I think that this can be done using unix "system" in perl and I guess there would be comparable functionality in python. On the Mac side of this, I think I know enough AppleScript to get where I want to be. Thanks to you and Bob for the suggestions. Richard Gordon -------------------- Gordon Consulting & Design Database Design/Scripting Languages mailto:richard@richardgordon.net http://www.richardgordon.net 770.971.6887 (voice) 770.216.1829 (fax) From maccgi@bellsouth.net Thu Jul 8 14:23:05 1999 From: maccgi@bellsouth.net (Richard Gordon) Date: Thu, 8 Jul 1999 09:23:05 -0400 Subject: [Pythonmac-SIG] An Odd Question... In-Reply-To: <454484803737950077801@mousa.demon.co.uk> References: <454484803737950077801@mousa.demon.co.uk> Message-ID: At 09:21 +0100 7/8/1999, Bill Bedford wrote: >This was on c.l.py.a last night, seems to be what you are looking for If nothing else, I don't feel foolish for bringing up the subject. :-] Thanks for the pointer. Richard Gordon -------------------- Gordon Consulting & Design Database Design/Scripting Languages mailto:richard@richardgordon.net http://www.richardgordon.net 770.971.6887 (voice) 770.216.1829 (fax) From maccgi@bellsouth.net Thu Jul 8 14:31:16 1999 From: maccgi@bellsouth.net (Richard Gordon) Date: Thu, 8 Jul 1999 09:31:16 -0400 Subject: [Pythonmac-SIG] An Odd Question... In-Reply-To: <19990708121405.1DA85303120@snelboot.oratrix.nl> References: <19990708121405.1DA85303120@snelboot.oratrix.nl> Message-ID: At 14:14 +0200 7/8/1999, Jack Jansen wrote: >Minotaur looks pretty neat! Maybe someone could pick it up and see how much >work a Mac port would be? Jean Claude mentioned a couple of times that there >shouldn't be any real problems... I noticed something in the description that I don't understand, viz.: "Minotaur uses some global data; it's not yet re-entrant / thread-safe. As a matter of fact, Minotaur is still totally ignorant of threads." I know what threads are and I suspect I know what thread-safe means, but what is "re-entrant" and to what extent would something that was re-entrant / thread-safe under unix retain those qualities when ported to the current MacOS? Just curious. Thanks. Richard Gordon -------------------- Gordon Consulting & Design Database Design/Scripting Languages mailto:richard@richardgordon.net http://www.richardgordon.net 770.971.6887 (voice) 770.216.1829 (fax) From joe@strout.net Thu Jul 8 16:05:57 1999 From: joe@strout.net (Joseph J. Strout) Date: Thu, 8 Jul 1999 08:05:57 -0700 Subject: [Pythonmac-SIG] An Odd Question... In-Reply-To: References: <19990708121405.1DA85303120@snelboot.oratrix.nl> <19990708121405.1DA85303120@snelboot.oratrix.nl> Message-ID: At 6:31 AM -0700 07/08/99, Richard Gordon wrote: >"Minotaur uses some global data; it's not yet re-entrant / >thread-safe. As a matter of fact, Minotaur is still totally ignorant >of threads." > >I know what threads are and I suspect I know what thread-safe means, >but what is "re-entrant" and to what extent would something that was >re-entrant / thread-safe under unix retain those qualities when >ported to the current MacOS? The current MacOS doesn't use threads (well, almost never -- it can if you jump through a lot of hoops). So thread safety is utterly irrelevant on the Mac. "re-entrant" is basically just another term for thread-safe. Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From jack@oratrix.nl Thu Jul 8 16:18:59 1999 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 08 Jul 1999 17:18:59 +0200 Subject: [Pythonmac-SIG] An Odd Question... In-Reply-To: Message by Richard Gordon , Thu, 8 Jul 1999 09:31:16 -0400 , Message-ID: <19990708151859.E467F303120@snelboot.oratrix.nl> > "Minotaur uses some global data; it's not yet re-entrant / > thread-safe. As a matter of fact, Minotaur is still totally ignorant > of threads." > > I know what threads are and I suspect I know what thread-safe means, > but what is "re-entrant" and to what extent would something that was > re-entrant / thread-safe under unix retain those qualities when > ported to the current MacOS? Just curious. Well, MacPython doesn't have threads yet, so that problem is pretty much solved:-) And reentrancy probably means here that you can't use Minotaur to call from Python to TCL and then back to Python (or something else). -- 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 jeffrey@Digicool.com Thu Jul 8 16:47:28 1999 From: jeffrey@Digicool.com (Jeffrey P Shell) Date: Thu, 08 Jul 1999 11:47:28 -0400 Subject: [Pythonmac-SIG] An Odd Question... Message-ID: <199907081545.LAA13897@python.org> > Well, MacPython doesn't have threads yet, so that problem is pretty much > solved:-) And reentrancy probably means here that you can't use Minotaur to > call from Python to TCL and then back to Python (or something else). Reentrancy is when a routine can be re-entered at the point it was left. For pre-emptive multitasking, this is a must. If you have a routine "getColor" that was 114 instructions, and two important processes were wanting access to that task at the same time, one would have to wait for the other to finish before it could execute in a non-reentrant system. In a reentrant system, they would basically execute simultaneously as one would go in a few instructions and then have its state saved while the other went in, and then the first would "re-enter" the routine where it left off and continue a ways, and so forth. Much of the core Mac OS Toolbox is non-re entrant code. This has held back the so-called "advanced" OS features such as true multitasking and multithreading. BeOS, OS/2, and Amiga OS are full of reentrant code and are very multitaskable. (teehee, no spelling suggestions on that word). Carbon in MacOS X is scheduled to fix a lot of these problems. In MacOS 8 (or any carbonlib capable Mac OS prior to 10), Carbon calls will map to the non-reentrant older Toolbox code, while in Mac OS X they will get to use the new libraries. I imagine a Carbon port of MacPython could easily be thread-safe. The above information is on an AFAIK basis, I could easily be wrong as I'm still trying to grok Carbon and I haven't gone into Mac OS X for a few days now due to other importances. FWIW, TipTop claims that Objective Everything is (or will be) usable with Carbon, opening up another cross-language (Python/Perl/TCL) scripting solution. If they would only release a Python 1.5.x based version of OE!!!!!!! wishing-very-much-he-could-see-the-carbon-compliant-macoffice-2000-build'ly yrs in stereophonic high speed master suite from the penthouse, .jPS From andres@corrada.com Thu Jul 8 15:59:24 1999 From: andres@corrada.com (Andres Corrada) Date: Thu, 08 Jul 1999 14:59:24 +0000 Subject: [Pythonmac-SIG] An Odd Question... References: <3784417F.918222AC@corrada.com> Message-ID: <3784BB82.59BA9030@corrada.com> Gordon wrote: > Yes, I think that this will work out fine, if somewhat inefficiently > vs. just being in perl or in python but not both. I'm a little fuzzy > about how you pass parameters and retrieve results between python and > perl, but I think that this can be done using unix "system" in perl > and I guess there would be comparable functionality in python. I don't know how to do this and would be interested in any details of how you get to do it. The work that I did was very text oriented. The Perl and Python scripts ran C programs that produced text data files. Perl was king at the shop because it is such a great text-processing language. I moved to Python because text files can contain data that you want to organize in something other than a linear array (yeah, yeah don't tell me about multi-dimensional arrays in Perl). With the introduction of the re module in Python, I could do the same text processing as in Perl but have a nicer syntax and more complex array structures. If I wanted to keep Python structures between script invocations, the pickle module helped me do it. ------------------------------------------------------- Andres Corrada-Emmanuel Email: andres@corrada.com Owner http://www.corrada.com/mamey Mamey Phone: (413) 587-9595 ------------------------------------------------------- From draayer@door.net Tue Jul 13 07:30:17 1999 From: draayer@door.net (Dean E.Draayer) Date: Tue, 13 Jul 99 01:30:17 -0500 Subject: [Pythonmac-SIG] Samll EasyDialogs bug Message-ID: <19990713063313441.AAA291@mail.door.net@[208.247.125.120]> In the AskString() definition in EasyDialogs.py, it looks like the line "id = 257" should be/have been deleted. def AskString(prompt, default = "", id=257): ... id = 257 Dean Draayer draayer@door.net From savageb@pacbell.net Sat Jul 17 23:13:14 1999 From: savageb@pacbell.net (savageb) Date: Sat, 17 Jul 1999 15:13:14 -0700 Subject: [Pythonmac-SIG] Error in PyDebugger.py / bdb.py Message-ID: <199907172213.PAA00773@mail-gw6.pacbell.net> I have been getting an error message whenever I try to clear a breakpoint (that is either by clicking on a breakpoint in the source window, or deleting from the 'edit breakpoints' window). TypeError: too many arguments; expected 2, got 3 file PyDebugger.py; line no. 563, in clear_break bdb.Bdb.clear_break(self, filename, lineno) This seems to happen consistently. The only way I have figured out how to clear breaks is to copy the code out of the file, throw the old file away, and paste the code into a clean file. If I try to "clear all breaks" I get a KeyError. file bdb.py; line 231, clear_all_file_breaks blist = Breakpoint.bplist[filename, line] From just@letterror.com Sun Jul 18 11:19:42 1999 From: just@letterror.com (Just van Rossum) Date: Sun, 18 Jul 1999 12:19:42 +0200 Subject: [Pythonmac-SIG] Error in PyDebugger.py / bdb.py In-Reply-To: <199907172213.PAA00773@mail-gw6.pacbell.net> Message-ID: --============_-1279828092==_============ Content-Type: text/plain; charset="us-ascii" At 3:13 PM -0700 7/17/99, savageb wrote: >I have been getting an error message whenever I try to clear a breakpoint >(that is either by clicking on a breakpoint in the source window, or >deleting from the 'edit breakpoints' window). > >TypeError: too many arguments; expected 2, got 3 > >file PyDebugger.py; >line no. 563, in clear_break > bdb.Bdb.clear_break(self, filename, lineno) > >This seems to happen consistently. The only way I have figured out how to >clear breaks is to copy the code out of the file, throw the old file away, >and paste the code into a clean file. > >If I try to "clear all breaks" I get a KeyError. > >file bdb.py; >line 231, clear_all_file_breaks > blist = Breakpoint.bplist[filename, line] Try replacing bdb.py with the attached file. Just --============_-1279828092==_============ Content-Type: application/mac-binhex40; name="bdb.py.sit" Content-Disposition: attachment; filename="bdb.py.sit" (This file must be converted with BinHex 4.0) :#Q*NBLj`H5jcDA3!8dP84&0*9#%"!!!!%KX!!!!!,qe6593K!!%!!")EFNaKG3* l!!!!&Qpl!!d'BQ4L,R"j!2r5H(!)m%J`!%5k@J!!!)!!!!!!#2J5EPdT#BB!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!$rrrrr9%9B9&"jG'J"!,,D`e#bfX03!!!!!!! !1L!!!!!!!!!4P3!!+JS!!!!!!!#qj3e1+AP+N!!"X$!*)qZc@j0EC#%6bU0&MJq @)jXX!l*l6Qj,ML9C1IikJ,A$,a5I[q#rhZA)3Y#2@+$V'R30Q[3,0hH-m#,,N4e C[#3,@FKN)B1&8,)TSDVQT#2cP8eACfHf0QR5C,2Qm$"E9QAGQQEGq%rYZV*iq-8 mrCY9eTT6-dMRkF4p(TJMmrAec&CY9KDQ,FeCGQR0UM+cFPRPYVAjq[$`F*BR6@- `mZ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-0iL#rC$iNjfa8HZ3k!bY[,,R +B%,clY9p82[T#j*4LU9[LeJY*NND,BPm-QM5)@HP(#$KKECV42c84k@FVp0jqrc 5E3`,#)BkI$U@k+hICR5L!0PV&eE!@%)LUk4P&eLJDJr+NC4Uf(RpN!$I$G1a&)% #0R)Ql&IiV*[[mMC*'$-3@c3)'*'3!(,(N!!GiBqF@0+lBK`Gq#)Cm8U8K%2V&9Y AAAb*e`bEmA1SV(2ULF+)cfI92m%XE*XN)a5-P&`BVQ$H-1d$epbb!YpkaYd3KX- k3Qk*fKh(3+$%5j!!c'9iFA8-Smh6JQ@"qd+A81C,KFVE5mb9925GeqYBlSE8pJc A9D'!FVUe$d%R5J&rT+3li+A0H[HD942)'KJ+VZSP1&ik%L*f+hk"&IZ[@R&`ZI[ 'NS8ri'`N-Ejrl)2IEa!*)`@NQ[rkUT8D6eIAHYZGFZV-VbIbLrEcmmmrlpcjmqI 2*Bc(28bY""(Dah09Yd@c8$(l[i8XL[rURIe3ELUL)-Ck8p`f&Rdl`Lpr`,ZJphf RMlHe)&h#M)j91JPip2P2"l2`$*fre8,cR!j*Q!F`B8KrZbHFiB(fD)'`("C%i8$ `1`Q1"E15aS`YaC@iiYQRP$!h"#rFcP"K(jYVKF)j53H&hr%kF9$mPC92IUEM+(& 5E@"L55d$[PBD*!-R'MM4qKPr6,J8i"q-$[m)!!!!f2`!!!: --============_-1279828092==_============-- From savageb@pacbell.net Sun Jul 18 21:47:44 1999 From: savageb@pacbell.net (savageb) Date: Sun, 18 Jul 1999 13:47:44 -0700 Subject: [Pythonmac-SIG] Error in PyDebugger.py / bdb.py Message-ID: <199907182047.NAA26872@mail-gw5.pacbell.net> > Try replacing bdb.py with the attached file. > > Just > That didn't fix it. I get the following traceback: File "bdb.py", line 248, in clear_all_file_breaks blist = Breakpoint.bplist[filename, line] or : File "bdb.py", line 223, in clear_break for bp in Breakpoint.bplist[filename, lineno][:]: depending on whether I am trying to clear all or just the single breakpoint. I am going to try a clean reinstall of Python, just to make sure I don't have something else messed up. Bob From savageb@pacbell.net Tue Jul 20 04:11:04 1999 From: savageb@pacbell.net (savageb) Date: Mon, 19 Jul 1999 20:11:04 -0700 Subject: [Pythonmac-SIG] Guido in S.F. Weds. Message-ID: <199907200311.UAA12595@mta2.snfc21.pbi.net> Hi, Anybody from the pythonmac-sig going to see Guido Wednesday? I'm heading in from mid-peninsula by Caltrain; I hope to get to the cafe nextdoor around 7:15 pm so I can grab a sandwich. If someone's going and they want to meet up, send me some email. Bob Savage savageb@pacbell.net BTW, I intend to go to the From cbarker@jps.net Wed Jul 21 00:54:48 1999 From: cbarker@jps.net (Christopher Barker) Date: Tue, 20 Jul 1999 16:54:48 -0700 Subject: [Pythonmac-SIG] RE: editor for python on the mac References: <199903141702.MAA29966@python.org> Message-ID: <37950C48.AE130ADA@jps.net> Hi, Has anyone written a Python mode for the Alpha editor for the mac? The Alpha (see: http://alpha.olm.net) editor is a programmers editor with tcl as it's scripting language. It seems to be the closest thing I have found on the Mac to providing what I get from Xemacs on Linux now. That is, a single editor with modes for every language I use (Python, C, C++, Fortran, MATLAB, LaTeX, etc). The only thing missing is a Python mode. Given Python's dependence on consistent indenting, a Python mode is critical. To be honest, I don't particularly like Emacs, but I have been able to find a mode for every language I use, so it's a good option for me. I just want to find something that fills that niche on a mac. If anyone has Python modes for BBedit, or any other Mac editor, that might work as well. I know a lot of folks like the IDE, but it has a few shortcoming for me: 1) can't interact with tkinter. 2) indents differently that emacs python mode (tabs). I go back and forth between the two a lot, so that's a pain. 3) no colorization. (is this in the works?) Has anyone use MPW (Macintosh Programmers Workshop) for Python development? I think Apple now gives it away for free, and it seems to give you most of the power of the UNIX command line on a Mac. Thanks, -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Wed Jul 21 01:11:26 1999 From: cbarker@jps.net (Christopher Barker) Date: Tue, 20 Jul 1999 17:11:26 -0700 Subject: [Pythonmac-SIG] wxPython References: <199903141702.MAA29966@python.org> Message-ID: <3795102E.13092613@jps.net> Hi, Is anyone working on wxPython for the Mac? I'm desperately searching for a way to do cross platform GUI development on Linux, the Mac and probably Windows while I'm at it. Tkinter just seeems to have too many shortcomings, particularly on the Mac. wxPython looks very promising. I'm starting to check it out on Linux, and I'm very impressed. It's pretty complete and powerful, and easy to use. It also provides an excellent method for developing prototypes in Python that you might want to migrate to C++ wxWindows for the Mac seems to be pretty close to ready, so it would be great to have wxPython also. By the way, can someone point me to a FAQ or something that addresses why Guido hasn't established a GUI framework for Python? I think the promise of cross platform development that Python offers would be MUCH enhanced by a standard GUI. There is a whole lot of duplicated effort going on, and there is NO good option yet that includes the Mac. I think much of the appeal of JAVA and tcl is the gui stuff. without tk, tcl never would have achieved the popularity it has. I sure can't imagine it's the language itself :-) the same goes for JAVA, aside from the hype from SUN, the idea of cross platform GUI develpment is it's strongest selling point. Well, enough of my ramblings, -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From savageb@pacbell.net Wed Jul 21 04:37:47 1999 From: savageb@pacbell.net (savageb) Date: Tue, 20 Jul 1999 20:37:47 -0700 Subject: [Pythonmac-SIG] Python on MacOS X - objectivePython Message-ID: <199907210351.UAA13601@mta1.snfc21.pbi.net> > THIS MESSAGE IS IN MIME FORMAT. Since your mail reader does not understand this format, some or all of this message may not be legible. --MS_Mac_OE_3015347867_4829329_MIME_Part Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit For Jeffrey and anyone else interested, I just got this: Forwarded message: >From pedja@TipTop.COM Tue Jul 20 06:48:17 1999 From: Pedja Bogdanovich Date: Tue, 20 Jul 99 07:23:14 -0600 Subject: Re: objective-python Yes, it will be included in the next release. No specific release date yet, as there are many other features going into that. Pedja Begin forwarded message: Date: Fri, 16 Jul 1999 11:46:06 -0700 Subject: objective-python From: "Bob Savage" To: info@tiptop.com Hello, I was wondering if you have any plans for releasing an objective-python with the 1.5 release of Python. Bob Savage Media Preservation Unit Stanford University Libraries --MS_Mac_OE_3015347867_4829329_MIME_Part Content-type: text/html; charset="US-ASCII" Content-transfer-encoding: quoted-printable Python on MacOS X - objectivePython For Jeffrey and anyone else interested, I just got this:

Forwarded message:
>From pedja@TipTop.COM Tue Jul 20 06= :48:17 1999
From: Pedja Bogdanovich <pedja@TipTop.COM>
Date: Tue, 20 Jul 99 07:23:14 -0600
Subject: Re: objective-python

Yes, it will be included in the next release.  No specific release dat= e yet,  
as there are many other features going into that.  Pedja

Begin forwarded message:

Date: Fri, 16 Jul 1999 11:46:06 -0700
Subject: objective-python
From: "Bob Savage" <bsavage@stanford.= edu>
To: info@tiptop.com

Hello,

I was wondering if you have any plans for releasing an objective-python wit= h
the 1.5 release of Python.

Bob Savage
Media Preservation Unit
Stanford University Libraries
--MS_Mac_OE_3015347867_4829329_MIME_Part-- From andres@corrada.com Wed Jul 21 10:21:16 1999 From: andres@corrada.com (Andres Corrada) Date: Wed, 21 Jul 1999 09:21:16 +0000 Subject: [Pythonmac-SIG] RE: editor for python on the mac References: <199903141702.MAA29966@python.org> <37950C48.AE130ADA@jps.net> Message-ID: <37958F80.C5CBEA79@corrada.com> Hi Christopher, Tom Fetherston wrote a Python mode for the Alpha editor. It used to be available in the Starship web site but I can't find it now. Does anyone know where it is? I can send you a copy if it isn't available from there. ------------------------------------------------------- Andres Corrada-Emmanuel Email: andres@corrada.com Owner http://www.corrada.com/mamey Mamey Phone: (413) 587-9595 ------------------------------------------------------- From managan@llnl.gov Wed Jul 21 16:34:00 1999 From: managan@llnl.gov (Rob Managan) Date: Wed, 21 Jul 1999 08:34:00 -0700 Subject: [Pythonmac-SIG] RE: editor for python on the mac In-Reply-To: <37950C48.AE130ADA@jps.net> References: <199903141702.MAA29966@python.org> <37950C48.AE130ADA@jps.net> Message-ID: At 4:54 PM -0700 7/20/99, Christopher Barker wrote: >Hi, > >Has anyone written a Python mode for the Alpha editor for the mac? One exists. There are some problems with indentation depending on how the tabs are set but it works fine. I will attach it to a private email. I agree that Alpha is a great tool. You might check with Vincent Darley who has done a lot of work with Alpha. > >I know a lot of folks like the IDE, but it has a few shortcoming for me: > >1) can't interact with tkinter. > >2) indents differently that emacs python mode (tabs). I go back and >forth between the two a lot, so that's a pain. > >3) no colorization. (is this in the works?) > >Has anyone use MPW (Macintosh Programmers Workshop) for Python >development? I think Apple now gives it away for free, and it seems to >give you most of the power of the UNIX command line on a Mac. > I think the problem here is the network support (read GUSI) is not up to date on MPW. That and I think a lot of the shared library support would need tweaking. Since I have already said more than I know I will leave it at that. *-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*- Rob Managan mailto://managan@llnl.gov LLNL ph: 925-423-0903 P.O. Box 808, L-095 FAX: 925-422-3389 Livermore, CA 94551-0808 From joe@strout.net Wed Jul 21 17:09:26 1999 From: joe@strout.net (Joseph J. Strout) Date: Wed, 21 Jul 1999 09:09:26 -0700 Subject: [Pythonmac-SIG] RE: editor for python on the mac In-Reply-To: <37950C48.AE130ADA@jps.net> References: <199903141702.MAA29966@python.org> Message-ID: At 4:54 PM -0700 07/20/99, Christopher Barker wrote: >If anyone has Python modes for BBedit, or any other Mac editor, that >might work as well. I don't know about a "mode", but there is a "Run Python" BBEdit extension that I used to use before the IDE came along. It worked pretty well. >2) indents differently that emacs python mode (tabs). I go back and >forth between the two a lot, so that's a pain. Tabs are a pretty standard method of indentation on the Mac. How about using a converter when you go back and forth? (I have an example on my Python site.) >3) no colorization. (is this in the works?) Yes, it's actually been there for a while, but Just is reluctant to release it because it isn't perfect (it can get confused when multi-line strings are involved, and when this happens you have to hit a command key to re-colorize the entire file). If you think that even imperfect colorization is worlds better than no colorization at all, write Just a note and politely explain this to him. (Note that it does more than just colorization: it can do any syntax styling, e.g. keywords in bold, comments in italics, etc. -- very flexible.) Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From joe@strout.net Wed Jul 21 17:13:07 1999 From: joe@strout.net (Joseph J. Strout) Date: Wed, 21 Jul 1999 09:13:07 -0700 Subject: [Pythonmac-SIG] wxPython In-Reply-To: <3795102E.13092613@jps.net> References: <199903141702.MAA29966@python.org> Message-ID: At 5:11 PM -0700 07/20/99, Christopher Barker wrote: >Is anyone working on wxPython for the Mac? Not to my knowledge. Though I've thought about it. >I'm desperately searching for a way to do cross platform GUI development >on Linux, the Mac and probably Windows while I'm at it. Tkinter just >seeems to have too many shortcomings, particularly on the Mac. What are you trying to do, exactly? If you need something less than a full application with menus, buttons, etc., but just need to draw in a window and handle simple mouse/keyboard interaction, then PIDDLE (plus the IDE) might be a good way to go. >wxWindows for the Mac seems to be pretty close to ready, so it would be >great to have wxPython also. Agreed. I downloaded wxWindows last week, and after clearing up some confusion with help from the author, it compiled very nicely. (You should find my read-me on his web site now.) Of all the cross-platform frameworks I've tried, this one looks most promising. >By the way, can someone point me to a FAQ or something that addresses >why Guido hasn't established a GUI framework for Python? It's not that F a Q -- I think most people reasonably assume that Guido has enough to do with the rest of Python. >I think the >promise of cross platform development that Python offers would be MUCH >enhanced by a standard GUI. There is a whole lot of duplicated effort >going on, and there is NO good option yet that includes the Mac. Well, I agree with that. Python would have beaten the snot out of Java if it had had the GUI standardization that Java does. It's a shame... Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From dozier@abs.net Thu Jul 22 02:39:24 1999 From: dozier@abs.net (Bill Dozier) Date: Wed, 21 Jul 1999 21:39:24 -0400 Subject: [Pythonmac-SIG] RE: editor for python on the mac Message-ID: <199907220236.WAA26762@vwww1.abs.net> >From: "Joseph J. Strout" >Subject: Re: [Pythonmac-SIG] RE: editor for python on the mac >>3) no colorization. (is this in the works?) > > Yes, it's actually been there for a while, but Just is reluctant to release > it because it isn't perfect (it can get confused when multi-line strings > are involved, and when this happens you have to hit a command key to > re-colorize the entire file). This happens to me sometimes in Xemacs (on Solaris) using the most up-to-date python-mode. It's no reason not to release the feature! >If you think that even imperfect > colorization is worlds better than no colorization at all, write Just a > note and politely explain this to him. (Note that it does more than just > colorization: it can do any syntax styling, e.g. keywords in bold, comments > in italics, etc. -- very flexible.) > I use Xemacs pretty much all day every day at work on NT and Solaris. I am completely spoiled by syntax highlighting and now find it hard to do without. Just, please make it available and I promise not to complain if it's not perfect! Bill From savageb@pacbell.net Thu Jul 22 07:30:49 1999 From: savageb@pacbell.net (savageb) Date: Wed, 21 Jul 1999 23:30:49 -0700 Subject: [Pythonmac-SIG] wxPython - Guido Message-ID: <199907220631.XAA26638@mta2.snfc21.pbi.net> As it turned out Guido came into town and spoke at a local Python enthusiasts meeting (BayPIGgies) tonight. The question of GUIs came up; it sounds like the main reason he prefers Tkinter is because the support for Macs in the other frameworks is/has been so week (and Tk has guaranteed support from Scriptics on Unix, Windows, and MacOS). He also said it might be time to have another discussion at the Python conference next January regarding GUI options, now that the other frameworks have had a chance to mature. BTW, some more Mac things came up, nothing big, but there was some minor discussion of MacOS X, and Guido said he was sure he would eventually get another Mac. ;) Bob From cbarker@jps.net Thu Jul 22 17:59:01 1999 From: cbarker@jps.net (Christopher Barker) Date: Thu, 22 Jul 1999 09:59:01 -0700 Subject: [Pythonmac-SIG] Re:RE: editor for python on the mac References: <199907220503.BAA21467@python.org> Message-ID: <37974DD5.C0E4E12F@jps.net> All: Thanks for the helpfull replies. I've got python mode for Alpha, thanks to Rob Managan (thanks Rob). I still don't have it doing indenting like I'd like, but I'll play with it and see if I can get it to do it. Just: One more vote for colorization in the IDE. Imperfect Colorization is fine. I don't use multiline strings that often anyway. Also, can the IDE be set to use apaces instead of tabs for indenting? That would make it compatable with Emacs mode. While I'm on Emacs python mode: Can I set it to use tabs instead of spaces? I really don't care, as long as it's consistent. Frankly, I kind of wish Python only allowed one or the other, then we wouldn't have this problem. Joe strout suggested that I use a converter when I go back and forth, which would certainly work, but really would be too much of a pain. I want to be able to put a script on my Linux box Appletalk server that others can put on their Mac and run and edit without a lot of hassle. Thanks for everyone's input. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Fri Jul 23 17:56:18 1999 From: cbarker@jps.net (Chris Barker) Date: Fri, 23 Jul 1999 09:56:18 -0700 Subject: [Pythonmac-SIG] wxPython - Guido References: <199907230504.BAA15169@python.org> Message-ID: <37989EB2.A4CAFD35@jps.net> Well, I'm glad the GUI thing is still being discussed. The problem with committing to Tkinter because of the Mac support is that the Mac support is not so good. To tell you the truth, I have been completely unimpressed with Tkinter on both windows and Mac, It really does work a lot better on Unix. I'm kind of disapointed that we have to be dependent on another organisation (Scriptics) and another language (tcl) for GUI support. I believe: "Define it and they will build it!" If a GUI standard were declared, people would probably write the code to make it work on all the major platforms. wxWindows, for one, seems to be almost ready on the Mac, so wxPython could be a good choice. It has some nice features, and is not dependent on another interpreted language. It would still be dependent on the wxWindows project, but that's all open source code, and could be adopted by the Python community in the future if neccesary. What we REALLY REALLY need is a cross platform GUI toolbox that is good enough that people would use it even if they don't need a cross platform solution. Does anyone on this list use Tkinter on the Mac for apps they are only going to run on the Mac? Am I the only one that need a Linux-Mac solution ? Well, that's my rant of the day. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Fri Jul 23 21:45:39 1999 From: cbarker@jps.net (Chris Barker) Date: Fri, 23 Jul 1999 13:45:39 -0700 Subject: [Pythonmac-SIG] Using Spaces for indentation in IDE References: <199907220503.BAA21467@python.org> Message-ID: <3798D473.F069568F@jps.net> HI folks, I am struggling with getting the interaction between using Python scripts on both Linux and the Mac. The problem is the spaces vs tabs indentation. Emacs Python mode uses spaces. the Mac IDE and all the editors I've found so far use tabs. This can be a major pain in the butt, and I don't want to have to run a conversion script every time I go back and forth. These seem to be my options: Set up emacs mode to use tabs: It doesn't seem obvious to me how to do this, but I'm trying. Can the IDE be set up to use just spaces for indentation? I'd like it to be just like Emacs mode. Get the Alpha Python mode to act like emacs -Thanks -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From jhouchin@texoma.net Sat Jul 24 15:05:32 1999 From: jhouchin@texoma.net (Jimmie Houchin) Date: Sat, 24 Jul 1999 09:05:32 -0500 Subject: [Pythonmac-SIG] wxPython - Guido In-Reply-To: <37989EB2.A4CAFD35@jps.net> References: <199907230504.BAA15169@python.org> Message-ID: <3.0.5.32.19990724090532.00a8c3a0@texoma.net> At 09:56 AM 7/23/99 -0700, Chris Barker wrote: > >Well, I'm glad the GUI thing is still being discussed. The problem with >committing to Tkinter because of the Mac support is that the Mac support >is not so good. To tell you the truth, I have been completely >unimpressed with Tkinter on both windows and Mac, It really does work a >lot better on Unix. Several months ago I tried the PySol app created by Markus F.X.J. Oberhumer. On my PC at work it ran without problem. I tried it on my Mac at home and it would not run. :( I then emailed Markus and he replied that he had been told that using Tkinter on the Mac required lots of memory. I was already at 20mb for Python so I bumped it up to 48mb and it ran. I think the lowest it got was around 40mb. This isn't good for a cross-platform GUI. >I'm kind of disapointed that we have to be dependent on another >organisation (Scriptics) and another language (tcl) for GUI support. Agreed. >I believe: "Define it and they will build it!" > >If a GUI standard were declared, people would probably write the code to >make it work on all the major platforms. wxWindows, for one, seems to be >almost ready on the Mac, so wxPython could be a good choice. It has some >nice features, and is not dependent on another interpreted language. It >would still be dependent on the wxWindows project, but that's all open >source code, and could be adopted by the Python community in the future >if neccesary. > >What we REALLY REALLY need is a cross platform GUI toolbox that is good >enough that people would use it even if they don't need a cross platform >solution. Does anyone on this list use Tkinter on the Mac for apps they >are only going to run on the Mac? I agree. If each platform's GUI is good enough to develop a GUI for that platform even if there is no need of cross-platform for that app. >Am I the only one that need a Linux-Mac solution ? Not at all. I personally Windows as little as possible and primarily when I am not making the choice. At home I own 4 Macs and am about to purchase an Intel box for development running Linux. >Well, that's my rant of the day. > >-Chris > > >-- >Christopher Barker, >Ph.D. >cbarker@jps.net --- --- --- >http://www.jps.net/cbarker -----@@ -----@@ -----@@ > ------@@@ ------@@@ ------@@@ >Water Resources Engineering ------ @ ------ @ ------ @ >Coastal and Fluvial Hydrodynamics ------- --------- -------- >------------------------------------------------------------------------ >------------------------------------------------------------------------ From just@letterror.com Sat Jul 24 16:51:42 1999 From: just@letterror.com (Just van Rossum) Date: Sat, 24 Jul 1999 17:51:42 +0200 Subject: [Pythonmac-SIG] wxPython - Guido In-Reply-To: <3.0.5.32.19990724090532.00a8c3a0@texoma.net> References: <37989EB2.A4CAFD35@jps.net> <199907230504.BAA15169@python.org> Message-ID: At 9:05 AM -0500 7/24/99, Jimmie Houchin wrote: >Several months ago I tried the PySol app created by Markus F.X.J. >Oberhumer. On my PC at work it ran without problem. I tried it on my Mac at >home and it would not run. :( >I then emailed Markus and he replied that he had been told that using >Tkinter on the Mac required lots of memory. I was already at 20mb for >Python so I bumped it up to 48mb and it ran. I think the lowest it got was >around 40mb. This isn't good for a cross-platform GUI. Just to clarify: this had nothing to do with Tk(inter)! PySol comes as one *gigantic* source file: 6150 lines, or 194 kb. The Python *compiler* uses an unproportionally large amount of memory for large source files, and that causes the problem. Once compiled to an applet it runs very nicely using "only" 15 megs... (Of course, Tk is still a memory hog, but then again, so is Python) Just From jhouchin@texoma.net Sat Jul 24 17:50:21 1999 From: jhouchin@texoma.net (Jimmie Houchin) Date: Sat, 24 Jul 1999 11:50:21 -0500 Subject: [Pythonmac-SIG] wxPython - Guido In-Reply-To: References: <3.0.5.32.19990724090532.00a8c3a0@texoma.net> <37989EB2.A4CAFD35@jps.net> <199907230504.BAA15169@python.org> Message-ID: <3.0.5.32.19990724115021.007ff9b0@texoma.net> At 05:51 PM 7/24/99 +0200, Just van Rossum wrote: >At 9:05 AM -0500 7/24/99, Jimmie Houchin wrote: >>Several months ago I tried the PySol app created by Markus F.X.J. >>Oberhumer. On my PC at work it ran without problem. I tried it on my Mac at >>home and it would not run. :( >>I then emailed Markus and he replied that he had been told that using >>Tkinter on the Mac required lots of memory. I was already at 20mb for >>Python so I bumped it up to 48mb and it ran. I think the lowest it got was >>around 40mb. This isn't good for a cross-platform GUI. > >Just to clarify: this had nothing to do with Tk(inter)! I can understand that. Even if it only had to do with Tk and nothing Python was at fault, it is still a potential problem. None of the "native" Solitaire games consume anywhere near such. I am willing to grant interpreted environments such as Python, Tk, Java greater lattitude in resource requirements, but there is a limit. Python brings some nice benefits for it's resource requirements. :) >PySol comes as one *gigantic* source file: 6150 lines, or 194 kb. The >Python *compiler* uses an unproportionally large amount of memory for large >source files, and that causes the problem. Once compiled to an applet it >runs very nicely using "only" 15 megs... That's nice to know maybe I'll make an applet. I attempted to read it's source once. Yuck. I didn't go very far. >(Of course, Tk is still a memory hog, but then again, so is Python) I've not used any of the cross-platform GUI's. It would be nice to have one which did not add excessively to the resource requirements due to it being on another interpreted environment. Thanks, Jimmie Houchin >Just From kantel@mpiwg-berlin.mpg.de Mon Jul 26 09:44:50 1999 From: kantel@mpiwg-berlin.mpg.de (=?iso-8859-1?Q?J=F6rg?= Kantel) Date: Mon, 26 Jul 1999 10:44:50 +0200 Subject: [Pythonmac-SIG] wxPython - Guido In-Reply-To: <37989EB2.A4CAFD35@jps.net> References: <199907230504.BAA15169@python.org> Message-ID: Chris Barker wrote >solution. Does anyone on this list use Tkinter on the Mac for apps they >are only going to run on the Mac? > >Am I the only one that need a Linux-Mac solution ? > Yes I use Tkinter also for apps that only should run on the Mac and I also need a lot of Linux/Solaris/-Mac solutions, exspecially for our XML stuff (we have no Windows here at the Institut and therefore we may be a little bit exotic but pls. don't stop the Tkinter support for GUIing - in another case I have to go back to TCL and I don't want. J"org -- -------------------------------------------------------------------------- J"org Kantel Max-Planck-Institute for the History of Science Computer-Department kantel@mpiwg-berlin.mpg.de Wilhelmstr. 44 http://www.mpiwg-berlin.mpg.de/staff/kantel/kantel.html D-10117 Berlin fon: +4930-22667-220 fax: +4930-22667-299 -------------------------------------------------------------------------- From joe@strout.net Mon Jul 26 16:00:25 1999 From: joe@strout.net (Joseph J. Strout) Date: Mon, 26 Jul 1999 08:00:25 -0700 Subject: [Pythonmac-SIG] Using Spaces for indentation in IDE In-Reply-To: <3798D473.F069568F@jps.net> References: <199907220503.BAA21467@python.org> Message-ID: At 1:45 PM -0700 07/23/99, Chris Barker wrote: >Can the IDE be set up to use just spaces for indentation? I'd like it to >be just like Emacs mode. If you must continue down this evil path, I think this is your most likely bet. Hack the IDE code that loads and saves files. On loading, have it convert spaces to tabs. On saving, have it convert tabs to spaces. This will be far easier than trying to get the text engine (WASTE) to understand that a tab isn't really a tab, but some variable number of spaces, and that when you hit delete, sometimes you don't want to delete just one space, but 2 or 3 or 4. An alternative to hacking the IDE would be to attach a Folder Action to the folder where you keep these scripts, that watches for files to be added or updated. It then launches a converter that automagically copies from a Unix folder to a Mac folder or vice versa, while doing the appropriate spaces/tab conversion. But this means duplicate folders, and may be even more of a pain to set up than hacking the IDE. Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From doug@sonosphere.com Wed Jul 28 23:23:19 1999 From: doug@sonosphere.com (Doug Wyatt) Date: Wed, 28 Jul 1999 18:23:19 -0400 Subject: [Pythonmac-SIG] stat(), alias files Message-ID: I've encountered a couple of small things with Mac Python 1.5.1 and 1.5.2b1. 1. A file modification time returned by os.stat() is 4 years in the past compared to a time constructed with time.mktime(). I suspect this is a GUSI issue. 2. I've been writing programs to scan directories, and keep tripping over alias files. It's particularly problematic when I use macfs.ResolveAliasFile and there pops up a dialog to insert a CD or mount a server. I'd rather just ignore alias files rather than pass every single file/directory I encounter to ResolveAliasFile. Have I missed a call that will tell me whether a file is an alias? I could test FInfo.Flags (where 0x8000 is kIsAlias), but I don't see a way to fetch a file's FInfo. Should the FInfo __init__ take an FSSpec/full path argument for the file whose info is to be fetched? It tolerates being passed an argument, but always seems to return a zero-filled FInfo, as the documentation says it will. I'd be happy to dig in and fix things if I knew what the right places for the fixes would be. TIA, Doug -- Doug Wyatt doug@sonosphere.com http://www.sonosphere.com/doug/ From joe@strout.net Thu Jul 29 00:03:06 1999 From: joe@strout.net (Joseph J. Strout) Date: Wed, 28 Jul 1999 16:03:06 -0700 Subject: [Pythonmac-SIG] stat(), alias files In-Reply-To: References: Message-ID: At 6:23 PM -0400 07/28/99, Doug Wyatt wrote: >1. A file modification time returned by os.stat() is 4 years in the past >compared to a time constructed with time.mktime(). I suspect this is a >GUSI issue. No, this is a documented difference between MacOS times and Python standard times. One is based on Jan 1, 1900, while the other is Jan 1, 1904. >2. I've been writing programs to scan directories, and keep tripping over >alias files. It's particularly problematic when I use >macfs.ResolveAliasFile and there pops up a dialog to insert a CD or mount a >server. I'd rather just ignore alias files rather than pass every single >file/directory I encounter to ResolveAliasFile. Have I missed a call that >will tell me whether a file is an alias? I could test FInfo.Flags (where >0x8000 is kIsAlias), but I don't see a way to fetch a file's FInfo. Here's the code from my little FileCrawler class I posted a while back: spec = macfs.FSSpec(fpath) try: info = spec.GetFInfo() except: # if GetFInfo fails, it must be a folder! info = macfs.FInfo() info.Type = 'fldr' if info.Flags & kIsAlias: if info.Type == 'fdrp': self.handleFolderAlias(fpath) else: self.handleAlias(fpath) See, you get a file's FInfo with GetFInfo(). >I'd be happy to dig in and fix things if I knew what the right places for >the fixes would be. Your code, I'd say. ;) Cheers, -- Joe ,------------------------------------------------------------------. | Joseph J. Strout Biocomputing -- The Salk Institute | | joe@strout.net http://www.strout.net | `------------------------------------------------------------------' From doug@sonosphere.com Thu Jul 29 00:12:28 1999 From: doug@sonosphere.com (Doug Wyatt) Date: Wed, 28 Jul 1999 19:12:28 -0400 Subject: [Pythonmac-SIG] stat(), alias files In-Reply-To: References: Message-ID: At 16:03 -0700 7/28/99, Joseph J. Strout wrote: > At 6:23 PM -0400 07/28/99, Doug Wyatt wrote: > > >1. A file modification time returned by os.stat() is 4 years in the past > >compared to a time constructed with time.mktime(). I suspect this is a > >GUSI issue. > > No, this is a documented difference between MacOS times and Python > standard times. One is based on Jan 1, 1900, while the other is Jan > 1, 1904. This bugs me. It seems that code that uses os.stat and the time module ought to be portable and ignorant of the fact that MacOS times are different from Python times. I'd have thought that the times returned by stat would be in Python times. Oh well. > See, you get a file's FInfo with GetFInfo(). Aha, I had done that before, long ago, and couldn't remember how. Thanks. Thanks for the reply! Doug From jack@oratrix.nl Thu Jul 29 09:50:41 1999 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 29 Jul 1999 10:50:41 +0200 Subject: [Pythonmac-SIG] stat(), alias files In-Reply-To: Message by Doug Wyatt , Wed, 28 Jul 1999 19:12:28 -0400 , Message-ID: <19990729085042.6FAF0303120@snelboot.oratrix.nl> > This bugs me. It seems that code that uses os.stat and the time module > ought to be portable and ignorant of the fact that MacOS times are > different from Python times. I'd have thought that the times returned by > stat would be in Python times. Oh well. I agree that it's a real bother, but I never fixed this because I was afraid of breaking other time-compatability (between os.stat() and fsspec.GetFInfo(), for instance). OTOH, it could be argued that compatability between os.time() and os.stat(), both being unix-emulation routines, is more important. Hmm, I think I just convince myself:-), unless anyone quickly disagrees I'll fix the times. -- 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