From cjl at physics.otago.ac.nz Mon Sep 1 09:50:36 2003 From: cjl at physics.otago.ac.nz (Chris Lee) Date: Sun Aug 31 16:51:46 2003 Subject: [Pythonmac-SIG] PackageManager wishlists, please! (was: unixy python and applescript) In-Reply-To: Message-ID: On Friday, August 29, 2003, at 09:59 AM, Jack Jansen wrote: > > On donderdag 28 augustus 2003, at 0:07AM, Chris Lee wrote: >> Yes but then you are asking people to download another python... Not >> everyone wants to have 4 versions of the same app. At the moment I >> use it with Fink python because Fink is the only thing that allows me >> to install scipy, Scientific and rpy and Numpy (linked to ATLAS >> instead of it's own libraries) right out of the box. I don't have >> the skills to make these things work myself so have no choice but to >> use the Fink version. > > Information like this I need to make Package Manager a success: if > there are packages > that people want I'd love to know. Depending on a number of factors > (how many > people want it, is it easy, is someone willing to do the work so I > only have to > shove it into the database, etc) I'll add it. You are cruising for trouble there. Every package has someone who uses it. I think this is far and away the biggest problem I have with python is that with the exception of Numpy and pil absolutely nothing will install out of the box and there are bugger all mac ready versions of any packages around. I know you guys are working hard unifying the unix and mac parts of python but I don't actually see that helping if we still can't install all these great modules at the end of it. > > Hmm, this is the first time that I have a problem where having a Wiki > actually > seems like a solution: it would allow voting, and people who did the > work before > (or tried and failed) could annotate it, etc. Instead of specific packages you should ask for votes for specific areas (and ask people to specify packages in the comments section). There are sooo many packages that you will end up with a million votes spread over a million packages and still not know where to start. The other thing is that you should include a prominent link on the same page to a work in progress section so that people can see if their pet package is on the way. > > Should we setup a Wiki for the PM wishlist? Anyone willing to do the > work > (in a way that I could easily incorporate into the MacPython website)? > -- > Jack Jansen, , http://www.cwi.nl/~jack > If I can't dance I don't want to be part of your revolution -- Emma > Goldman > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > ################################# Chris Lee Physics Department Otago University PO Box 56 Dunedin New Zealand Phone ++64 3 479 7749 Fax ++64 3 479 0964 ################################# From Jack.Jansen at cwi.nl Mon Sep 1 00:14:27 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Sun Aug 31 17:14:31 2003 Subject: [Pythonmac-SIG] PackageManager wishlists, please! (was: unixy python and applescript) In-Reply-To: References: Message-ID: <1A7070DC-DBF8-11D7-ACF9-000A27B19B96@cwi.nl> On 31-aug-03, at 22:50, Chris Lee wrote: >> Information like this I need to make Package Manager a success: if >> there are packages >> that people want I'd love to know. Depending on a number of factors >> (how many >> people want it, is it easy, is someone willing to do the work so I >> only have to >> shove it into the database, etc) I'll add it. > > You are cruising for trouble there. Every package has someone who > uses it. I think this is far and away the biggest problem I have with > python is that with the exception of Numpy and pil absolutely nothing > will install out of the box and there are bugger all mac ready > versions of any packages around. Well, we have to start somewhere, don't we? And there already is Bob Ippolito's collection of packages at , of which I've said that I'll include anything that people want, which hasn't had much followup since then... Hmm, Bob's database isn't mentioned on the Package Manager homepage. I'll rectify that shortly, and I'll also add a note that people are invited to create their own databases too. -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From bob at redivi.com Mon Sep 1 22:37:23 2003 From: bob at redivi.com (Bob Ippolito) Date: Mon Sep 1 21:37:48 2003 Subject: [Pythonmac-SIG] Re: PackageManager wishlists, please! (was: unixy python and applescript) In-Reply-To: Message-ID: <0040E392-DCE6-11D7-887F-000A95686CD8@redivi.com> On Thursday, Aug 28, 2003, at 17:59 America/New_York, Jack Jansen wrote: > > On donderdag 28 augustus 2003, at 0:07AM, Chris Lee wrote: >> Yes but then you are asking people to download another python... Not >> everyone wants to have 4 versions of the same app. At the moment I >> use it with Fink python because Fink is the only thing that allows me >> to install scipy, Scientific and rpy and Numpy (linked to ATLAS >> instead of it's own libraries) right out of the box. I don't have >> the skills to make these things work myself so have no choice but to >> use the Fink version. > > Information like this I need to make Package Manager a success: if > there are packages > that people want I'd love to know. Depending on a number of factors > (how many > people want it, is it easy, is someone willing to do the work so I > only have to > shove it into the database, etc) I'll add it. I've pretty much been doing this with my repository. There's a few packages in there that should be moved over to yours. > Hmm, this is the first time that I have a problem where having a Wiki > actually > seems like a solution: it would allow voting, and people who did the > work before > (or tried and failed) could annotate it, etc. > > Should we setup a Wiki for the PM wishlist? Anyone willing to do the > work > (in a way that I could easily incorporate into the MacPython website)? I think there should be a wiki,moin-moin isn't too hard to set up. -bob From kevin at macosx.com Mon Sep 1 22:53:09 2003 From: kevin at macosx.com (kevin) Date: Mon Sep 1 21:53:24 2003 Subject: [Pythonmac-SIG] install test Message-ID: <33D807B2-DCE8-11D7-A839-003065555ABC@macosx.com> It used to be (Python 2.2 or thereabouts) that there was a readme file that told you how to run some tests after you installed python to make sure all was groovy. I think that it was: >>> import test.regrtest >>> test.regrtest.main() and then it would chug away and usually fail one or two silly tests that you could ignore and rest easily knowing that you got your python installed okay and you was ready to hack some code. is there some such test to run on 2.3? i tried the above and not much happened >>> import test.regrtest was okay then i tried to run the thing with test.regrtest.main()" and got the following silliness: Python 2.3 (#2, Jul 30 2003, 11:45:28) [GCC 3.1 20020420 (prerelease)] Type "copyright", "credits" or "license" for more information. MacPython IDE 1.0.1 >>> import test.regrtest >>> test.regrtest.main() Regression test. This will find all modules whose name is "test_*" in the test directory, and run them. Various command line options provide additional facilities. Command line options: -v: verbose -- run tests in verbose mode with output to stdout -q: quiet -- don't print anything except if a test fails -g: generate -- write the output file for a test instead of comparing it -x: exclude -- arguments are tests to *exclude* -s: single -- run only a single test (see below) -r: random -- randomize test execution order -f: fromfile -- read names of tests to run from a file (see below) -l: findleaks -- if GC is available detect tests that leak memory -u: use -- specify which special resource intensive tests to run -h: help -- print this text and exit -t: threshold -- call gc.set_threshold(N) If non-option arguments are present, they are names for tests to run, unless -x is given, in which case they are names for tests not to run. If no test names are given, all tests are run. -v is incompatible with -g and does not compare test output files. -s means to run only a single test and exit. This is useful when doing memory analysis on the Python interpreter (which tend to consume too many resources to run the full regression test non-stop). The file /tmp/pynexttest is read to find the next test to run. If this file is missing, the first test_*.py file in testdir or on the command line is used. (actually tempfile.gettempdir() is used instead of /tmp). -f reads the names of tests from the file given as f's argument, one or more test names per line. Whitespace is ignored. Blank lines and lines beginning with '#' are ignored. This is especially useful for whittling down failures involving interactions among tests. -u is used to specify which special resource intensive tests to run, such as those requiring large file support or network connectivity. The argument is a comma-separated list of words indicating the resources to test. Currently only the following are defined: all - Enable all special resources. audio - Tests that use the audio device. (There are known cases of broken audio drivers that can crash Python or even the Linux kernel.) curses - Tests that use curses and will modify the terminal's state and output modes. largefile - It is okay to run some test that may create huge files. These tests can take a long time and may consume >2GB of disk space temporarily. network - It is okay to run tests that use external network resource, e.g. testing SSL support for sockets. bsddb - It is okay to run the bsddb testsuite, which takes a long time to complete. To enable all resources except one, use '-uall,-'. For example, to run all the tests except for the bsddb tests, give the option '-uall,-bsddb'. option -p not recognized Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/test/ regrtest.py", line 150, in main usage(2, msg) File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/test/ regrtest.py", line 114, in usage sys.exit(code) SystemExit: 2 --- What's up with that? cheers, kevin parks From kevin at macosx.com Mon Sep 1 23:12:12 2003 From: kevin at macosx.com (kevin) Date: Mon Sep 1 22:12:26 2003 Subject: [Pythonmac-SIG] install test Message-ID: It used to be (Python 2.2 or thereabouts) that there was a readme file that told you how to run some tests after you installed python to make sure all was groovy. I think that it was: >>> import test.regrtest >>> test.regrtest.main() and then it would chug away and usually fail one or two silly tests that you could ignore and rest easily knowing that you got your python installed okay and you was ready to hack some code. is there some such test to run on 2.3? i tried the above and not much happened >>> import test.regrtest was okay then i tried to run the thing with test.regrtest.main()" and got the following silliness: Python 2.3 (#2, Jul 30 2003, 11:45:28) [GCC 3.1 20020420 (prerelease)] Type "copyright", "credits" or "license" for more information. MacPython IDE 1.0.1 >>> import test.regrtest >>> test.regrtest.main() Regression test. This will find all modules whose name is "test_*" in the test directory, and run them. Various command line options provide additional facilities. Command line options: -v: verbose -- run tests in verbose mode with output to stdout -q: quiet -- don't print anything except if a test fails -g: generate -- write the output file for a test instead of comparing it -x: exclude -- arguments are tests to *exclude* -s: single -- run only a single test (see below) -r: random -- randomize test execution order -f: fromfile -- read names of tests to run from a file (see below) -l: findleaks -- if GC is available detect tests that leak memory -u: use -- specify which special resource intensive tests to run -h: help -- print this text and exit -t: threshold -- call gc.set_threshold(N) If non-option arguments are present, they are names for tests to run, unless -x is given, in which case they are names for tests not to run. If no test names are given, all tests are run. -v is incompatible with -g and does not compare test output files. -s means to run only a single test and exit. This is useful when doing memory analysis on the Python interpreter (which tend to consume too many resources to run the full regression test non-stop). The file /tmp/pynexttest is read to find the next test to run. If this file is missing, the first test_*.py file in testdir or on the command line is used. (actually tempfile.gettempdir() is used instead of /tmp). -f reads the names of tests from the file given as f's argument, one or more test names per line. Whitespace is ignored. Blank lines and lines beginning with '#' are ignored. This is especially useful for whittling down failures involving interactions among tests. -u is used to specify which special resource intensive tests to run, such as those requiring large file support or network connectivity. The argument is a comma-separated list of words indicating the resources to test. Currently only the following are defined: all - Enable all special resources. audio - Tests that use the audio device. (There are known cases of broken audio drivers that can crash Python or even the Linux kernel.) curses - Tests that use curses and will modify the terminal's state and output modes. largefile - It is okay to run some test that may create huge files. These tests can take a long time and may consume >2GB of disk space temporarily. network - It is okay to run tests that use external network resource, e.g. testing SSL support for sockets. bsddb - It is okay to run the bsddb testsuite, which takes a long time to complete. To enable all resources except one, use '-uall,-'. For example, to run all the tests except for the bsddb tests, give the option '-uall,-bsddb'. option -p not recognized Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/test/ regrtest.py", line 150, in main usage(2, msg) File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/test/ regrtest.py", line 114, in usage sys.exit(code) SystemExit: 2 --- What's up with that? cheers, kevin parks From lizardo at urbi.com.br Mon Sep 1 21:06:57 2003 From: lizardo at urbi.com.br (Lizardo H. C.M. Nunes) Date: Tue Sep 2 01:02:26 2003 Subject: [Pythonmac-SIG] [Q] Python and MacPython Message-ID: Hi, I downloaded the MacPython 2.3 package, according to the README file, binaries are installed in the "/usr/local" folder. But "/usr/local/bin" is already set in my $PATH. Can Apple's python conflict with MacPython's python ? Thanks, Lizardo. P.S.: I think that this question have been addressed to this forum before; if so, I would appreciate if you could point me to the archives. From kantel at mpiwg-berlin.mpg.de Tue Sep 2 16:36:20 2003 From: kantel at mpiwg-berlin.mpg.de (=?ISO-8859-1?Q?J=F6rg_Kantel?=) Date: Tue Sep 2 09:36:39 2003 Subject: [Pythonmac-SIG] Installing Modules in MacPython 2.3 Message-ID: <6FB8A2F0-DD4A-11D7-A61E-0003934BD10A@mpiwg-berlin.mpg.de> Dear all, maybe I'm a little bit thumb or I didn't understand the package manager as I should -- but I want to install piddle () within MacPython 2.3 (Mac OS X) and I don't know why. Whether I know how to install additional packages to the package manager by myself (because piddle isn't in the standard managers database and it isn't in the only other database I know (). And still copying the piddle package to Library/Frameworks/Python.fraameworks/Versions/2.3/lib/python2.3/site- packages in analogy to the "Extensions" Folder in older MacPython Distributions didn't work (for me). So please: Ho can I install piddle in MacPython 2.3 and -- for further purposes -- how can I add packages to the package manager by meyself? Or (far more general): How to install python modules within MacPython 2.3 (OS X) which are not listened in any package manager database? Many thanks for help (and excuse my bad (d)english) J"org Kantel -- J"org Kantel Max Planck Institute for the History of Science - Comp. Dept. Wilhelmstr. 44, D-10177 Berlin fon: +4930-22667-220 | fax: +4930-22667-299 kantel@mpiwg-berlin.mpg.de -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1317 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20030902/da6d0219/attachment.bin From bob at redivi.com Tue Sep 2 10:46:03 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Sep 2 09:46:34 2003 Subject: [Pythonmac-SIG] Installing Modules in MacPython 2.3 In-Reply-To: <6FB8A2F0-DD4A-11D7-A61E-0003934BD10A@mpiwg-berlin.mpg.de> Message-ID: On Tuesday, Sep 2, 2003, at 09:36 America/New_York, J?rg Kantel wrote: > Dear all, > > maybe I'm a little bit thumb or I didn't understand the package > manager as I should -- but I want to install piddle > () within MacPython 2.3 (Mac OS X) and > I don't know why. Whether I know how to install additional packages to > the package manager by myself (because piddle isn't in the standard > managers database and it isn't in the only other database I know > (). > And still copying the piddle package to > > > Library/Frameworks/Python.fraameworks/Versions/2.3/lib/python2.3/site- > packages That won't work for C extensions in source form. I'm pretty sure piddle is a C extension. What you need to do is run "sudo python2.3 setup.py install" from the terminal in the folder of the downloaded extension. > > in analogy to the "Extensions" Folder in older MacPython Distributions > didn't work (for me). > > So please: Ho can I install piddle in MacPython 2.3 and -- for further > purposes -- how can I add packages to the package manager by meyself? You can not add packages to the package manager yourself, package manager is a list of packages that someone else maintains. I'll look into adding it to my package manager database (the one at undefined.org) sometime soon. > Or (far more general): How to install python modules within MacPython > 2.3 (OS X) which are not listened in any package manager database? I answered this above. -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1655 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20030902/c4b9d20a/attachment.bin From kantel at mpiwg-berlin.mpg.de Tue Sep 2 17:48:24 2003 From: kantel at mpiwg-berlin.mpg.de (=?ISO-8859-1?Q?J=F6rg_Kantel?=) Date: Tue Sep 2 10:48:34 2003 Subject: [Pythonmac-SIG] Installing Modules in MacPython 2.3 In-Reply-To: Message-ID: <814ABF34-DD54-11D7-A61E-0003934BD10A@mpiwg-berlin.mpg.de> Am Dienstag, 02.09.03 um 15:46 Uhr schrieb Bob Ippolito: > That won't work for C extensions in source form. I'm pretty sure > piddle is a C extension. What you need to do is run "sudo python2.3 > setup.py install" from the terminal in the folder of the downloaded > extension. That works. Many thanks for the fast help. J"org -- J"org Kantel Max Planck Institute for the History of Science - Comp. Dept. Wilhelmstr. 44, D-10177 Berlin fon: +4930-22667-220 | fax: +4930-22667-299 kantel@mpiwg-berlin.mpg.de From kantel at mpiwg-berlin.mpg.de Tue Sep 2 18:34:20 2003 From: kantel at mpiwg-berlin.mpg.de (=?ISO-8859-1?Q?J=F6rg_Kantel?=) Date: Tue Sep 2 11:34:30 2003 Subject: [Pythonmac-SIG] Piddle, Python and Umlauts Message-ID: Dear all, it's me again ;o) After I've played a little bit around with piddle I've two comments/questions: I was running this programm which still works with MacPython 2.2.2 (OS X): 1. piddleQD seems to be broken. I've implemented my own patches but I still got a deprecation warning (integer expected, got float) and at least an error: ImportError: No module named img File "PixMapWrapper.py", line 12, in ? import img 2. The same program with TK runs (with pythonw from the terminal), but it still got a deprecation warning (integer expected, got float). And it's shows a strange behaviour with german umlauts: The "?" (a-Umlaut) in root.title("Apfelm?nnchen") will not shown, I've got another warning instead: DeprecationWarning: Non-ASCII character '\x8a' in file /Users/kantel/Desktop/apfelmtk.py on line 40, but no encoding declared. What's going wrong or what changed in Python 2.3? I'm a little bit concerned about that. Then sure, I've a lot of code running in Python with German Umlauts in string constants. Will that work further more without changing the code? Many thanks in advance (and once again: Excuse my bad (d)english) J"org Kantel -- J"org Kantel Max Planck Institute for the History of Science - Comp. Dept. Wilhelmstr. 44, D-10177 Berlin fon: +4930-22667-220 | fax: +4930-22667-299 kantel@mpiwg-berlin.mpg.de From rswerdlow at transpose.com Tue Sep 2 14:52:34 2003 From: rswerdlow at transpose.com (Bob Swerdlow) Date: Tue Sep 2 13:52:43 2003 Subject: [Pythonmac-SIG] bundlebuilder --standalone not working Message-ID: <01c301c3717b$00de2360$046fa8c0@RSWERDLOW800> We have a Macintosh application, built on Python using PyObjC. It is intended as a double-clickable application and we want to build it stand-alone so that the user does not need to do any additional installation. I have the application building with MacPython 2.3 with PyObjC installed using the PackageManager and PyXML installed using the PyXML setup.py. It runs fine when I build it with python buildapp.py build However, when I run python buildapp.py --standalone build it generates a bunch of warnings (I've appended them below) and when I run the application, I get this error: from xml.sax import saxutils ImportError: No module named sax When I look in the application package, the Frameworks directory includes the Python.framework/Versions/2.3 directory, but it does NOT have the lib subdirectory. I tried copying in that directory manually, but the application still could not find it - presumably because there is some kind of path that needs to be set for it. So, how do I get --standalone to find the rest of these modules and build a complete application? Here's the output from "python buildapp.py --standalone build": Finding module dependencies /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-mac/Car bon/Controls.py:11: FutureWarning: hex/oct constants > sys.maxint will return positive values in Python 2.4 and up kDataBrowserClientPropertyFlagsMask = 0xFF000000 Building 'build/Goombah.app' Copying files Adding Python modules Warning: couldn't find the following submodules: (Note that these could be false alarms -- it's not always possible to distinguish between "from package import submodule" and "from package import name") ? AppKit.NSAlertAlternateReturn ? AppKit.NSAlertDefaultReturn ? AppKit.NSApp ? AppKit.NSApplicationMain ? AppKit.NSBeginAlertSheet ? AppKit.NSBeginInformationalAlertSheet ? AppKit.NSCancelButton ? AppKit.NSGetInformationalAlertPanel ? AppKit.NSOKButton ? AppKit.NSReleaseAlertPanel ? AppKit.NSRunAlertPanel ? AppKit.NSRunCriticalAlertPanel ? AppKit.NSRunInformationalAlertPanel ? AppKit.NSWorkspace ? Foundation.NSAppleScript ? Foundation.NSData ? Foundation.NSDictionary ? Foundation.NSInvocation ? Foundation.NSLog ? Foundation.NSMutableDictionary ? Foundation.NSObject ? Foundation.NSTimer ? Foundation.NSURL ? Foundation.NSUserDefaults ? objc.selector ? objc.set_class_extender ? objc.set_signature_for_selector Warning: couldn't find the following modules: ? OverrideFrom23._Res ? SOCKS ? _xmlrpclib ? java.lang ? msvcrt ? os.path ? readline ? rourl2path ? sgmlop Done. Many thanks for your help. Bob Swerdlow COO Transpose rswerdlow@transpose.com 207-781-8284 http://www.transpose.com ---------------------------------- Fight Spam! Add this link to your signature (as I did): http://wecanstopspam.org Click through to find out more. ---------------------------------- From just at letterror.com Tue Sep 2 21:06:38 2003 From: just at letterror.com (Just van Rossum) Date: Tue Sep 2 14:06:40 2003 Subject: [Pythonmac-SIG] bundlebuilder --standalone not working In-Reply-To: <01c301c3717b$00de2360$046fa8c0@RSWERDLOW800> Message-ID: Bob Swerdlow wrote: > However, when I run python buildapp.py --standalone build it > generates a bunch of warnings (I've appended them below) and when I > run the application, I get this error: from xml.sax import saxutils > ImportError: No module named sax This is most likely caused by PyXML's _xmlplus hack. Try to add --package=_xmlplus. If that doesn't work, you could tweak your install by removing the original xml package, and rename _xmlplus to xml. > When I look in the application package, the Frameworks directory > includes the Python.framework/Versions/2.3 directory, but it does NOT > have the lib subdirectory. Correct, only the bare necessities. Everything needed from the library is in Contents/Resources/Modules.zip and Contents/Resources/ExtensionModules/ > I tried copying in that directory > manually, but the application still could not find it - presumably > because there is some kind of path that needs to be set for it. Contents/Resources/ is on sys.path, so if needed you can copy stuff there. But I'd rather find a way to let bundlebuilder do what you need. > So, how do I get --standalone to find the rest of these modules and > build a complete application? Let me know if the "--package=_xmlplus" thing worked. Just From rswerdlow at transpose.com Tue Sep 2 15:57:42 2003 From: rswerdlow at transpose.com (Bob Swerdlow) Date: Tue Sep 2 14:57:55 2003 Subject: [Pythonmac-SIG] bundlebuilder --standalone not working References: Message-ID: <01e101c37184$19fe64f0$046fa8c0@RSWERDLOW800> Just - Thanks for your help. The "--package=_xmlplus" seems to have improved things. I still get lots of warnings, but the application is running (I'm getting run-time errors, but I don't think they are related to this.) Here are the warnings - do you see anything I should be concerned about?: % python buildapp.py --standalone --package=_xmlplus build Finding module dependencies /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-mac/Car bon/Controls.py:11: FutureWarning: hex/oct constants > sys.maxint will return positive values in Python 2.4 and up kDataBrowserClientPropertyFlagsMask = 0xFF000000 Building 'build/Goombah.app' Copying files Adding Python modules Warning: couldn't find the following submodules: (Note that these could be false alarms -- it's not always possible to distinguish between "from package import submodule" and "from package import name") ? AppKit.NSAlertAlternateReturn ? AppKit.NSAlertDefaultReturn ? AppKit.NSApp ? AppKit.NSApplicationMain ? AppKit.NSBeginAlertSheet ? AppKit.NSBeginInformationalAlertSheet ? AppKit.NSCancelButton ? AppKit.NSGetInformationalAlertPanel ? AppKit.NSOKButton ? AppKit.NSReleaseAlertPanel ? AppKit.NSRunAlertPanel ? AppKit.NSRunCriticalAlertPanel ? AppKit.NSRunInformationalAlertPanel ? AppKit.NSWorkspace ? Foundation.NSAppleScript ? Foundation.NSData ? Foundation.NSDictionary ? Foundation.NSInvocation ? Foundation.NSLog ? Foundation.NSMutableDictionary ? Foundation.NSObject ? Foundation.NSTimer ? Foundation.NSURL ? Foundation.NSUserDefaults ? objc.selector ? objc.set_class_extender ? objc.set_signature_for_selector Warning: couldn't find the following modules: ? DateTime ? Ft.Lib ? Ft.Lib.DumpBgTuple ? Ft.__init__ ? OverrideFrom23._Res ? SOCKS ? XMLClient ? XMLFactory ? XMLinter ? XPathParserc ? _xmlrpclib ? com.indelv.dom ? com.indelv.dom.util ? com.sun.xml.tree ? ext.IsDOMString ? ext.SplitQName ? fr.loria.xml ? java.io ? java.lang ? java.net ? javax.xml.parsers ? msvcrt ? org.apache.xerces.dom ? org.apache.xerces.parsers ? org.brownell.xml ? org.brownell.xml.dom ? org.openxml.dom ? org.openxml.parser ? org.w3c.dom ? org.xml.sax ? org.xml.sax.helpers ? os.path ? readline ? rourl2path ? saxlib ? sgmlop ? xml.FtCore ? xml.dom.Attr ? xml.dom.BAD_BOUNDARYPOINTS_ERR ? xml.dom.BadBoundaryPointsErr ? xml.dom.DOMImplementation ? xml.dom.Document ? xml.dom.DocumentType ? xml.dom.Element ? xml.dom.Entity ? xml.dom.INVALID_NODE_TYPE_ERR ? xml.dom.InvalidNodeTypeErr ? xml.dom.NodeIterator ? xml.dom.Text ? xml.dom.UNSPECIFIED_EVENT_TYPE_ERR ? xml.dom.UnspecifiedEventTypeErr ? xml.dom.XML_PARSE_ERR ? xml.dom.ext ? xml.dom.ext.Visitor ? xml.dom.ext.reader ? xml.dom.ext.reader.HtmlLib ? xml.dom.html ? xml.dom.html.HTMLCollection ? xml.dom.html.HTMLElement ? xml.dom.implementation ? xml.ns ? xml.parsers.pyexpat ? xml.parsers.sgmllib ? xml.parsers.sgmlop ? xml.parsers.xmlproc ? xml.parsers.xmlproc.dtdparser ? xml.parsers.xmlproc.xmlapp ? xml.sax.drivers ? xml.sax.drivers.drv_xmlproc ? xml.sax.sax2exts ? xml.sax.saxexts ? xml.sax.saxlib ? xml.unicode.iso8859 ? xml.utils ? xml.utils.characters ? xml.xpath ? xml.xpath.ParsedAbbreviatedAbsoluteLocationPath ? xml.xpath.ParsedAbbreviatedRelativeLocationPath ? xml.xpath.ParsedAbsoluteLocationPath ? xml.xpath.ParsedAxisSpecifier ? xml.xpath.ParsedPredicateList ? xml.xpath.ParsedRelativeLocationPath ? xml.xpath.ParsedStep ? xml.xslt ? xml.xslt.ParsedPattern ? xml_dc ----- Original Message ----- From: "Just van Rossum" To: "Bob Swerdlow" Cc: ; "Gary Robinson" Sent: Tuesday, September 02, 2003 2:06 PM Subject: Re: [Pythonmac-SIG] bundlebuilder --standalone not working > Bob Swerdlow wrote: > > > However, when I run python buildapp.py --standalone build it > > generates a bunch of warnings (I've appended them below) and when I > > run the application, I get this error: from xml.sax import saxutils > > ImportError: No module named sax > > This is most likely caused by PyXML's _xmlplus hack. Try to add > --package=_xmlplus. If that doesn't work, you could tweak your install > by removing the original xml package, and rename _xmlplus to xml. > > > When I look in the application package, the Frameworks directory > > includes the Python.framework/Versions/2.3 directory, but it does NOT > > have the lib subdirectory. > > Correct, only the bare necessities. Everything needed from the library > is in Contents/Resources/Modules.zip and > Contents/Resources/ExtensionModules/ > > > I tried copying in that directory > > manually, but the application still could not find it - presumably > > because there is some kind of path that needs to be set for it. > > Contents/Resources/ is on sys.path, so if needed you can copy stuff > there. But I'd rather find a way to let bundlebuilder do what you need. > > > So, how do I get --standalone to find the rest of these modules and > > build a complete application? > > Let me know if the "--package=_xmlplus" thing worked. > > Just > > From rswerdlow at transpose.com Tue Sep 2 17:01:57 2003 From: rswerdlow at transpose.com (Bob Swerdlow) Date: Tue Sep 2 16:02:10 2003 Subject: [Pythonmac-SIG] Add PyXML to MacPython PackageManager? Message-ID: <020701c3718d$13981fd0$046fa8c0@RSWERDLOW800> I need the PyXML libraries for my application. I had to do the install manually since PackageManager doesn't know about them. Jack says that he'll add them to PackageManger if there is enough interest - so, anybody else out there using PyXML or think they should be added to PackageManager? Bob Swerdlow COO Transpose rswerdlow@transpose.com 207-781-8284 http://www.transpose.com ---------------------------------- Fight Spam! Add this link to your signature (as I did): http://wecanstopspam.org Click through to find out more. ---------------------------------- From israel at sandlotgames.com Tue Sep 2 14:13:05 2003 From: israel at sandlotgames.com (Israel C. Evans) Date: Tue Sep 2 16:13:24 2003 Subject: [Pythonmac-SIG] Add PyXML to MacPython PackageManager? In-Reply-To: <020701c3718d$13981fd0$046fa8c0@RSWERDLOW800> Message-ID: I think I'd use them provided I figure out xml and the panoply of relative specs surrounding it. On Tuesday, September 2, 2003, at 01:01 PM, Bob Swerdlow wrote: > I need the PyXML libraries for my application. I had to do the install > manually since PackageManager doesn't know about them. > > Jack says that he'll add them to PackageManger if there is enough > interest - > so, anybody else out there using PyXML or think they should be added to > PackageManager? > > Bob Swerdlow > COO > Transpose > rswerdlow@transpose.com > 207-781-8284 > http://www.transpose.com > > ---------------------------------- > Fight Spam! > Add this link to your signature (as I did): http://wecanstopspam.org > Click through to find out more. > ---------------------------------- > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > ~Israel~ From bob at redivi.com Tue Sep 2 17:27:00 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Sep 2 16:27:40 2003 Subject: [Pythonmac-SIG] Add PyXML to MacPython PackageManager? In-Reply-To: <020701c3718d$13981fd0$046fa8c0@RSWERDLOW800> Message-ID: On Tuesday, Sep 2, 2003, at 16:01 America/New_York, Bob Swerdlow wrote: > I need the PyXML libraries for my application. I had to do the install > manually since PackageManager doesn't know about them. > > Jack says that he'll add them to PackageManger if there is enough > interest - > so, anybody else out there using PyXML or think they should be added to > PackageManager? What do you use from PyXML that's not in the standard library XML implementation? The only times I used PyXML were before python came with a standard library implementation and when I was using Jaguar's Python that didn't have an expat module compiled and therefore didn't really work. In any case, PyXML is easy to compile, so I'll go ahead and put it in my list of things that will go into my repository when I find the time. -bob From bob at redivi.com Tue Sep 2 19:09:11 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Sep 2 18:09:49 2003 Subject: [Pythonmac-SIG] unixy python and applescript In-Reply-To: Message-ID: <1501FEC3-DD92-11D7-81F1-000A95686CD8@redivi.com> On Thursday, Aug 28, 2003, at 14:24 America/New_York, Russell Finn wrote: > On Wednesday, August 27, 2003, at 06:41 PM, Bob Ippolito wrote: >> I'll probably get around to compiling Numpy+ATLAS, Scipy, etc. for >> MacPython sometime. I'd have done it by now, but the damn thing >> needs a Fortran compiler and I haven't come across one that's >> reasonably easy to install/use with the gcc 3.3 toolchain. If you >> find one, let me know, and I'll see about doing it. > > Just the thing you need, courtesy of IBM: > search.jsp?go=y&rs=vacpp3> > > Disclaimer: It's technically beta, and I haven't actually used it. > But it's supposed to work with (nay, requires) gcc 3.3. Just FYI, the IBM compiler seems to install and compile trivial software (PRINT *, "Hello World!") correctly on my pbg4 1ghz even though it lists a PowerMac G5 as a requirement. I'll let you all know how Numpy+ATLAS and SciPy go when I get the chance to try those out. -bob From cjl at physics.otago.ac.nz Wed Sep 3 11:12:30 2003 From: cjl at physics.otago.ac.nz (Chris Lee) Date: Tue Sep 2 18:13:48 2003 Subject: [Pythonmac-SIG] unixy python and applescript In-Reply-To: <1501FEC3-DD92-11D7-81F1-000A95686CD8@redivi.com> Message-ID: <8B68A830-DD92-11D7-B7F4-0003937807FC@physics.otago.ac.nz> On Wednesday, September 3, 2003, at 10:09 AM, Bob Ippolito wrote: > > Just FYI, the IBM compiler seems to install and compile trivial > software (PRINT *, "Hello World!") correctly on my pbg4 1ghz even > though it lists a PowerMac G5 as a requirement. I'll let you all know > how Numpy+ATLAS and SciPy go when I get the chance to try those out. According to what I have seen on other lists it will not compile anything large unless you increase the stack size (the default is 512k). Cheers Chris > > -bob > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > ################################# Chris Lee Physics Department Otago University PO Box 56 Dunedin New Zealand Phone ++64 3 479 7749 Fax ++64 3 479 0964 ################################# From bob at redivi.com Tue Sep 2 19:29:22 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Sep 2 18:30:00 2003 Subject: [Pythonmac-SIG] unixy python and applescript In-Reply-To: <8B68A830-DD92-11D7-B7F4-0003937807FC@physics.otago.ac.nz> Message-ID: On Tuesday, Sep 2, 2003, at 18:12 America/New_York, Chris Lee wrote: > > On Wednesday, September 3, 2003, at 10:09 AM, Bob Ippolito wrote: >> >> Just FYI, the IBM compiler seems to install and compile trivial >> software (PRINT *, "Hello World!") correctly on my pbg4 1ghz even >> though it lists a PowerMac G5 as a requirement. I'll let you all >> know how Numpy+ATLAS and SciPy go when I get the chance to try those >> out. > > According to what I have seen on other lists it will not compile > anything large unless you increase the stack size (the default is > 512k). Thanks for the heads up, I probably wouldn't have noticed cause my .tcshrc sets stack size to 16mb cause I hit this wall with something else earlier (a lisp interpreter, I think). -bob From bob at redivi.com Tue Sep 2 20:10:11 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Sep 2 19:10:51 2003 Subject: [Pythonmac-SIG] unixy python and applescript In-Reply-To: Message-ID: <9AA4163E-DD9A-11D7-81F1-000A95686CD8@redivi.com> On Tuesday, Sep 2, 2003, at 18:47 America/New_York, Rob Managan wrote: >> On Thursday, Aug 28, 2003, at 14:24 America/New_York, Russell Finn >> wrote: >> >>> On Wednesday, August 27, 2003, at 06:41 PM, Bob Ippolito wrote: >>>> I'll probably get around to compiling Numpy+ATLAS, Scipy, etc. for >>>> MacPython sometime. I'd have done it by now, but the damn thing >>>> needs a Fortran compiler and I haven't come across one that's >>>> reasonably easy to install/use with the gcc 3.3 toolchain. If you >>>> find one, let me know, and I'll see about doing it. >>> >>> Just the thing you need, courtesy of IBM: >>> >> search.jsp?go=y&rs=vacpp3> >>> >>> Disclaimer: It's technically beta, and I haven't actually used it. >>> But it's supposed to work with (nay, requires) gcc 3.3. >> >> Just FYI, the IBM compiler seems to install and compile trivial >> software (PRINT *, "Hello World!") correctly on my pbg4 1ghz even >> though it lists a PowerMac G5 as a requirement. I'll let you all >> know how Numpy+ATLAS and SciPy go when I get the chance to try those >> out. >> > > i did try compiling ATLAS and the settings I gave it resultedin lower > MFLOPS numbers in the SUMMARY.LOG file than the default gcc > installation!! Well it seems that the OS X High Performance Computing page ( http://gravity.psu.edu/~khanna/hpc.html ) has been updated to include an experimental version of g77 for gcc 3.3, so I'll try both g77 and xlf90 with a couple different flags (time willing) and see which benchmarks better on my g4. I'd be willing to bet that IBM's compilers work MUCH better with a ppc970 target than GCC does.. I doubt IBM was shooting for much more than compatibility with Motorola processors, especially for this initial beta. -bob From jwblist at olympus.net Tue Sep 2 18:55:03 2003 From: jwblist at olympus.net (John W. Baxter) Date: Tue Sep 2 20:55:28 2003 Subject: [Pythonmac-SIG] Piddle, Python and Umlauts In-Reply-To: Message-ID: On 9/2/2003 8:34, "J?rg Kantel" wrote: > Dear all, > > it's me again ;o) After I've played a little bit around with piddle > I've two comments/questions: > > I was running this programm which still works with MacPython 2.2.2 (OS > X): > > 1. piddleQD seems to be broken. I've implemented my own patches > but I still got a deprecation > warning (integer expected, got float) and at least an error: > > ImportError: No module named img > File "PixMapWrapper.py", line 12, in ? > import img > > 2. The same program with TK runs (with pythonw from the terminal), but > it still got a deprecation warning (integer expected, got float). And > it's shows a strange behaviour with german umlauts: The "?" (a-Umlaut) > in > > root.title("Apfelm?nnchen") > > will not shown, I've got another warning instead: DeprecationWarning: > Non-ASCII character '\x8a' in file /Users/kantel/Desktop/apfelmtk.py on > line 40, but no encoding declared. > > What's going wrong or what changed in Python 2.3? I'm a little bit > concerned about that. Then sure, I've a lot of code running in Python > with German Umlauts in string constants. Will that work further more > without changing the code? > > Many thanks in advance (and once again: Excuse my bad (d)english) > J"org Kantel For what's new in Python 2.3, see http://www.python.org/doc/2.3/whatsnew/ For the above issue, look at item 3 in the list: 3 PEP 263: Source Code Encodings And then go on to the PEP itself: http://www.python.org/peps/pep-0263.html Basically, you can declare the encoding of a source file so that the non-ASCII characters are understood as intended. Sample > #!/usr/bin/env python > # -*- coding: UTF-8 -*- The declaration must be very early in the source file (see the PEP). Identifiers are still restricted to a subset of ASCII characters. (No ASCII character has a 1 in the high order bit.) --John From just at letterror.com Wed Sep 3 21:14:46 2003 From: just at letterror.com (Just van Rossum) Date: Thu Sep 4 14:15:45 2003 Subject: [Pythonmac-SIG] bundlebuilder --standalone not working In-Reply-To: <017901c37241$e36a6fb0$046fa8c0@RSWERDLOW800> Message-ID: Bob Swerdlow wrote: > I added --package=encodings and application seems to be working well > now. > > That warning about XML seems inappropriate: DeprecationWarning: The > xmllib module is obsolete. Use xml.sax instead. We ARE using xml.sax > and I don't see why xmllib is getting called at all - could this be > coming from some other package rather than our code? Can I safely > ignore these warnings? I'm not familiar enough with PyXML to be able to judge that. > The bundle is now 8MB, which is pretty large for downloading. Is > there any way to reduce the size? The --package directive includes *all* of that package, so you're now pulling in all of PyXML and all of encodings, don't know which is bigger. Experiment with that dummy import encodings.whatever-it-was to see how much that helps. Regarding PyXML: the only way I can think of right now is to remove the old xml and rename _xmlplus to xml, and don't specify --package=_xmlplus. Hm, onother option would be to put a dummy import _xmlplis.whatever-it-is-you're-really-importing-from-PyXML. Btw. these dummy imports may occur in a function that never gets called. Example from one of my own projects: def _moduleFinderHint(): """Dummy function to let modulefinder know what tables may be dynamically imported. """ import B_A_S_E_ import C_F_F_ import D_S_I_G_ import G_D_E_F_ import G_P_O_S_ ...etc. Also: add a -v to the bundlebuilder options to see a list of what modules actually get included. Sometimes it's easy to spot stuff that you know is not going to get used, but is pulled in because of some never triggered import somewhere. Use the --exclude option to exclude specific modules. Just From just at letterror.com Wed Sep 3 19:24:17 2003 From: just at letterror.com (Just van Rossum) Date: Thu Sep 4 14:30:53 2003 Subject: [Pythonmac-SIG] bundlebuilder --standalone not working In-Reply-To: <015201c37236$607819f0$046fa8c0@RSWERDLOW800> Message-ID: Bob Swerdlow wrote: > Unfortunately, building with --standalone does not seem to include the right > xml code. > > If I build with "python buildapp.py build" my application works as I expect > it to, but it is not stand-alone. > > If I build with "python buildapp.py --standalone build", I get > ImportError: No module named sax > on > form xml.sax import saxutils > > If I build with "python buildapp.py --standalone --package=_xmlplus", I get: > ./build/Goombah.app/Contents/Resources/Modules.zip/xmllib.py:10: > DeprecationWarning: > The xmllib module is obsolete. Use xml.sax instead. > and > LookupError: unknown encoding: string-escape > in pickle.py (the stack trace is attached below). > > My guess is that _xmlplus is not the package that I need. Is there > some other package that is needed to include the sax module? If you need PyXML, you need _xmlplus. If that doesn't work, try my other suggestion: remove the original xml package, and rename _xmlplus to xml. The string-escape issue: that will probably be solved by adding --package=encodings to the command line, or include a dummy "import encodings.string_escape" somewhere in your code, so that modulefinder picks it up. Just From rswerdlow at transpose.com Wed Sep 3 14:36:15 2003 From: rswerdlow at transpose.com (Bob Swerdlow) Date: Thu Sep 4 14:32:46 2003 Subject: [Pythonmac-SIG] bundlebuilder --standalone not working References: Message-ID: <017901c37241$e36a6fb0$046fa8c0@RSWERDLOW800> I added --package=encodings and application seems to be working well now. That warning about XML seems inappropriate: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead. We ARE using xml.sax and I don't see why xmllib is getting called at all - could this be coming from some other package rather than our code? Can I safely ignore these warnings? The bundle is now 8MB, which is pretty large for downloading. Is there any way to reduce the size? Thanks, Bob ----- Original Message ----- From: "Just van Rossum" To: "Bob Swerdlow" Cc: ; "Gary Robinson" Sent: Wednesday, September 03, 2003 12:24 PM Subject: Re: [Pythonmac-SIG] bundlebuilder --standalone not working > Bob Swerdlow wrote: > > > Unfortunately, building with --standalone does not seem to include the > right > > xml code. > > > > If I build with "python buildapp.py build" my application works as I > expect > > it to, but it is not stand-alone. > > > > If I build with "python buildapp.py --standalone build", I get > > ImportError: No module named sax > > on > > form xml.sax import saxutils > > > > If I build with "python buildapp.py --standalone --package=_xmlplus", > I get: > > ./build/Goombah.app/Contents/Resources/Modules.zip/xmllib.py:10: > > DeprecationWarning: > > The xmllib module is obsolete. Use xml.sax instead. > > and > > LookupError: unknown encoding: string-escape > > in pickle.py (the stack trace is attached below). > > > > My guess is that _xmlplus is not the package that I need. Is there > > some other package that is needed to include the sax module? > > If you need PyXML, you need _xmlplus. If that doesn't work, try my other > suggestion: remove the original xml package, and rename _xmlplus to xml. > > The string-escape issue: that will probably be solved by adding > --package=encodings to the command line, or include a dummy "import > encodings.string_escape" somewhere in your code, so that modulefinder > picks it up. > > Just > > From rswerdlow at transpose.com Wed Sep 3 13:13:50 2003 From: rswerdlow at transpose.com (Bob Swerdlow) Date: Thu Sep 4 14:32:49 2003 Subject: [Pythonmac-SIG] bundlebuilder --standalone not working References: Message-ID: <015201c37236$607819f0$046fa8c0@RSWERDLOW800> Unfortunately, building with --standalone does not seem to include the right xml code. If I build with "python buildapp.py build" my application works as I expect it to, but it is not stand-alone. If I build with "python buildapp.py --standalone build", I get ImportError: No module named sax on form xml.sax import saxutils If I build with "python buildapp.py --standalone --package=_xmlplus", I get: ./build/Goombah.app/Contents/Resources/Modules.zip/xmllib.py:10: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead. and LookupError: unknown encoding: string-escape in pickle.py (the stack trace is attached below). My guess is that _xmlplus is not the package that I need. Is there some other package that is needed to include the sax module? Thanks for your help! Here's the end of the stack trace for the "string-escape" problem, which is in the pickle code: ... strVersion = pickle.load(prefFile) # version string for future changes File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/pickle.py", line 1390, in load return Unpickler(file).load() File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/pickle.py", line 872, in load dispatch[key](self) File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/pickle.py", line 985, in load_string self.append(rep.decode("string-escape")) LookupError: unknown encoding: string-escape ----- Original Message ----- From: "Just van Rossum" To: "Bob Swerdlow" Cc: ; "Gary Robinson" Sent: Tuesday, September 02, 2003 2:06 PM Subject: Re: [Pythonmac-SIG] bundlebuilder --standalone not working > Bob Swerdlow wrote: > > > However, when I run python buildapp.py --standalone build it > > generates a bunch of warnings (I've appended them below) and when I > > run the application, I get this error: from xml.sax import saxutils > > ImportError: No module named sax > > This is most likely caused by PyXML's _xmlplus hack. Try to add > --package=_xmlplus. If that doesn't work, you could tweak your install > by removing the original xml package, and rename _xmlplus to xml. > > > When I look in the application package, the Frameworks directory > > includes the Python.framework/Versions/2.3 directory, but it does NOT > > have the lib subdirectory. > > Correct, only the bare necessities. Everything needed from the library > is in Contents/Resources/Modules.zip and > Contents/Resources/ExtensionModules/ > > > I tried copying in that directory > > manually, but the application still could not find it - presumably > > because there is some kind of path that needs to be set for it. > > Contents/Resources/ is on sys.path, so if needed you can copy stuff > there. But I'd rather find a way to let bundlebuilder do what you need. > > > So, how do I get --standalone to find the rest of these modules and > > build a complete application? > > Let me know if the "--package=_xmlplus" thing worked. > > Just > > From israel at sandlotgames.com Wed Sep 3 21:29:55 2003 From: israel at sandlotgames.com (Israel C. Evans) Date: Thu Sep 4 15:30:28 2003 Subject: [Pythonmac-SIG] Python iCal Module? Message-ID: <0DA86622-DE88-11D7-805E-000393A47FF2@sandlotgames.com> Hey there wonderful Python people.. I've been wondering if anyone has gotten around to writing up a Python Module capable of reading/writing iCal files. I'd do one myself if I had the proficiency and the time, but I've got neither, yet. So, in the hopes that someone else has done all the work before I've even lifted a finger, I'm calling out to you to ask you the aforementioned question... aforequestioned? I've seen lots of mention of people wanting to make one but I haven't seen anything that actually does the trick. Though I have seen tutorials on Java and iCal and Ruby and iCal and there is a really cool phpiCal program out there.. I'm hoping python can also offer up the goods. anyway... thanks, and good pythononinginginging... ~Israel~ From bob at redivi.com Wed Sep 3 03:35:42 2003 From: bob at redivi.com (Bob Ippolito) Date: Thu Sep 4 16:28:35 2003 Subject: [Pythonmac-SIG] Additional binary packages for Python2.3 on 10.2.6 Message-ID: <61FA70C3-DE23-11D7-8C29-000A95686CD8@redivi.com> I've done another update to my Package Manager repository, which is at: http://undefined.org/python/pimp/darwin-6.6-Power_Macintosh.plist The current package list, new or updated packages are marked with an asterisk: sdl_pygame_deps-1.2.5-binary (dependencies for pygame, SDL, smpeg, etc.) aeve-0.0.2-binary (my pythonic AppleEvent package, you should wait for 0.0.3 though) mxBase-2.0.4-binary PIL-1.1.4-binary (should have freetype2, libjpeg, libtiff statically) pyOpenSSL-0.5.1-binary ctypes-0.6.2-binary pycrypto-1.9a6-binary *Twisted-1.0.7rc1-binary (includes my experiemental CoreFoundation reactor and support library) *Numeric-23.1-binary (compiled against Apple's vecLib, probably will only work on G4/G5) PyOpenGL-2.1.05-binary (includes andrew's patch) pygame-1.5.6-binary (has some patches by me) Pyro-3.3beta-binary numarray-0.6.1-binary ZODB3-3.2b2-binary PythonCardPrototype-0.7.1-binary pycurl-7.10.5-binary (linked static to newest libcurl, OS X 10.2.6 libcurl is too old) PyChecker-0.8.12-binary pygsear-0.47.1-binary *MySQL-python-0.9.2-binary (linked statically to MySQL client libraries) *pyPgSQL-2.4-binary (linked statically to PgSQL client libraries) *Pyrex-0.8.2-binary (small fix to Nodes.py that allows import from system header files) *LaunchServices-0.1-binary (my pythonic wrapper for Apple's Launch Services) *PyXML-0.8.3-binary *metakit-2.4.9.2-binary (linked statically to metakit) *Lupy-0.1.5.4 *Pyndex-0.3.2a-binary *Reverend-0.2.3-binary *Quotient-0.5-binary I still haven't gotten around to making any "Extras" packages for anything. I've managed to hobble together a copy of SciPy but it doesn't pass all the tests. I think this is something to do with the ATLAS I used (I used one that someone else compiled, and it didn't have all the symbols so I also linked in Apple's vecLib... so it's an ugly monster). I plan on making a copy of bsddb3 that (maybe?) includes a static copy of bsddb, since Jack didn't include it with MacPython. Otherwise I'll probably make a "deps" package that installs the beast. I took a look at piddle's QD renderer.. A couple quick hacks can get rid of all the warnings, but the fact that you have to run a Wapplication mainloop and the QDRotate module's source has been lost makes me think that someone should just write a new/better one on top of CoreGraphics and/or Cocoa. This is my current relatively-interested-in-hacking-or-packaging list in no particular order: aeve (finish 0.0.3) bsddb3 SciPy piddle (well, a good backend for OS X) python-ldap pyogg pyvorbis chaco (does this have a good OS X backend yet?) VTK Soya 3D If anyone has any requests for modules that aren't yet covered by myself or Jack, let me know and I'll look into it. When we get a wiki this will be much easer to keep track of. -bob From bob at redivi.com Thu Sep 4 18:03:44 2003 From: bob at redivi.com (Bob Ippolito) Date: Thu Sep 4 17:04:06 2003 Subject: [Pythonmac-SIG] Additional binary packages for Python2.3 on 10.2.6 In-Reply-To: <61FA70C3-DE23-11D7-8C29-000A95686CD8@redivi.com> Message-ID: <44CFBF21-DF1B-11D7-8C29-000A95686CD8@redivi.com> On Wednesday, Sep 3, 2003, at 02:35 America/New_York, Bob Ippolito wrote: > I've done another update to my Package Manager repository, which is at: > http://undefined.org/python/pimp/darwin-6.6-Power_Macintosh.plist > > The current package list, new or updated packages are marked with an > asterisk: > sdl_pygame_deps-1.2.5-binary (dependencies for pygame, SDL, smpeg, > etc.) > aeve-0.0.2-binary (my pythonic AppleEvent package, you should wait > for 0.0.3 though) > mxBase-2.0.4-binary > PIL-1.1.4-binary (should have freetype2, libjpeg, libtiff statically) > pyOpenSSL-0.5.1-binary > ctypes-0.6.2-binary > pycrypto-1.9a6-binary > *Twisted-1.0.7rc1-binary (includes my experiemental CoreFoundation > reactor and support library) > *Numeric-23.1-binary (compiled against Apple's vecLib, probably will > only work on G4/G5) > PyOpenGL-2.1.05-binary (includes andrew's patch) > pygame-1.5.6-binary (has some patches by me) > Pyro-3.3beta-binary > numarray-0.6.1-binary > ZODB3-3.2b2-binary > PythonCardPrototype-0.7.1-binary > pycurl-7.10.5-binary (linked static to newest libcurl, OS X 10.2.6 > libcurl is too old) > PyChecker-0.8.12-binary > pygsear-0.47.1-binary > *MySQL-python-0.9.2-binary (linked statically to MySQL client > libraries) > *pyPgSQL-2.4-binary (linked statically to PgSQL client libraries) > *Pyrex-0.8.2-binary (small fix to Nodes.py that allows import from > system header files) > *LaunchServices-0.1-binary (my pythonic wrapper for Apple's Launch > Services) > *PyXML-0.8.3-binary > *metakit-2.4.9.2-binary (linked statically to metakit) > *Lupy-0.1.5.4 > *Pyndex-0.3.2a-binary > *Reverend-0.2.3-binary > *Quotient-0.5-binary > > I still haven't gotten around to making any "Extras" packages for > anything. > > I've managed to hobble together a copy of SciPy but it doesn't pass > all the tests. I think this is something to do with the ATLAS I used > (I used one that someone else compiled, and it didn't have all the > symbols so I also linked in Apple's vecLib... so it's an ugly > monster). > > I plan on making a copy of bsddb3 that (maybe?) includes a static copy > of bsddb, since Jack didn't include it with MacPython. Otherwise I'll > probably make a "deps" package that installs the beast. > > I took a look at piddle's QD renderer.. A couple quick hacks can get > rid of all the warnings, but the fact that you have to run a > Wapplication mainloop and the QDRotate module's source has been lost > makes me think that someone should just write a new/better one on top > of CoreGraphics and/or Cocoa. > > This is my current relatively-interested-in-hacking-or-packaging list > in no particular order: > aeve (finish 0.0.3) > bsddb3 > SciPy > piddle (well, a good backend for OS X) > python-ldap > pyogg > pyvorbis > chaco (does this have a good OS X backend yet?) > VTK > Soya 3D > > If anyone has any requests for modules that aren't yet covered by > myself or Jack, let me know and I'll look into it. When we get a wiki > this will be much easer to keep track of. I went ahead and compiled bsddb3 and added it to my repository. The version of bsddb in Jack's distribution of MacPython 2.3 is incomplete (not functional), because it is missing _bsddb.so. My bsddb package consists of *only* _bsddb.so, which gets installed into site-packages so that the existing bsddb python package will find it. I did it this way because sys.path puts site-packages *after* standard library, so it's not possible to override the python bits of it through standard means. A _bsddb.so anywhere on sys.path does make the existing bsddb python package work. _bsddb.so is linked statically with BerkeleyDB 4.1, so it has no additional dependencies. -bob From bob at redivi.com Thu Sep 4 18:42:24 2003 From: bob at redivi.com (Bob Ippolito) Date: Thu Sep 4 17:42:53 2003 Subject: [Pythonmac-SIG] Additional binary packages for Python2.3 on 10.2.6 In-Reply-To: <15EBC63A-DF1D-11D7-B7F4-0003937807FC@physics.otago.ac.nz> Message-ID: I don't know how Numeric aligns its data structures, but if it's at the top of something allocated with malloc it will be 128bit aligned (this is documented behavior for OS X). I tried compiling ATLAS a few times (with xlf90 and g77 from the high performance computing page) to no avail, and the only precompiled ATLAS I could find was messed up (I ended up having to link to vecLib anyways to get all of the symbols SciPy wanted). If you can provide me with a statically linked version of ATLAS, LAPACK, BLAS, etc. then I will compile SciPy and Numeric with it.. but until then, I pretty much give up. ATLAS doesn't like something about how I'm setup. -bob On Thursday, Sep 4, 2003, at 17:16 America/New_York, Chris Lee wrote: > Wow that was quick work. Thanks Bob, though I do have a question :) > > VecLib automatically uses scalar code if it is sent a double or if the > vectors are misaligned. Is there a way to make sure python only uses > single precision 16 bit aligned floats? > Otherwise you are better off linking to ATLAS which has better > optimisation for double precision scalar code. > > Sorry if I am throwing extra work at you but it is a consideration. > > Cheers > Chris > On Wednesday, September 3, 2003, at 06:35 PM, Bob Ippolito wrote: > >> I've done another update to my Package Manager repository, which is >> at: >> http://undefined.org/python/pimp/darwin-6.6-Power_Macintosh.plist >> >> The current package list, new or updated packages are marked with an >> asterisk: >> sdl_pygame_deps-1.2.5-binary (dependencies for pygame, SDL, smpeg, >> etc.) >> aeve-0.0.2-binary (my pythonic AppleEvent package, you should wait >> for 0.0.3 though) >> mxBase-2.0.4-binary >> PIL-1.1.4-binary (should have freetype2, libjpeg, libtiff statically) >> pyOpenSSL-0.5.1-binary >> ctypes-0.6.2-binary >> pycrypto-1.9a6-binary >> *Twisted-1.0.7rc1-binary (includes my experiemental CoreFoundation >> reactor and support library) >> *Numeric-23.1-binary (compiled against Apple's vecLib, probably will >> only work on G4/G5) >> PyOpenGL-2.1.05-binary (includes andrew's patch) >> pygame-1.5.6-binary (has some patches by me) >> Pyro-3.3beta-binary >> numarray-0.6.1-binary >> ZODB3-3.2b2-binary >> PythonCardPrototype-0.7.1-binary >> pycurl-7.10.5-binary (linked static to newest libcurl, OS X 10.2.6 >> libcurl is too old) >> PyChecker-0.8.12-binary >> pygsear-0.47.1-binary >> *MySQL-python-0.9.2-binary (linked statically to MySQL client >> libraries) >> *pyPgSQL-2.4-binary (linked statically to PgSQL client libraries) >> *Pyrex-0.8.2-binary (small fix to Nodes.py that allows import from >> system header files) >> *LaunchServices-0.1-binary (my pythonic wrapper for Apple's Launch >> Services) >> *PyXML-0.8.3-binary >> *metakit-2.4.9.2-binary (linked statically to metakit) >> *Lupy-0.1.5.4 >> *Pyndex-0.3.2a-binary >> *Reverend-0.2.3-binary >> *Quotient-0.5-binary >> >> I still haven't gotten around to making any "Extras" packages for >> anything. >> >> I've managed to hobble together a copy of SciPy but it doesn't pass >> all the tests. I think this is something to do with the ATLAS I used >> (I used one that someone else compiled, and it didn't have all the >> symbols so I also linked in Apple's vecLib... so it's an ugly > >> monster). >> >> I plan on making a copy of bsddb3 that (maybe?) includes a static >> copy of bsddb, since Jack didn't include it with MacPython. >> Otherwise I'll probably make a "deps" package that installs the >> beast. >> >> I took a look at piddle's QD renderer.. A couple quick hacks can get >> rid of all the warnings, but the fact that you have to run a >> Wapplication mainloop and the QDRotate module's source has been lost >> makes me think that someone should just write a new/better one on top >> of CoreGraphics and/or Cocoa. >> >> This is my current relatively-interested-in-hacking-or-packaging list >> in no particular order: >> aeve (finish 0.0.3) >> bsddb3 >> SciPy >> piddle (well, a good backend for OS X) >> python-ldap >> pyogg >> pyvorbis >> chaco (does this have a good OS X backend yet?) >> VTK >> Soya 3D >> >> If anyone has any requests for modules that aren't yet covered by >> myself or Jack, let me know and I'll look into it. When we get a >> wiki this will be much easer to keep track of. From bob at redivi.com Wed Sep 3 03:35:42 2003 From: bob at redivi.com (Bob Ippolito) Date: Thu Sep 4 17:52:04 2003 Subject: [Pythonmac-SIG] Additional binary packages for Python2.3 on 10.2.6 In-Reply-To: Message-ID: I've done another update to my Package Manager repository, which is at: http://undefined.org/python/pimp/darwin-6.6-Power_Macintosh.plist The current package list, new or updated packages are marked with an asterisk: sdl_pygame_deps-1.2.5-binary (dependencies for pygame, SDL, smpeg, etc.) aeve-0.0.2-binary (my pythonic AppleEvent package, you should wait for 0.0.3 though) mxBase-2.0.4-binary PIL-1.1.4-binary (should have freetype2, libjpeg, libtiff statically) pyOpenSSL-0.5.1-binary ctypes-0.6.2-binary pycrypto-1.9a6-binary *Twisted-1.0.7rc1-binary (includes my experiemental CoreFoundation reactor and support library) *Numeric-23.1-binary (compiled against Apple's vecLib, probably will only work on G4/G5) PyOpenGL-2.1.05-binary (includes andrew's patch) pygame-1.5.6-binary (has some patches by me) Pyro-3.3beta-binary numarray-0.6.1-binary ZODB3-3.2b2-binary PythonCardPrototype-0.7.1-binary pycurl-7.10.5-binary (linked static to newest libcurl, OS X 10.2.6 libcurl is too old) PyChecker-0.8.12-binary pygsear-0.47.1-binary *MySQL-python-0.9.2-binary (linked statically to MySQL client libraries) *pyPgSQL-2.4-binary (linked statically to PgSQL client libraries) *Pyrex-0.8.2-binary (small fix to Nodes.py that allows import from system header files) *LaunchServices-0.1-binary (my pythonic wrapper for Apple's Launch Services) *PyXML-0.8.3-binary *metakit-2.4.9.2-binary (linked statically to metakit) *Lupy-0.1.5.4 *Pyndex-0.3.2a-binary *Reverend-0.2.3-binary *Quotient-0.5-binary I still haven't gotten around to making any "Extras" packages for anything. I've managed to hobble together a copy of SciPy but it doesn't pass all the tests. I think this is something to do with the ATLAS I used (I used one that someone else compiled, and it didn't have all the symbols so I also linked in Apple's vecLib... so it's an ugly monster). I plan on making a copy of bsddb3 that (maybe?) includes a static copy of bsddb, since Jack didn't include it with MacPython. Otherwise I'll probably make a "deps" package that installs the beast. I took a look at piddle's QD renderer.. A couple quick hacks can get rid of all the warnings, but the fact that you have to run a Wapplication mainloop and the QDRotate module's source has been lost makes me think that someone should just write a new/better one on top of CoreGraphics and/or Cocoa. This is my current relatively-interested-in-hacking-or-packaging list in no particular order: aeve (finish 0.0.3) bsddb3 SciPy piddle (well, a good backend for OS X) python-ldap pyogg pyvorbis chaco (does this have a good OS X backend yet?) VTK Soya 3D If anyone has any requests for modules that aren't yet covered by myself or Jack, let me know and I'll look into it. When we get a wiki this will be much easer to keep track of. -bob From ryanwilcox at mac.com Thu Sep 4 20:24:48 2003 From: ryanwilcox at mac.com (Ryan Wilcox) Date: Thu Sep 4 19:24:59 2003 Subject: [Pythonmac-SIG] Python iCal Module? In-Reply-To: <0DA86622-DE88-11D7-805E-000393A47FF2@sandlotgames.com> Message-ID: On Wednesday, September 3, 2003, at 11:29 PM, Israel C. Evans wrote: > I've been wondering if anyone has gotten around to writing up a Python > Module capable of reading/writing iCal files. I'm working on one, actually. I've got it reading the calendar and (most of) the event objects. I need it for a project that should be in testing within the next month or so... I'll have it done by then, if not sooner. (But, hey, if someone's got a module that I could just use, well, great!) -Ryan Who *just* saw the "reading iCal with Ruby" MacTech article... From sarwat at sarwat.net Thu Sep 4 20:31:03 2003 From: sarwat at sarwat.net (Sarwat Khan) Date: Thu Sep 4 19:31:16 2003 Subject: [Pythonmac-SIG] Some new tools: plistservices, userdefaults, and CFPython Message-ID: Hi all, I released some stuff today that should interest you guys. plistservices and userdefaults are Python modules. CFPython is a library to make working with the Python C API and CoreFoundation easier. plistservices is like plistlib in that it supports reading and writing of property list data, but unlike the version included with Python 2.3 it supports plists of any time (not just dictionaries). Most importantly plistservices includes an ISO 8601 parser to create datetime objects, so you don't need to install PyXML to use property lists that use dates. However, plistservices requires Python 2.3. plistservices is very Cocoa-like in its interface; it's intended to be used like NSPropertyListSerialization. plistservices includes Date (datetime.datetime), Data, and TimeInterval classes to make it easier to work with code or data that was intended for Cocoa or PyObjC. userdefaults is a Python interface to CFPreferences (or NSUserDefaults). This lets you read and write your script's preferences to the current user's ~/Library/Preferences folder as well as access system preferences (such as NSCurrencySymbol or com.apple.sound.beep.sound). CFPython was used to implement userdefaults and is a translator between PyObject<=>CFTypeRef. It's more functional than the pycfbridge.c included with the Python 2.3 source, however. Currently it only supports translation of property list types, as that was all I was interested in implementing. It's a very useful library however, as it lets you write all your logic using Cocoa or Carbon and then perform the data translations as necessary when you need to supply or get data from Python. You can get this stuff from my website at http://sarwat.net/opensource/ The stuff's released under a BSD-style license. Use 'bzcat | pax -r' to extract the archives. From jreese99 at earthlink.net Wed Sep 3 22:59:27 2003 From: jreese99 at earthlink.net (James Reese) Date: Thu Sep 4 19:39:43 2003 Subject: [Pythonmac-SIG] Newbie question - getting boa-constructor to work Message-ID: <69F75EAA-DE7B-11D7-BB14-003065C69CBE@earthlink.net> What do I have to do to get boa-constructor to work, specifically editing? Boa will run just fine, but I am unable to edit any source code. From anode at anotrash.com Tue Sep 2 22:46:41 2003 From: anode at anotrash.com (Anode) Date: Thu Sep 4 19:44:35 2003 Subject: [Pythonmac-SIG] Plistlib Message-ID: I was wondering if someone could let me know what this is distributed with? It's on my system, but I'm not sure if it came with one of the MacPython 2.3 betas, MacPython 2.3 final or some add-on module that I've installed Cheers, Anode From bob at redivi.com Thu Sep 4 18:57:37 2003 From: bob at redivi.com (Bob Ippolito) Date: Thu Sep 4 21:10:28 2003 Subject: [Pythonmac-SIG] Python iCal Module? In-Reply-To: <0DA86622-DE88-11D7-805E-000393A47FF2@sandlotgames.com> Message-ID: On Wednesday, Sep 3, 2003, at 23:29 America/New_York, Israel C. Evans wrote: > > Hey there wonderful Python people.. > > I've been wondering if anyone has gotten around to writing up a Python > Module capable of reading/writing iCal files. > I'd do one myself if I had the proficiency and the time, but I've got > neither, yet. So, in the hopes that someone else has done all the > work before I've even lifted a finger, I'm calling out to you to ask > you the aforementioned question... aforequestioned? > > I've seen lots of mention of people wanting to make one but I haven't > seen anything that actually does the trick. Though I have seen > tutorials on Java and iCal and Ruby and iCal and there is a really > cool phpiCal program out there.. I'm hoping python can also offer up > the goods. http://www.nongnu.org/python-pdi/ http://www.logilab.org/projects/vcalsax/ (seems down at the moment, but it worked yesterday) -bob From pf at comsulting.de Fri Sep 5 08:35:16 2003 From: pf at comsulting.de (Patrick W. Fraley) Date: Fri Sep 5 03:35:19 2003 Subject: [Pythonmac-SIG] Quiting a CGIHttpServer Message-ID: <1062747313.3798.5.camel@l03.tdf.comsulting.de> Hi List, I have two questions: 1) I have written a WebApplicationServer Based on the CGIHttpServer Module that comes with Python. Now once this thing is running the is no way for me to quit the Programm. It will not react to a File->Quit, nor am I able to shutdown the Computer. (Mac OS 9) 2) Is it possible to prevent the 'console window' from appearing when the Server is being started? Thank you in advance Patrick W. Fraley -- *************************************** COMsulting Gerhard Faehling GmbH Patrick W. Fraley Oeverdieker Weg 6 23669 Timmendorfer Strand Tel: 04503 / 88 12 45 Fax: 04503 / 88 10 18 E-Mail: pf@comsulting.de Internet: www.comsulting.de *************************************** From just at letterror.com Fri Sep 5 16:18:16 2003 From: just at letterror.com (Just van Rossum) Date: Fri Sep 5 09:18:09 2003 Subject: [Pythonmac-SIG] Plistlib In-Reply-To: Message-ID: Anode wrote: > I was wondering if someone could let me know what this is distributed > with? It's on my system, but I'm not sure if it came with one of the > MacPython 2.3 betas, MacPython 2.3 final or some add-on module that > I've installed It's in all MacPython 2.3 betas, and in 2.3 final. It's also in PyObjC (for 2.2 compatibility). Although it's a cross-platform module, it's only installed with MacPython. I have an updated version which also supports lists as top-level modules. Just From Martina at Oefelein.de Fri Sep 5 20:58:50 2003 From: Martina at Oefelein.de (Martina Oefelein) Date: Fri Sep 5 13:58:55 2003 Subject: [Pythonmac-SIG] bundlebuilder --standalone not working In-Reply-To: <015201c37236$607819f0$046fa8c0@RSWERDLOW800> Message-ID: <9A9076C6-DFCA-11D7-B6DB-000A957DBE94@Oefelein.de> Hi Bob, > If I build with "python buildapp.py --standalone build", I get > ImportError: No module named sax > on > form xml.sax import saxutils > > If I build with "python buildapp.py --standalone --package=_xmlplus", > I get: > ./build/Goombah.app/Contents/Resources/Modules.zip/xmllib.py:10: > DeprecationWarning: > The xmllib module is obsolete. Use xml.sax instead. > and > LookupError: unknown encoding: string-escape > in pickle.py (the stack trace is attached below). > > My guess is that _xmlplus is not the package that I need. Is there > some > other package that is needed to include the sax module? pyxml is loaded from an ugly "hook" in xml/__init__.py, which looks for a package named _xmlplus, and if it exists, munges sys.modules so that the module "xml" actually points to _xmlplus. This confuses bundlebuilder (and users). So you need _xmlplus AND xml. Check whether bundlebuilder adds them both to your app. If not, use dummy imports to make sure that they included. Or try Just approach (renaming _xmlplus to xml), or try replacing all references to module xml in your source with _xmlplus. I think that these tricks alone still won't work, as some pyxml modules load plugin modules (e.g. parsers) dynamically and might not be recognized by bundlebuilder. So you have to load these plugins explicitly. ciao Martina From Jack.Jansen at cwi.nl Sat Sep 6 00:51:09 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Fri Sep 5 17:51:14 2003 Subject: [Pythonmac-SIG] The future Message-ID: <0F2EB490-DFEB-11D7-AA0C-000A27B19B96@cwi.nl> Folks, with Python 2.3 in all probability going to be included in OSX 10.3 and with lots of nifty new stuff coming available from MacPython developers (aeve and the CF additions, to name just two) we need to come up with a scheme to gradually introduce these. Under MacOS9 there was really no problem, because there were so few core developers. Most new things got done by a small group who had access to it immediately, and the rest of the world had to wait. Moreover, they often didn't have to wait all that long, because often I would introduce stealthily introduce new functionality (if it was backward compatible) in a minor release. And the MacPython user community was so small that if someone was a minor release behind and something didn't work it was easy to make them upgrade. All of these assertions are going to break with 10.3, or already broken. There are a lot more developers, and they come up with all sorts of goodies. But 99.9% of the Python installed base will remain at MacPython 2.3.0 until MacOSX 10.4 comes out, so sneaking in functionality in 2.3.1 is a strict no-no, as it would potentially break things badly for people distributing software to third parties. What I want to do is something similar to "from future import ...", but it's a bit different. For example, if we have a new Carbon.CF module then "from MacPython24 import Carbon.CF" won't cut it, because you really want some sort of a statement that will, from that point on, *everything* to use the new module. Carbon.CF is a prime example, because it is also used under the hood: the core Python engine (and through it extensions like PyObjC) will import it itself when it needs to create a CF object. I have a couple of ideas on how to do this, but they're all either clunky, or contradictory, or both. So: let's hear any bright ideas you all have, please... -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Sat Sep 6 01:08:38 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Fri Sep 5 18:08:43 2003 Subject: [Pythonmac-SIG] Need beta-testers for MacPython-Panther Message-ID: <80803D88-DFED-11D7-AA0C-000A27B19B96@cwi.nl> Folks, I need beta testers for MacPython 2.3 for Panther (the distribution that contains everything that is in MacPython 2.3 but not included in Panther by Apple: the IDE, Package Manager, waste, etc). If you're a Panther beta tester and you have access to 7B53 (or later): please contact me and I'll tell you where to find the installer. -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From bob at redivi.com Fri Sep 5 19:23:10 2003 From: bob at redivi.com (Bob Ippolito) Date: Fri Sep 5 18:23:32 2003 Subject: [Pythonmac-SIG] The future In-Reply-To: <0F2EB490-DFEB-11D7-AA0C-000A27B19B96@cwi.nl> Message-ID: <88575921-DFEF-11D7-8C29-000A95686CD8@redivi.com> On Friday, Sep 5, 2003, at 17:51 America/New_York, Jack Jansen wrote: > Folks, > with Python 2.3 in all probability going to be included in OSX 10.3 > and with > lots of nifty new stuff coming available from MacPython developers > (aeve and > the CF additions, to name just two) we need to come up with a scheme to > gradually introduce these. I believe Package Manager is a good testbed for these. I don't think we should accept new modules into MacPython proper until they are properly documented, tested, and relatively popular. PyObjC is a prime example of this, and should DEFINITELY be a battery of the next release of Python (assuming it hits 1.0 and fixes the few remaining known bugs, I guess). > Under MacOS9 there was really no problem, because there were so few > core > developers. Most new things got done by a small group who had access to > it immediately, and the rest of the world had to wait. Moreover, they > often didn't have to wait all that long, because often I would > introduce > stealthily introduce new functionality (if it was backward compatible) > in a minor release. And the MacPython user community was so small that > if someone was a minor release behind and something didn't work it > was easy to make them upgrade. I think that a bunch of MacOS9 functionality has been broken already, I propose to break even more ;) For example, I believe colon delimited file specifications should be completely deprecated, and FSSpec, FSRef and Alias should be given useful __str__ and __unicode__ methods (return unix path), for example. Someone should also buckle down and wrap QuickTime properly so that you can do whatever you want with it. I've been maintaining my own version of the QuickTime wrapper because I've had to make changes to the bgen so that it actually lets you create a QuickTime movie from scratch, for example. Maybe we need to make bgen smarter, or make it output Pyrex instead of C? I've had very good results with Pyrex so far, though automating the C header file -> Pyrex include file stuff would be excellent (so far I've been doing it in Vim by hand each time with regexps). Although, in MacOS X, sometimes it's preferable to have paths as URLs.. hmm. > All of these assertions are going to break with 10.3, or already > broken. > There are a lot more developers, and they come up with all sorts of > goodies. But 99.9% of the Python installed base will remain at > MacPython 2.3.0 until MacOSX 10.4 comes out, so sneaking in > functionality > in 2.3.1 is a strict no-no, as it would potentially break things badly > for people distributing software to third parties. I sort of agree with this, but I think that this problem is mostly solved with bundlebuilder. If 2.3.1's bundlebuilder knows what changed between Python 2.3.1 and Python 2.3.0 modulewise, then it could include those changed modules for compatibility across the 2.3.x board... as long as sys.path is setup properly so that the replacements are preferred over system modules. > What I want to do is something similar to "from future import ...", > but it's a bit different. For example, if we have a new Carbon.CF > module > then "from MacPython24 import Carbon.CF" won't cut it, because > you really want some sort of a statement that will, from that point > on, *everything* to use the new module. Carbon.CF is a prime example, > because it is also used under the hood: the core Python engine > (and through it extensions like PyObjC) will import it itself > when it needs to create a CF object. > > I have a couple of ideas on how to do this, but they're all either > clunky, or contradictory, or both. So: let's hear any bright ideas you > all have, > please... I don't know if this really makes sense. Old versions of ModuleX are going to depend on the functionality and bugs of the version of Carbon.CF it was released with (for example, LaunchServices makes up for a retain count bug in Carbon.CF, and would leak on a fixed version). It is up to the author of ModuleX to be aware that there are multiple versions of Carbon.CF it may be using, but Carbon.CF doesn't say what version it is (though you could extrapolate this from the sys module, if the user hasn't replaced the installed version of Carbon.CF). As far as making everything use the new module goes, something that does sys.modules['Carbon.CF'] = MacPython24.Carbon.CF *should* work, although I don't know what that would do if another module in the Carbon package said "import CF". IMHO, there should be a standard way for doing module metadata. Many package and module authors use __version__, I think this should be a standard for all modules, even system modules. It would make PackageManager easier, for sure. This could partially be solved if PackageManager had package receipts, since all the metadata is known when it installs a package.. but this should really be distutils functionality (actually I think that most of PackageManager should be distutils functionality). Oh, FYI, I make a small update to makepimp.py the other day so it is tolerant of setup.py scripts that like to print crap to stdout. Now it runs setup.py twice, the first time to determine the amount of line noise, and the second time to actually query package metadata. http://undefined.org/python/makepimp.py -bob From bob at redivi.com Fri Sep 5 19:59:20 2003 From: bob at redivi.com (Bob Ippolito) Date: Fri Sep 5 18:59:32 2003 Subject: [Pythonmac-SIG] Additional binary packages for Python2.3 on 10.2.6 In-Reply-To: Message-ID: <956FB17E-DFF4-11D7-8C29-000A95686CD8@redivi.com> On Friday, Sep 5, 2003, at 13:03 America/New_York, Rob Managan wrote: > I have a copy of the QDRotate sources. Here is what I have from the > piddle-1.0.14 release Thanks Rob, I managed to build QDRotate for piddle with some minor changes to include statements. Piddle 1.0.15 with my MacOS X fixes and a working QDRotate (builds as part of setup.py) is available from: http://undefined.org/python/piddle-1.0.15-osx.tgz A binary version is also available in my Package Manager repository: http://undefined.org/python/pimp/darwin-6.6-Power_Macintosh.plist It's not heavily tested, and I'm not exactly sure it does what it's supposed to because I'm not familiar with W or Piddle, but a small test worked (the first one I saw on the webpage with rotated text). -bob From bob at redivi.com Fri Sep 5 20:15:18 2003 From: bob at redivi.com (Bob Ippolito) Date: Fri Sep 5 19:15:26 2003 Subject: [Pythonmac-SIG] Some new tools: plistservices, userdefaults, and CFPython In-Reply-To: Message-ID: On Thursday, Sep 4, 2003, at 19:31 America/New_York, Sarwat Khan wrote: > Hi all, > > I released some stuff today that should interest you guys. > plistservices and userdefaults are Python modules. CFPython is a > library to make working with the Python C API and CoreFoundation > easier. > > plistservices is like plistlib in that it supports reading and writing > of property list data, but unlike the version included with Python 2.3 > it supports plists of any time (not just dictionaries). Most > importantly plistservices includes an ISO 8601 parser to create > datetime objects, so you don't need to install PyXML to use property > lists that use dates. However, plistservices requires Python 2.3. > > plistservices is very Cocoa-like in its interface; it's intended to be > used like NSPropertyListSerialization. plistservices includes Date > (datetime.datetime), Data, and TimeInterval classes to make it easier > to work with code or data that was intended for Cocoa or PyObjC. > > userdefaults is a Python interface to CFPreferences (or > NSUserDefaults). This lets you read and write your script's > preferences to the current user's ~/Library/Preferences folder as well > as access system preferences (such as NSCurrencySymbol or > com.apple.sound.beep.sound). > > CFPython was used to implement userdefaults and is a translator > between PyObject<=>CFTypeRef. It's more functional than the > pycfbridge.c included with the Python 2.3 source, however. Currently > it only supports translation of property list types, as that was all I > was interested in implementing. It's a very useful library however, as > it lets you write all your logic using Cocoa or Carbon and then > perform the data translations as necessary when you need to supply or > get data from Python. I dunno if it's more functional than the pycfbridge... I've been able to get away with using the bridge's conversion functions and crossing my fingers and hoping what I wanted to get pops out. Some quick suggestions: You should probably rewrite the module to use the existing pycfbridge for interoperability, like PyObjC and my LaunchServices do. Since you have this context object that gets passed to _every function_, you should encapsulate that functionality in a python class and make all the functions in the module instance methods of that class. Create a distutils setup.py script to make life for other developers easier. It wouldn't be hard to make one, considering you have a single source file to contend with and one framework to link to. -bob From sarwat at sarwat.net Fri Sep 5 20:51:01 2003 From: sarwat at sarwat.net (Sarwat Khan) Date: Fri Sep 5 19:51:06 2003 Subject: [Pythonmac-SIG] Some new tools: plistservices, userdefaults, and CFPython In-Reply-To: Message-ID: > I dunno if it's more functional than the pycfbridge... I've been able > to get away with using the bridge's conversion functions and crossing > my fingers and hoping what I wanted to get pops out. It's more functional in that it handles datetime.datetime/CFDate and CFData objects. It's also configurable for that functionality. > > Some quick suggestions: > You should probably rewrite the module to use the existing pycfbridge > for interoperability, like PyObjC and my LaunchServices do. It's not actually a module though, and that's why it doesn't have a setup.py. For an example use of the thing take a look at the source for the userdefaults module at http://sarwat.net/opensource/ . CFPython is meant for writing C code. I did hack in a module for testing but that's not supposed to be used for anything else. It's like choosing between putting pycfbridge.c or CFPython.c in your project to translate PyObject*s into CFTypeRefs. Although if you think it has a useful future a module, let me know; I wrote it because it was an easier way of writing the userdefaults module. I haven't considered it to be anything else. {sarwat khan : http://sarwat.net} From bob at redivi.com Fri Sep 5 21:11:44 2003 From: bob at redivi.com (Bob Ippolito) Date: Fri Sep 5 20:11:54 2003 Subject: [Pythonmac-SIG] Some new tools: plistservices, userdefaults, and CFPython In-Reply-To: Message-ID: On Friday, Sep 5, 2003, at 19:51 America/New_York, Sarwat Khan wrote: >> I dunno if it's more functional than the pycfbridge... I've been able >> to get away with using the bridge's conversion functions and crossing >> my fingers and hoping what I wanted to get pops out. > > It's more functional in that it handles datetime.datetime/CFDate and > CFData objects. It's also configurable for that functionality. >>> import Carbon.CF >>> data = Carbon.CF.CFDataCreate('some arbitrary data...') >>> data.CFDataGetData() 'some arbitrary data...' What more do you want from that? Sure, it *should* have a toPython that works, but unfortunately it doesn't at the moment. I agree that CFDate needs an additional type, but you can add that additional type outside the scope of Carbon.CF while still maintaining compatibility (i.e. allow it to init from a Carbon.CF.CFTypeRef, and allow it to be converted to a Carbon.CF.CFTypeRef). If you want to figure out whether or not it's a CFDate coming in as a CFTypeRef, you simply have to compare CFTypeRef.CFGetTypeID() to the CFTypeID of CFDate and then if it is a CFDate then you can use the C API functions to grab the real CFTypeRef from C. > >> >> Some quick suggestions: >> You should probably rewrite the module to use the existing >> pycfbridge for interoperability, like PyObjC and my LaunchServices >> do. > > It's not actually a module though, and that's why it doesn't have a > setup.py. For an example use of the thing take a look at the source > for the userdefaults module at http://sarwat.net/opensource/ . > > CFPython is meant for writing C code. I did hack in a module for > testing but that's not supposed to be used for anything else. It's > like choosing between putting pycfbridge.c or CFPython.c in your > project to translate PyObject*s into CFTypeRefs. > > Although if you think it has a useful future a module, let me know; I > wrote it because it was an easier way of writing the userdefaults > module. I haven't considered it to be anything else. I see that now, but I still think you should simply use the CFDataGetData/CFDataCreate methods when you need a CFData, and write a simple CFDate extension module to add that functionality to Carbon.CF. -bob From sarwat at sarwat.net Fri Sep 5 22:36:51 2003 From: sarwat at sarwat.net (Sarwat Khan) Date: Fri Sep 5 21:36:57 2003 Subject: [Pythonmac-SIG] Some new tools: plistservices, userdefaults, and CFPython In-Reply-To: Message-ID: <96F559F8-E00A-11D7-9AAC-003065C9DF8C@sarwat.net> On Friday, September 5, 2003, at 08:11 PM, Bob Ippolito wrote: > > >>> import Carbon.CF > >>> data = Carbon.CF.CFDataCreate('some arbitrary data...') > >>> data.CFDataGetData() > 'some arbitrary data...' The problem is that pycfbridge.c's PyCF_Python2CF won't convert a Python instance to a CFData object and backwards. It looks like it won't work with Python CFTypeRefs either. Also, it didn't help that I didn't know that pycfbridge existed when I wrote CFPython :) Not that it took much time anyway. Note that userdefaults also works with the Python 2.2 that ships with Mac OS X 10.2. >> Although if you think it has a useful future a module, let me know; I >> wrote it because it was an easier way of writing the userdefaults >> module. I haven't considered it to be anything else. > > I see that now, but I still think you should simply use the > CFDataGetData/CFDataCreate methods when you need a CFData, and write a > simple CFDate extension module to add that functionality to Carbon.CF. Hmm. So far I've been a member of the MacPython community for 25.5 hours now (according to the timestamp on the Welcome email) so keep in mind that this is all pretty new to me :) I've been using Python on Unix for some time (installing python on OS X myself as needed and on FreeBSD, etc). A Python data instance isn't necessarily going to be a CFData object. If you take a look at the defaultsdemo.py in the userdefaults-1 distribution, it defines several possible data classes. plistservices defines another. In my BitTorrent implementation, I define 'data' to be anything that raises a unicode exception while trying to encode 'str' objects into UTF-8. So the problem is not that I need a CFDataRef instance, it's more of an issue of object classification. Python doesn't really have a 'data' type like NSData, you're expected to use str to hold bytes. However, you can't assume that every str you come across is binary data, which is why pycfbridge doesn't handle CFData. Also, userdefaults.py manipulates user defaults without plat-mac... I'm kind of hoping that people using other platforms will be interested in the module too. And yeah, someone should write the datetime<=>CFDate code for pycfbridge... feel free to swipe my code :P It's just a few lines. Again, I don't know who's in charge of that stuff. I think this email response has lost coherence; I had dinner in-between writing it. (hey look at that, userdefaults.UserDefaults.dataForKey's implementation is a few revisions too old...) {sarwat khan : http://sarwat.net} From andrew.straw at adelaide.edu.au Sat Sep 6 12:15:12 2003 From: andrew.straw at adelaide.edu.au (Andrew Straw) Date: Fri Sep 5 21:45:34 2003 Subject: [Pythonmac-SIG] The future In-Reply-To: <88575921-DFEF-11D7-8C29-000A95686CD8@redivi.com> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > Someone should also buckle down and wrap QuickTime properly so that > you can do whatever you want with it. I've been maintaining my own > version of the QuickTime wrapper because I've had to make changes to > the bgen so that it actually lets you create a QuickTime movie from > scratch, for example. Maybe we need to make bgen smarter, or make it > output Pyrex instead of C? I've had very good results with Pyrex so > far, though automating the C header file -> Pyrex include file stuff > would be excellent (so far I've been doing it in Vim by hand each time > with regexps). To make a small diversion from the point of the thread, I would like to suggest that any future QuickTime wrapper also works on Windows... Cheers! Andrew -----BEGIN PGP SIGNATURE----- iD8DBQE/WTwz1xWcCSPVbpgRArQAAKCKY5qeU26bSaO4I3z2lfgstez+lACeN0VQ lFK8GWIHx0cq08Wo0y8czz4= =WyJx -----END PGP SIGNATURE----- From bob at redivi.com Fri Sep 5 23:45:52 2003 From: bob at redivi.com (Bob Ippolito) Date: Fri Sep 5 22:46:02 2003 Subject: [Pythonmac-SIG] Additional binary packages for Python2.3 on 10.2.6 In-Reply-To: Message-ID: <3AD4F04A-E014-11D7-8C29-000A95686CD8@redivi.com> On Friday, Sep 5, 2003, at 21:31 America/New_York, Andrew Straw wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > On Saturday, Sep 6, 2003, at 00:29 Australia/Adelaide, Bob Ippolito > wrote: > >> >> On Thursday, Sep 4, 2003, at 20:34 America/New_York, Andrew Straw >> wrote: >>>> chaco (does this have a good OS X backend yet?) >>> >>> It works as well on OS X as it works anywhere else, as far as my >>> usage goes, anyway. That is to say I know wxPython based rendering >>> and interaction works (check out the cool demos!) and PDF rendering >>> works (when reportlab is installed). >> >> I still don't like wxPython for Mac yet.. Every time I take a look at >> it I see a bunch of nasty bugs and decide to write a mac only GUI or >> just write more than one. Though I can imagine it does it's job for >> what chaco needs. > > Since I don't know what platform I'm going to be on from one day to > the next, let alone what my main personal computer will be when I next > buy one, I've stayed clear of any platform-specific stuff. I can see, > however, that Cocoa makes fantastic apps, and with Panther it's so > cool to think one could make Python scripts that download in < 1 MB > that will truly be double-clickable by the masses and will be > commercial quality... I've pretty much sold my soul to Apple, I really hate using win32 and linux doesn't have the applications I need for work. I'm just so much more productive on the Mac, though I do waste a LOT of free time porting things to the Mac that I'd get "for free" elsewhere. I'm really not concerned with the size of bundles, for anything sufficiently useful someone will download a few megs. > > Plus, I'm so used to working with bugs from my initial forays in > Tkinter that wxPython seems like a godsend. Also, I can't say I've > found more than a couple of bugs in wxPython/Mac... Are you referring > to rendering/appearance bugs or actual functionality bugs? Yeah, I refuse to use Tkinter for the same reasons on OS X. Last I checked, it was both appearance and functionality bugs.. the former more common than the later. > >> I remember reading about Chaco and how it was half-modeled after >> CoreGraphics.. I wonder why it doesn't have a backend for it yet? >> Maybe I'll write one if I find the time. > > My (near zero) understanding is that the PDF rendering backend is a > Quartz(?, or Aqua?, whatever...) > workalike... I don't think the GUIs themselves are. Again, this is > all "I think I remember that..." You're probably correct, though there definitely should be a Quartz backend for OS X. Unfortunately that means someone like me will probably have to write it :) > > PS Using ATLAS is one of the main reasons why I do use fink. I don't > find fink evil, but then I try not to compile too many mach-o binaries > that I inflict upon the general public... I can see Apple's linking > stuff is really clever, but I still don't understand it all... Apple's linking stuff is really.. peculiar, to say the least. It's more than a few mouthfuls to explain the how's and why's, but I know my way around it far too well. As far as ATLAS goes, vecLib links in most or all of ATLAS (though the symbols aren't exported.. ugh), and does some magic so it detects your CPU at runtime and links in the proper optimizations for G3, G4, or G5 (in Panther, maybe the latest seed of 10.2.x beta). Which is really cool, and hard to do on your own. > PPS Speaking of all the above leads me to a question you might be able > to help me on-- I'd like to get back to the mainstream wxPython > distros so I don't have to roll my own, but I think they're all > compiled with libtiff libzip, libjpeg, and the like statically linked, > which causes dynamic linking namespace conflicts with the libraries in > use by PIL and pygame... I remember you made a comment about the best > way to deal with this on one of the mailing lists, but I couldn't > quite translate it to this particular case. (Probably just because > I'm sitting here really trying to write up my thesis and not get too > into the specifics of linking binary files on Mac OS X, which is so, > so, so far from the neurophysiology of insect visual motion > detection!) This is the exact reason why I've said on multiple occasions "DO NOT USE -undefined suppress -flat_namespace". A lot of people still use that crap for compatibility with old pythons, and it screws up the whole deal for people like you who are using a sane version of Python. Chances are, the wx guys are using flat_namespace, so you're pretty much screwed. I'm pretty sure that my PackageManager versions of PIL and pygame use two level namespaces and shouldn't have this problem on their own. Maybe it's time for me to roll my own distro of wxPython that's compiled in a reasonable way? -bob From bob at redivi.com Sat Sep 6 03:41:33 2003 From: bob at redivi.com (Bob Ippolito) Date: Sat Sep 6 02:41:51 2003 Subject: [Pythonmac-SIG] ANN: TECManager 0.1 - Converts Mac encoded text to Unicode Message-ID: <27C40534-E035-11D7-8C29-000A95686CD8@redivi.com> While working on the latest revision of aeve, I realized that all of the AEText stuff is a pain in the ass. I don't want to know that text is encoded in smRoman or smGreek, I just want text that works. So, I did some research and figured out that The Way to make sense of script/language/region-ized text is to use part of Text Encoding Conversion Manager/UnicodeServices ( http://developer.apple.com/documentation/Carbon/Reference/ Text_Encodin_sion_Manager/ ). TECManager is an *extremely* simple package. It has one function and a bunch of constants. It's much smarter and more complete than the mac encoding packages that come with Python. Example usage: >>> import TECManager as TM >>> TM.ConvertToUnicode('\xa5', script=TM.smRoman) # convert a macRoman bullet to a unicode bullet u'\u2022' >>> TM.ConvertToUnicode('\xde', script=TM.smHebrew) # convert a smHebrew HEBREW POINT QAMATS, alternate form "qamats qatan" u'\u05b8\uf87f' Of course, it works with more than one character at a time. homepage: http://undefined.org/python/ pydoc documentation: http://undefined.org/python/TECManager-0.1-pydoc.html source tarball: http://undefined.org/python/TECManager-0.1.tar.gz PackageManager URL (Python 2.3 - 10.2.x): http://undefined.org/python/pimp/darwin-6.6-Power_Macintosh.plist -bob From velosa at cinenet.net Sat Sep 6 22:52:36 2003 From: velosa at cinenet.net (velosa@cinenet.net) Date: Sun Sep 7 00:52:16 2003 Subject: [Pythonmac-SIG] Creating an applet that includes wxPython Message-ID: <19F33C4B-E0EF-11D7-A7C9-0050E4C5D568@cinenet.net> I have written a small Python application for managing family trees that uses wxPython for the interface. My goal is to make this available to various members of my family tree so they can enter the information they have. I'm now trying to figure out how to make it available to other people. I am hoping that there is a way to extend the results of MacPython applet tool to include the wxPython libraries, but I don't know enough about how Mac packaging works to know whether this is really possible. I got my own environment working by downloading MacPython and wxPython-mac and installing them. I'm hoping I can simply provide a single bundle to the other Mac users. Ideally I'd like them to be able to run it all off of a CD. Is there a reasonable way to do this or do I have to separately include MacPython and wxPython-mac with my little applet. Thanks, -Nathan From just at letterror.com Sun Sep 7 10:03:54 2003 From: just at letterror.com (Just van Rossum) Date: Sun Sep 7 03:03:48 2003 Subject: [Pythonmac-SIG] Creating an applet that includes wxPython In-Reply-To: <19F33C4B-E0EF-11D7-A7C9-0050E4C5D568@cinenet.net> Message-ID: velosa@cinenet.net wrote: > I have written a small Python application for managing family trees > that uses wxPython for the interface. My goal is to make this > available to various members of my family tree so they can enter the > information they have. I'm now trying to figure out how to make it > available to other people. I am hoping that there is a way to extend > the results of MacPython applet tool to include the wxPython > libraries, but I don't know enough about how Mac packaging works to > know whether this is really possible. I got my own environment > working by downloading MacPython and wxPython-mac and installing > them. I'm hoping I can simply provide a single bundle to the other > Mac users. Ideally I'd like them to be able to run it all off of a > CD. Is there a reasonable way to do this or do I have to separately > include MacPython and wxPython-mac with my little applet. You can create standalone .app bundle that includes Python with bundlebuilder.py. Check the archives of this list for discussion of some potential problems, there was a thread last week with the word "bundlebuilder" in the subject. Alternatively, we just discussed some bundlebuilder features on the PyObjC mailing list: http://sourceforge.net/mailarchive/forum.php?thread_id=3082424&forum_id= 4355 (I somehow have to load that page twice before it works) I've never used wxPython, but I've heard repackaging it is non-trivial. Maybe there are other people on this list that have experience with building standalone apps that use wxPython? Just From bob at redivi.com Sun Sep 7 15:49:59 2003 From: bob at redivi.com (Bob Ippolito) Date: Sun Sep 7 14:50:06 2003 Subject: [Pythonmac-SIG] Creating an applet that includes wxPython In-Reply-To: Message-ID: <15017B5C-E164-11D7-8532-000A95686CD8@redivi.com> On Sunday, Sep 7, 2003, at 03:03 America/New_York, Just van Rossum wrote: > velosa@cinenet.net wrote: > >> I have written a small Python application for managing family trees >> that uses wxPython for the interface. My goal is to make this >> available to various members of my family tree so they can enter the >> information they have. I'm now trying to figure out how to make it >> available to other people. I am hoping that there is a way to extend >> the results of MacPython applet tool to include the wxPython >> libraries, but I don't know enough about how Mac packaging works to >> know whether this is really possible. I got my own environment >> working by downloading MacPython and wxPython-mac and installing >> them. I'm hoping I can simply provide a single bundle to the other >> Mac users. Ideally I'd like them to be able to run it all off of a >> CD. Is there a reasonable way to do this or do I have to separately >> include MacPython and wxPython-mac with my little applet. > > You can create standalone .app bundle that includes Python with > bundlebuilder.py. Check the archives of this list for discussion of > some > potential problems, there was a thread last week with the word > "bundlebuilder" in the subject. > > Alternatively, we just discussed some bundlebuilder features on the > PyObjC mailing list: > > http://sourceforge.net/mailarchive/ > forum.php?thread_id=3082424&forum_id= > 4355 > > (I somehow have to load that page twice before it works) > > I've never used wxPython, but I've heard repackaging it is non-trivial. > Maybe there are other people on this list that have experience with > building standalone apps that use wxPython? wxPython installs the following extensions in site-packages: wxPython/calendarc.so wxPython/gizmosc.so wxPython/glcanvasc.so wxPython/gridc.so wxPython/helpc.so wxPython/htmlc.so wxPython/oglc.so wxPython/stc_c.so wxPython/wizardc.so wxPython/wxc.so wxPython/xrcc.so According to otool, all of these link to one or both of: /usr/local/lib/libwx_macd-2.4.0.dylib (compatibility version 2.4.0, current version 2.4.1) /usr/local/lib/libwx_macd_gl-2.4.0.dylib (compatibility version 2.4.0, current version 2.4.1) These two libraries do not link to anything that requires relocation (just system libraries). What you have to from here is make a copy of the wxPython framework and do this for each of the wxPython so files: install_name_tool -change /usr/local/lib/libwx_macd-2.4.0.dylib @executable_path/../Resources/libwx_macd-2.4.0.dylib %s install_name_tool -change /usr/local/lib/libwx_macd_gl-2.4.0.dylib @executable_path/../Resources/libwx_macd_gl-2.4.0.dylib %s Then you have to make copies of the two libwx dylib files and do these transformations to them: install_name_tool -id @executable_path/../Resources/libwx_macd-2.4.0.dylib libwx_macd-2.4.0.dylib install_name_tool -id @executable_path/../Resources/libwx_macd_gl-2.4.0.dylib libwx_macd_gl-2.4.0.dylib Then all you have to do is make sure that your copy of the wxPython package gets in the bundle instead of the one in your site-packages, and make sure that these two transformed dylib files end up in Resources of your app bundle. Note that you will lose the wxWindows gettext translations when you do this, because I don't know how to relocate that.. I don't know much about gettext and I don't know if it's possible to override the gettext search path to look places other than /usr/local/share/locale I haven't tried this, but it should work. In a future version of bundlebuilder, we could incorporate my potool module ( http://undefined.org/python/ ) to perform translations like this automatically (though we would also need logic for Frameworks, and it would have to do this process recursively). -bob From Jack.Jansen at cwi.nl Sun Sep 7 22:50:24 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Sun Sep 7 15:50:29 2003 Subject: [Pythonmac-SIG] Creating an applet that includes wxPython In-Reply-To: <15017B5C-E164-11D7-8532-000A95686CD8@redivi.com> References: <15017B5C-E164-11D7-8532-000A95686CD8@redivi.com> Message-ID: <858023E4-E16C-11D7-AB7D-000A27B19B96@cwi.nl> In stead of modifying the references to the wx libraries, as Bob suggested, I think it should be possible to setup DYLD_LIBRARY_PATH in the bundle bootstrap script, and simply copy the libraries into the bundle somewhere (I think I would put them in Frameworks in stead of in Resources, but that's a minor detail). Hmm, looking at the source for the bootstrap script I see it already sets both DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH to point to the Frameworks directory! And there's a --lib option that puts things in there! So, Nathan, could you try adding the options "--lib /usr/local/lib/libwx_macd-2.4.0.dylib --lib /usr/local/lib/libwx_macd_gl-2.4.0.dylib" to your bundlebuilder command line, and see whether the resulting bundle works on a system where wx isn't pre-installed? If it doesn't work (and you want us to help debugging it, and trying to get it to work): run your applet from the command line, with DYLD_PRINT_LIBRARIES set to 1, and show us the output. -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From just at letterror.com Sun Sep 7 23:20:28 2003 From: just at letterror.com (Just van Rossum) Date: Sun Sep 7 16:20:12 2003 Subject: [Pythonmac-SIG] Creating an applet that includes wxPython In-Reply-To: <15017B5C-E164-11D7-8532-000A95686CD8@redivi.com> Message-ID: Bob Ippolito wrote: > I haven't tried this, but it should work. In a future version of > bundlebuilder, we could incorporate my potool module ( > http://undefined.org/python/ ) to perform translations like this > automatically (though we would also need logic for Frameworks, and it > would have to do this process recursively). That would be fantastic. I briefly looked at potool just now, but for it to be incorporated in bundlebuilder if would have to be independent from 3rd party packages. How deep is potool's dependence on ctypes? Just From bob at redivi.com Sun Sep 7 17:20:22 2003 From: bob at redivi.com (Bob Ippolito) Date: Sun Sep 7 16:20:28 2003 Subject: [Pythonmac-SIG] Creating an applet that includes wxPython In-Reply-To: <858023E4-E16C-11D7-AB7D-000A27B19B96@cwi.nl> Message-ID: On Sunday, Sep 7, 2003, at 15:50 America/New_York, Jack Jansen wrote: > In stead of modifying the references to the wx libraries, as Bob > suggested, I think it should be possible to setup DYLD_LIBRARY_PATH > in the bundle bootstrap script, and simply copy the libraries into > the bundle somewhere (I think I would put them in Frameworks in stead > of in Resources, but that's a minor detail). I would put them in Frameworks too, myself, but I haven't used bundlebuilder enough to know that it knows how to put stuff other than the Python framework there. > Hmm, looking at the source for the bootstrap script I see it already > sets both DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH to point to the > Frameworks directory! And there's a --lib option that puts things in > there! Cool :) I like to modify the references so it's more deterministic.. AFAIK dyld will always try the mach-o header references first, then start poking around at the search paths. In my suggested case, it will link to the included binaries regardless of what the user has installed. There is definitely a case for using potool to allow bundlebuilder to find these libraries for you (i.e. check references that don't live in /System or /usr/lib and move those frameworks and libraries into the bundle). I also think that since some modules reference the same dynamic libraries, it might make sense to have an option to do even more relocation (in the case where they use different versions or something).. for example you could put things in @executable_path/../Frameworks/%s/ where %s is the name of the python package that depends on that dylib or framework. I don't know of any real cases where a conflict of this nature happens, so it might be YAGNI. -bob From bob at redivi.com Sun Sep 7 17:29:53 2003 From: bob at redivi.com (Bob Ippolito) Date: Sun Sep 7 16:29:58 2003 Subject: [Pythonmac-SIG] Creating an applet that includes wxPython In-Reply-To: Message-ID: <09782494-E172-11D7-8532-000A95686CD8@redivi.com> On Sunday, Sep 7, 2003, at 16:20 America/New_York, Just van Rossum wrote: > Bob Ippolito wrote: > >> I haven't tried this, but it should work. In a future version of >> bundlebuilder, we could incorporate my potool module ( >> http://undefined.org/python/ ) to perform translations like this >> automatically (though we would also need logic for Frameworks, and it >> would have to do this process recursively). > > That would be fantastic. I briefly looked at potool just now, but for > it > to be incorporated in bundlebuilder if would have to be independent > from > 3rd party packages. How deep is potool's dependence on ctypes? Very shallow, it just uses the Structure class for convenience. I'll write a metaclass that does what ctypes Structure module does (as far as I'm using it, at least) and post a new version today. -bob From just at letterror.com Sun Sep 7 23:48:50 2003 From: just at letterror.com (Just van Rossum) Date: Sun Sep 7 16:48:37 2003 Subject: [Pythonmac-SIG] Creating an applet that includes wxPython In-Reply-To: <09782494-E172-11D7-8532-000A95686CD8@redivi.com> Message-ID: Bob Ippolito wrote: > > 3rd party packages. How deep is potool's dependence on ctypes? > > Very shallow, it just uses the Structure class for convenience. I'll > write a metaclass that does what ctypes Structure module does (as far > as I'm using it, at least) and post a new version today. Cool. Now if you could turn it into a one-file module, I'm sure Jack won't mind checking it into plat-mac... But let's plan this out a bit more before we waste too much time. Does potools support otool -L type stuff? It would be really useful if we could do some automatic dependency checking. Another problem with bundlebuilder is that it needs the dev tools installed for --strip to work, which is kindof neccesary to produce bundles of an acceptable size. Have you any idea whether a pure Python version of strip would be feasable? Alternatively, we could perhaps ship the strip executable somehow, if the license would allow that. An IDE could just include it for example. Just From bob at redivi.com Sun Sep 7 18:29:30 2003 From: bob at redivi.com (Bob Ippolito) Date: Sun Sep 7 17:29:34 2003 Subject: [Pythonmac-SIG] Creating an applet that includes wxPython In-Reply-To: Message-ID: <5D7DFD60-E17A-11D7-8532-000A95686CD8@redivi.com> On Sunday, Sep 7, 2003, at 16:48 America/New_York, Just van Rossum wrote: > Bob Ippolito wrote: > >>> 3rd party packages. How deep is potool's dependence on ctypes? >> >> Very shallow, it just uses the Structure class for convenience. I'll >> write a metaclass that does what ctypes Structure module does (as far >> as I'm using it, at least) and post a new version today. > > Cool. Now if you could turn it into a one-file module, I'm sure Jack > won't mind checking it into plat-mac... But let's plan this out a bit > more before we waste too much time. > > Does potools support otool -L type stuff? It would be really useful if > we could do some automatic dependency checking. It is pretty much a one file module, pinstall_name_tool and potool are examples of how to use it (they emulate otool -L[v] and pinstall_name_tool) using the mach_o module. The functionality from both of these can easily be turned into convenience methods in the mach_o module. Yes, it does everything otool -L and otool -Lv does, and it does everything that install_name_tool does. It should even have the same output format. > Another problem with bundlebuilder is that it needs the dev tools > installed for --strip to work, which is kindof neccesary to produce > bundles of an acceptable size. Have you any idea whether a pure Python > version of strip would be feasable? Alternatively, we could perhaps > ship > the strip executable somehow, if the license would allow that. An IDE > could just include it for example. I don't see any reason why strip couldn't be emulated. I'd need to wrap more of the mach_o headers, for sure, but it would probably be a nifty experiment to have pure python access to the whole symbol table. Currently, it can read the entire mach-o header, though it only understands the parts relevant to otool / install_name_tool. -bob From kevino at tulane.edu Sun Sep 7 19:11:20 2003 From: kevino at tulane.edu (Kevin Ollivier) Date: Sun Sep 7 21:14:54 2003 Subject: [Pythonmac-SIG] Creating an applet that includes wxPython In-Reply-To: <19F33C4B-E0EF-11D7-A7C9-0050E4C5D568@cinenet.net> Message-ID: <5B087708-E199-11D7-87A2-000393CB1C86@tulane.edu> Hi, On Saturday, September 6, 2003, at 09:52 PM, velosa@cinenet.net wrote: > I have written a small Python application for managing family trees > that uses wxPython for the interface. My goal is to make this > available to various members of my family tree so they can enter the > information they have. I'm now trying to figure out how to make it > available to other people. I am hoping that there is a way to extend > the results of MacPython applet tool to include the wxPython > libraries, but I don't know enough about how Mac packaging works to > know whether this is really possible. I got my own environment > working by downloading MacPython and wxPython-mac and installing them. > I'm hoping I can simply provide a single bundle to the other Mac > users. Ideally I'd like them to be able to run it all off of a CD. > Is there a reasonable way to do this or do I have to separately > include MacPython and wxPython-mac with my little applet. It can be done, and it is not that difficult. Bundlebuilder.py will do most of the work for you, and the only special thing you need to do is add the libwx_macd library and resource file in via the "libs" option (if you use opengl you will need to add that library as well). Here's a bundlebuilder script I use to build my wxPython application, hopefully it is mostly self-explanatory: ------------------------------------------------------------------------ ------ import bundlebuilder, os #I set this to make adding subfolders into the package easier packageroot = "/Users/kevino/oss/eclass/eclass_builder" myapp = bundlebuilder.AppBuilder(verbosity=1) myapp.mainprogram = os.path.join(packageroot, "editor.py") myapp.standalone = 1 myapp.name = "EClass.Builder" myapp.includePackages.append("encodings") myapp.includePackages.append("_xmlplus") myapp.resources.append(os.path.join(packageroot, "about")) myapp.resources.append(os.path.join(packageroot, "autorun")) myapp.resources.append(os.path.join(packageroot, "Graphics")) #... add other necessary folders/files... myapp.libs.append("/usr/local/lib/libwx_macd-2.4.0.dylib") myapp.libs.append("/usr/local/lib/libwx_macd-2.4.0.rsrc") myapp.setup() myapp.build() ------------------------------------------------------------------------ -------- HTH! Kevin From bob at redivi.com Mon Sep 8 04:36:53 2003 From: bob at redivi.com (Bob Ippolito) Date: Mon Sep 8 03:36:57 2003 Subject: [Pythonmac-SIG] Creating an applet that includes wxPython In-Reply-To: <09782494-E172-11D7-8532-000A95686CD8@redivi.com> Message-ID: <375B771C-E1CF-11D7-8532-000A95686CD8@redivi.com> On Sunday, Sep 7, 2003, at 16:29 America/New_York, Bob Ippolito wrote: > > On Sunday, Sep 7, 2003, at 16:20 America/New_York, Just van Rossum > wrote: > >> Bob Ippolito wrote: >> >>> I haven't tried this, but it should work. In a future version of >>> bundlebuilder, we could incorporate my potool module ( >>> http://undefined.org/python/ ) to perform translations like this >>> automatically (though we would also need logic for Frameworks, and it >>> would have to do this process recursively). >> >> That would be fantastic. I briefly looked at potool just now, but for >> it >> to be incorporated in bundlebuilder if would have to be independent >> from >> 3rd party packages. How deep is potool's dependence on ctypes? > > Very shallow, it just uses the Structure class for convenience. I'll > write a metaclass that does what ctypes Structure module does (as far > as I'm using it, at least) and post a new version today. As promised, I've emulated all of the ctypes functionality that I've used for potool. Here's the latest version (it is the same, except it does not depend on ctypes): http://undefined.org/python/potool-0.2.tgz The ptypes module I've written is rather interesting. I'd like to improve on it (to accommodate variable length arrays, particularly those based on structures as in mach-o headers. and also certain types that change based upon "typecodes" in the structure) mapping, and also to optimize it a bit (have structures and arrays turn a list of non-Indeterminate Packables into a single pack or unpack statement). Aside from that, I should change the interface and provide convenience methods for the functions that otool and install_name_tool perform. The ptypes module is a cute little example of what __metaclass__ can do for you. -bob From yannis.haralambous at enst-bretagne.fr Mon Sep 8 16:46:36 2003 From: yannis.haralambous at enst-bretagne.fr (Yannis Haralambous) Date: Mon Sep 8 09:46:59 2003 Subject: [Pythonmac-SIG] "no codec search functions registered" Message-ID: <20030908134636.1709@courrier.enst-bretagne.fr> Hi everybody, I just subscribed to this list I know there was a thread on this error message last year, but here the situation is different. I use a freshly installed python2.3 from fink, and the binary is clearly /sw/bin/python2.3 and not /usr/bin/python. here is the exact error message I get when I try to launch TTX (a tool for converting TrueType font into XML and back): >bash-2.05a$ /sw/bin/python2.3 ttx.py /WINDOWS/verdana.ttx >Compiling "/WINDOWS/verdana.ttx" to "/WINDOWS/verdana#1.ttf"... >Traceback (most recent call last): > File "ttx.py", line 278, in ? > main(sys.argv[1:]) > File "ttx.py", line 260, in main > process(jobs, options) > File "ttx.py", line 245, in process > action(input, output, options) > File "ttx.py", line 169, in ttCompile > ttf.importXML(input) > File "/sw/lib/python2.3/site-packages/FontTools/fontTools/ttLib/ >__init__.py", line 280, in importXML > xmlImport.importXML(self, file, progress) > File "/sw/lib/python2.3/site-packages/FontTools/fontTools/ttLib/ >xmlImport.py", line 134, in importXML > p.parse() > File "/sw/lib/python2.3/site-packages/FontTools/fontTools/ttLib/ >xmlImport.py", line 24, in parse > self.parseFile(file) > File "/sw/lib/python2.3/site-packages/FontTools/fontTools/ttLib/ >xmlImport.py", line 44, in parseFile > parser.Parse(chunk, 0) >LookupError: no codec search functions registered: can't find encoding Any idea what may be going wrong? Thanks in advance Yannis +--------------------------------------------------------------------+ | Yannis Haralambous, Ph.D. yannis.haralambous@enst-bretagne.fr | | Professor http://omega.enstb.org/yannis | | Tel. +33 (0)2.29.00.14.27 | | Fax +33 (0)2.29.00.12.82 | | Computer Science Department | | Ecole Nationale Superieure des Telecommunications de Bretagne | | Technopole de Brest Iroise, CS 83818, 29238 Brest CEDEX 3, France | +--------------------------------------------------------------------+ ...pour distinguer l'exterieur d'un aquarium, mieux vaut n'etre pas poisson ...the ball I threw while playing in the park has not yet reached the ground From israel at sandlotgames.com Mon Sep 8 08:34:14 2003 From: israel at sandlotgames.com (Israel C. Evans) Date: Mon Sep 8 10:34:41 2003 Subject: [Pythonmac-SIG] fink python... Message-ID: <84D52425-E209-11D7-861E-000393A47FF2@sandlotgames.com> greetings all, I've just installed Fink in an attempt to get gnumeric and gnucash running on my machine and doing so has hosed my regular python and shell's setenv stuff. Now when I type python on the commandline, I'm sent to the fink python which I really don't want. And now that I'm trying to set up mod_python, I'm getting all sorts of errors. I can direct the /.configure for mod_python to use the 2.3 python in /usr/local/bin, but at the end of make or make install, it seems that make is trying to do work with what's in /sw. Can anybody here clue me in on how to tame fink and make it a good citizen on my computer? I've been trying to mess with setenv and place the /sw* paths at the end of my PATH, but that only worked for as long as the shell was on... after restarting the shell, the PATH was reset. I've looked for /sw* stuff in .tcshrc, .login, .cshrc but can't find any and so I'm confused as to how fink inserts those paths into the PATH variable. If anyone could help with this I would be most grateful, Thanks. ~Israel~ From Benjamin.Schollnick at usa.xerox.com Mon Sep 8 12:26:34 2003 From: Benjamin.Schollnick at usa.xerox.com (Schollnick, Benjamin) Date: Mon Sep 8 11:47:39 2003 Subject: [Pythonmac-SIG] EasyDialog? Not quite what I need.. Message-ID: <51B62EFFBC83D6118ADA00096BB030A102CC2E71@usamcms7.mc.usa.xerox.com> Folks, I'm working on a zip file archive viewer... The idea is that the user would select the archive, I would read the table of contents via zipfile, and display a pop up or a list dialog with the files. The user chooses the files they want to view (multiple or single select) and then the program would unarchive them and display the file on screen.. Either via Applescript or a image viewer in python... (Maybe quicktime) Well, I can do everything, except display the pop up or list dialog... EasyDialogs would be the solution for the Select Fialog dialog... If this was Mac 9, I would be using Tkinter probably to create the dialog window for the file selection... Since that option is not available for Mac OS X, Does anyone have a suggestion for the file selection window? I see that popups are available from Easy dialogs. (The second demo test) But I have not been able to simplify it to just show a single popup... Even then, may be a "Select File: XXXXX.ZIP" with the internal zip listing would be good... But I haven't messed with the GUI side of python programming, except with Tkinter... Anyone willing to offer some suggestions, or take pity, and point out how I can do this? (Pointers are *VERY WELCOME*) - Ben From kevino at tulane.edu Mon Sep 8 10:01:33 2003 From: kevino at tulane.edu (Kevin Ollivier) Date: Mon Sep 8 12:05:08 2003 Subject: [Pythonmac-SIG] EasyDialog? Not quite what I need.. In-Reply-To: <51B62EFFBC83D6118ADA00096BB030A102CC2E71@usamcms7.mc.usa.xerox.com> Message-ID: Hi Benjamin, Have you considered going the wxPython route? It's interesting in that there is no free, cross-platform ZIP/UNZIP software, and I've always thought that Python/wxPython would be the perfect combo for one. (At our work we distribute free software to people in developing countries, so having this would be very nice. ;-) Just a thought! I'm sure someone else will also offer PyObjC as a solution to this problem as well. ^_^ Thanks, Kevin On Monday, September 8, 2003, at 08:26 AM, Schollnick, Benjamin wrote: > Folks, > > I'm working on a zip file archive viewer... > > The idea is that the user would select the archive, I would read > the table of contents via zipfile, and display a pop up or a list > dialog with the files. > > The user chooses the files they want to view (multiple or single > select) > and then the program would unarchive them and display the file on > screen.. > Either via Applescript or a image viewer in python... (Maybe > quicktime) > > Well, I can do everything, except display the pop up or list > dialog... > EasyDialogs would be the solution for the Select Fialog dialog... > > If this was Mac 9, I would be using Tkinter probably to create the > dialog > window for the file selection... > > Since that option is not available for Mac OS X, Does anyone have a > suggestion > for the file selection window? I see that popups are available from > Easy dialogs. > (The second demo test) But I have not been able to simplify it to > just > show a single popup... > > Even then, may be a "Select File: XXXXX.ZIP" with the internal > zip listing > would be good... But I haven't messed with the GUI side of python > programming, > except with Tkinter... > > Anyone willing to offer some suggestions, or take pity, and point > out how > I can do this? (Pointers are *VERY WELCOME*) > > - Ben > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From bob at redivi.com Mon Sep 8 13:18:43 2003 From: bob at redivi.com (Bob Ippolito) Date: Mon Sep 8 12:18:48 2003 Subject: [Pythonmac-SIG] EasyDialog? Not quite what I need.. In-Reply-To: Message-ID: <1DA940AC-E218-11D7-851F-000A95686CD8@redivi.com> Tkinter and PIL will do this, and they are both available in OS X. You just have to download Tcl/Tk separately, that's all. Look in Jack's (the official) Package Manager repository, they're both there (Tk is just instructions, PIL is something you can actually fetch). On Monday, Sep 8, 2003, at 12:01 America/New_York, Kevin Ollivier wrote: > Hi Benjamin, > > Have you considered going the wxPython route? It's interesting in that > there is no free, cross-platform ZIP/UNZIP software, and I've always > thought that Python/wxPython would be the perfect combo for one. (At > our work we distribute free software to people in developing > countries, so having this would be very nice. ;-) Just a thought! > > I'm sure someone else will also offer PyObjC as a solution to this > problem as well. ^_^ > > Thanks, > > Kevin > > On Monday, September 8, 2003, at 08:26 AM, Schollnick, Benjamin wrote: > >> Folks, >> >> I'm working on a zip file archive viewer... >> >> The idea is that the user would select the archive, I would read >> the table of contents via zipfile, and display a pop up or a list >> dialog with the files. >> >> The user chooses the files they want to view (multiple or single >> select) >> and then the program would unarchive them and display the file on >> screen.. >> Either via Applescript or a image viewer in python... (Maybe >> quicktime) >> >> Well, I can do everything, except display the pop up or list >> dialog... >> EasyDialogs would be the solution for the Select Fialog dialog... >> >> If this was Mac 9, I would be using Tkinter probably to create the >> dialog >> window for the file selection... >> >> Since that option is not available for Mac OS X, Does anyone have a >> suggestion >> for the file selection window? I see that popups are available from >> Easy dialogs. >> (The second demo test) But I have not been able to simplify it to >> just >> show a single popup... >> >> Even then, may be a "Select File: XXXXX.ZIP" with the internal >> zip listing >> would be good... But I haven't messed with the GUI side of python >> programming, >> except with Tkinter... >> >> Anyone willing to offer some suggestions, or take pity, and point >> out how >> I can do this? (Pointers are *VERY WELCOME*) From Benjamin.Schollnick at usa.xerox.com Mon Sep 8 13:45:27 2003 From: Benjamin.Schollnick at usa.xerox.com (Schollnick, Benjamin) Date: Mon Sep 8 12:46:10 2003 Subject: [Pythonmac-SIG] EasyDialog? Not quite what I need.. Message-ID: <51B62EFFBC83D6118ADA00096BB030A102CC2E78@usamcms7.mc.usa.xerox.com> > Have you considered going the wxPython route? It's > interesting in that > there is no free, cross-platform ZIP/UNZIP software, and I've always > thought that Python/wxPython would be the perfect combo for one. (At > our work we distribute free software to people in developing > countries, > so having this would be very nice. ;-) Just a thought! I'll take a look... I previously examined WxPython earlier, but did not see any helpful documentation for getting started.... And I think they didn't yet have MOSX binaries... I'll have to see that I can make a portable binary, without having to hand out Wxpython, but it's a option. I just printed out the Tutorial and I'll mess around a bit... - Benjamin From kevino at tulane.edu Mon Sep 8 11:01:03 2003 From: kevino at tulane.edu (Kevin Ollivier) Date: Mon Sep 8 13:04:49 2003 Subject: [Pythonmac-SIG] EasyDialog? Not quite what I need.. In-Reply-To: <51B62EFFBC83D6118ADA00096BB030A102CC2E78@usamcms7.mc.usa.xerox.com> Message-ID: <07DE5CBE-E21E-11D7-87A2-000393CB1C86@tulane.edu> Hi Benjamin, On Monday, September 8, 2003, at 09:45 AM, Schollnick, Benjamin wrote: > >> Have you considered going the wxPython route? It's >> interesting in that >> there is no free, cross-platform ZIP/UNZIP software, and I've always >> thought that Python/wxPython would be the perfect combo for one. (At >> our work we distribute free software to people in developing >> countries, >> so having this would be very nice. ;-) Just a thought! > > I'll take a look... I previously examined WxPython earlier, but did > not see any helpful documentation for getting started.... And I think > they didn't yet have MOSX binaries... Try the documentation on the Wiki at: http://wiki.wxpython.org/index.cgi/Getting_20Started It's much more complete than the getting started tutorial on the main site. The Wiki in general is a great place to find info on wxPython, although I do think that eventually a nice tutorial page should come out of all this. > I'll have to see that I can make a portable binary, without having to > hand out Wxpython, but it's a option. If you mean an ".exe" file on Windows, and a ".app" on Mac, then yes, you can do both. (And I do so for my own wxPython application, EClass.Builder.) If you're talking about distributing the script itself, people would need to download wxPython to run it of course. (Hopefully this could be fixed in future versions of Python... =) Thanks, Kevin > I just printed out the Tutorial and I'll mess around a bit... > > - Benjamin > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From managan at llnl.gov Mon Sep 8 11:26:07 2003 From: managan at llnl.gov (Rob Managan) Date: Mon Sep 8 13:26:21 2003 Subject: [Pythonmac-SIG] Additional binary packages for Python2.3 on 10.2.6 In-Reply-To: <3AD4F04A-E014-11D7-8C29-000A95686CD8@redivi.com> References: <3AD4F04A-E014-11D7-8C29-000A95686CD8@redivi.com> Message-ID: >On Friday, Sep 5, 2003, at 21:31 America/New_York, Andrew Straw wrote: > > >Apple's linking stuff is really.. peculiar, to say the least. It's >more than a few mouthfuls to explain the how's and why's, but I know >my way around it far too well. As far as ATLAS goes, vecLib links >in most or all of ATLAS (though the symbols aren't exported.. ugh), >and does some magic so it detects your CPU at runtime and links in >the proper optimizations for G3, G4, or G5 (in Panther, maybe the >latest seed of 10.2.x beta). Which is really cool, and hard to do >on your own. > >>PPS Speaking of all the above leads me to a question you might be >>able to help me on-- I'd like to get back to the mainstream >>wxPython distros so I don't have to roll my own, but I think >>they're all compiled with libtiff libzip, libjpeg, and the like >>statically linked, which causes dynamic linking namespace conflicts >>with the libraries in use by PIL and pygame... I remember you made >>a comment about the best way to deal with this on one of the >>mailing lists, but I couldn't quite translate it to this particular >>case. (Probably just because I'm sitting here really trying to >>write up my thesis and not get too into the specifics of linking >>binary files on Mac OS X, which is so, so, so far from the >>neurophysiology of insect visual motion > detection!) > >This is the exact reason why I've said on multiple occasions "DO NOT >USE -undefined suppress -flat_namespace". A lot of people still use >that crap for compatibility with old pythons, and it screws up the >whole deal for people like you who are using a sane version of >Python. Chances are, the wx guys are using flat_namespace, so >you're pretty much screwed. I'm pretty sure that my PackageManager >versions of PIL and pygame use two level namespaces and shouldn't >have this problem on their own. Maybe it's time for me to roll my >own distro of wxPython that's compiled in a reasonable way? > Since I recently built the wxMac-2.4.1 ditributoin I checked this and they do use "-undefined suppress -flat_namespace" in the SHARED_LD macro which is what build the shared library. may take a look at changing that. -- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- Rob Managan email managan at llnl.gov LLNL phone: 925-423-0903 P.O. Box 808, L-095 FAX: 925-422-3389 Livermore, CA 94551-0808 From bob at redivi.com Mon Sep 8 14:36:47 2003 From: bob at redivi.com (Bob Ippolito) Date: Mon Sep 8 13:36:52 2003 Subject: [Pythonmac-SIG] Additional binary packages for Python2.3 on 10.2.6 In-Reply-To: Message-ID: <05B1A261-E223-11D7-851F-000A95686CD8@redivi.com> On Monday, Sep 8, 2003, at 13:26 America/New_York, Rob Managan wrote: >> On Friday, Sep 5, 2003, at 21:31 America/New_York, Andrew Straw wrote: >> >> >> Apple's linking stuff is really.. peculiar, to say the least. It's >> more than a few mouthfuls to explain the how's and why's, but I know >> my way around it far too well. As far as ATLAS goes, vecLib links in >> most or all of ATLAS (though the symbols aren't exported.. ugh), and >> does some magic so it detects your CPU at runtime and links in the >> proper optimizations for G3, G4, or G5 (in Panther, maybe the latest >> seed of 10.2.x beta). Which is really cool, and hard to do on your >> own. >> >>> PPS Speaking of all the above leads me to a question you might be >>> able to help me on-- I'd like to get back to the mainstream wxPython >>> distros so I don't have to roll my own, but I think they're all >>> compiled with libtiff libzip, libjpeg, and the like statically >>> linked, which causes dynamic linking namespace conflicts with the >>> libraries in use by PIL and pygame... I remember you made a comment >>> about the best way to deal with this on one of the mailing lists, >>> but I couldn't quite translate it to this particular case. >>> (Probably just because I'm sitting here really trying to write up my >>> thesis and not get too into the specifics of linking binary files on >>> Mac OS X, which is so, so, so far from the neurophysiology of insect >>> visual motion > detection!) >> >> This is the exact reason why I've said on multiple occasions "DO NOT >> USE -undefined suppress -flat_namespace". A lot of people still use >> that crap for compatibility with old pythons, and it screws up the >> whole deal for people like you who are using a sane version of >> Python. Chances are, the wx guys are using flat_namespace, so you're >> pretty much screwed. I'm pretty sure that my PackageManager versions >> of PIL and pygame use two level namespaces and shouldn't have this >> problem on their own. Maybe it's time for me to roll my own distro >> of wxPython that's compiled in a reasonable way? >> > Since I recently built the wxMac-2.4.1 ditributoin I checked this and > they do use "-undefined suppress -flat_namespace" in the SHARED_LD > macro which is what build the shared library. > > may take a look at changing that. Please please please tell whoever is responsible for the wx builds and build scripts to stop doing that. It only made sense for 10.1, and it's not something you want at all for anything more recent than that. -bob From gherman at darwin.in-berlin.de Tue Sep 9 13:44:11 2003 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Tue Sep 9 06:44:06 2003 Subject: [Pythonmac-SIG] ANN: Pycotine 0.4 available! Message-ID: <8C5316E0-E2B2-11D7-9E88-00039345C610@darwin.in-berlin.de> Hi, after becoming a happy bundlebuilder user I'm about to repackage a few tools and proto-tools of mine to increase their usability for a wider audience. Number one is "Pycotine" a native Mac OS X Cocoa GUI using PyObjC to the PyUnit test framework. Please see the attached Readme below. I'm glad about any comments you might have! Regards, Dinu -- Dinu C. Gherman ...................................................................... "Fascism should more appropriately be called corporatism because it is a merger of state and corporate power." (Benito Mussolini) Pycotine ======== Summary ------- Pycotine is a Mac OS X Cocoa GUI to the PyUnit test framework. Overview -------- Pycotine (Python Cocoa Test Interface Environment) is a Cocoa GUI for Mac OS X to Steve Purcell's PyUnit test framework [1]_. It allows you to execute a Python testsuite, possibly spread over many modules, comfortably from an application which shows statistical information about the ongoing tests with various counters and a progress bar. Errors and failures, usually reported on the commandline, are listed in a seperate part of the window. The user interface is very much designed after an existing Tkinter version [2]_. Basics ------ Using Pycotine you can open Python files (with extension ".py") and execute testsuites created in these files with the "unittest" module of the Python 2.x standard library. Right now, Pycotine first trys to import a function named "suite()" or "makeSuite()" from an opened Python module which it assumes to build and return a testsuite. If no such functions are found, it will search for all subclasses of unittest.TestCase in the top-level of the selected Python module. The test files in samples/ were shamelessly copied from Steve Purcell's own original test cases for PyUnit 1.4.1 (just skipping the Tkinter ones for obvious reasons). I added only one new file, "listtestsfail.py" which shows a test failing on purpose, too. There is one known bug which can crash Pycotine when it tries to load files having a full path with blanks and/or non-ASCII characters. History ------- :0.2: first release, written in Objective-C, relying on an external Python interpreter :0.3: fully reimplemented in Python, using PyObjC :0.4: repackaged with Python 2.2.3 and PyObjC 1.0b included Requirements ------------ There are no special requirements for running Pycotine. From version 0.4 it ships as a standalone application which should be running on any Mac OS X 10.x, althouth it was developped on 10.2. As it comes with full source code you can build Pycotine yourself, if you have Apple's developer tools installed, plus some Python interpreter version 2.2 or higher, plus PyObjC 1.0b. Licence ------- Pycotine is released under the GPL - see the included file, "GPL.txt". Download -------- The Pycotine distribution, screenshots and a sample movie of Pycotine in action are all available from: http://python.net/~gherman/Pycotine.html Notes ------ Pycotine was developped from its author's personal frustration with running (or rather not running) Tkinter on Mac OS X as the only existing GUI for PyUnit. While at the time it might have well been possible to get Tkinter running, it was probably easier to write this little tool... Originally, Pycotine was written as a vanilla Cocoa application (sic!) in Objective-C, calling a dedicated TestRunner class in Python. Today, Pycotine is written entirely in Python using the excellent PyObjC [3]_ bridging technology. Future ------ The future is uncertain, but I might spend a bit more time on this tool to add localisation to a few more languages and or make the errors and failures output more useful. Your help and suggestions are very welcome! Links ----- .. [1] http://pyunit.sourceforge.net/ .. [2] http://pyunit.sourceforge.net/screenshot.gif .. [3] http://pyobjc.sourceforge.net/ Author ------ Dinu Gherman, dinu at mac dot com, 2003-09-09 From just at letterror.com Tue Sep 9 14:25:19 2003 From: just at letterror.com (Just van Rossum) Date: Tue Sep 9 07:25:11 2003 Subject: [Pythonmac-SIG] "no codec search functions registered" In-Reply-To: <20030908134636.1709@courrier.enst-bretagne.fr> Message-ID: Yannis Haralambous wrote: > I know there was a thread on this error message last year, but here the > situation is different. I use a freshly installed python2.3 from fink, > and the binary is clearly /sw/bin/python2.3 and not /usr/bin/python. > > here is the exact error message I get when I try to launch TTX (a tool > for converting TrueType font into XML and back): > > >bash-2.05a$ /sw/bin/python2.3 ttx.py /WINDOWS/verdana.ttx > >Compiling "/WINDOWS/verdana.ttx" to "/WINDOWS/verdana#1.ttf"... > >Traceback (most recent call last): > > File "ttx.py", line 278, in ? > > main(sys.argv[1:]) > > File "ttx.py", line 260, in main > > process(jobs, options) > > File "ttx.py", line 245, in process > > action(input, output, options) > > File "ttx.py", line 169, in ttCompile > > ttf.importXML(input) > > File "/sw/lib/python2.3/site-packages/FontTools/fontTools/ttLib/ > >__init__.py", line 280, in importXML > > xmlImport.importXML(self, file, progress) > > File "/sw/lib/python2.3/site-packages/FontTools/fontTools/ttLib/ > >xmlImport.py", line 134, in importXML > > p.parse() > > File "/sw/lib/python2.3/site-packages/FontTools/fontTools/ttLib/ > >xmlImport.py", line 24, in parse > > self.parseFile(file) > > File "/sw/lib/python2.3/site-packages/FontTools/fontTools/ttLib/ > >xmlImport.py", line 44, in parseFile > > parser.Parse(chunk, 0) > >LookupError: no codec search functions registered: can't find encoding > > Any idea what may be going wrong? I can reproduce this error by removing the encodings package. Can you "import encodings", and if so, is it the right one? Does unicode("a", "utf8") work? Just From akhar at gmx.net Tue Sep 9 01:25:31 2003 From: akhar at gmx.net (Akhar) Date: Tue Sep 9 07:43:07 2003 Subject: [Pythonmac-SIG] Apple Events, Carbon, and OS X Message-ID: Hello, I have been reading through about 2 years worth of the archives, in search of tips/tutorials on how to use python to script OS X apps. Now I have found alot of: import App d = App.App() do stuff with d etc ... but for some reason these do not work. I use both the pre-installed python and MacPython from VisionEgg, on OS X.2.6 . Also I cannot seem to find any info on Carbon libs, from what I gather from there names, I should be able to create GUI apps but right now I am just coding blind with dir(). Tutorials on a web page would greatly be apreciated by many others I am sure. Regards Stephane From admin at proboscis.org.uk Tue Sep 9 14:06:57 2003 From: admin at proboscis.org.uk (Proboscis Admin) Date: Tue Sep 9 08:07:04 2003 Subject: [Pythonmac-SIG] reading text from HTML form to Python using CGI Message-ID: <1BFFAEC8-E2BE-11D7-A056-0030654ABF76@proboscis.org.uk> Hello, I have an HTML form and I need to get the user input to my Python code.Im not experienced with python.Im using CGI which seems to be fine except that im getting a key error because of the cgi.py module which is raising an exception as it is not finding the key. in the html form the action refers to the python code which contains the cgi and I have used the same names as the in both html and python but i think im not knowing how to refer the python program to that form page. Could you please advice. Or even basic code of what must be in the CGI for it to read the form. thank you From gherman at darwin.in-berlin.de Tue Sep 9 15:31:28 2003 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Tue Sep 9 08:31:31 2003 Subject: [Pythonmac-SIG] ANN: RegexPlor 0.6 available! Message-ID: <88FF43F0-E2C1-11D7-9E88-00039345C610@darwin.in-berlin.de> Hi, Next in line is "RegexPlor", a native Mac OS X Cocoa GUI tool using PyObjC to provide an intuitive way of exploring regular expressions. Please see the attached Readme below. I'd be grateful for any comments you might have! Regards, Dinu -- Dinu C. Gherman ...................................................................... "I am a gentlemen: I live by robbing the poor." (George Bernard Shaw) RegexPlor ========= Summary ------- RegexPlor is a Mac OS X tool for interactively exploring regular expressions. Overview -------- RegexPlor is a tool for interactively exploring regular expressions. It provides a graphic frontend for experimenting with such regular expressions in a intuitive way. You can edit an input text as well as a regular expression as well as colors for matched text, etc. and study various effects at every keystroke. This is a much more convenient way of hunting down the one expression you're after, without typing any code at all in the usual trial-and-error method. Basics ------ RegexPlor is pretty intuitive to use. There are three differen panes or views you can switch between at the top of the window. The input pane shows the input text and the regular expression to be applied to it. Change any of them and various ways of matching (selectable using the bottom buttons) will be applied instantly, resulting in coloring the respective portions of the input text. Colors and specific matching options can be changed in the drawer popping out horizontally of the main window. The output pane is divided into several columns where the respective text portions can be easily copied from if you need them somewhere else. Here you can also replace text using the drawer popping out vertically of the main window when the Replace button is pressed. The Syntax pane provides a summary about the regular expression syntax which you can look-up to use special features. The files in samples/ only provide a starting point for your own exploration of regular expressions. History ------- :0.5: first release, relying on an external Python interpreter :0.6: repackaged with Python 2.2.3 and PyObjC 1.0b included, minor fixes Requirements ------------ There are no special requirements for running RegexPlor. From version 0.6 it ships as a standalone application which should be running on any Mac OS X 10.x, althouth it was developped on 10.2. As it comes with full source code you can build RegexPlor yourself, if you have Apple's developer tools installed, plus some Python interpreter version 2.2 or higher, plus PyObjC 1.0b [1]_. Licence ------- RegexPlor is released under the GPL - see the included file, "GPL.txt". Download -------- The RegexPlor distribution, screenshots and a sample movie of RegexPlor in action are all available from: http://python.net/~gherman/RegexPlor.html Notes ------ Among the undoubtly many other GUI tools similar to RegexPlor are Kodos [2]_ and Regex-Coach [3]_. If you know more of them, please send me a short note. You might experience some strange effects with RegexPlor when moving the window accross the screen. I suspect this is somehow related to the metal texture being used, but I'm not sure yet. It usually disappears quickly after clicking in some places of the windows. If you happen to know the reason for that please tell me. At the moment, RegexPlor does nothing meaningful when attempting to save or open a file. This will probably be disabled, soon. Future ------ I think RegexPlor 0.6 is quite complete in terms of functionality but I'd like to mark text also using background colours like it is done in Hydra, but I have no idea how that can be done. Again, if you know... And then the usual localization etc. Your help and suggestions are very welcome! Links ----- .. [1] http://pyobjc.sourceforge.net .. [2] http://kodos.sourceforge.net .. [3] http://www.weitz.de/regex-coach Author ------ Dinu Gherman, dinu at mac dot com, 2003-09-09 From yannis.haralambous at enst-bretagne.fr Tue Sep 9 15:31:33 2003 From: yannis.haralambous at enst-bretagne.fr (Yannis Haralambous) Date: Tue Sep 9 08:31:51 2003 Subject: [Pythonmac-SIG] codecs Message-ID: <20030909123133.18995@smtp.numericable.fr> Thank you Just for your answer, when I do: >unicode("a","utf8") I get: >Traceback (most recent call last): > File "", line 1, in ? >LookupError: no codec search functions registered: can't find encoding even after an "import encodings", and an "import codecs" I'm using: >Python 2.3 (#1, Sep 8 2003, 10:13:34) >[GCC 3.1 20020420 (prerelease)] on darwin under MacOS X 10.2.6 I checked and there is indeed a codecs.py in /sw/lib/python2.3 and an encodings directory /sw/lib/python2.3/encodings/ is this a bug in the python distribution for Darwin? Or am I doing something wrong? +--------------------------------------------------------------------+ | Yannis Haralambous, Ph.D. yannis.haralambous@enst-bretagne.fr | | Professor http://omega.enstb.org/yannis | | Tel. +33 (0)2.29.00.14.27 | | Fax +33 (0)2.29.00.12.82 | | Computer Science Department | | Ecole Nationale Superieure des Telecommunications de Bretagne | | Technopole de Brest Iroise, CS 83818, 29238 Brest CEDEX 3, France | +--------------------------------------------------------------------+ ...pour distinguer l'exterieur d'un aquarium, mieux vaut n'etre pas poisson ...the ball I threw while playing in the park has not yet reached the ground From gherman at darwin.in-berlin.de Tue Sep 9 15:36:18 2003 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Tue Sep 9 08:36:13 2003 Subject: [Pythonmac-SIG] "no codec search functions registered" In-Reply-To: Message-ID: <35F18608-E2C2-11D7-9E88-00039345C610@darwin.in-berlin.de> Just van Rossum: > I can reproduce this error by removing the encodings package. Can you > "import encodings", and if so, is it the right one? I had very similar effects... Adding the encodings directory to the application bundle was not enough in my case, though. I could only work around that by including all *.pyc files from this folder, too, since I was too lazy to find out exactly which ones I needed. But I think sometimes you can't really know in advance if you get text from unknown sources... Dinu -- Dinu C. Gherman ...................................................................... "My view of Microsoft is that they had two goals in the last 10 years: to copy the Macintosh and to copy Lotus' success in the application business. And they accomplished those goals. Now, they're kind of lost. I've told Bill [Gates] that I think it's in Microsoft's best interest if NeXT becomes successful because we'll give them something to copy for the rest of this decade." (Steve Jobs) From just at letterror.com Tue Sep 9 15:44:43 2003 From: just at letterror.com (Just van Rossum) Date: Tue Sep 9 08:44:30 2003 Subject: [Pythonmac-SIG] codecs In-Reply-To: <20030909123133.18995@smtp.numericable.fr> Message-ID: Yannis Haralambous wrote: > when I do: > > >unicode("a","utf8") > > I get: > > >Traceback (most recent call last): > > File "", line 1, in ? > >LookupError: no codec search functions registered: can't find encoding > > even after an "import encodings", and an "import codecs" Something's not right with your install. > I'm using: > >Python 2.3 (#1, Sep 8 2003, 10:13:34) > >[GCC 3.1 20020420 (prerelease)] on darwin > under MacOS X 10.2.6 > > I checked and there is indeed a codecs.py in /sw/lib/python2.3 and an > encodings directory /sw/lib/python2.3/encodings/ > > is this a bug in the python distribution for Darwin? Or am I doing > something wrong? I think the problem may also occur of you have a _different_ module named "encodings" on sys.path. You can check by importting "encodings" and checking its __file__. Or on the interactive prompt, it should show something like this: >>> import encodings >>> encodings >>> Just From just at letterror.com Tue Sep 9 15:47:16 2003 From: just at letterror.com (Just van Rossum) Date: Tue Sep 9 08:46:56 2003 Subject: [Pythonmac-SIG] "no codec search functions registered" In-Reply-To: <35F18608-E2C2-11D7-9E88-00039345C610@darwin.in-berlin.de> Message-ID: Dinu Gherman wrote: > > I can reproduce this error by removing the encodings package. Can > > you "import encodings", and if so, is it the right one? > > I had very similar effects... Adding the encodings directory to the > application bundle was not enough in my case, though. I could only > work around that by including all *.pyc files from this folder, too, > since I was too lazy to find out exactly which ones I needed. But > I think sometimes you can't really know in advance if you get text > from unknown sources... If this was with bundlebuilder, did you do --package=encodings ? This was discussed here *very* recently, check the "bundlebuilder --standalone not working" thread. Just From gherman at darwin.in-berlin.de Tue Sep 9 16:44:59 2003 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Tue Sep 9 09:44:58 2003 Subject: [Pythonmac-SIG] ANN: ReSTedit 0.2 available! Message-ID: Hi, the last one for today is "ReSTedit", a native Mac OS X Cocoa GUI tool using PyObjC and Docutils to provide an intuitive way of exploring, editing and rendering text in the ReStructuredText format. Please see the attached Readme below. As usual I'm grate- ful for any comments or insights you might have to share! Regards, Dinu -- Dinu C. Gherman ...................................................................... "There comes a point when we the people must demand more of our elected officials than just showing up." (Arnold Schwarzenegger) ReSTedit ========= Summary ------- ReSTedit is a Mac OS X demo for interactively exploring ReStructuredText. Overview -------- ReSTedit is a GUI tool for editing and interactivly exploring texts in the ReStructuredText [1]_ format (or ReST) as introduced by the Docutils [2]_ project. Despite being very simple ReSTedit is very useful for quickly checking if Docutils renders some text as you would expect it. You only paste it into a ReSTedit window to see if it's ok or not, without writing any test code around it. Basics ------ ReSTedit is extremely simple to use. You paste an input text into the lower half of a window or type it in there and ReSTedit renders your text into the default HTML format which it displays in the upper half of the window. The rendering takes place silently in the background and the upper output half will tell you which errors were detected if there were any. And that's it. When you're done you can copy your text out, again... Hyperlinks are displayed the usual way and are clickable, too (launching your default webbrowser). And images are also correctly displayed (don't forget the file:// prefix for local files!). History ------- :0.1: first release, relying on an external Python interpreter :0.2: repackaged with Python 2.2.3 and PyObjC 1.0b and Docutils 0.3 included Requirements ------------ There are no special requirements for running ReSTedit. From version 0.2 it ships as a standalone application which should be running on any Mac OS X 10.x, althouth it was developped on 10.2. As it comes with full source code you can build ReSTedit yourself, if you have Apple's developer tools installed, plus some Python interpreter version 2.2 or higher, plus PyObjC 1.0b [3]_. Licence ------- ReSTedit is released under the GPL - see the included file, "GPL.txt". Download -------- The ReSTedit distribution, screenshots and a sample movie of ReSTedit in action are all available from: http://python.net/~gherman/ReSTedit.html Notes ------ Among other GUI tools similar to ReSTedit is DocFactory [4]_. If you know more of them, please send me a short note. Future ------ ReSTedit is really just a proof of concept. I'm certainly not planning to make it a full-fledged editor. Right now, ReSTedit does nothing meaningful when attempting to save or open a file, but this will be enabled, soon. As usual: your help and suggestions are very welcome! Links ----- .. [1] http://docutils.sourceforge.net/spec/rst/reStructuredText.html .. [2] http://docutils.sourceforge.net .. [3] http://pyobjc.sourceforge.net .. [4] http://docutils.sourceforge.net/sandbox/gschwant/docfactory/doc/ Author ------ Dinu Gherman, dinu at mac dot com, 2003-09-09 From gherman at darwin.in-berlin.de Tue Sep 9 16:51:42 2003 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Tue Sep 9 09:51:38 2003 Subject: [Pythonmac-SIG] "no codec search functions registered" In-Reply-To: Message-ID: Just van Rossum: > If this was with bundlebuilder, did you do --package=encodings ? This > was discussed here *very* recently, check the "bundlebuilder > --standalone not working" thread. Yes, it was bundlebuilder. I found the thread you mention, but it doesn't say if only .pyc or if also the .pyo files get included and I just didn't do the research quickly myself. Think I'll do that, soon... Dinu -- Dinu C. Gherman ...................................................................... "Fascism should more appropriately be called corporatism because it is a merger of state and corporate power." (Benito Mussolini) From p.oberndoerfer at urheberrecht.org Tue Sep 9 17:21:07 2003 From: p.oberndoerfer at urheberrecht.org (Pascal Oberndoerfer) Date: Tue Sep 9 10:21:20 2003 Subject: [Pythonmac-SIG] ANN: RegexPlor 0.6 available! In-Reply-To: <88FF43F0-E2C1-11D7-9E88-00039345C610@darwin.in-berlin.de> Message-ID: Dinu Gherman at gherman@darwin.in-berlin.de: > Hi, > > Next in line is "RegexPlor", a native Mac OS X Cocoa GUI tool using > PyObjC to provide an intuitive way of exploring regular expressions. > Please see the attached Readme below. I'd be grateful for any > comments you might have! > > Regards, > > Dinu [...] > Requirements > ------------ > > There are no special requirements for running RegexPlor. From > version 0.6 it ships as a standalone application which should be > running on any Mac OS X 10.x, althouth it was developped on 10.2. > As it comes with full source code you can build RegexPlor yourself, > if you have Apple's developer tools installed, plus some Python > interpreter version 2.2 or higher, plus PyObjC 1.0b [1]_. Hi Dinu, I don't think this will work on MacOS X up to 10.1.5 as you are using a shell script inside your .app bundle (at least it doesn't work for me). Trying to start RegexPlor from Terminal gives me an error message: > [powerbook:RegexPlor.app/Contents/MacOS] pob% ./RegexPlor > dyld: ./python can't open library: /sw/lib/libdl.0.dylib (No such file or > directory, errno = 2) > [powerbook:RegexPlor.app/Contents/MacOS] pob% Fink? Best regards, Pascal From gherman at darwin.in-berlin.de Tue Sep 9 17:40:47 2003 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Tue Sep 9 10:40:43 2003 Subject: [Pythonmac-SIG] ANN: RegexPlor 0.6 available! In-Reply-To: Message-ID: <998489B2-E2D3-11D7-9E88-00039345C610@darwin.in-berlin.de> Pascal Oberndoerfer: > Hi Dinu, > > I don't think this will work on MacOS X up to 10.1.5 as you are using a > shell script inside your .app bundle (at least it doesn't work for me). Which one is that? I can't see any. > Trying to start RegexPlor from Terminal gives me an error message: > >> [powerbook:RegexPlor.app/Contents/MacOS] pob% ./RegexPlor >> dyld: ./python can't open library: /sw/lib/libdl.0.dylib (No such >> file or >> directory, errno = 2) >> [powerbook:RegexPlor.app/Contents/MacOS] pob% This is what I get when trying what you did: [localhost:RegexPlor.app/Contents/MacOS] dinu% ./RegexPlor ./python: can't open file './Resources/__main__.py' Why are you trying to open an application that way? One of the following works just fine for me: [localhost:Cocoa/RegexPlor/RegexPlor.app] dinu% open . [localhost:Cocoa/RegexPlor] dinu% open RegexPlor.app Or are you saying you're missing some system library on 10.1.5 which is somehow needed and available, later? Dinu -- Dinu C. Gherman ...................................................................... "Fascism should more appropriately be called corporatism because it is a merger of state and corporate power." (Benito Mussolini) From just at letterror.com Tue Sep 9 17:44:02 2003 From: just at letterror.com (Just van Rossum) Date: Tue Sep 9 10:43:52 2003 Subject: [Pythonmac-SIG] "no codec search functions registered" In-Reply-To: Message-ID: Dinu Gherman wrote: > Yes, it was bundlebuilder. I found the thread you mention, but it > doesn't say if only .pyc or if also the .pyo files get included and > I just didn't do the research quickly myself. Think I'll do that, > soon... Except for the main program, it's .pyc all the way, but on 2.3, they will be stuffed in the Modules.zip file. (I don't think .pyo is properly supported, actually. I never use it at least.) Again, reading bb's source helps, you should try it some times... Just From Jack.Jansen at cwi.nl Tue Sep 9 19:43:39 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Sep 9 12:43:44 2003 Subject: [Pythonmac-SIG] ANN: RegexPlor 0.6 available! In-Reply-To: <998489B2-E2D3-11D7-9E88-00039345C610@darwin.in-berlin.de> References: <998489B2-E2D3-11D7-9E88-00039345C610@darwin.in-berlin.de> Message-ID: On 9-sep-03, at 16:40, Dinu Gherman wrote: > Pascal Oberndoerfer: > >> Hi Dinu, >> >> I don't think this will work on MacOS X up to 10.1.5 as you are using >> a >> shell script inside your .app bundle (at least it doesn't work for >> me). > > Which one is that? I can't see any. Applets don't wok on 10.1, because it doesn't support #! binaries, and MacPython applets depend on it. This is also the reason there's no MacPython distribution for 10.1:-( Pascal: if 10.1 is important to you and you want to create a workaround: I'd love to get one, so we could distribute MacPython 2.3.1 for 10.1 too. A workaround could simply be teaching bundlebuilder that it would need to install its shell script as "xxxx.sh", and installing a program "xxxx" that execl()s /bin/sh with argv[0] with ".sh" appended. But it may be more involved than that, I don't know for sure... -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From brownr at ucalgary.ca Tue Sep 9 13:10:19 2003 From: brownr at ucalgary.ca (Robb Brown) Date: Tue Sep 9 14:10:22 2003 Subject: [Pythonmac-SIG] Python modules linked to static libraries Message-ID: Okay, for anyone who's been following, I'm trying to wrap the dcmtk dicom library into a Python module. Problem is, it doesn't work. The same code, compiled as a C program works fine, but the module crashes with an illegal instruction. The dcmtk toolkit consists of static libraries (which contain global, static variables). What happens when I link a dynamic Python module to these static libraries? Is this something that's allowed? What happens to the static globals in the new dynamic library? Are they still really static or do they get reinitialized every time I call the library? _____________________________ Robb Brown Seaman Family MR Center Calgary, AB From sarwat at sarwat.net Tue Sep 9 15:56:49 2003 From: sarwat at sarwat.net (Sarwat Khan) Date: Tue Sep 9 14:57:01 2003 Subject: [Pythonmac-SIG] reading text from HTML form to Python using CGI In-Reply-To: <1BFFAEC8-E2BE-11D7-A056-0030654ABF76@proboscis.org.uk> Message-ID: <5E6F65B0-E2F7-11D7-9AAC-003065C9DF8C@sarwat.net> On Tuesday, September 9, 2003, at 08:06 AM, Proboscis Admin wrote: > Could you please advice. Or even basic code of what must be in the CGI > for it to read the form. This might be off-topic for this list but I'll bite. I've recently decided to abandon PHP in favour of Python and I'm much happier! The only problem is optimizing your python CGI; unless you install something like mod_python (which is pretty old, unfortunately), it's a bit hard to get the performance of PHP. But I've gotten close. The biggest performance boost you can get if you're using a CGI is to make a "frozen" python binary using the tools at: http://www.egenix.com/files/python/mxCGIPython.html With that python with start up instantaneously. I've included the text of a simple CGI that should teach you a bit about using the high-level interface for the CGI module and a little bit about python too. I'm not sure in which way you were using the CGI module that was causing it to raise an exception; if getfirst() used as below cannot find the key, it returns None. The script below works with Apple's installation of Python 2.2 in /usr/bin/python with OS 10.2 (you can replace the first line with #! /usr/bin/python, if you really want). #!/usr/bin/env python """ A web page/cgi that shows a menu of web pages to redirect to, and then calls itself as the form action to redirect to that web page. CGI variables: url - if this variable is set, the client is redirected to this. """ import cgi # other stuff that's useful import sys, os # I didn't use this, but if you're going to join lots of strings, you should. from StringIO import StringIO # let's get the form values. we actually query these in the main function below. gForm = cgi.FieldStorage() def redirect(url): "Called to redirect to the given url." print 'Location: %s' % url print sys.exit() # exit the cgi now to make sure nothing else gets printed. def print_html(): "Called to print out html so the user can choose a url to redirect to." htmlTemplate = """ %(documentTitle)s

%(documentTitle)s

Select a web site to visit:

""" # a dictionary of values to fill the html template with htmlValues = { 'documentTitle' : 'CGI Programming Example', # in case we're not running as a CGI, use foo. 'formAction' : os.path.basename(os.environ.get('SCRIPT_NAME', 'foo')), 'formMethod' : 'POST', # or GET. 'extraURLOptions' : make_option_tags_for('http://sarwat.net', 'http://sarwat.net/opensource/')} # actually start printing html print "Content-Type: text/html" print print htmlTemplate % htmlValues def make_option_tags_for(*args): # the *args means that args is a variable argument list. You can pass as many # arguments as you want to this function and they'll turn into this list. result = "" for url in args: result += '