From bogus@does.not.exist.com Mon Dec 4 15:56:56 2000 From: bogus@does.not.exist.com () Date: Mon Dec 4 15:57:23 2000 Subject: No subject hera.cwi.nl with SMTP id IAA02132 for ; Thu, 9 Sep 1999 08:07:08 +0200 (MET DST) Received: from exchange.adventure.com by ns.adventure.com via smtpd (for hera.cwi.nl [192.16.191.1]) with SMTP; 9 Sep 1999 06:07:08 UT Received: by atlas.adventure.com with Internet Mail Service (5.5.2448.0) id ; Wed, 8 Sep 1999 23:07:06 -0700 Message-ID: <775C7FB8CE24D31195930008C745F54301CD43@HERMES.adventure.com> From: Hung Jung Lu To: "'Jack.Jansen@cwi.nl'" Subject: Custom Folder Icon Date: Wed, 8 Sep 1999 23:05:37 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" Return-Path: Hi, I would appreciate it if you could help me on this. Right now in Mac Python, is it possible to set the hasCustomIcon bit for a folder? (I know I can set it for a file, but I have not found anything for folders.) I have a folder with the 'Icon\015' file inside, but I have not been able to see the custom icon. regards, Hung Jung ------- End of Forwarded Message From tom@othermedia.com Fri Dec 1 09:17:33 2000 From: tom@othermedia.com (tom smith) Date: Fri, 01 Dec 2000 09:17:33 +0000 Subject: [Pythonmac-SIG] pyobjc-dev mailing list at SourceForge In-Reply-To: Message-ID: on 30/11/00 10:28 pm, Steven D. Majewski at sdm7g@minsky.med.virginia.edu wrote: > > > > There seems to now be a pyobjc-dev mailing list on SourceForge. > > http://lists.sourceforge.net/mailman/listinfo/pyobjc-dev > > Except for the occasional progress report, pyobjc discussion > will move there. Will someone make an announcement here when I can run MacPython on OSX....emacs is not my style man :-) thanks tom From christian@rocketnetwork.com Tue Dec 5 21:17:21 2000 From: christian@rocketnetwork.com (Christian Reyes) Date: Tue, 5 Dec 2000 13:17:21 -0800 Subject: [Pythonmac-SIG] (no subject) In-Reply-To: <20001121170324.594A81D331@dinsdale.python.org> Message-ID: Ok, real quick one. How do I get python to yield to other processes on the mac? christian From cbarker@jps.net Wed Dec 6 01:29:02 2000 From: cbarker@jps.net (Chris Barker) Date: Tue, 05 Dec 2000 17:29:02 -0800 Subject: [Pythonmac-SIG] (no subject) References: Message-ID: <3A2D965E.91ECAC1E@jps.net> Christian Reyes wrote: > > Ok, real quick one. > How do I get python to yield to other processes on the mac? > > christian > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://www.python.org/mailman/listinfo/pythonmac-sig Run OSX or PPC Linux (Sorry, I couldn't help myself) -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From tom@othermedia.com Wed Dec 6 09:41:41 2000 From: tom@othermedia.com (tom smith) Date: Wed, 06 Dec 2000 09:41:41 +0000 Subject: [Pythonmac-SIG] (no subject) In-Reply-To: Message-ID: on 5/12/00 9:17 pm, Christian Reyes at christian@rocketnetwork.com wrote: > Ok, real quick one. > How do I get python to yield to other processes on the mac? haha! I've just been playing with this... My *solutions* were... Have a look at the "framework" stuff in the mac folder. With this you can handle you're code on an idle event...so, everytime you get an idle message, you do a bit more of your stuff. This results is an "always-on" application that doesn't hog the processor... My other *solution* was to use Tk, which has an event loop, and the setafter() call, with which you can set how you get called back... I could get the SchedParams() thing to let go of the processor or time.sleep()...and threading...apart from being complicated...seems to crash a fair bit...with me at least. The two examples above at least work, although they're not exactly what you want hope this helps tom From jack@oratrix.nl Wed Dec 6 09:41:36 2000 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 06 Dec 2000 10:41:36 +0100 Subject: [Pythonmac-SIG] Re: In-Reply-To: Message by "Christian Reyes" , Tue, 5 Dec 2000 13:17:21 -0800 , Message-ID: <20001206094137.F11ED3B89B3@snelboot.oratrix.nl> > Ok, real quick one. > How do I get python to yield to other processes on the mac? It does so automatically, in the interpreter inner loop. You can change the parameters (how often and how long it yields) with MacOS.SchedParams(). -- 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 Dec 6 10:44:31 2000 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 06 Dec 2000 11:44:31 +0100 Subject: [Pythonmac-SIG] Alias resource portability between MacOS9 and MacOSX Message-ID: <20001206104431.97F803B89B3@snelboot.oratrix.nl> Folks, I have a strange problem that I hope someone can help with. I'm running MacOSX on one partition, MacOS9 on the other, with MacOSX using the 9 partition for its classic emulation. The problem is that I have to recreate the Python preference file every time I switch from 9 to 10 or back: the alis resource that is created by the one system isn't understood by the other. The pathname is correct in both cases, so I would have guessed that ResolveAlias could hand it, but it can't. Here's the hex data for the two alis resources: Alis resource created while MacOS 9 ran standalone: 0000000000D200020001035361700000 00000000000000000000000000000000 000000000000B625EA7F424400000000 2B8006507974686F6E00000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000509DB5E523BF00E302160276 03D4FFFFFFFF00000000000000000000 00000000000000000005535744657600 0001000C00002B8000002B0500002B03 000200195361703A7566733A6A61636B 3A53574465763A507974686F6E00FFFF 0000 Alis created while MacOS 9 ran under MacOS X: 0000000000D200020001035361700000 00000000000000000000000000000000 000000000000B625DC6F424400000000 2B8006507974686F6E00000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000509DB5E5079F00E302160276 03D4FFFFFFFF00000000000000000000 00000000000000000005535744657600 0001000C00002B8000002B0500002B03 000200195361703A7566733A6A61636B 3A53574465763A507974686F6E00FFFF 0000 diffs: word 28 is EA7F vs. DC6F word 78 is 23BF vs. 079F. Does anyone else see this same problem? Does anyone know whether it's possible to create an alis resource that will work on both systems? If that is impossible, is there a way to find out whether we're running under standalone MacOS9 or 9-under-X, so that I can have two different alis resources? Or should I not bother and assume this problem goes away when the real MacOSX comes out and people will use either 9 or X but not both? -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | ++++ see http://www.xs4all.nl/~tank/ ++++ From tom@othermedia.com Wed Dec 6 10:49:56 2000 From: tom@othermedia.com (tom smith) Date: Wed, 06 Dec 2000 10:49:56 +0000 Subject: [Pythonmac-SIG] Alias resource portability between MacOS9 and MacOSX In-Reply-To: <20001206104431.97F803B89B3@snelboot.oratrix.nl> Message-ID: on 6/12/00 10:44 am, Jack Jansen at jack@oratrix.nl wrote: > I have a strange problem that I hope someone can help with. I'm running MacOSX > on one partition, MacOS9 on the other, with MacOSX using the 9 partition for > its classic emulation. Er..me too, with the same setup... I think...reading between the lines a bit. When I run MacPython in Classic emulation...it complains that the preferences file is corrupt or missing. When I boot again in 9, everything is fine....I this what you mean? From billb@mousa.demon.co.uk Wed Dec 6 10:49:05 2000 From: billb@mousa.demon.co.uk (Bill Bedford) Date: Wed, 6 Dec 2000 10:49:05 +0000 Subject: [Pythonmac-SIG] (no subject) In-Reply-To: References: Message-ID: <972460711708009822759@mousa.demon.co.uk> At 1:17 pm -0800 05/12/00, Christian Reyes wrote: >Ok, real quick one. >How do I get python to yield to other processes on the mac? > If you need a sledgehammer approach you can bring the other process to the front. _InterfaceLib = calldll.getlibrary('InterfaceLib') _GetCurrentProcess = calldll.newcall(_InterfaceLib.GetCurrentProcess, 'None', 'InLong') _SetFrontProcess = calldll.newcall(_InterfaceLib.SetFrontProcess, 'OSErr', 'InLong') def exportart(): buffer = array.array('c', '\0\0\0\0\0\0\0\0') ptr = buffer.buffer_info()[0] _GetCurrentProcess(ptr) Do some apple event stuff _SetFrontProcess(ptr) -- Bill Bedford There has been an alarming increase in the number of things you know nothing about. From jack@oratrix.nl Wed Dec 6 12:13:58 2000 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 06 Dec 2000 13:13:58 +0100 Subject: [Pythonmac-SIG] Alias resource portability between MacOS9 and MacOSX In-Reply-To: Message by tom smith , Wed, 06 Dec 2000 10:49:56 +0000 , Message-ID: <20001206121359.1533A3B89B3@snelboot.oratrix.nl> > Er..me too, with the same setup... I think...reading between the lines a > bit. When I run MacPython in Classic emulation...it complains that the > preferences file is corrupt or missing. When I boot again in 9, everything > is fine....I this what you mean? Yep, that's the thing. Removing the preference file and then making sure the first Python interpreter/applet is run from the Python home folder will fix it. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From fgranger@altern.org Wed Dec 6 18:08:44 2000 From: fgranger@altern.org (Francois Granger) Date: Wed, 06 Dec 2000 19:08:44 +0100 Subject: [Pythonmac-SIG] (no subject) In-Reply-To: Message-ID: on 6/12/00 10:41, tom smith at tom@othermedia.com wrote: > Have a look at the "framework" stuff in the mac folder. With this you can > handle you're code on an idle event...so, everytime you get an idle messa= ge, > you do a bit more of your stuff. This results is an "always-on" applicat= ion > that doesn't hog the processor... Could you, please, give a simple sample code for a real beginner with "framework". --=20 Fran=E7ois Granger fgranger@altern.org From tom@othermedia.com Wed Dec 6 19:00:05 2000 From: tom@othermedia.com (tom smith) Date: Wed, 06 Dec 2000 19:00:05 +0000 Subject: [Pythonmac-SIG] (no subject) In-Reply-To: Message-ID: > 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_3058974005_3206327_MIME_Part Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit on 6/12/00 6:08 pm, Francois Granger at fgranger@altern.org wrote: > on 6/12/00 10:41, tom smith at tom@othermedia.com wrote: > >> Have a look at the "framework" stuff in the mac folder. With this you can >> handle you're code on an idle event...so, everytime you get an idle message, >> you do a bit more of your stuff. This results is an "always-on" application >> that doesn't hog the processor... > > Could you, please, give a simple sample code for a real beginner with > "framework". The PythonSlave app is where I started...in the mac/contrib/BBy/ folder. Attached is my version, App_Lite.py, without all the AppleEvent Handling stuff. The bit you'd need to do is manage a list of things to do, and write code to get the next_thing_to_do, then remove it from the list.... there are umpteen ways to do that... sql database, shelve database...text files in a folder... I would suggest using python instances, but they'd disappear when you quit the app... anyone else got suggestions on how to manage a queue? tom --MS_Mac_OE_3058974005_3206327_MIME_Part Content-type: multipart/appledouble; boundary="MS_Mac_OE_3058974002_3233799_MIME_Part" --MS_Mac_OE_3058974002_3233799_MIME_Part Content-type: application/applefile; name="app_lite.py" Content-transfer-encoding: base64 Content-disposition: attachment AAUWBwACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAJAAAAPgAAACAAAAADAAAAXgAAAAsAAAAC AAAAaQAAGiZURVhUUGlkZQEAAikBUQAAAAAAAAAAAAAAAAAAAAAAAGFwcF9saXRlLnB5AAAB AAAAGT0AABg9AAAA6QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABUAbQB6ATUBagAAAQAB AAAAAAAAgAAAAAwGDAYAAAAAACAAIAARAv8MAP////8AAAAAAAAAAAAgAAAAIAAAAAAAAAAe AAEACgAAAAAAIAAgAJmAIAAAAAAAIAAgAAAAAAAAAAAASAAAAEgAAAAAAAgAAQAIAAAAAAAA VOwAAAAAAAAACIAAAP8AAP///////wAA/////8zMAAD/////mZkAAP////9mZgAA/////zMz AAD/////AAAAAP//zMz//wAA///MzMzMAAD//8zMmZkAAP//zMxmZgAA///MzDMzAAD//8zM AAAAAP//mZn//wAA//+ZmczMAAD//5mZmZkAAP//mZlmZgAA//+ZmTMzAAD//5mZAAAAAP// Zmb//wAA//9mZszMAAD//2ZmmZkAAP//ZmZmZgAA//9mZjMzAAD//2ZmAAAAAP//MzP//wAA //8zM8zMAAD//zMzmZkAAP//MzNmZgAA//8zMzMzAAD//zMzAAAAAP//AAD//wAA//8AAMzM AAD//wAAmZkAAP//AABmZgAA//8AADMzAAD//wAAAAAAAMzM/////wAAzMz//8zMAADMzP// mZkAAMzM//9mZgAAzMz//zMzAADMzP//AAAAAMzMzMz//wAAzMzMzMzMAADMzMzMmZkAAMzM zMxmZgAAzMzMzDMzAADMzMzMAAAAAMzMmZn//wAAzMyZmczMAADMzJmZmZkAAMzMmZlmZgAA zMyZmTMzAADMzJmZAAAAAMzMZmb//wAAzMxmZszMAADMzGZmmZkAAMzMZmZmZgAAzMxmZjMz AADMzGZmAAAAAMzMMzP//wAAzMwzM8zMAADMzDMzmZkAAMzMMzNmZgAAzMwzMzMzAADMzDMz AAAAAMzMAAD//wAAzMwAAMzMAADMzAAAmZkAAMzMAABmZgAAzMwAADMzAADMzAAAAAAAAJmZ /////wAAmZn//8zMAACZmf//mZkAAJmZ//9mZgAAmZn//zMzAACZmf//AAAAAJmZzMz//wAA mZnMzMzMAACZmczMmZkAAJmZzMxmZgAAmZnMzDMzAACZmczMAAAAAJmZmZn//wAAmZmZmczM AACZmZmZmZkAAJmZmZlmZgAAmZmZmTMzAACZmZmZAAAAAJmZZmb//wAAmZlmZszMAACZmWZm mZkAAJmZZmZmZgAAmZlmZjMzAACZmWZmAAAAAJmZMzP//wAAmZkzM8zMAACZmTMzmZkAAJmZ MzNmZgAAmZkzMzMzAACZmTMzAAAAAJmZAAD//wAAmZkAAMzMAACZmQAAmZkAAJmZAABmZgAA mZkAADMzAACZmQAAAAAAAGZm/////wAAZmb//8zMAABmZv//mZkAAGZm//9mZgAAZmb//zMz AABmZv//AAAAAGZmzMz//wAAZmbMzMzMAABmZszMmZkAAGZmzMxmZgAAZmbMzDMzAABmZszM AAAAAGZmmZn//wAAZmaZmczMAABmZpmZmZkAAGZmmZlmZgAAZmaZmTMzAABmZpmZAAAAAGZm Zmb//wAAZmZmZszMAABmZmZmmZkAAGZmZmZmZgAAZmZmZjMzAABmZmZmAAAAAGZmMzP//wAA ZmYzM8zMAABmZjMzmZkAAGZmMzNmZgAAZmYzMzMzAABmZjMzAAAAAGZmAAD//wAAZmYAAMzM AABmZgAAmZkAAGZmAABmZgAAZmYAADMzAABmZgAAAAAAADMz/////wAAMzP//8zMAAAzM/// mZkAADMz//9mZgAAMzP//zMzAAAzM///AAAAADMzzMz//wAAMzPMzMzMAAAzM8zMmZkAADMz zMxmZgAAMzPMzDMzAAAzM8zMAAAAADMzmZn//wAAMzOZmczMAAAzM5mZmZkAADMzmZlmZgAA MzOZmTMzAAAzM5mZAAAAADMzZmb//wAAMzNmZszMAAAzM2ZmmZkAADMzZmZmZgAAMzNmZjMz AAAzM2ZmAAAAADMzMzP//wAAMzMzM8zMAAAzMzMzmZkAADMzMzNmZgAAMzMzMzMzAAAzMzMz AAAAADMzAAD//wAAMzMAAMzMAAAzMwAAmZkAADMzAABmZgAAMzMAADMzAAAzMwAAAAAAAAAA /////wAAAAD//8zMAAAAAP//mZkAAAAA//9mZgAAAAD//zMzAAAAAP//AAAAAAAAzMz//wAA AADMzMzMAAAAAMzMmZkAAAAAzMxmZgAAAADMzDMzAAAAAMzMAAAAAAAAmZn//wAAAACZmczM AAAAAJmZmZkAAAAAmZlmZgAAAACZmTMzAAAAAJmZAAAAAAAAZmb//wAAAABmZszMAAAAAGZm mZkAAAAAZmZmZgAAAABmZjMzAAAAAGZmAAAAAAAAMzP//wAAAAAzM8zMAAAAADMzmZkAAAAA MzNmZgAAAAAzMzMzAAAAADMzAAAAAAAAAAD//wAAAAAAAMzMAAAAAAAAmZkAAAAAAABmZgAA AAAAADMzAADu7gAAAAAAAN3dAAAAAAAAu7sAAAAAAACqqgAAAAAAAIiIAAAAAAAAd3cAAAAA AABVVQAAAAAAAEREAAAAAAAAIiIAAAAAAAAREQAAAAAAAAAA7u4AAAAAAADd3QAAAAAAALu7 AAAAAAAAqqoAAAAAAACIiAAAAAAAAHd3AAAAAAAAVVUAAAAAAABERAAAAAAAACIiAAAAAAAA EREAAAAAAAAAAO7uAAAAAAAA3d0AAAAAAAC7uwAAAAAAAKqqAAAAAAAAiIgAAAAAAAB3dwAA AAAAAFVVAAAAAAAAREQAAAAAAAAiIgAAAAAAABERAADu7u7u7u4AAN3d3d3d3QAAu7u7u7u7 AACqqqqqqqoAAIiIiIiIiAAAd3d3d3d3AABVVVVVVVUAAERERERERAAAIiIiIiIiAAARERER EREAAAAAAAAAAAAAAAAAIAAgAAAAAAAgACAAAAAKAAAAAwAgABwG/gDo//0AF/4ABf/89PPz 9P7zAPT6//z0AvP0//0AFv4AAP/78wL06v75/wb08/Tz/vP//QAQ/gAA//zz8/8E8/Tz8//9 ABj+AAD//fMC///9/v8A9Pn/BP7z8/T//QAX/gAA//3zBv/9/+D///74/wP0/vP//QAd/gAA //3zE6z/+PVWXYGt/v3+4P//9P/08/P//QAe/gAA//7zDfTq+wArVvpdXYiIrf3+/v8D9P7z //0AHf4AAP/98wz/+gArVl1dgoKIrf7g/v8D9PPz//0AHv4AAP/+8xT0//sA9vf5iF37if3+ 3//0//Tz/v/9AB7+AAD//vMN9P+BAPv7XqxerN/g/v7+/wP09PP//QAd/gAA//7zCvz++Prg //+IiP///uD+/wP+8/T//QAe/gAO//Pz9PuzK12s//9XiP/9/v8G/v//9PTz//0AHv4AAP/+ 8xSsiPj2VohdB/3/3/3+/uD//vTz/v/9AB7+AAD//vMU1vv49fky+ADd/6393f7+//709PP/ /QAe/gAA//7zFP2B+AD33V0AiP/eiP3g///+9PP0//0AHv4AGP/W8/P0+/b2Xd9dXf7/4Kze /vTg/vP0/v/9AB3+AAD//fMT//Yy3oH4gbPq4P6t/uD08/Tz8//9AB7+ABj/89bz8/9W94it +YiI4P/+/t/+8/T0/vT//QAe/gAU/9bz89b/+/X7XSteiN/f/a3g9PP+/vMA//0AHv4AFP/z 89bz8//4XVYy/K39rd/+/vP08/70AP/9AB7+ABj/1vPz///z9/n59/de3f7//uD09PP08/7/ /QAd/gD+/wL0+iT+KwX6+/uI/v/+/gbg/fTz9PP//QAb/gAK//z2JCQq9fn1+Pr8/QPf/ur+ /f0A//0AHv4AGP8kKioreQD4B1ZW+vys/f7+4P79/v79rP/9ABz+AA3/T/b1elUkACsyV1eC rf7f/f0DrND7//0AG/4ADf9PTk96T/YkJE/3+fuI+/wEpaX8gP/9AB7+ABj/JFVPgCpP9SQq T05VevqlpXr7gKWA+3n//QAe/gAY//Z59/okVSoq9ipP93lVeXpOq3p6VdBP//0AHv4AGP96 Knp6AE9PJHoqVU9O9qQk+Xp6VU78Vf/9AB7+ABj/eiqrVSRPVVV59U8qVaT2JNBVek4kq3n/ /QAG/gDo//0AAAD/AAAFYGljbnMAAAVgaWNzIwAAAEh//H/8f/x7/H/8f/x//H/8f/x//H/8 d/xf/HP8Xfx//H/8f/x//H/8f/x//H/8f/x//H/8f/x//H/8f/x//H/8SUNOIwAAAQgf///w H///8B////Af///wH///8B////AfRf/wH8q/8B+T//Afxr/wH9r/8B6f7/AfnP/wH6v/8B8V //Afid3wH53/cB+z//Afmu/wH8v/8B/Zf/Afw//wHi3/8BgD33ARLvfwEIH/0BEKunAVAGXQ EkKVUBEQKlAaSopQH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B// //Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///w H///8B////Af///wH///8B////Af///wH///8B////Af///waWNsOAAABAgAAAD///////// ////////////////////////AAAAAAAAAP/89PPz9PPz8/T/////////9PT09PTz9P8AAAAA AAAA//Pz8/Pz8/Tq/v//////////9PP08/7z/wAAAAAAAAD/8/Pz8/P///////////////// //P08/P/AAAAAAAAAP/z8/Pz///9////9P///////////vPz9P8AAAAAAAAA//Pz8/P//f/g ///+////////////9P7z/wAAAAAAAAD/8/Pz86z/+PVWXYGt/v3+4P//9P/08/P/AAAAAAAA AP/z8/P06vsAK1b6XV2IiK39/v////T+8/8AAAAAAAAA//Pz8/P/+gArVl1dgoKIrf7g//// 9PPz/wAAAAAAAAD/8/Pz9P/7APb3+Yhd+4n9/t//9P/08/7/AAAAAAAAAP/z8/P0/4EA+/te rF6s3+D+/v////T08/8AAAAAAAAA//Pz8/z++Prg//+IiP//4ODg/////vP0/wAAAAAAAAD/ 8/P0+7MrXaz//1eI//3////+///09PP/AAAAAAAAAP/z8/OsiPj2VohdB/3/3/3+/uD//vTz /v8AAAAAAAAA//Pz89b7+PX5MvgA3f+t/d3+/v/+9PTz/wAAAAAAAAD/8/Pz/YH4APfdXQCI /96I/eD///708/T/AAAAAAAAAP/W8/P0+/b2Xd9dXf7/4Kze/vTg/vP0/v8AAAAAAAAA//Pz 8/P/9jLegfiBs+rg/q3+4PTz9PPz/wAAAAAAAAD/89bz8/9W94it+YiI4P/+/t/+8/T0/vT/ AAAAAAAAAP/W8/PW//v1+10rXojf3/2t4PTz/vPz8/8AAAAAAAAA//Pz1vPz//hdVjL8rf2t 3/7+8/Tz9PT0/wAAAAAAAAD/1vPz///z9/n59/de3f7//uD09PP08/7/AAAAAAAAAP////T6 JCsrK/r7+4j+//7+/uD99PP08/8AAAAAAAAA//z2JCQq9fn1+Pr9/f39/d/+6v79/f39/wAA AAAAAAD/JCoqK3kA+AdWVvr8rP3+/uD+/f7+/az/AAAAAAAAAP9P9vV6VSQAKzJXV4Kt39/f /f39/azQ+/8AAAAAAAAA/09OT3pP9iQkT/f5+4j8/Pz8/PylpfyA/wAAAAAAAAD/JFVPgCpP 9SQqT05VevqlpXr7gKWA+3n/AAAAAAAAAP/2eff6JFUqKvYqT/d5VXl6Tqt6elXQT/8AAAAA AAAA/3oqenoAT08keipVT072pCT5enpVTvxV/wAAAAAAAAD/eiqrVSRPVVV59U8qVaT2JNBV ek4kq3n/AAAAAAAAAP////////////////////////////////8AAAAAAAABAB////Af///w H///8B////Af///wH///8B9F//Afyr/wH5P/8B/Gv/Af2v/wHp/v8B+c//Afq//wHxX/8B+J 3fAfnf9wH7P/8B+a7/Afy//wH9l/8B/D//AeLf/wGAPfcBEu9/AQgf/QEQq6cBUAZdASQpVQ ERAqUBpKilAf///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B// //Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///w H///8B////Af///wH///8B////Af///wH///8B////AAAAQAAAAA//////////////////// /////////////wAAAAAAAAD//PTz8/Tz8/P0//////////T09PT08/T/AAAAAAAAAP/z8/Pz 8/P06v7///////////Tz9PP+8/8AAAAAAAAA//Pz8/Pz///////////////////z9PPz/wAA AAAAAAD/8/Pz8////f////T///////////7z8/T/AAAAAAAAAP/z8/Pz//3/4P///v////// //////T+8/8AAAAAAAAA//Pz8/Os//j1Vl2Brf79/uD///T/9PPz/wAAAAAAAAD/8/Pz9Or7 ACtW+l1diIit/f7////0/vP/AAAAAAAAAP/z8/Pz//oAK1ZdXYKCiK3+4P////Tz8/8AAAAA AAAA//Pz8/T/+wD29/mIXfuJ/f7f//T/9PP+/wAAAAAAAAD/8/Pz9P+BAPv7XqxerN/g/v7/ ///09PP/AAAAAAAAAP/z8/P8/vj64P//iIj//+Dg4P////7z9P8AAAAAAAAA//Pz9PuzK12s //9XiP/9/////v//9PTz/wAAAAAAAAD/8/PzrIj49laIXQf9/9/9/v7g//708/7/AAAAAAAA AP/z8/PW+/j1+TL4AN3/rf3d/v7//vT08/8AAAAAAAAA//Pz8/2B+AD33V0AiP/eiP3g///+ 9PP0/wAAAAAAAAD/1vPz9Pv29l3fXV3+/+Cs3v704P7z9P7/AAAAAAAAAP/z8/Pz//Yy3oH4 gbPq4P6t/uD08/Tz8/8AAAAAAAAA//PW8/P/VveIrfmIiOD//v7f/vP09P70/wAAAAAAAAD/ 1vPz1v/79ftdK16I39/9reD08/7z8/P/AAAAAAAAAP/z89bz8//4XVYy/K39rd/+/vP08/T0 9P8AAAAAAAAA/9bz8///8/f5+ff3Xt3+//7g9PTz9PP+/wAAAAAAAAD////0+iQrKyv6+/uI /v/+/v7g/fTz9PP/AAAAAAAAAP/89iQkKvX59fj6/f39/f3f/ur+/f39/f8AAAAAAAAA/yQq Kit5APgHVlb6/Kz9/v7g/v3+/v2s/wAAAAAAAAD/T/b1elUkACsyV1eCrd/f3/39/f2s0Pv/ AAAAAAAAAP9PTk96T/YkJE/3+fuI/Pz8/Pz8paX8gP8AAAAAAAAA/yRVT4AqT/UkKk9OVXr6 paV6+4ClgPt5/wAAAAAAAAD/9nn3+iRVKir2Kk/3eVV5ek6renpV0E//AAAAAAAAAP96Knp6 AE9PJHoqVU9O9qQk+Xp6VU78Vf8AAAAAAAAA/3oqq1UkT1VVefVPKlWk9iTQVXpOJKt5/wAA AAAAAAD/////////////////////////////////AAAAAAAAAEB//H/8f/x7/H/8f/x//H/8 f/x//H/8d/xf/HP8Xfx//H/8f/x//H/8f/x//H/8f/x//H/8f/x//H/8f/x//H/8AAAATgAA AAQAAAAAd2FudHR5cGUAAAAEY2Rpc2Zyb21udWxsAAAAAGZvcm1lbnVtAAAABG5hbWVzZWxk VEVYVAAAAA1Ub20ncyBhcmNoaXZlAAAAADoAAgAAAAAAFABIACQAk4gJTmV3c0hvdW5kAAAA AAAAZACEAGQAhMACAIAAAAAAACoAQAC8AL3AAgCAAAAA1ntzFAAAAHJ1bl93aXRoX2ludGVy cHJldGVyaQAAAABzBwAAAHRhYnNpemUoAgAAAGkIAAAAaQEAAABzDAAAAGZvbnRzZXR0aW5n cygEAAAAcwYAAABHZW5ldmFpAAAAAGkMAAAAKAMAAABpAAAAAGn/fwAAaQAAAABzDAAAAHdp bmRvd2JvdW5kcygEAAAAaQ4AAABpNwAAAGkXAwAAaeoCAABzCwAAAHJ1bl9hc19tYWluaQAA AABzCQAAAHNlbGVjdGlvbigCAAAAaZ4AAABpngAAADAAAAEAAAAZPQAAGD0AAADpCybPiAQK AAAAHADSAAhETE9HAAAASkRJVEwAAABWUElDVAAAAGJpY25zAAAAbklDTiMAAAB6aWNsOAAA AIZpY3MjAAAAkm9iaiAAAACeUHlXUwAAAKoH0QAAAAAAAAAAAAAAgP//AAAXJQAAAAAAgP// AAAAGQAAAAAAgP//AAAMIwAAAAAAgP//AAARhwAAAAAAgP//AAASiwAAAAAAgP//AAAWjwAA AAAAgP//AAAW0wAAAAAAgAAHAAAXYwsnY1AGc3BsYXNoD3dpbmRvdyBzZXR0aW5ncw== --MS_Mac_OE_3058974002_3233799_MIME_Part Content-type: text/plain; name="app_lite.py"; x-mac-creator="50696465"; x-mac-type="54455854" Content-disposition: attachment Content-transfer-encoding: base64 IiIiDWFwcF9saXRlLnB5DUEgaGFja2VkIHZlcnNpb24gb2YgUHl0aG9uQ0dJU2xhdmUuDUhh cyBhbnlvbmUgZG9uZSB0aGUgZXF1aXZhbGVudCBvZiB0aGlzIGluIFRraW50ZXI/DWxldCBt ZSBrbm93Li4udG9tQG90aGVybWVkaWEuY29tLCBJIGNvbGxlY3QgZXhhbXBsZXMuLi4NIiIi DV9fdmVyc2lvbl9fID0gIjAuMS4zIg0NaW1wb3J0IEZyYW1lV29yaywgc3lzLCB0cmFjZWJh Y2ssIHN0cmluZywgRWFzeURpYWxvZ3MsIG9zLCBRZCwgdHlwZXMNZnJvbSBFdmVudHMgaW1w b3J0IGNoYXJDb2RlTWFzaywgY21kS2V5DWltcG9ydCBNYWNPUywgRXZ0LCB0aW1lDQ0NDWNs YXNzIFB5dGhvblNsYXZlKEZyYW1lV29yay5BcHBsaWNhdGlvbik6DQlkZWYgX19pbml0X18o c2VsZik6DQkJRnJhbWVXb3JrLkFwcGxpY2F0aW9uLl9faW5pdF9fKHNlbGYpDQkJTWFjT1Mu U2NoZWRQYXJhbXMoKSAjIGRvbid0IGtub3cgaWYgdGhpcyB3b3Jrcw0JCU1hY09TLkVuYWJs ZUFwcHN3aXRjaCgxKSAjIG9yIHRoaXMgZWl0aGVyLi4uDQkJDQlkZWYgbWFrZXVzZXJtZW51 cyhzZWxmKToNCQlzZWxmLmZpbGVtZW51ID0gbSA9IEZyYW1lV29yay5NZW51KHNlbGYubWVu dWJhciwgIkZpbGUiKQ0JCXNlbGYuX3F1aXRpdGVtID0gRnJhbWVXb3JrLk1lbnVJdGVtKG0s ICJRdWl0IiwgIlEiLCBzZWxmLl9xdWl0KQ0JDQlkZWYgZG9fa2V5KHNlbGYsIGV2ZW50KToN CQkod2hhdCwgbWVzc2FnZSwgd2hlbiwgd2hlcmUsIG1vZGlmaWVycykgPSBldmVudA0JCWMg PSBjaHIobWVzc2FnZSAmIGNoYXJDb2RlTWFzaykNCQlpZiBtb2RpZmllcnMgJiBjbWRLZXkg YW5kIGMgPT0gJy4nOg0JCQlyZXR1cm4NCQlGcmFtZVdvcmsuQXBwbGljYXRpb24uZG9fa2V5 KHNlbGYsIGV2ZW50KQ0JDQlkZWYgaWRsZShzZWxmLCBldmVudCk6DQkJZ2xvYmFsIG9sZHRp bWUNDQkJdCA9IHRpbWUudGltZSgpDQkJZHVydGltZSA9IHJvdW5kKHQtb2xkdGltZSkNCQlp ZiBkdXJ0aW1lID4gNSA6ICMgIGFmdGVyIGhvdyBtYW55IHNlY29uZHMgZG8geW91IHdhbnQg dGhpcyBhcHAgdG8gZG8gc29tZXRoaW5nDQkJCSMgdGhpcyBpcyB3aGVyZSB5b3Ugd3JpdGUg YSBiaXQgb2YgY29kZSB0byBnZXQgYSBqb2Igb2ZmIGEgcXVldWUNCQkJcHJpbnQgImhlbGxv IHRoZXJlIiAsIHRpbWUuY3RpbWUodGltZS50aW1lKCkpDQkJCW9sZHRpbWUgPSB0aW1lLnRp bWUoKQ0JCQ0JCVFkLkluaXRDdXJzb3IoKQ0JDQlkZWYgcXVpdChzZWxmLCAqYXJncyk6DQkJ cmFpc2Ugc2VsZg0JDQlkZWYgZ2V0YWJvdXR0ZXh0KHNlbGYpOg0JCXJldHVybiAiQWJvdXQg QXBwIExpdGXJIg0JDQlkZWYgZG9fYWJvdXQoc2VsZiwgaWQsIGl0ZW0sIHdpbmRvdywgZXZl bnQpOg0JCUVhc3lEaWFsb2dzLk1lc3NhZ2UoIkFwcCBMaXRlICIgKyBfX3ZlcnNpb25fXyAr ICJcckNvcHlsZWZ0IKkgMjAwMCwgVG9tIFNtaXRoLCB3d3cub3RoZXJtZWRpYS5jb20iKQ0N DWRlZiBRdWl0SGFuZGxlcih0aGVBcHBsZUV2ZW50LCB0aGVSZXBseSk6DQlwcmludCAidG9v ZGxlLW9vISINCXNsYXZlLnF1aXQoKQ0JcmV0dXJuIDANDSMgSW4gdGhlIGlkbGUgbG9vcCBJ IHNldCBvbGR0aW1lIHRvIHRoZSBjdXJyZW50IHRpbWUsIGFuZCB0aGVuIGNoZWNrIHRvIHNl ZSBpZiBzbyBtYW55IHNlY29uZHMgaGF2ZSBwYXNzZWQsIHRoZW4gZG8gc29tZSBzdHVmZi4J DWdsb2JhbCBvbGR0aW1lDW9sZHRpbWUgPSB0aW1lLnRpbWUoKQ1zbGF2ZSA9IFB5dGhvblNs YXZlKCkNcHJpbnQgIk15IEFwcCIsIF9fdmVyc2lvbl9fLCAicmVhZHkuIg1zbGF2ZS5tYWlu bG9vcCgpDQ== --MS_Mac_OE_3058974002_3233799_MIME_Part-- --MS_Mac_OE_3058974005_3206327_MIME_Part-- From christian@rocketnetwork.com Wed Dec 6 19:13:36 2000 From: christian@rocketnetwork.com (Christian Reyes) Date: Wed, 6 Dec 2000 11:13:36 -0800 Subject: [Pythonmac-SIG] python debugger In-Reply-To: <20001206094137.F11ED3B89B3@snelboot.oratrix.nl> Message-ID: Another newbie question. How do I activate the python debugger on pythonmac ide? Thanks, christian From sdm7g@virginia.edu Wed Dec 6 19:25:17 2000 From: sdm7g@virginia.edu (Steven D. Majewski) Date: Wed, 6 Dec 2000 14:25:17 -0500 (EST) Subject: [Pythonmac-SIG] Alias resource portability between MacOS9 and MacOSX In-Reply-To: <20001206104431.97F803B89B3@snelboot.oratrix.nl> Message-ID: I've seen this too, Jack -- in fact I mentioned it in one of my earlier OSX reports, but I didn't dig into the details (Mostly cause I stay pretty much in OSX unless I have an urgent need to play Bugdom!) I forwarded your message to the macosx-dev@omnigroup.com list -- If I get a response, I'll forward it here. I wonder if it has something to do with FindFolder and the different way that OSX has to handle preferences due to being multi-user. -- Steve Majewski From just@letterror.com Wed Dec 6 20:26:52 2000 From: just@letterror.com (Just van Rossum) Date: Wed, 6 Dec 2000 21:26:52 +0100 Subject: [Pythonmac-SIG] python debugger In-Reply-To: References: <20001206094137.F11ED3B89B3@snelboot.oratrix.nl> Message-ID: At 11:13 AM -0800 06-12-2000, Christian Reyes wrote: >Another newbie question. >How do I activate the python debugger on pythonmac ide? Choose "Enable debugger" in the little popup menu at the top right of an edit window, then run your script. Just From fgranger@altern.org Wed Dec 6 22:19:33 2000 From: fgranger@altern.org (Francois Granger) Date: Wed, 6 Dec 2000 23:19:33 +0100 Subject: [Pythonmac-SIG] python debugger In-Reply-To: References: Message-ID: At 11:13 -0800 6/12/00, in message [Pythonmac-SIG] python debugger, Christian Reyes wrote: >Another newbie question. >How do I activate the python debugger on pythonmac ide? >Thanks, To right of the windows, small black arrow to the right, click there is a menu. BTW, I started a FAQ for Python Mac beginners, dig on http://francois.granger.free.fr and give help if you want ;-) -- "Faites des phrases courtes. Un sujet, un verbe, un complément. Quand vous voudrez ajouter un adjectif, vous viendrez me voir." - Georges Clemenceau, 1841-1929, médecin et homme politique français. Consignes aux journalistes de "L'Aurore". d'après From tom@othermedia.com Thu Dec 7 17:04:14 2000 From: tom@othermedia.com (tom smith) Date: Thu, 07 Dec 2000 17:04:14 +0000 Subject: [Pythonmac-SIG] urlopen() question In-Reply-To: Message-ID: Jack kindly wrote me a bit of code to REALLY get a urls' data for me...along the lines of... def read_url(url, the_file=None): u = urllib.urlopen(str(url)) rv = '' newdata = u.read() while newdata: rv = rv + newdata try: newdata = u.read() except: raise u.close() return rv ...the only problem is is that I keep getting "socket not connected errors" which I can't catch. I need my program to keep running, so if a socket doesn't connect, I'll try again later any ideas? thanks tom From tom@othermedia.com Thu Dec 7 17:06:06 2000 From: tom@othermedia.com (tom smith) Date: Thu, 07 Dec 2000 17:06:06 +0000 Subject: [Pythonmac-SIG] repeat loop question Message-ID: n = 0 the_list = ["a", "b", "c"] for i in the_list: print n, i n=n+1 ...is there a way of getting the "count" of i without having to hand increment n? thanks tom From tom@othermedia.com Thu Dec 7 17:07:35 2000 From: tom@othermedia.com (tom smith) Date: Thu, 07 Dec 2000 17:07:35 +0000 Subject: [Pythonmac-SIG] python debugger In-Reply-To: Message-ID: on 6/12/00 10:19 pm, Francois Granger at fgranger@altern.org wrote: > BTW, I started a FAQ for Python Mac beginners, dig on > http://francois.granger.free.fr and give help if you want ;-) I noticed an Advanced Beginners section... which made my head hurt :-) From cbarker@jps.net Thu Dec 7 18:42:54 2000 From: cbarker@jps.net (Chris Barker) Date: Thu, 07 Dec 2000 10:42:54 -0800 Subject: [Pythonmac-SIG] repeat loop question References: Message-ID: <3A2FDA2E.11DECEE5@jps.net> tom smith wrote: > ...is there a way of getting the "count" of i without having to hand > increment n? > > thanks > > tom No, but it is a PEP (Python Enhancement Proposal), so it may be in a future version see: http://python.sourceforge.net/peps/pep-0212.html -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Thu Dec 7 18:49:05 2000 From: cbarker@jps.net (Chris Barker) Date: Thu, 07 Dec 2000 10:49:05 -0800 Subject: [Pythonmac-SIG] repeat loop question References: Message-ID: <3A2FDBA1.FAA9E685@jps.net> > n = 0 > the_list = ["a", "b", "c"] > > for i in the_list: > print n, i > n=n+1 > > ...is there a way of getting the "count" of i without having to hand > increment n? Sorry not to put this in my last message, but these are two other (slightly better) ways of doing it now: Before 2.0: for n in range(len(the_list)): i = sequence[n] print n, i After 2.0 (zip is a new function) for n, i in zip(range(len(the_list)), the_list) print n, i -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From fgranger@altern.org Wed Dec 6 22:27:32 2000 From: fgranger@altern.org (Francois Granger) Date: Wed, 6 Dec 2000 23:27:32 +0100 Subject: [Pythonmac-SIG] (no subject) In-Reply-To: References: Message-ID: At 19:00 +0000 6/12/00, in message Re: [Pythonmac-SIG] (no subject), tom smith wrote: >Attached is my version, App_Lite.py, without all the AppleEvent Handling >stuff. Thanks a lot, i'll dig into it. -- "Faites des phrases courtes. Un sujet, un verbe, un complément. Quand vous voudrez ajouter un adjectif, vous viendrez me voir." - Georges Clemenceau, 1841-1929, médecin et homme politique français. Consignes aux journalistes de "L'Aurore". d'après From bobsavage@mac.com Thu Dec 7 18:30:18 2000 From: bobsavage@mac.com (Bob Savage) Date: Thu, 07 Dec 2000 10:30:18 -0800 Subject: [Pythonmac-SIG] repeat loop question In-Reply-To: Message-ID: on 12/7/00 9:06 AM, tom smith wrote: > > n = 0 > the_list = ["a", "b", "c"] > > for i in the_list: > print n, i > n=n+1 > > > ...is there a way of getting the "count" of i without having to hand > increment n? > Remember that in your example above i is not an index into the_list, it is the actual item. You need to use something like this instead: >>> theList = ["a", "b", "c"] >>> for i in range(len(theList)): ... print i, theList[i] ... 0 a 1 b 2 c Bob From ybenita@mac.com Fri Dec 8 09:58:14 2000 From: ybenita@mac.com (Yair Benita) Date: Fri, 08 Dec 2000 10:58:14 +0100 Subject: [Pythonmac-SIG] can't exit module Message-ID: Although I import the sys module the command sys.exit() doesn't work. Here is the most simple example: import sys a= 7 while a<10: print 'this is the while loop' a=a+1 if a==9: print 'exiting' sys.exit() I always get the same error: SystemExit: Traceback (innermost last): File "Script 1", line 9, in ? sys.exit() I am not sure what innermost last means. Please advise, I can't quit a module without it. Yair Benita Utrecht University The Netherlands From jack@oratrix.nl Fri Dec 8 12:11:41 2000 From: jack@oratrix.nl (Jack Jansen) Date: Fri, 08 Dec 2000 13:11:41 +0100 Subject: [Pythonmac-SIG] can't exit module In-Reply-To: Message by Yair Benita , Fri, 08 Dec 2000 10:58:14 +0100 , Message-ID: <20001208121141.B0E783B89B3@snelboot.oratrix.nl> > Although I import the sys module the command sys.exit() doesn't work. > Here is the most simple example: > import sys > > a= 7 > while a<10: > print 'this is the while loop' > a=a+1 > if a==9: > print 'exiting' > sys.exit() > > I always get the same error: > SystemExit: > Traceback (innermost last): > File "Script 1", line 9, in ? > sys.exit() You're right: sys.exit() doesn't work in the IDE. In the raw interpreter it works fine, and indeed exits the interpreter, but in the IDE it is unclear what it should do. On the one hand exiting the IDE is a possible solution, and seems to be what you expected. On the other hand exiting may not be what you want: if you're running a script that was written for Unix (which doesn't have an IDE) calling sys.exit() will be the normal way of terminating the script, and you wouldn't want to terminate the IDE in that case. I'm not sure. Maybe there should be a preference telling the IDE what to do on sys.exit, either the current behaviour or exiting? A side issue is that the message "SystemExit" is rather obscure. Maybe it should be replaced with "Script called sys.exit()" or something a bit more descriptive. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From cbarker@jps.net Fri Dec 8 18:25:07 2000 From: cbarker@jps.net (Chris Barker) Date: Fri, 08 Dec 2000 10:25:07 -0800 Subject: [Pythonmac-SIG] can't exit module References: <20001208121141.B0E783B89B3@snelboot.oratrix.nl> Message-ID: <3A312783.49DE473E@jps.net> Jack Jansen wrote: > You're right: sys.exit() doesn't work in the IDE. In the raw interpreter it > works fine, and indeed exits the interpreter, but in the IDE it is unclear > what it should do. > > On the one hand exiting the IDE is a possible solution, and seems to be what > you expected. On the other hand exiting may not be what you want: if you're > running a script that was written for Unix (which doesn't have an IDE) calling > sys.exit() will be the normal way of terminating the script, and you wouldn't > want to terminate the IDE in that case. ARRGG! once again, a problem arising from the fundamental flaw of the IDE: it uses the same interpreter to run itself as the scripts you are running. This means that you are forced to have different behavior depending on whether a script is run from the IDE or not. This continually is causing problems like this one. We really need a way to run a script from the IDE and have it behave exactly like running it from the raw interpreter. I know, I know, this is free software... if you want something, stop complaining and do it yourself. I only wish I knew enough about Mac programming to make this anything short of a Major project for me...maybe I will still do it someday. I am I really the only one who thinks this is a problem? -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From owen@astro.washington.edu Fri Dec 8 18:37:47 2000 From: owen@astro.washington.edu (Russell E Owen) Date: Fri, 8 Dec 2000 10:37:47 -0800 Subject: [Pythonmac-SIG] can't exit module In-Reply-To: <3A312783.49DE473E@jps.net> References: <20001208121141.B0E783B89B3@snelboot.oratrix.nl> <3A312783.49DE473E@jps.net> Message-ID: >I am I really the only one who thinks this is a problem? I agree it's a problem, but I wonder if it's worth spending a lot of time trying to fix it. I'd personally much rather see IDLE up and running on the Mac, for two reasons: - If IDLE cannot run on the Mac then this suggests bugs or limitations in MacPython that are probably important to fix. - Any efforts to fix the development environment benefit more people and so potentially can muster more assistance (though of course it may also result in more interference). Having said that, I have no idea why IDLE doesn't run on the Mac (aside from file events being broken); anybody know? I also don't know if it has the same problem as the IDE; I'm just getting python running on my first unix box these days and hope to find out. -- Russell From johnp@reportlab.com Fri Dec 8 18:45:27 2000 From: johnp@reportlab.com (John Precedo) Date: Fri, 8 Dec 2000 18:45:27 -0000 Subject: [Pythonmac-SIG] can't exit module In-Reply-To: <3A312783.49DE473E@jps.net> Message-ID: Chris Barker said: > Jack Jansen wrote: >> You're right: sys.exit() doesn't work in the IDE. In the raw interpreter it >> works fine, and indeed exits the interpreter, but in the IDE it is unclear >> what it should do. >> >> On the one hand exiting the IDE is a possible solution, and seems to be >> what you expected. On the other hand exiting may not be what you want... [SNIP] > > ARRGG! once again, a problem arising from the fundamental flaw of the > IDE: it uses the same interpreter to run itself as the scripts you are > running. This means that you are forced to have different behaviour > depending on whether a script is run from the IDE or not. This > continually is causing problems like this one. Personally, I find the way that the IDE behaves pretty sensible. It does behave in the same way as the interpreter most of the time. And when it doesn't, it seems to have a good reason. I would rather have one long session in the IDE, with it stopping the program running and giving me a message telling me it had hit a sys.exit() call, rather than having to keep starting and re-starting the IDE every time the program ended. That strikes me as a waste of time - and I'd be complaining about the how annoying it would be if actually did act like that. If I really _want_ it to die at the sys.exit call, I run it from the interpreter anyway. When I want to see exactly what happens when a program runs in the interpreter, I run it in the interpreter. Seems to make perfect sense to me! :o) > I am I really the only one who thinks this is a problem? Maybe not the only one. But it doesn't bother me. The thing that does bother me is the way it behaves when you use a "raw_input". That little pop-up box that appears for you to type your text into is plain _annoying_! I find that when I write a program that needs a lot of keyboard input, I test it from the interpreter, and just use the IDE as a glorified word processor to enter the programs with. In this case, I think it would have made a lot more sense to have a window that both displays output and allows you to type text in (in the same way the it does when your run it in the interpreter). Oh well, the GUI isn't perfect, but the fact that sys.exit doesn't kill it doesn't really bother me. Anyone else have anything that bugs them about it? -- John Precedo (johnp@reportlab.com) Junior Developer, Reportlab, Inc From fgranger@altern.org Fri Dec 8 20:18:13 2000 From: fgranger@altern.org (Francois Granger) Date: Fri, 8 Dec 2000 21:18:13 +0100 Subject: [Pythonmac-SIG] python debugger In-Reply-To: References: Message-ID: At 17:07 +0000 7/12/00, in message Re: [Pythonmac-SIG] python debugger, tom smith wrote: >on 6/12/00 10:19 pm, Francois Granger at fgranger@altern.org wrote: > > > BTW, I started a FAQ for Python Mac beginners, dig on > > http://francois.granger.free.fr and give help if you want ;-) > >I noticed an Advanced Beginners section... which made my head hurt :-) Sorry for your head ;-) English not being my native language ... please ...scuze ;-) I feel that I am an "advanced beginner" in programming, and I have been for the last ten years. -- "Faites des phrases courtes. Un sujet, un verbe, un complément. Quand vous voudrez ajouter un adjectif, vous viendrez me voir." - Georges Clemenceau, 1841-1929, médecin et homme politique français. Consignes aux journalistes de "L'Aurore". d'après From fgranger@altern.org Fri Dec 8 21:00:56 2000 From: fgranger@altern.org (Francois Granger) Date: Fri, 8 Dec 2000 22:00:56 +0100 Subject: [Pythonmac-SIG] can't exit module In-Reply-To: <3A312783.49DE473E@jps.net> References: <20001208121141.B0E783B89B3@snelboot.oratrix.nl> <3A312783.49DE473E@jps.net> Message-ID: At 10:25 -0800 8/12/00, in message Re: [Pythonmac-SIG] can't exit module, Chris Barker wrote: >I know, I know, this is free software... if you want something, stop >complaining and do it yourself. I only wish I knew enough about Mac >programming to make this anything short of a Major project for >me...maybe I will still do it someday. > >I am I really the only one who thinks this is a problem? As you say, I can't complain because I can't do anything to enhance it ;-) I was proud of producing this code snippet copying on an idea from Tim Peters def toBin(x): a = '' y = x while x: x, y = x / 2, y % 2 if y: a = '1' + a else: a = '0' + a y = x return rjust(a,8) My level is just as a user of pure python. And I gratefully thanks all people which makes it running. -- "Faites des phrases courtes. Un sujet, un verbe, un complément. Quand vous voudrez ajouter un adjectif, vous viendrez me voir." - Georges Clemenceau, 1841-1929, médecin et homme politique français. Consignes aux journalistes de "L'Aurore". d'après From jack@oratrix.nl Sun Dec 10 21:50:52 2000 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 10 Dec 2000 22:50:52 +0100 Subject: [Pythonmac-SIG] can't exit module In-Reply-To: Message by Chris Barker , Fri, 08 Dec 2000 10:25:07 -0800 , <3A312783.49DE473E@jps.net> Message-ID: <20001210215057.BA41A116394@oratrix.oratrix.nl> Recently, Chris Barker said: > ARRGG! once again, a problem arising from the fundamental flaw of the > IDE: it uses the same interpreter to run itself as the scripts you are > running. This means that you are forced to have different behavior > depending on whether a script is run from the IDE or not. This > continually is causing problems like this one. We really need a way to > run a script from the IDE and have it behave exactly like running it > from the raw interpreter. No, I don't think this is the problem here. The problem is that the semantics of "sys.exit()" are "terminate program". And, if you're running in an IDE, there's a question of what "program" you mean: the script that's running or the IDE. If you chose one of these there's bound to be someone who expects the other behaviour. All that said I think there's definitely a good reason to have IDE optionally use an external interpreter to do the actual work, but it is just such an incredible amount of work to do it right. Not only do you want stdin/stdout/stderr to be routed correctly, but you'll also need stubs in the work-interpreter to allow the debugger and the browser to work, etc. And the machinery needed to implement all this in the work-interpreter may well have such an impact that you still can't really run Tkinter scripts:-( The good news is that once you've done this you get remote debugging and other goodies (like using IDE to run Python scripts on your Windows-PC, and who knows what more) for free. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From richard@richardgordon.net Mon Dec 11 02:48:56 2000 From: richard@richardgordon.net (Richard Gordon) Date: Sun, 10 Dec 2000 21:48:56 -0500 Subject: [Pythonmac-SIG] recursion problem Message-ID: hi- I'm stuck on something that I thought would be easy, but has got me stumped. The scenario is that I am using python to automate the construction of a web index page that uses one of the assorted expanding/collapsing file tree javascripts (e.g., it is organized into folders and files within folders based on the physical location of stuff on the server). This particular one uses
    and
  • tags along with some trick style stuff to expand or collapse various levels of the hierarchy and looks more or less like the windoze explorer stuff once the dust settles. Anyway, walking the tree, figuring out what's a file and what's a directory and that kind of thing are easy, but where I'm getting stuck is in dealing with deeply nested folders. This will probably get screwed up in email, but what I want is something like:
      Level0folder
    • L0file
    • L0file
        Level1folder
      • L1file
          Level2folder
        • L2file
        • L2file
      • L1file
    So I am basically just reading the top level directory, then testing each item to see if it is a file or a folder. If it's a file, I just call a function that prints '
  • ' + filename + '' while if it's a directory, I go into another function that is supposed to do the initial
      stuff, then calls the file printer function for each file, then closes things out with
    before passing control back to the initial treewalker. Anyway, this is getting all screwed up as far as the closing
tags are concerned and I have managed to create the world's widest web page (kind of cool if you like fractals), hit a recursion limit, and otherwise toyed with it until I am exasperated. The question is how to drill down thru an arbitrary number of subdirectories and get the closing tags in the right places since the nesting prevents just writing one out every time you exit a directory? Thanks for any help you may have to offer. Richard Gordon -------------------- Gordon Design Web Design/Database Development http://www.richardgordon.net From Gerry Brush Mon Dec 11 18:05:06 2000 From: Gerry Brush (Gerry Brush) Date: Mon, 11 Dec 2000 12:05:06 -0600 (CST) Subject: [Pythonmac-SIG] AppleScripting from Python Message-ID: <200012111805.MAA09929@darwin.sfbr.org> Hello, I'm writing as a MacPython 2.0 user. I've followed the instructions for using AppleScript from the "Using Open Scripting Extension from Python" document. What I'm trying to do is send a script written in the QuicKeys Scripting Language to QuicKeys via AppleScript and DoScript. Everything works fine execpt sending multiline QuicKeys scripts. The first line is executed and the remaining lines are thrown away. I've tried packaging the lines in a string with Mac EOL characters after each line of the script, but still no luck. I'm not sure if this is specifically a MacPython problem. Any suggestions? Thanks. Gerry --------------------------------------------------------------------- Gerry Brush Tel: (210) 258-9613 Department of Genetics Fax: (210) 670-3317 Southwest Foundation for Email: gbrush@darwin.sfbr.org Biomedical Research P.O. Box 760549 San Antonio, TX 78245-0549, USA --------------------------------------------------------------------- From just@letterror.com Mon Dec 11 19:39:57 2000 From: just@letterror.com (Just van Rossum) Date: Mon, 11 Dec 2000 20:39:57 +0100 Subject: [Pythonmac-SIG] can't exit module In-Reply-To: <3A312783.49DE473E@jps.net> References: <20001208121141.B0E783B89B3@snelboot.oratrix.nl> Message-ID: At 10:25 AM -0800 08-12-2000, Chris Barker wrote: >ARRGG! once again, a problem arising from the fundamental flaw of the >IDE: it uses the same interpreter to run itself as the scripts you are >running. Hm, funny how that never seems to bother me... A new Python process on the Mac takes quite a bit of time: one of the fun parts of a Python IDE is that code is executed instantly. You'd lose that with a separate process. Another thing that's less convenient (if it's possible at all) with a separate process is executing snippets of scripts or modules. It saves a lot of time: you can reload individual functions and methods, update module globals, update the behavior of live objects, etc. Of course, a separate process is simply neccesary when you're dealing with event loops. But unfortunately it is more difficult to implement than it looks, and then there's the problem that _I_ don't really need it... >This means that you are forced to have different behavior >depending on whether a script is run from the IDE or not. This >continually is causing problems like this one. I don't even agree that sys.exit() should _ever_ exit the IDE: it is a function to end a script. The IDE catches all exceptions, so also SystemExit. Once thing that might be nice, would be for the IDE to not throw a traceback window at you for SystemExit. This is what I do for KeyboardInterrupt. On the other hand, you'd lose the SystemExit argument, so I'm not sure this is ideal. Just From redbird@rbisland.cx Mon Dec 11 20:10:04 2000 From: redbird@rbisland.cx (Gordon Worley) Date: Mon, 11 Dec 2000 15:10:04 -0500 Subject: [Pythonmac-SIG] recursion problem In-Reply-To: References: Message-ID: At 9:48 PM -0500 12/10/2000, Richard Gordon wrote: >
    Level0folder >
  • L0file >
  • L0file >
      Level1folder >
    • L1file >
        Level2folder >
      • L2file >
      • L2file >
      >
    • L1file >
    >
You have made an error in your HTML. UL is a container, and those can contain other elements, but not actual text to be displayed. The code should read something like this:
  • Level0folder
    • L0file
    • L0file
    • Level1folder
      • L1file
      • Level2folder
        • L2file
        • L2file
      • L1file
This may be the source of your problem, depending on the rendering engine you use. Even if it is not, good HTML is always important. -- Gordon Worley http://www.rbisland.cx/ mailto:redbird@rbisland.cx PGP: C462 FA84 B811 3501 9010 20D2 6EF3 77F7 BBD3 B003 From carraj@attglobal.net Mon Dec 11 22:08:45 2000 From: carraj@attglobal.net (Dr Alun J. Carr) Date: Mon, 11 Dec 2000 22:08:45 +0000 Subject: [Pythonmac-SIG] can't exit module In-Reply-To: References: <3A312783.49DE473E@jps.net> <20001208121141.B0E783B89B3@snelboot.oratrix.nl> Message-ID: At 8:39 pm +0100 11/12/00, Just van Rossum wrote: >At 10:25 AM -0800 08-12-2000, Chris Barker wrote: >>ARRGG! once again, a problem arising from the fundamental flaw of the >>IDE: it uses the same interpreter to run itself as the scripts you are >>running. If you look at the Wish shell for Tcl, it actually uses two Tcl interpreters in the one program. This is what we need for the Python IDE: the IDE executing in one interpreter, and the script in another. This might allow the use of Tkinter in the second interpreter, if we're lucky. I must say that I sympathize with another correspondent about the need to fix things so that we can get IDLE running on MacOS. Alun == Dr Alun J. Carr Phone: +353-(0)1-716 1989 (Office) Mechanical Engineering Dept +353-(0)1-716 1752 (BRC Office) University College Dublin Fax: +353-(0)1-283 0534 Belfield Email: alun.j.carr@ucd.ie (UCD) Dublin 4 carraj@attglobal.net (Home) Ireland From jack@oratrix.nl Mon Dec 11 23:06:56 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 12 Dec 2000 00:06:56 +0100 Subject: [Pythonmac-SIG] can't exit module In-Reply-To: Message by "Dr Alun J. Carr" , Mon, 11 Dec 2000 22:08:45 +0000 , Message-ID: <20001211230702.2B931116397@oratrix.oratrix.nl> Recently, "Dr Alun J. Carr" said: > If you look at the Wish shell for Tcl, it actually uses two Tcl > interpreters in the one program. This is what we need for the Python IDE: > the IDE executing in one interpreter, and the script in another. This might > allow the use of Tkinter in the second interpreter, if we're lucky. Unfortunately for Python this means that one of the two interpreters cannot use a GUI, which sort-of defeats the purpose. Tcl/Tk doesn't have this problem because they have completely masked the native OS GUI calls. The advantage of this is that their gui-calls can handle multiple threads, the disadvantage is that most MacOS toolboxes aren't available, and those that are (QuickTime, AppleEvents) only to a _very_ limited extent, and with quite a bit of effort. > I must say that I sympathize with another correspondent about the need to > fix things so that we can get IDLE running on MacOS. Definitely. But is seem that no-one cares enough to actually put some work into it:-( I spent a week or so this summer in getting Tkinter to work again, only because people kept asking about it (I personally abhor it) and in the hope that Tkinter development would pick up again once I had gotten the lowlevel stuff working, but it seems not, alas... -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From cbarker@jps.net Mon Dec 11 15:16:41 2000 From: cbarker@jps.net (Christopher Barker) Date: Mon, 11 Dec 2000 15:16:41 +0000 Subject: [Pythonmac-SIG] can't exit module References: <20001208121141.B0E783B89B3@snelboot.oratrix.nl> Message-ID: <3A34EFD9.D281D5C4@jps.net> Just van Rossum wrote: > I don't even agree that sys.exit() should _ever_ exit the IDE: it is a > function to end a script. I have to agree with Just on this: why would you want a sys.exit() in a script to kill the whole IDE? that kind of goes against the grain of how the IDE works. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Mon Dec 11 15:18:15 2000 From: cbarker@jps.net (Christopher Barker) Date: Mon, 11 Dec 2000 15:18:15 +0000 Subject: [Pythonmac-SIG] can't exit module References: <3A312783.49DE473E@jps.net> <20001208121141.B0E783B89B3@snelboot.oratrix.nl> Message-ID: <3A34F037.A9660E12@jps.net> > If you look at the Wish shell for Tcl, it actually uses two Tcl > interpreters in the one program. This is what we need for the Python IDE: > the IDE executing in one interpreter, and the script in another. This might > allow the use of Tkinter in the second interpreter, if we're lucky. > > I must say that I sympathize with another correspondent about the need to > fix things so that we can get IDLE running on MacOS. Does anyone know what IDLE does about this? Can you use another GUI toolbox with IDLE other than tkinter?, or soes it have the same conflicting mainloop problems? -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Mon Dec 11 15:28:20 2000 From: cbarker@jps.net (Christopher Barker) Date: Mon, 11 Dec 2000 15:28:20 +0000 Subject: [Pythonmac-SIG] can't exit module References: <20001210215057.BA41A116394@oratrix.oratrix.nl> Message-ID: <3A34F294.29609FAB@jps.net> Jack Jansen wrote: > All that said I think there's definitely a good reason to have IDE > optionally use an external interpreter to do the actual work, but it > is just such an incredible amount of work to do it right. I figured that. If it weren't, someone would have done it by now. > Not only do > you want stdin/stdout/stderr to be routed correctly, but you'll also > need stubs in the work-interpreter to allow the debugger and the > browser to work, etc. And the machinery needed to implement all this > in the work-interpreter may well have such an impact that you still > can't really run Tkinter scripts:-( Just wrote: > A new Python process on the Mac takes quite a bit of time: one of the fun > parts of a Python IDE is that code is executed instantly. would it be possible for the interpreter to "reset" itself, so that you could start from scratch without having to actually restart the interpreter? I suppose there would be issues with dynamically loaded modules... > You'd lose that > with a separate process. Another thing that's less convenient (if it's > possible at all) with a separate process is executing snippets of scripts > or modules. It saves a lot of time: you can reload individual functions and > methods, update module globals, update the behavior of live objects, etc. > Of course, a separate process is simply neccesary when you're dealing with > event loops. But unfortunately it is more difficult to implement than it > looks, and then there's the problem that _I_ don't really need it... I think this is the big issue: different people use the IDE differently. It works well for the way Just likes to work. Personally, I mostly write short programs that do things like translate text files and such. I hardly ever use any of the nifty features mentioned above, If I did, I would parably think it was well worth the small annoyances that the current approach has. It is clear from what Jack wrote that doing it "right" would be a major effort, but would it be nearly as big an effort to add a "run with raw interpretter" option. I would personally be happy to have that, even if I lost the debugger, browser, and some of the interactivity the user would get a choice as to how s/he wanted it to run. Another bonus to adding a "restart" event to the interpreter would be that it would be much easier to use it from other editors. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From jack@oratrix.nl Tue Dec 12 10:15:44 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 12 Dec 2000 11:15:44 +0100 Subject: [Pythonmac-SIG] can't exit module In-Reply-To: Message by Christopher Barker , Mon, 11 Dec 2000 15:18:15 +0000 , <3A34F037.A9660E12@jps.net> Message-ID: <20001212101544.8E223371868@snelboot.oratrix.nl> > Does anyone know what IDLE does about this? Can you use another GUI > toolbox with IDLE other than tkinter?, or soes it have the same > conflicting mainloop problems? Possibly. On the mac you have to write your own event loop, so if you use two event loops they won't know about each other, and half your events won't get to their destination. On X11 (or on X11+Xt actually, what almost everyone uses) the event loop is in the bowels of the library, and you simply register handlers for various events and then call the supplied event loop, so there's a good chance of multiple windowing packages working together. The same is true on Windows, with the event loop down in the OS (as far as I know). It will also be true on MacOS X, I think it's part of the Carbon Event Handler. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From cbarker@jps.net Thu Dec 14 21:49:51 2000 From: cbarker@jps.net (Chris Barker) Date: Thu, 14 Dec 2000 13:49:51 -0800 Subject: [Pythonmac-SIG] wxPython References: <20001211230702.2B931116397@oratrix.oratrix.nl> Message-ID: <3A39407F.2EAA4FE1@jps.net> Jack Jansen wrote: > I spent a week or so this summer in getting Tkinter to > work again, only because people kept asking about it (I personally > abhor it) Jack, Have you checked out wxPython yet? Rumor has it that a port to MacPython has been done (but not really released yet). Stepan Csomor (the wxMac developer) posted this note to the wxWindows mailing list: ######## > Anyone working on a wxPython for Macintosh? > > Philippe de Rochambeau Milan Brunclik from Barco has done it and promised to send me the sources, I'll hope to have things like this and OpenGL back in the archives by christmas Stefan ####### Once it's basically working, I'm sure it will need a fair bit of tweeking, so it would be great if the MacPython crown chipped in. wxPython would really be a great addition to MacPython. Besides providing another cross platform GUI toolkit, it would also provide a complete application framework, complete with a substantial number of nice high level widgets. This would be helpful for MacPython develpment, even if you were only writing for the Mac. A lot for folks that don't like tk, like wx a lot (I'm one of them), so it's worth a look. -Chris From rael@oreilly.com Thu Dec 14 21:45:22 2000 From: rael@oreilly.com (Rael Dornfest) Date: Thu, 14 Dec 2000 13:45:22 -0800 (PST) Subject: [Pythonmac-SIG] SimpleHTTPServer hangs OS 9 Message-ID: Howdy, Anyone have any idea why / how to get around Simple/BaseHTTPServer hanging my a very recent powerbook (bronze) running OS 9. Thanks, Rael From jack@oratrix.nl Fri Dec 15 00:56:37 2000 From: jack@oratrix.nl (Jack Jansen) Date: Fri, 15 Dec 2000 01:56:37 +0100 Subject: [Pythonmac-SIG] Breaking the circular dependencies between toolbox modules Message-ID: <20001215005642.889D1116392@oratrix.oratrix.nl> Here's a half-baked idea I'd liek some feedback on. Currently a lot of the toolbox modules depend on each other, mainly to create objects and access them. For instance, Dlg depends on Ctl, because dialog.GetDialogItemAsControl() needs to wrap a MacOS ControlRef in a Python ControlObj. These dependencies have now resulted in the majority of the toolbox modules living in PythonCore, and a few others dynamically linking to each other. All this is getting messy, and as Steven Majevski's messages show the headaches are getting bigger once we try to move to Mach-O, the native MacOSX executable format. The half-baked idea is as follows: we put placeholders for all the object-wrapping and unwrapping routines (such as CtlObj_New and CtlObj_Convert) in a single place (probably PythonCore, or a separate DLL for Mach-O). These placeholders are referred to through a function pointer (i.e. CtlObj_New is #defined as (*CtlObj_New_routineptr)), and the only thing they do is import the Ctl module and then call *CtlObj_New_routineptr again. One of the things the init module of Ctl does is store the address of the real wrapper function (_CtlObj_New seems like a reasonable name) into the CtlObj_New_routineptr variable. What do you all think? Does this sound feasible? -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | ++++ see http://www.xs4all.nl/~tank/ ++++ From Mike.Crowe@us.army.mil Mon Dec 18 16:32:08 2000 From: Mike.Crowe@us.army.mil (Mike Crowe) Date: Mon, 18 Dec 2000 10:32:08 -0600 Subject: [Pythonmac-SIG] Tkinter and Python 2.0 problem Message-ID: I am trying to write Tkinter code in Python 2.0. After executing any Tkinter command, the interpreter (or IDE) will not quit normally. The problem occurs when I press the Quit key. The Tk window goes away, but I do not get the >>> prompt back in the interpreter. Even though I can still select the menus, choosing Quit from the file menu has no effect. Also, Command-Q does not work. At this point, the About box has changed from "About Python..." to "About Tcl & Tk". I have to force quit the Python Interpreter to regain control. Is anyone else using Tkinter, Python 2.0 on the Mac? If so, how do you get it to work, and what is the best way to develop code? Or is there a better way to develop cross platform Python GUI apps on the Mac? I would appreciate any suggestions. Thanks, Mike Crowe --- From owen@astro.washington.edu Mon Dec 18 16:43:36 2000 From: owen@astro.washington.edu (Russell E Owen) Date: Mon, 18 Dec 2000 08:43:36 -0800 Subject: [Pythonmac-SIG] Tkinter and Python 2.0 problem In-Reply-To: References: Message-ID: >I am trying to write Tkinter code in Python 2.0. After executing >any Tkinter command, the interpreter (or IDE) will not quit normally. > >The problem occurs when I press the Quit key. The Tk window goes >away, but I do not get the >>> prompt back in the interpreter... In MacPython 1.5.2, and likely still in 2.0, this happens if you have the startup options set to continue (return to >>> prompt) after the script is done. I don't recall the exact name of the setting, but it's the first one. Make sure you run with this setting disabled. Then the Quit menu item works correctly and you'll no longer have to force-exit the interpreter after a Tkinter script. Fundamentally, MacPython doesn't get along terribly well with Tkinter. We're very lucky it works as well as it does. -- Russell P.S. Tk file events are broken in MacPython 2.0. If you are using those, stick with MacPython 1.5.2 or other platforms. From jack@oratrix.nl Mon Dec 18 16:44:33 2000 From: jack@oratrix.nl (Jack Jansen) Date: Mon, 18 Dec 2000 17:44:33 +0100 Subject: [Pythonmac-SIG] Tkinter and Python 2.0 problem In-Reply-To: Message by Mike Crowe , Mon, 18 Dec 2000 10:32:08 -0600 , Message-ID: <20001218164433.D5DE8371868@snelboot.oratrix.nl> > I am trying to write Tkinter code in Python 2.0. After executing any > Tkinter command, the interpreter (or IDE) will not quit normally. Running Tkinter things interactively in MacPython is not a good idea. As you've noticed Tk takes over too much, so MacPython can't get back into a useable state afterwards. At least: I don't know how to do it. Running scripts that use Tkinter shouldn't be a problem. -- 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 jimholliman@heartsoft.com Mon Dec 18 20:53:53 2000 From: jimholliman@heartsoft.com (Jim Holliman) Date: Mon, 18 Dec 2000 14:53:53 -0600 Subject: [Pythonmac-SIG] [Pythonmac-SIG]: error -110 =?ISO-8859-1?B?oA==?=memAdrErr Message-ID: I am running a very simple script that copies several files into a director= y the script creates and then deletes the originals. It also calls the EasyDailogs.Message() routine. After the applet is done and the interpreter shuts itself down I receive an error -110 message that just reposts repeatedly, forcing me to reset the machine. Apple lists the error as: -110 =A0memAdrErr Address was odd, or out of range Any body got any ideas about this? --=20 Thanks Jim=20 From cbarker@jps.net Mon Dec 18 21:11:19 2000 From: cbarker@jps.net (Chris Barker) Date: Mon, 18 Dec 2000 13:11:19 -0800 Subject: [Pythonmac-SIG] Tkinter and Python 2.0 problem References: Message-ID: <3A3E7D77.CAC659DD@jps.net> Mike Crowe wrote: > I have to force quit the Python Interpreter to regain control. > Others have answered this for the most part but one aded note: You may be able to use ctrl+D to quite the interpreter instead. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From cbarker@jps.net Mon Dec 18 21:14:33 2000 From: cbarker@jps.net (Chris Barker) Date: Mon, 18 Dec 2000 13:14:33 -0800 Subject: [Pythonmac-SIG] Tkinter and Python 2.0 problem References: Message-ID: <3A3E7E39.E8058B9@jps.net> Mike Crowe wrote: > and what is the best way to develop code? I've found iot far more productive to develop on another platform (Linux) and then only bring it over to the Mac when it's done. Note that if you only have a Mac, you can run Linux on it, with PPC linux of various flavours. > Or is > there a better way to develop cross platform Python GUI apps on the > Mac? It looks like wxPython on the Mac may happen soon, but if you need something you can count on now, tkinter is it. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From sdm7g@virginia.edu Tue Dec 19 23:48:07 2000 From: sdm7g@virginia.edu (Steven D. Majewski) Date: Tue, 19 Dec 2000 18:48:07 -0500 (EST) Subject: [Pythonmac-SIG] Breaking the circular dependencies between toolbox modules In-Reply-To: <20001215005642.889D1116392@oratrix.oratrix.nl> Message-ID: Sorry I didn't reply earlier, Jack. My answer is: probably ... I don't know ... I'm still figuring out much of the OSX plumbing. I suspect there's a better way (at least for OSX) but I'm not sure how to do it. BTW: I was unable to check out from the MacPython CVS server. ( I wanted to start merging some of the OSX Carbon fixes into the MacPython sources. ) I was going to try it myself rather than ask you but: Does CVS or any of the Mac clients do anything about line endings ? I had to convert the line endings ( tr '\r' '\n' ) of the MacPython sources to read and compile them on OSX. How are they stored on the CVS server ? --- Steve Majewski On Fri, 15 Dec 2000, Jack Jansen wrote: > Here's a half-baked idea I'd liek some feedback on. > > Currently a lot of the toolbox modules depend on each other, mainly to > create objects and access them. For instance, Dlg depends on Ctl, > because dialog.GetDialogItemAsControl() needs to wrap a MacOS > ControlRef in a Python ControlObj. > > These dependencies have now resulted in the majority of the toolbox > modules living in PythonCore, and a few others dynamically linking to > each other. All this is getting messy, and as Steven Majevski's > messages show the headaches are getting bigger once we try to move to > Mach-O, the native MacOSX executable format. > > The half-baked idea is as follows: we put placeholders for all the > object-wrapping and unwrapping routines (such as CtlObj_New and > CtlObj_Convert) in a single place (probably PythonCore, or a separate > DLL for Mach-O). These placeholders are referred to through a function > pointer (i.e. CtlObj_New is #defined as (*CtlObj_New_routineptr)), and > the only thing they do is import the Ctl module and then call > *CtlObj_New_routineptr again. One of the things the init module of Ctl > does is store the address of the real wrapper function (_CtlObj_New > seems like a reasonable name) into the CtlObj_New_routineptr variable. > > What do you all think? Does this sound feasible? > -- > Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ > Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ > www.oratrix.nl/~jack | ++++ see http://www.xs4all.nl/~tank/ ++++ > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://www.python.org/mailman/listinfo/pythonmac-sig > From tom@othermedia.com Wed Dec 20 11:21:05 2000 From: tom@othermedia.com (tom smith) Date: Wed, 20 Dec 2000 11:21:05 +0000 Subject: [Pythonmac-SIG] Tkinter and Python 2.0 problem In-Reply-To: Message-ID: on 18/12/00 9:14 pm, Chris Barker at cbarker@jps.net wrote: > Mike Crowe wrote: > >> and what is the best way to develop code? I always make my Tkinter python files have the creator 'Pyth', so when I double click them the interpreter fires up, NOT the IDE. Or I drag them onto the interpreter. Setting the preference so that the interpreter doesn't hang around after the app quits makes it feel more natural. It reminds me a little of the HyperCard problem, where nobody wanted so see even the tiniest trace of HyperCard as a stack was launched... no 'HyperCard' in the menu bar...no File, Edit, Go menus... Because most of my scripts are personal widgets I've learned to live with the poor aesthetics.. Once I finish my script, I normally save it as an Applet, so that I never accidentally run it in the interpreter. (when I normally have other unsaved and unsaveable scripts on the go) From Mike.Crowe@us.army.mil Wed Dec 20 20:11:58 2000 From: Mike.Crowe@us.army.mil (Mike Crowe) Date: Wed, 20 Dec 2000 14:11:58 -0600 Subject: [Pythonmac-SIG] Tkinter and Python 2.0 problem In-Reply-To: References: Message-ID: Thank you all for your suggestions and info! Mike Crowe --- >on 18/12/00 9:14 pm, Chris Barker at cbarker@jps.net wrote: > >> Mike Crowe wrote: >> >>> and what is the best way to develop code? > >I always make my Tkinter python files have the creator 'Pyth', so when I >double click them the interpreter fires up, NOT the IDE. Or I drag them onto >the interpreter. Setting the preference so that the interpreter doesn't hang >around after the app quits makes it feel more natural. > >It reminds me a little of the HyperCard problem, where nobody wanted so see >even the tiniest trace of HyperCard as a stack was launched... no >'HyperCard' in the menu bar...no File, Edit, Go menus... Because most of my >scripts are personal widgets I've learned to live with the poor aesthetics.. > >Once I finish my script, I normally save it as an Applet, so that I never >accidentally run it in the interpreter. (when I normally have other unsaved >and unsaveable scripts on the go) > > >_______________________________________________ >Pythonmac-SIG maillist - Pythonmac-SIG@python.org >http://www.python.org/mailman/listinfo/pythonmac-sig From moroo@jp.fujitsu.com Tue Dec 26 23:11:58 2000 From: moroo@jp.fujitsu.com (Moroo Jun) Date: Wed, 27 Dec 2000 08:11:58 +0900 Subject: [Pythonmac-SIG] urllib problem Message-ID: I tried to run follow program, Python 1.5.2c get all text from web site, but Python 2.0 doesn't. In Solaris 2.6, the same program can get all text from web site both with Python 1.5.2 and Python 2.0. --- Begin --- import urllib a=urllib.urlopen("http://www.yahoo.co.jp/") d=a.read() f=open("yahoo.html","wb") f.write(d) f.close() a.close() --- End --- I tried them on: Powerbook G3/333 OS 8.6 PowerMacintosh 9600/233 OS 9.0 -- moroo@jp.fujitsu.co.jp Fujitsu Laboratories LTD. From moroo@jp.fujitsu.com Tue Dec 26 23:24:56 2000 From: moroo@jp.fujitsu.com (Moroo Jun) Date: Wed, 27 Dec 2000 08:24:56 +0900 Subject: [Pythonmac-SIG] Python 2.0 installing problem Message-ID: If the path to Python 2.0 directory has Japanese directory name, Installing does not finish. It says "ImportError: No module named macfsn". Maybe other two byte encoding system ex. Chinese or Korea have same problem. If a file named foo placed on System:"APURIKE_SHON":foo, a Python get filename as follows. System:\203A\203v\203\212\203P\201[\203V\203\207\203\223:foo "APURIKE_SHON" is Japanese encoded string. -- moroo@jp.fujitsu.co.jp Fujitsu Laboratories LTD. From jack@oratrix.nl Wed Dec 27 09:33:48 2000 From: jack@oratrix.nl (Jack Jansen) Date: Wed, 27 Dec 2000 10:33:48 +0100 Subject: [Pythonmac-SIG] Python 2.0 installing problem In-Reply-To: Message by Moroo Jun , Wed, 27 Dec 2000 08:24:56 +0900 , Message-ID: <20001227093348.BC1903C0BB9@snelboot.oratrix.nl> > If the path to Python 2.0 directory has Japanese directory name, Installing > does not finish. It says "ImportError: No module named macfsn". > Maybe other two byte encoding system ex. Chinese or Korea have same problem. > > If a file named foo placed on System:"APURIKE_SHON":foo, a Python get > filename as follows. > System:\203A\203v\203\212\203P\201[\203V\203\207\203\223:foo > > "APURIKE_SHON" is Japanese encoded string. That could indeed be a problem: I never thought about 2-byte character sets. I also have no idea how FSSpecs and such are implemented for 2-byte charsets. Could you try running the following commands in that APURIKE_SHON folder (easiest is probably to put them in a script and run that script from the that folder)? - print sys.prefix - print sys.path - open("foo") - os.getcwd() - open(os.path.join(os.getcwd(), "foo")) - fss = macfs.FSSpec("foo"); print fss - print fss.as_pathname() - alias = fss.NewAlias() - alias.Resolve().as_pathname() Also, option-starting Python and setting the "trace import statements" bit should give a bit more information. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From tmk@easynet.be Wed Dec 27 10:34:31 2000 From: tmk@easynet.be (Tattoo Mabonzo K.) Date: Wed, 27 Dec 2000 11:34:31 +0100 Subject: [Pythonmac-SIG] Python 2.0 and MultiUser Message-ID: <200012271034.eBRAYWZ00301@metis.microscript.be> Yo, I'm not @ my home machine for the moment but I've noticed that there's a = problem running Python from an account other than the owner's. I get an error message stating something 'bout a failed import quite = early in the process of launching Python (be it the IDE or the = interpreter). 1.5.2c1 works fine though. 2.0 works fine from the owner account. Sorry for the incomplete report but I wanted to know if anyone has = observed a similar problem.=20 I'll report the exact error message this evening. TIA =3D tmk =3D= From tmk@easynet.be Wed Dec 27 10:37:03 2000 From: tmk@easynet.be (Tattoo Mabonzo K.) Date: Wed, 27 Dec 2000 11:37:03 +0100 Subject: [Pythonmac-SIG] Re: Python 2.0 and MultiUser Message-ID: <200012271037.eBRAb4U00304@metis.microscript.be> On Wednesday, December 27, 2000, at 11:34 AM, Tattoo Mabonzo K. wrote: > Yo,=20 > =20 > I'm not @ my home machine for the moment but I've noticed that there's = a problem running=20 > Python from an account other than the owner's.=20 > =20 > I get an error message stating something 'bout a failed import quite = early in the process=20 > of launching Python (be it the IDE or the interpreter).=20 FWIW, as far as I recall the import failed because the macfsn could'nt = be found. > =20 > 1.5.2c1 works fine though. 2.0 works fine from the owner account.=20 > =20 > Sorry for the incomplete report but I wanted to know if anyone has = observed a similar=20 > problem. =20 > I'll report the exact error message this evening.=20 > =20 > TIA=20 > =20 > =3D tmk =3D=20 > =20 From tmk@easynet.be Thu Dec 28 14:33:21 2000 From: tmk@easynet.be (Tattoo Mabonzo K.) Date: Thu, 28 Dec 2000 15:33:21 +0100 Subject: [Pythonmac-SIG] urllib problem Message-ID: <200012281433.eBSEXLq00307@metis.usertalk.com> Yo, I got caught by that one already. But as always, Jack was quick to point to the solution. Please below. I = copy-paste=20 his answer. --- cut Hi, that's not broken, it's only strange. There is absolutely no guarantee = how=20 much a read() on a socket will return. The correct way to read all data = is to=20 do x =3D urllib.urlopen(....) alldata =3D '' while 1: next =3D x.read() if not next: break alldata =3D alldata + next However, as it often happens on unix that you get all data in one read = call,=20 and sometimes on MacOS too, it's easy to think that read should return=20= everything. Note that read() on files does guarantee that it returns all data. --- cut On Wednesday, December 27, 2000, at 12:11 AM, Moroo Jun wrote: > I tried to run follow program, Python 1.5.2c get all text from web = site,=20 > but Python 2.0 doesn't.=20 > In Solaris 2.6, the same program can get all text from web site both = with=20 > Python 1.5.2 and Python 2.0.=20 > =20 > --- Begin ---=20 > import urllib=20 > =20 > a=3Durllib.urlopen("http://www.yahoo.co.jp/")=20 > d=3Da.read()=20 > f=3Dopen("yahoo.html","wb")=20 > f.write(d)=20 > f.close()=20 > a.close()=20 > --- End ---=20 > =20 > I tried them on:=20 > Powerbook G3/333 OS 8.6=20 > PowerMacintosh 9600/233 OS 9.0=20 > =20 > -- =20 > moroo@jp.fujitsu.co.jp=20 > Fujitsu Laboratories LTD.=20 > =20 > _______________________________________________=20 > Pythonmac-SIG maillist - Pythonmac-SIG@python.org=20 > http://www.python.org/mailman/listinfo/pythonmac-sig=20 > =20 > =20 From jack@oratrix.nl Thu Dec 28 16:04:45 2000 From: jack@oratrix.nl (Jack Jansen) Date: Thu, 28 Dec 2000 17:04:45 +0100 Subject: [Pythonmac-SIG] Re: Python 2.0 and MultiUser In-Reply-To: Message by "tmk@mac" , Thu, 28 Dec 2000 14:17:00 +0100 , Message-ID: <20001228160450.D13AC116396@oratrix.oratrix.nl> Bingo! when you run Python as another user you don't have the preference file, apparently each user has a completely distinct set of preferences files. Therefore, each user that wants to use Python must run InstalPython first. Otherwise the default sys.prefix will be set to whereever the first Python applet was run from. I'll add a note to the readme file, and I'll also add some code to be a bit more intelligent about setting the sys.prefix preference (I could for instance skip this if the folder from which we're run does not contain :Lib and :Mac subfolders). -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From cbarker@jps.net Fri Dec 29 21:35:37 2000 From: cbarker@jps.net (Chris Barker) Date: Fri, 29 Dec 2000 13:35:37 -0800 Subject: [Pythonmac-SIG] NumPy extensions on the Mac References: <200012111805.MAA09929@darwin.sfbr.org> Message-ID: <3A4D03A9.55B97ED7@jps.net> Has anyone gotten C extensions on the Mac working with NumPy Arrays (PyArrayObject)? I'm having assorted problems. I have an extension I wrote on Linux, and it works just fine there. I am having a bear of a time getting it working on the Mac. I'm using MacPython 1.5.2c1, and CodeWarrior Pro 5. At the moment my problem is that PyArray_Check() doesn't seem to work, it return false whether I pass in a NumPy array or any other object. I can probably get my extension to work without this, but I won't be able to have any type checking on the input, and when a bad type is passed in, the results are ugly. Has anyone gotten this working? If you have gotten useful NumPy array based extension working, I'd love to see any cod eyou would be willing to send me. This has been very frustrating! It is taking me longer to get this working ont he Mac, that it took to get the whole thing written on Linux, ewven though I had never written a Python extension before, and have barely written any C programs at all. thanks for any help anyone can give. -Chris -- Christopher Barker, Ph.D. cbarker@jps.net --- --- --- http://www.jps.net/cbarker -----@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Water Resources Engineering ------ @ ------ @ ------ @ Coastal and Fluvial Hydrodynamics ------- --------- -------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ From patrick@swdev.com Sat Dec 30 06:04:09 2000 From: patrick@swdev.com (Patrick Curtain) Date: Fri, 29 Dec 2000 22:04:09 -0800 Subject: [Pythonmac-SIG] building extensions on OSX Message-ID: <20001230060344.XOAZ17226.femail1.sdc1.sfba.home.com@patrickspb> Howdy All! Please, forgive me in advance for all the idiotic statements I'm likely = to make, but.... I'm running OSX, Python 2.0b1 and trying to build the MySQLdb extension. I've built it, after a lot of fussing, directing the setup.py script to = the Python-2.0b1 directory to find libpython and such. Now, though, if I try to import the module, i get the following: dyld: python multiple definitions of symbol _Pickler_setattr python definition of _Pickler_setattr /usr/local/lib/python2.0/site-packages/_mysql.so definition of = _Pickler_setattr And python dumps to the shell prompt. I'm sure there's more and more to tell before this can make sense to = anyone, but let me start here. Thanks for ANY help at all. :) --p Patrick Curtain, Husband & Father ( i also write software ) 503/781.6199 http://www.swdev.com/= From cpsoct@lycos.com Sat Dec 30 18:11:43 2000 From: cpsoct@lycos.com (kevin parks) Date: Sun, 31 Dec 2000 03:11:43 +0900 Subject: [Pythonmac-SIG] love python, but Discouraged with Mac IDLE Message-ID: I am very new to python and perhaps am speaking out of turn here, but please note that i love python, the python community and am extreemly grateful that the langauge even runs on a mac, but i have to say, IDLE is really unpleasant on the Mac. As far as i can tell there is no sytax coloring (looked and looked and looked..) and no pretty printing help no formatting tools, even more noteworthy, no line numbers! I thought that i was crazy, well ok, but i downloaded python onto a pc (yucky) and installed it just to see IDLE in action, and it was super sweet. Also i was used to using alpha to hack tcl and that was pretty sweet as well (people claim there is a python mode for that but i fail to see that as well). Can we look forward to basic nice-ities in macIdle or are these always going to be beyond us because of things that the OS forbids? I hate the PC, have no access to UNIX (god help me, my beloved NeXT is far far away) and am stuck on a mac for the time being ($), and in a twisted way occasionally like the mac for my other tasks (audio). I know that it is a lot of work and that many folks work hard to bring us mac python, but i really want to enjoy hacking with python more than i do and i find that IDLE and the interpreter (another topic altogether) is what keeps me from being productive and happy. The language is freaky awesome, the mac can be cool sometimes too, but the thing inbetween: IDLE is the discouraging part. I hope no one is angry at this post. It was meant to be constructive. Like when your wife, whom you love to no end, tries something with her hair that just isn't working.... best, kevin parks seoul, korea cpsoct@lycos.com PS. the mac-specific docs are no day at the beach either! Get FREE Email/Voicemail with 15MB at Lycos Communications at http://comm.lycos.com From jack@oratrix.nl Sun Dec 31 12:23:55 2000 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 31 Dec 2000 13:23:55 +0100 Subject: [Pythonmac-SIG] NumPy extensions on the Mac In-Reply-To: Message by Chris Barker , Fri, 29 Dec 2000 13:35:37 -0800 , <3A4D03A9.55B97ED7@jps.net> Message-ID: <20001231122400.8651E143DD5@oratrix.oratrix.nl> Recently, Chris Barker said: > I'm using MacPython 1.5.2c1, and CodeWarrior Pro 5. > > At the moment my problem is that > > PyArray_Check() doesn't seem to work, it return false whether I pass in > a NumPy array or any other object. This is usually a sign that you have two copies of the numpy code, probably the one that is a Python extension and another one that is linked to your extension. Type checking works by comparing the addresses of the typeobject pointer in the PyObject struct, so this hypothesis is easy to check with the codewarrior debugger. I'm not sure about the details under 1.5.2 (it's been a long time) but you have to make sure that your extension is linked against the .slb that contains the numeric module, and that the two are in the same folder during runtime (there's a few other ways to make sure the right one is found, but this is the easiest). -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From jack@oratrix.nl Sun Dec 31 12:29:27 2000 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 31 Dec 2000 13:29:27 +0100 Subject: [Pythonmac-SIG] building extensions on OSX In-Reply-To: Message by Patrick Curtain , Fri, 29 Dec 2000 22:04:09 -0800 , <20001230060344.XOAZ17226.femail1.sdc1.sfba.home.com@patrickspb> Message-ID: <20001231122932.0F7DD143DD5@oratrix.oratrix.nl> I haven't played with OSX a lot yet, but I have heard the rumour that it is extremely picky about multiple definitions (on most systems, include MacOS9 and most Unixes Im familiar with, this would be a warning at most, and Python and mysql would happily use their local copy of Pickler_setattr). But, on to the problem: it seems you're including cpickle.c in your shared library. Which you don't have to do, because it's already in 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