From kent_quirk at cognitoy.com Mon Apr 2 03:59:18 2007 From: kent_quirk at cognitoy.com (Kent Quirk) Date: Sun, 01 Apr 2007 21:59:18 -0400 Subject: [Pythonmac-SIG] not mac related but OLPC In-Reply-To: <65fadfc30703302129o59bce3fbuaf76973cb1d401bb@mail.gmail.com> References: <65fadfc30703302129o59bce3fbuaf76973cb1d401bb@mail.gmail.com> Message-ID: <46106376.5080305@cognitoy.com> Nehemiah Dacres wrote: > I just wanted to tell you all about the One Laptop per Child Program > in case any of you are interested in programming on a non mac and > haven't heard of this yet. It is mostly programmed in python and most > of the information is at laptop.org > I'm involved with the OLPC project on the game development side. Right now, the system is using PyGTK for the UI. Annoyingly, PyGTK appears to be basically nonfunctional on the Mac (if anyone knows otherwise, please speak up!). So mac-based development for the OLPC isn't real easy right now. I'm working on getting SDL and PyGame up on the platform, so at least then game developers and people who can use SDL for a UI could work on a Mac. Anyone who's interested in participating should read wiki.laptop.org, and feel free to contact me if you're interested in game development for the platform. Kent -- ------------------------------------------------------------ Kent Quirk I'm making a game about global warming. Game Architect Track the progress at: CogniToy http://www.cognitoy.com/meltingpoint From Jack.Jansen at cwi.nl Mon Apr 2 10:21:45 2007 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Mon, 2 Apr 2007 10:21:45 +0200 Subject: [Pythonmac-SIG] Macintosh modules/Carbon/documentation In-Reply-To: <018495AD-0892-4FC6-BB24-2B596778CF51@virgin.net> References: <018495AD-0892-4FC6-BB24-2B596778CF51@virgin.net> Message-ID: On 31-Mar-2007, at 19:58 , has wrote: > Furthermore, this stumbling block has a stumbling block of its own: > bgen. There's very few folk around who understand it at all, and no > documentation (AFAIK) for anyone else to make sense of it. Until > there's some sort of decision made about bgen's future (maintain and > document it? Replace it completely? Abandon it and maintain existing > code by hand?), I can't see anyone really wanting to step into that > tarpit. I'm committed to bgen, for at least the next couple of years. I'm also using it to generate a bidirectional C++ bridge for Ambulant (which is my main project nowadays, and which is one of the things that makes me spend so little time with development of Python itself). But unfortunately getting the &*^$ thing in better shape for initial use is something that keeps slipping:-( -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20070402/585163a9/attachment.htm From hengist.podd at virgin.net Mon Apr 2 14:02:25 2007 From: hengist.podd at virgin.net (has) Date: Mon, 2 Apr 2007 13:02:25 +0100 Subject: [Pythonmac-SIG] Macintosh modules/Carbon/documentation In-Reply-To: References: <018495AD-0892-4FC6-BB24-2B596778CF51@virgin.net> Message-ID: <2B4C8605-4AEF-4A44-9CEA-4176E5032149@virgin.net> On 2 Apr 2007, at 09:21, Jack Jansen wrote: >> Furthermore, this stumbling block has a stumbling block of its own: >> bgen. There's very few folk around who understand it at all, and no >> documentation (AFAIK) for anyone else to make sense of it. > > I'm committed to bgen, for at least the next couple of years. Good man - deserve a medal, so you do. > But unfortunately getting the &*^$ thing in better shape for > initial use is something that keeps slipping:-( Yeah, cleaning up APIs and internals and writing good user docs is well and truly teh suk as jobs go. Without it though, I think you'll have a very tough time convincing others to help share the load. (e.g. I wouldn't mind contributing if/where I could, seeing as I rely on some of it myself, but for now it's just beyond me.) Cheers, has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org http://appscript.sourceforge.net/objc-appscript.html From kw at codebykevin.com Mon Apr 2 22:01:25 2007 From: kw at codebykevin.com (Kevin Walzer) Date: Mon, 02 Apr 2007 16:01:25 -0400 Subject: [Pythonmac-SIG] Macintosh modules/Carbon/documentation In-Reply-To: <2B4C8605-4AEF-4A44-9CEA-4176E5032149@virgin.net> References: <018495AD-0892-4FC6-BB24-2B596778CF51@virgin.net> <2B4C8605-4AEF-4A44-9CEA-4176E5032149@virgin.net> Message-ID: <46116115.1070600@codebykevin.com> has wrote: > On 2 Apr 2007, at 09:21, Jack Jansen wrote: > > Yeah, cleaning up APIs and internals and writing good user docs is > well and truly teh suk as jobs go. Without it though, I think you'll > have a very tough time convincing others to help share the load. I'm willing to contribute a little bit here--at least to the portions about getting started with MacPython, where to access packages, updating the IDE part to reflect IDLE, and so on. I'm working on a Python application ATM and will have to finish that first, but I'm already making notes of stuff to update. Can't help with the Carbon bits, alas, it's beyond my expertise. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From kw at codebykevin.com Fri Apr 6 00:11:04 2007 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 05 Apr 2007 18:11:04 -0400 Subject: [Pythonmac-SIG] Suggested revisions for MacPython documentation section 1--please review Message-ID: <461573F8.6000100@codebykevin.com> I've taken some time to prepare a draft update to section 1 of the MacPython documentation that ships with the standard Python 2.5 distribution: the anchor link for this is file:///Library/Frameworks/Python.framework/Versions/2.5/Resources/English.lproj/Documentation/mac/using.html. The current docs are obsolete, referring to the old PythonIDE, PackageManager, bundlebuilder/build as applet, etc. I've taken some time to revise them to reflect the current state of Python on the Mac, at least in terms of "getting started." I've added stuff on downloading from Python.org, IDLE as the standard editor with MacPython, a brief intro on GUI toolkits, py2app, and so on. I'm not going to touch the other documentation, i.e. the Carbon modules, as I'm not knowledgable enough about the Carbon bits. (I would suggest replacing all the OSA bits with a reference to appscript, but I'm not going to write that part myself.) I am wondering, however, if some additional sections to the Mac library could simply be lifted from docstrings and added? Running pydoc shows stuff like plistlib, Terminal(?) and other stuff that isn't included in the standard documentation. Could someone review the text below and let me know what should be changed? Also, what is the best way to get this submitted/committed for the next point release of Python 2.5.x? I'm still learning that process. :-) Thanks, Kevin ------ "Using MacPython on a Macintosh" 1.1, Getting and Installing MacPython Mac OS X 10.4 comes with Python 2.3 pre-installed by Apple. However, you are encouraged to install the most recent of version of Python from the Python website (http://www.python.org). A "universal binary" build of Python 2.5, which runs natively on the Mac's new Intel and legacy PPC CPU's, is available there. (A separate, freeware commercial build of Python for OS X is available from http:///www.activestate.com.) What you get after installing is a number of things: * A MacPython 2.5 folder in your Applications folder. In here you find IDLE, the development environment that is a standard part of official Python distributions; PythonLauncher, which handles double-clicking Python scripts from the Finder; and the "Build Applet" tool, which allows you to package Python scripts as standalone applications on your system. * A fairly standard Unix commandline Python interpreter in /usr/local/bin/python, but without the usual /usr/local/lib/python. * A framework /Library/Frameworks/Python.framework, where all the action really is, but which you usually do not have to be aware of. To uninstall MacPython you can simply remove these three things. The Apple-provided build of Python is installed in /System/Library/Frameworks/Python.framework and /usr/bin/python, respectively. You should in principle never modify or delete these, as they are Apple-controlled and may be used by Apple- or third-party software. IDLE includes a help menu that allows you to access Python documentation. If you are completely new to Python you should start reading the IDE introduction in that document. If you are familiar with Python on other Unix platforms you should read the section on running Python scripts from the Unix shell. 1.1.1 How to run a Python script Your best way to get started with Python on Mac OS X is through the IDLE integrated development environment, see section 1.2 and use the Help menu when the IDE is running. If you want to run Python scripts from the Terminal window command line or from the Finder you first need an editor to create your script. Mac OS X comes with a number of standard Unix command line editors, vim and emacs among them. If you want a more Mac-like editor BBEdit or TextWrangler from Bare Bones Software (see http://www.barebones.com/products/bbedit/index.shtml) are good choices. To run your script from the Terminal window you must make sure that /usr/local/bin is in your shell search path. To run your script from the Finder you have two options: * Drag it to PythonLauncher * Select PythonLauncher as the default application to open your script (or any .py script) through the finder Info window and double-click it. PythonLauncher has various preferences to control how your script is launched. Option-dragging allows you to change these for one invocation, or use its Preferences menu to change things globally. 1.1.2 Running scripts with a GUI With older versions of Python, there is one Mac OS X quirk that you need to be aware of: programs that talk to the Aqua window manager (in other words, anything that has a GUI) need to be run in a special way. Use pythonw instead of python to start such scripts. With Python 2.5, you can use either python or pythonw. 1.1.3 configuration MacPython honours all standard Unix environment variables such as PYTHONPATH, but setting these variables for programs started from the Finder is non-standard as the Finder does not read your .profile or .cshrc at startup. You need to create a file ~/.MacOSX/environment.plist. See Apple's Technical Document QA1067 for details. For more information on installation Python packages in MacPython, see section 1.3, "Installing Additional Python Packages." 1.2 The IDE MacPython ships with the standard IDLE development environment. A good introduction to using IDLE can be found at http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html. ***remove all 1.2.x subsections--they pertain to the obsolete PythonIDE*** 1.3 Installing Additional Python Packages There are several methods to install additional Python packages: * http://pythonmac.org/packages/ contains selected compiled packages for Python 2.5, 2.4, and 2.3. * Packages can be installed via the standard Python distutils mode ("python setup.py install"). * Many packages can also be installed via the setuptools extension. 1.4 GUI Programming on the Mac There are several options for building GUI applications on the Mac with Python. The standard Python GUI toolkit is tkinter, based on the cross-platform Tk toolkit (http://www.tcl.tk). An Aqua-native version of Tk is bundled with OS X by Apple, and the latest version can be downloaded and installed from http://www.activestate.com; it can also be built from source. wxPython is another popular cross-platform GUI toolkit that runs natively on Mac OS X. Packages and documentation are available from http://www.wxpython.org. PyObjC is a Mac-only Python binding to the Cocoa toolkit that ships with Mac OS X. Information on PyObjC is available from http://pybojc.sourceforge.net. 1.4 Distributing Python Applications on the Mac The "Build Applet" tool that is placed in the MacPython 2.5 folder is fine for packaging small Python scripts on your own machine to run as a standard Mac application. This tool, however, is not robust enough to distribute Python applications to other users. The standard tool for deploying standalone Python applications on the Mac is py2app. More information on installing and using py2app can be found at http://undefined.org/python/#py2app. 1.5 Other Resources A useful resource for Python on the Mac is at the MacPython wiki: http://wiki.python.org/moin/MacPython From ronaldoussoren at mac.com Fri Apr 6 08:10:09 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 6 Apr 2007 08:10:09 +0200 Subject: [Pythonmac-SIG] Suggested revisions for MacPython documentation section 1--please review In-Reply-To: <461573F8.6000100@codebykevin.com> References: <461573F8.6000100@codebykevin.com> Message-ID: On 6 Apr, 2007, at 0:11, Kevin Walzer wrote: > I've taken some time to prepare a draft update to section 1 of the > MacPython documentation that ships with the standard Python 2.5 > distribution: the anchor link for this is > file:///Library/Frameworks/Python.framework/Versions/2.5/Resources/ > English.lproj/Documentation/mac/using.html. > > The current docs are obsolete, referring to the old PythonIDE, > PackageManager, bundlebuilder/build as applet, etc. I've taken some > time > to revise them to reflect the current state of Python on the Mac, at > least in terms of "getting started." I've added stuff on downloading > from Python.org, IDLE as the standard editor with MacPython, a brief > intro on GUI toolkits, py2app, and so on. > > I'm not going to touch the other documentation, i.e. the Carbon > modules, > as I'm not knowledgable enough about the Carbon bits. (I would suggest > replacing all the OSA bits with a reference to appscript, but I'm not > going to write that part myself.) I am wondering, however, if some > additional sections to the Mac library could simply be lifted from > docstrings and added? Running pydoc shows stuff like plistlib, > Terminal(?) and other stuff that isn't included in the standard > documentation. > > Could someone review the text below and let me know what should be > changed? Also, what is the best way to get this submitted/committed > for > the next point release of Python 2.5.x? I'm still learning that > process. :-) The next point release (2.5.1) is impossible to get into, that is in a complete freeze. 2.5.2 should be possible. File a patch or bug at the SF bugtracker for python when your done (in the documentation category) and let me know the bug number, that way I can at least add a comment to say that these changes should go in. The source of the documentation are latex files in the subdirectory Doc/mac. Uploading your changes as a patch to the documentation should expedite things, but otherwise several of the documentation maintainers have publicly stated that they will translate your changes into latex for you. Ronald > > Thanks, > Kevin > > ------ > > "Using MacPython on a Macintosh" > > 1.1, Getting and Installing MacPython > > Mac OS X 10.4 comes with Python 2.3 pre-installed by Apple. > However, you > are encouraged to install the most recent of version of Python from > the > Python website (http://www.python.org). A "universal binary" build of > Python 2.5, which runs natively on the Mac's new Intel and legacy PPC > CPU's, is available there. (A separate, freeware commercial build of > Python for OS X is available from http:///www.activestate.com.) I don't think you should mention ActiveState's python distribution, that just confuses things. Why mention ActiveState but not fink or macports? > > What you get after installing is a number of things: > > * A MacPython 2.5 folder in your Applications folder. In here you find > IDLE, the development environment that is a standard part of official > Python distributions; PythonLauncher, which handles double-clicking > Python scripts from the Finder; and the "Build Applet" tool, which > allows you to package Python scripts as standalone applications on > your > system. > > * A fairly standard Unix commandline Python interpreter in > /usr/local/bin/python, but without the usual /usr/local/lib/python. /usr/local/bin/python is deprecated and only present for backward compatiblity. The interpreter lives inside the framework and the binary installer will update your shell profile to point to that location. > > * A framework /Library/Frameworks/Python.framework, where all the > action > really is, but which you usually do not have to be aware of. That's not quite true. You'll be mightily surprised when using distutils to install scripts and expect them to appear in /usr/local/ bin. > > To uninstall MacPython you can simply remove these three things. > > The Apple-provided build of Python is installed in > /System/Library/Frameworks/Python.framework and /usr/bin/python, > respectively. You should in principle never modify or delete these, as > they are Apple-controlled and may be used by Apple- or third-party > software. s/may be/are/ > > IDLE includes a help menu that allows you to access Python > documentation. If you are completely new to Python you should start > reading the IDE introduction in that document. > > If you are familiar with Python on other Unix platforms you should > read > the section on running Python scripts from the Unix shell. > > 1.1.1 How to run a Python script > > Your best way to get started with Python on Mac OS X is through the > IDLE > integrated development environment, see section 1.2 and use the Help > menu when the IDE is running. > > If you want to run Python scripts from the Terminal window command > line > or from the Finder you first need an editor to create your script. Mac > OS X comes with a number of standard Unix command line editors, vim > and > emacs among them. If you want a more Mac-like editor BBEdit or > TextWrangler from Bare Bones Software (see > http://www.barebones.com/products/bbedit/index.shtml) are good > choices. TextMate seems to be very popular these days and appears to be a much better OSX citizen than BBEdit (at least the last time I look at both of these, which for BBEdit is several years ago). > > To run your script from the Terminal window you must make sure that > /usr/local/bin is in your shell search path. > > To run your script from the Finder you have two options: > > * Drag it to PythonLauncher > * Select PythonLauncher as the default application to open your script > (or any .py script) through the finder Info window and double-click > it. > PythonLauncher has various preferences to control how your script is > launched. Option-dragging allows you to change these for one > invocation, > or use its Preferences menu to change things globally. > > 1.1.2 Running scripts with a GUI > > With older versions of Python, there is one Mac OS X quirk that you > need > to be aware of: programs that talk to the Aqua window manager (in > other > words, anything that has a GUI) need to be run in a special way. Use > pythonw instead of python to start such scripts. > > With Python 2.5, you can use either python or pythonw. > > 1.1.3 configuration > > MacPython honours all standard Unix environment variables such as > PYTHONPATH, but setting these variables for programs started from the > Finder is non-standard as the Finder does not read your .profile or > .cshrc at startup. You need to create a file > ~/.MacOSX/environment.plist. See Apple's Technical Document QA1067 for > details. > > For more information on installation Python packages in MacPython, see > section 1.3, "Installing Additional Python Packages." > > 1.2 The IDE > > MacPython ships with the standard IDLE development environment. A good > introduction to using IDLE can be found at > http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html. > > ***remove all 1.2.x subsections--they pertain to the obsolete > PythonIDE*** > > > 1.3 Installing Additional Python Packages > > There are several methods to install additional Python packages: > > * http://pythonmac.org/packages/ contains selected compiled > packages for > Python 2.5, 2.4, and 2.3. > > * Packages can be installed via the standard Python distutils mode > ("python setup.py install"). > > * Many packages can also be installed via the setuptools extension. > > > 1.4 GUI Programming on the Mac > > There are several options for building GUI applications on the Mac > with > Python. > > The standard Python GUI toolkit is tkinter, based on the cross- > platform > Tk toolkit (http://www.tcl.tk). An Aqua-native version of Tk is > bundled > with OS X by Apple, and the latest version can be downloaded and > installed from http://www.activestate.com; it can also be built > from source. > > wxPython is another popular cross-platform GUI toolkit that runs > natively on Mac OS X. Packages and documentation are available from > http://www.wxpython.org. > > PyObjC is a Mac-only Python binding to the Cocoa toolkit that ships > with > Mac OS X. Information on PyObjC is available from > http://pybojc.sourceforge.net. I'm a bit biased of course but would like to see PyObjC as the first item in the list, we are talking about python on the mac after all :-) > > 1.4 Distributing Python Applications on the Mac > > The "Build Applet" tool that is placed in the MacPython 2.5 folder is > fine for packaging small Python scripts on your own machine to run > as a > standard Mac application. This tool, however, is not robust enough to > distribute Python applications to other users. > > The standard tool for deploying standalone Python applications on the > Mac is py2app. More information on installing and using py2app can be > found at http://undefined.org/python/#py2app. > > 1.5 Other Resources > > A useful resource for Python on the Mac is at the MacPython wiki: > > http://wiki.python.org/moin/MacPython Over all: a good document. Could you please add a short section about application scripting as well, with a reference to appscript? Ronald > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070406/6998090c/attachment.bin From bill.hart at utas.edu.au Sun Apr 8 11:40:54 2007 From: bill.hart at utas.edu.au (Bill Hart) Date: Sun, 8 Apr 2007 19:40:54 +1000 Subject: [Pythonmac-SIG] py2app dynamically loading .so plugins Message-ID: <87F17D91-1D24-45EB-8151-B42644D0AD94@utas.edu.au> Hi, I'm trying to build a py2app application which uses the C++ openscenegraph libraries with some swig based wrappers. Openscenegraph has a module osgDB, which dynamically loads a bunch of plugins (.so) files for reading and writing different types of files. I have a simple test application which loads a data file cow.osg and displays it in a viewer. I run py2applet --make-setup osgtest.py cow.osg -frameworks osgdb_osg.so everything seems to work fine all the appropriate modules seem to be loaded and I can definitely see the osgdb_osg.so file in the Frameworks folder in the dist file. When I run the application the viewer starts up, but no cow appears. The console shows Warning: Could not find plugin to read objects from file "cow.osg". In case I got the wrong plugin, I've manually copied in all of the plugin .so files into the Frameworks folder of the app, but still get the same message in the console. It appears that the c++ library libosgDB.dylib isn't finding the .so files. Any ideas appreciated -Bill Hart -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20070408/635bf0ad/attachment.htm From bob at redivi.com Sun Apr 8 19:53:57 2007 From: bob at redivi.com (Bob Ippolito) Date: Sun, 8 Apr 2007 10:53:57 -0700 Subject: [Pythonmac-SIG] py2app dynamically loading .so plugins In-Reply-To: <87F17D91-1D24-45EB-8151-B42644D0AD94@utas.edu.au> References: <87F17D91-1D24-45EB-8151-B42644D0AD94@utas.edu.au> Message-ID: <6a36e7290704081053s1d248280gb3d6043bbc206fd4@mail.gmail.com> On 4/8/07, Bill Hart wrote: > Hi, > > I'm trying to build a py2app application which uses the C++ openscenegraph > libraries with some swig based wrappers. Openscenegraph has a module osgDB, > which dynamically loads a bunch of plugins (.so) files for reading and > writing different types of files. > > I have a simple test application which loads a data file cow.osg and > displays it in a viewer. I run > > py2applet --make-setup osgtest.py cow.osg -frameworks osgdb_osg.so > > everything seems to work fine all the appropriate modules seem to be loaded > and I can definitely see the osgdb_osg.so file in the Frameworks folder in > the dist file. > > When I run the application the viewer starts up, but no cow appears. The > console shows > > Warning: Could not find plugin to read objects from file "cow.osg". > > In case I got the wrong plugin, I've manually copied in all of the plugin > .so files into the Frameworks folder of the app, but still get the same > message in the console. It appears that the c++ library libosgDB.dylib > isn't finding the .so files. Sounds like the Frameworks folder isn't the right place to put them. You'll have to ask someone familiar with OSG to see where they're supposed to be in the context of an application bundle. Might want to try the Resources folder.. -bob From fairwinds at eastlink.ca Sun Apr 8 22:41:54 2007 From: fairwinds at eastlink.ca (David Pratt) Date: Sun, 08 Apr 2007 17:41:54 -0300 Subject: [Pythonmac-SIG] Universal build bug - Undefined symbols and pythonmac? In-Reply-To: <45EECAC8.5020604@eastlink.ca> References: <4186BE5E-EE60-45CE-AC02-22D28BDC968E@samuelsmith.org> <509C0063-238D-42A8-9630-868D8815FEDF@samuelsmith.org> <6a36e7290703021302h4d9fcf5ek79e7c51e6c0bb15a@mail.gmail.com> <14D47C27-51A5-4AD2-A385-7FF3497E1BE3@samuelsmith.org> <589B2B46-B12F-43A8-97B9-22B16E4FB176@samuelsmith.org> <05A86462-C764-4407-8B90-545C1315CEFA@samuelsmith.org> <45EECAC8.5020604@eastlink.ca> Message-ID: <46195392.8050203@eastlink.ca> I have been getting the same undefined symbols when linking after compiling. On a few weeks back I posted on a problem building mod_python, now its pylucene - same problem. Crazy thing is I build the same pylucene version just before upgrading to 2.4.4 pythonmac without these problems. From mod_python build: ld: Undefined symbols: _fstatvfs referenced from Python expected to be defined in libSystem _lchown referenced from Python expected to be defined in libSystem _statvfs referenced from Python expected to be defined in libSystem apxs:Error: Command failed with rc=65536 . make[1]: *** [mod_python.so] Error 1 make: *** [do_dso] Error 2 From pylucene build: ld: Undefined symbols: _fstatvfs referenced from Python expected to be defined in libSystem _lchown referenced from Python expected to be defined in libSystem _statvfs referenced from Python expected to be defined in libSystem gmake: *** [release/_PyLucene.so] Error 1 I have googled to see what more I can find and there are others with this issue but maybe it is the fact that folks are doing infrequent software builds that is leaving this problem under the surface. Does any one have any suggestions. All seemed good when I was on the PPC pythonmac at 2.4.3 Regards, David From bob at redivi.com Sun Apr 8 22:47:12 2007 From: bob at redivi.com (Bob Ippolito) Date: Sun, 8 Apr 2007 13:47:12 -0700 Subject: [Pythonmac-SIG] Universal build bug - Undefined symbols and pythonmac? In-Reply-To: <46195392.8050203@eastlink.ca> References: <4186BE5E-EE60-45CE-AC02-22D28BDC968E@samuelsmith.org> <509C0063-238D-42A8-9630-868D8815FEDF@samuelsmith.org> <6a36e7290703021302h4d9fcf5ek79e7c51e6c0bb15a@mail.gmail.com> <14D47C27-51A5-4AD2-A385-7FF3497E1BE3@samuelsmith.org> <589B2B46-B12F-43A8-97B9-22B16E4FB176@samuelsmith.org> <05A86462-C764-4407-8B90-545C1315CEFA@samuelsmith.org> <45EECAC8.5020604@eastlink.ca> <46195392.8050203@eastlink.ca> Message-ID: <6a36e7290704081347k53ef2cb9m2b642541e480a3c6@mail.gmail.com> On 4/8/07, David Pratt wrote: > I have been getting the same undefined symbols when linking after > compiling. On a few weeks back I posted on a problem building > mod_python, now its pylucene - same problem. Crazy thing is I build the > same pylucene version just before upgrading to 2.4.4 pythonmac without > these problems. > > From mod_python build: > > ld: Undefined symbols: > _fstatvfs referenced from Python expected to be defined in libSystem > _lchown referenced from Python expected to be defined in libSystem > _statvfs referenced from Python expected to be defined in libSystem > apxs:Error: Command failed with rc=65536 > . > make[1]: *** [mod_python.so] Error 1 > make: *** [do_dso] Error 2 > > From pylucene build: > > ld: Undefined symbols: > _fstatvfs referenced from Python expected to be defined in libSystem > _lchown referenced from Python expected to be defined in libSystem > _statvfs referenced from Python expected to be defined in libSystem > gmake: *** [release/_PyLucene.so] Error 1 > > I have googled to see what more I can find and there are others with > this issue but maybe it is the fact that folks are doing infrequent > software builds that is leaving this problem under the surface. Does any > one have any suggestions. > > All seemed good when I was on the PPC pythonmac at 2.4.3 The version of OS X you're using is probably relevant. -bob From fairwinds at eastlink.ca Sun Apr 8 23:33:02 2007 From: fairwinds at eastlink.ca (David Pratt) Date: Sun, 08 Apr 2007 18:33:02 -0300 Subject: [Pythonmac-SIG] Universal build bug - Undefined symbols and pythonmac? In-Reply-To: <6a36e7290704081347k53ef2cb9m2b642541e480a3c6@mail.gmail.com> References: <4186BE5E-EE60-45CE-AC02-22D28BDC968E@samuelsmith.org> <509C0063-238D-42A8-9630-868D8815FEDF@samuelsmith.org> <6a36e7290703021302h4d9fcf5ek79e7c51e6c0bb15a@mail.gmail.com> <14D47C27-51A5-4AD2-A385-7FF3497E1BE3@samuelsmith.org> <589B2B46-B12F-43A8-97B9-22B16E4FB176@samuelsmith.org> <05A86462-C764-4407-8B90-545C1315CEFA@samuelsmith.org> <45EECAC8.5020604@eastlink.ca> <46195392.8050203@eastlink.ca> <6a36e7290704081347k53ef2cb9m2b642541e480a3c6@mail.gmail.com> Message-ID: <46195F8E.2000607@eastlink.ca> Hi Bob. My apologies. I am using 10.3.9. If you require any further details, please let me know. I use this mac for development and this is really not good. I have ordered a copy of 10.4.9 that I hope will be arriving within the week to try but I am on a PPC. I scanned the list quickly and noticed another post from someone a while back. from Stephan Werner 4/07/06 /usr/bin/ld: Undefined symbols: _fstatvfs referenced from Python expected to be defined in libSystem _lchown referenced from Python expected to be defined in libSystem _statvfs referenced from Python expected to be defined in libSystem This happens only for the PPC part of my UB application, it seems to link the i386 part just fine. I am using the 10.3.9 SDK for the PPC side, 10.4u for i386. Do I need to link against the 10.4u SDK on both sides? I'd not be too happy about doing that, since I want to make sure the app runs perfeclty on 10.3.9/PPC. Googling I see others with posts to different software lists for the software they are trying to build. Regards, David Bob Ippolito wrote: > On 4/8/07, David Pratt wrote: >> I have been getting the same undefined symbols when linking after >> compiling. On a few weeks back I posted on a problem building >> mod_python, now its pylucene - same problem. Crazy thing is I build the >> same pylucene version just before upgrading to 2.4.4 pythonmac without >> these problems. >> >> From mod_python build: >> >> ld: Undefined symbols: >> _fstatvfs referenced from Python expected to be defined in libSystem >> _lchown referenced from Python expected to be defined in libSystem >> _statvfs referenced from Python expected to be defined in libSystem >> apxs:Error: Command failed with rc=65536 >> . >> make[1]: *** [mod_python.so] Error 1 >> make: *** [do_dso] Error 2 >> >> From pylucene build: >> >> ld: Undefined symbols: >> _fstatvfs referenced from Python expected to be defined in libSystem >> _lchown referenced from Python expected to be defined in libSystem >> _statvfs referenced from Python expected to be defined in libSystem >> gmake: *** [release/_PyLucene.so] Error 1 >> >> I have googled to see what more I can find and there are others with >> this issue but maybe it is the fact that folks are doing infrequent >> software builds that is leaving this problem under the surface. Does any >> one have any suggestions. >> >> All seemed good when I was on the PPC pythonmac at 2.4.3 > > The version of OS X you're using is probably relevant. > > -bob > From bob at redivi.com Mon Apr 9 06:59:22 2007 From: bob at redivi.com (Bob Ippolito) Date: Sun, 8 Apr 2007 21:59:22 -0700 Subject: [Pythonmac-SIG] Universal build bug - Undefined symbols and pythonmac? In-Reply-To: <46195F8E.2000607@eastlink.ca> References: <4186BE5E-EE60-45CE-AC02-22D28BDC968E@samuelsmith.org> <509C0063-238D-42A8-9630-868D8815FEDF@samuelsmith.org> <6a36e7290703021302h4d9fcf5ek79e7c51e6c0bb15a@mail.gmail.com> <14D47C27-51A5-4AD2-A385-7FF3497E1BE3@samuelsmith.org> <589B2B46-B12F-43A8-97B9-22B16E4FB176@samuelsmith.org> <05A86462-C764-4407-8B90-545C1315CEFA@samuelsmith.org> <45EECAC8.5020604@eastlink.ca> <46195392.8050203@eastlink.ca> <6a36e7290704081347k53ef2cb9m2b642541e480a3c6@mail.gmail.com> <46195F8E.2000607@eastlink.ca> Message-ID: <6a36e7290704082159y63000506wf1cd974ffb6f38f@mail.gmail.com> I'm pretty sure that 10.4 would fix this. 10.3.9 isn't really equipped to build extensions for a universal Python (it can only build the PPC part). It runs them fine, but it can't build stuff properly because the Xcode is too old. -bob On 4/8/07, David Pratt wrote: > Hi Bob. My apologies. I am using 10.3.9. If you require any further > details, please let me know. I use this mac for development and this is > really not good. I have ordered a copy of 10.4.9 that I hope will be > arriving within the week to try but I am on a PPC. > > I scanned the list quickly and noticed another post from someone a while > back. > > from Stephan Werner 4/07/06 > > /usr/bin/ld: Undefined symbols: > _fstatvfs referenced from Python expected to be defined in libSystem > _lchown referenced from Python expected to be defined in libSystem > _statvfs referenced from Python expected to be defined in libSystem > > This happens only for the PPC part of my UB application, it seems to > link the i386 part just fine. I am using the 10.3.9 SDK for the PPC > side, 10.4u for i386. Do I need to link against the 10.4u SDK on both > sides? I'd not be too happy about doing that, since I want to make > sure the app runs perfeclty on 10.3.9/PPC. > > Googling I see others with posts to different software lists for the > software they are trying to build. > > Regards, > David > > > Bob Ippolito wrote: > > On 4/8/07, David Pratt wrote: > >> I have been getting the same undefined symbols when linking after > >> compiling. On a few weeks back I posted on a problem building > >> mod_python, now its pylucene - same problem. Crazy thing is I build the > >> same pylucene version just before upgrading to 2.4.4 pythonmac without > >> these problems. > >> > >> From mod_python build: > >> > >> ld: Undefined symbols: > >> _fstatvfs referenced from Python expected to be defined in libSystem > >> _lchown referenced from Python expected to be defined in libSystem > >> _statvfs referenced from Python expected to be defined in libSystem > >> apxs:Error: Command failed with rc=65536 > >> . > >> make[1]: *** [mod_python.so] Error 1 > >> make: *** [do_dso] Error 2 > >> > >> From pylucene build: > >> > >> ld: Undefined symbols: > >> _fstatvfs referenced from Python expected to be defined in libSystem > >> _lchown referenced from Python expected to be defined in libSystem > >> _statvfs referenced from Python expected to be defined in libSystem > >> gmake: *** [release/_PyLucene.so] Error 1 > >> > >> I have googled to see what more I can find and there are others with > >> this issue but maybe it is the fact that folks are doing infrequent > >> software builds that is leaving this problem under the surface. Does any > >> one have any suggestions. > >> > >> All seemed good when I was on the PPC pythonmac at 2.4.3 > > > > The version of OS X you're using is probably relevant. > > > > -bob > > > From ronaldoussoren at mac.com Mon Apr 9 10:22:43 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 9 Apr 2007 10:22:43 +0200 Subject: [Pythonmac-SIG] Universal build bug - Undefined symbols and pythonmac? In-Reply-To: <6a36e7290704082159y63000506wf1cd974ffb6f38f@mail.gmail.com> References: <4186BE5E-EE60-45CE-AC02-22D28BDC968E@samuelsmith.org> <509C0063-238D-42A8-9630-868D8815FEDF@samuelsmith.org> <6a36e7290703021302h4d9fcf5ek79e7c51e6c0bb15a@mail.gmail.com> <14D47C27-51A5-4AD2-A385-7FF3497E1BE3@samuelsmith.org> <589B2B46-B12F-43A8-97B9-22B16E4FB176@samuelsmith.org> <05A86462-C764-4407-8B90-545C1315CEFA@samuelsmith.org> <45EECAC8.5020604@eastlink.ca> <46195392.8050203@eastlink.ca> <6a36e7290704081347k53ef2cb9m2b642541e480a3c6@mail.gmail.com> <46195F8E.2000607@eastlink.ca> <6a36e7290704082159y63000506wf1cd974ffb6f38f@mail.gmail.com> Message-ID: On 9 Apr, 2007, at 6:59, Bob Ippolito wrote: > I'm pretty sure that 10.4 would fix this. 10.3.9 isn't really equipped > to build extensions for a universal Python (it can only build the PPC > part). It runs them fine, but it can't build stuff properly because > the Xcode is too old. You can't build universal binaries on 10.3.9, but I'd expect that you can build ppc-only extensions on 10.3.9 as long as you don't explictly link to Python.framework. Adding MACOSX_DEPLOYMENT_TARGET=10.3 to environment before linking might help as well (the symbols that give link errors are weakly linked which isn't supported on the default deployment target). Ronald > > -bob > > On 4/8/07, David Pratt wrote: >> Hi Bob. My apologies. I am using 10.3.9. If you require any further >> details, please let me know. I use this mac for development and >> this is >> really not good. I have ordered a copy of 10.4.9 that I hope will be >> arriving within the week to try but I am on a PPC. >> >> I scanned the list quickly and noticed another post from someone a >> while >> back. >> >> from Stephan Werner 4/07/06 >> >> /usr/bin/ld: Undefined symbols: >> _fstatvfs referenced from Python expected to be defined in libSystem >> _lchown referenced from Python expected to be defined in libSystem >> _statvfs referenced from Python expected to be defined in libSystem >> >> This happens only for the PPC part of my UB application, it seems to >> link the i386 part just fine. I am using the 10.3.9 SDK for the PPC >> side, 10.4u for i386. Do I need to link against the 10.4u SDK on both >> sides? I'd not be too happy about doing that, since I want to make >> sure the app runs perfeclty on 10.3.9/PPC. >> >> Googling I see others with posts to different software lists for the >> software they are trying to build. >> >> Regards, >> David >> >> >> Bob Ippolito wrote: >>> On 4/8/07, David Pratt wrote: >>>> I have been getting the same undefined symbols when linking after >>>> compiling. On a few weeks back I posted on a problem building >>>> mod_python, now its pylucene - same problem. Crazy thing is I >>>> build the >>>> same pylucene version just before upgrading to 2.4.4 pythonmac >>>> without >>>> these problems. >>>> >>>> From mod_python build: >>>> >>>> ld: Undefined symbols: >>>> _fstatvfs referenced from Python expected to be defined in >>>> libSystem >>>> _lchown referenced from Python expected to be defined in libSystem >>>> _statvfs referenced from Python expected to be defined in libSystem >>>> apxs:Error: Command failed with rc=65536 >>>> . >>>> make[1]: *** [mod_python.so] Error 1 >>>> make: *** [do_dso] Error 2 >>>> >>>> From pylucene build: >>>> >>>> ld: Undefined symbols: >>>> _fstatvfs referenced from Python expected to be defined in >>>> libSystem >>>> _lchown referenced from Python expected to be defined in libSystem >>>> _statvfs referenced from Python expected to be defined in libSystem >>>> gmake: *** [release/_PyLucene.so] Error 1 >>>> >>>> I have googled to see what more I can find and there are others >>>> with >>>> this issue but maybe it is the fact that folks are doing infrequent >>>> software builds that is leaving this problem under the surface. >>>> Does any >>>> one have any suggestions. >>>> >>>> All seemed good when I was on the PPC pythonmac at 2.4.3 >>> >>> The version of OS X you're using is probably relevant. >>> >>> -bob >>> >> > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070409/5e6f7033/attachment-0001.bin From zbir at urbanape.com Mon Apr 9 14:48:13 2007 From: zbir at urbanape.com (Zachery Bir) Date: Mon, 9 Apr 2007 08:48:13 -0400 Subject: [Pythonmac-SIG] py2app: Adding additional frameworks to setup.py? Message-ID: <934F9730-1683-44E4-878F-DD0B567384F0@urbanape.com> I might have missed it in the docs, but is there a way I can add frameworks to be bundled in the setup.py, rather than on the command line? Everything that has to get added explicitly on the command line is one more thing I'm likely to forget when releases don't happen every other day :^) Zac From zbir at urbanape.com Mon Apr 9 15:37:08 2007 From: zbir at urbanape.com (Zachery Bir) Date: Mon, 9 Apr 2007 09:37:08 -0400 Subject: [Pythonmac-SIG] py2app: Adding additional frameworks to setup.py? In-Reply-To: <934F9730-1683-44E4-878F-DD0B567384F0@urbanape.com> References: <934F9730-1683-44E4-878F-DD0B567384F0@urbanape.com> Message-ID: <911B28F6-AE7E-439B-9B56-10E27AA18FCF@urbanape.com> On Apr 9, 2007, at 8:48 AM, Zachery Bir wrote: > I might have missed it in the docs, but is there a way I can add > frameworks to be bundled in the setup.py, rather than on the command > line? Everything that has to get added explicitly on the command line > is one more thing I'm likely to forget when releases don't happen > every other day :^) Urgh. Replying to myself. Would it be like this? setup( app=['MyApplication.py'], options=dict(py2app=dict( frameworks=['One.framework','Two.framework'], )), ) Zac From fairwinds at eastlink.ca Mon Apr 9 16:04:20 2007 From: fairwinds at eastlink.ca (David Pratt) Date: Mon, 09 Apr 2007 11:04:20 -0300 Subject: [Pythonmac-SIG] Universal build bug - Undefined symbols and pythonmac? In-Reply-To: References: <4186BE5E-EE60-45CE-AC02-22D28BDC968E@samuelsmith.org> <509C0063-238D-42A8-9630-868D8815FEDF@samuelsmith.org> <6a36e7290703021302h4d9fcf5ek79e7c51e6c0bb15a@mail.gmail.com> <14D47C27-51A5-4AD2-A385-7FF3497E1BE3@samuelsmith.org> <589B2B46-B12F-43A8-97B9-22B16E4FB176@samuelsmith.org> <05A86462-C764-4407-8B90-545C1315CEFA@samuelsmith.org> <45EECAC8.5020604@eastlink.ca> <46195392.8050203@eastlink.ca> <6a36e7290704081347k53ef2cb9m2b642541e480a3c6@mail.gmail.com> <46195F8E.2000607@eastlink.ca> <6a36e7290704082159y63000506wf1cd974ffb6f38f@mail.gmail.com> Message-ID: <461A47E4.7000702@eastlink.ca> Hi. Many thanks for your reply. I set environment var of MACOSX_DEPLOYMENT_TARGET to 10.3 but no change in situation unfortunately. I wonder if I should use mac ports version of python in the short term - it should build on the PPC alright but it does not seem up to date since I don't see a 2.4.4 available. I don't know what it is going to do to with Frameworks either and I don't really want a bunch of side effects on my system when I upgrade to 10.4 I am hoping this will resolve with the os upgrade and that I am not talking about a new mac right away because I am on PPC - I can't stop working for a week waiting for this either. I am all of sudden happy I did not put my money on the greatest G5 PPC hardware - it would have been a huge mistake. Any other alternatives? BTW, my original reason for ordering 10.4 had little to do with the ui improvements in 10.4 - in fact, it was the decision by mac not to release the 1.5 JDK on 10.3. I see releases for Windows98 - grumble, grumble :-( Regards, David Ronald Oussoren wrote: > > On 9 Apr, 2007, at 6:59, Bob Ippolito wrote: > >> I'm pretty sure that 10.4 would fix this. 10.3.9 isn't really equipped >> to build extensions for a universal Python (it can only build the PPC >> part). It runs them fine, but it can't build stuff properly because >> the Xcode is too old. > > You can't build universal binaries on 10.3.9, but I'd expect that you > can build ppc-only extensions on 10.3.9 as long as you don't explictly > link to Python.framework. Adding MACOSX_DEPLOYMENT_TARGET=10.3 to > environment before linking might help as well (the symbols that give > link errors are weakly linked which isn't supported on the default > deployment target). > > Ronald > >> >> -bob >> >> On 4/8/07, David Pratt wrote: >>> Hi Bob. My apologies. I am using 10.3.9. If you require any further >>> details, please let me know. I use this mac for development and this is >>> really not good. I have ordered a copy of 10.4.9 that I hope will be >>> arriving within the week to try but I am on a PPC. >>> >>> I scanned the list quickly and noticed another post from someone a while >>> back. >>> >>> from Stephan Werner 4/07/06 >>> >>> /usr/bin/ld: Undefined symbols: >>> _fstatvfs referenced from Python expected to be defined in libSystem >>> _lchown referenced from Python expected to be defined in libSystem >>> _statvfs referenced from Python expected to be defined in libSystem >>> >>> This happens only for the PPC part of my UB application, it seems to >>> link the i386 part just fine. I am using the 10.3.9 SDK for the PPC >>> side, 10.4u for i386. Do I need to link against the 10.4u SDK on both >>> sides? I'd not be too happy about doing that, since I want to make >>> sure the app runs perfeclty on 10.3.9/PPC. >>> >>> Googling I see others with posts to different software lists for the >>> software they are trying to build. >>> >>> Regards, >>> David >>> >>> >>> Bob Ippolito wrote: >>>> On 4/8/07, David Pratt wrote: >>>>> I have been getting the same undefined symbols when linking after >>>>> compiling. On a few weeks back I posted on a problem building >>>>> mod_python, now its pylucene - same problem. Crazy thing is I build >>>>> the >>>>> same pylucene version just before upgrading to 2.4.4 pythonmac without >>>>> these problems. >>>>> >>>>> From mod_python build: >>>>> >>>>> ld: Undefined symbols: >>>>> _fstatvfs referenced from Python expected to be defined in libSystem >>>>> _lchown referenced from Python expected to be defined in libSystem >>>>> _statvfs referenced from Python expected to be defined in libSystem >>>>> apxs:Error: Command failed with rc=65536 >>>>> . >>>>> make[1]: *** [mod_python.so] Error 1 >>>>> make: *** [do_dso] Error 2 >>>>> >>>>> From pylucene build: >>>>> >>>>> ld: Undefined symbols: >>>>> _fstatvfs referenced from Python expected to be defined in libSystem >>>>> _lchown referenced from Python expected to be defined in libSystem >>>>> _statvfs referenced from Python expected to be defined in libSystem >>>>> gmake: *** [release/_PyLucene.so] Error 1 >>>>> >>>>> I have googled to see what more I can find and there are others with >>>>> this issue but maybe it is the fact that folks are doing infrequent >>>>> software builds that is leaving this problem under the surface. >>>>> Does any >>>>> one have any suggestions. >>>>> >>>>> All seemed good when I was on the PPC pythonmac at 2.4.3 >>>> >>>> The version of OS X you're using is probably relevant. >>>> >>>> -bob >>>> >>> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > From kw at codebykevin.com Wed Apr 11 16:23:55 2007 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 11 Apr 2007 10:23:55 -0400 Subject: [Pythonmac-SIG] Update list of Mac applications using Python Message-ID: <461CEF7B.3000905@codebykevin.com> Hi all, In addition to putting together some updates for the official MacPython documentation (still in progress, but to be submitted to the tracker soon), I also want to do some updates to the MacPython wiki, now hosted at http://wiki.python.org/moin/MacPython. An area of particular interest is the list of Mac applications that are built with Python, or integrate Python in some significant way: http://wiki.python.org/moin/MacPython/MacSoftwareUsingPython The list has been updated by a couple of folks recently, but I don't believe this is the entire list of Python applications available. My criteria for adding an app is as follows: the app is written in Python or makes extensive use of Python as a scripting language, it is Mac-only or has a dedicated, supported Mac-native/Aqua build (i.e. bundled with py2app, distributed in a DMG, has a standard Mac icon, etc.), and are under current development (a lot of the apps currently listed at the wiki do not appear have been updated for a long time, or at least the listings haven't). Note that I don't want to limit the list to PyObjC apps--wxPython, PyQt, and Tkinter applications should also be listed if they fit these criteria. Here are a few I think should be added: Brian Lenihan's port of PySol to OS X--now hosted (according to his webpage) at http://pysolfc.sourceforge.net/. I gather that Brian's work has been merged into a full-blown, cross-platform project that is a fork of PySol. The new version of PySol makes use of new Tk libraries (Tile) that greatly improve the look and feel under Aqua. Russell Owen's TUI (http://www.apo.nmsu.edu/35m_operations/TUI/), a Tkinter GUI for the APO 3.5m telescope. Goombah by Emergent Software, a PyObjC commercial application that integrates with iTunes. http://www.gombah.com. I see one application I already knew about, Checkout, has already been added; another, Find It!, is new to me. I'll be adding one of my own applications written in Python/Tkinter as well. If anyone can think of other apps to add to this list, I would appreciate it--I'll handle actually adding them to the wiki since most folks don't have time to do that. Again, this list should include PyObjC apps, and wxPython, Tk, and PyQt apps with dedicated Mac builds/versions. Also, if anyone could let me know the current status of any of these applications, I would appreciate it: Drawbot (is it current?) RegExPlor RestEdit TomatoTorrent: Looks current, but what's the difference between this and BitTorrent? Isn't there an official Mac build written with one of the standard Mac GUI toolkits? (Sorry, not a BitTorrent user) FontLab Thanks! -- Kevin Walzer Code by Kevin http://www.codebykevin.com From vivacarlie at gmail.com Wed Apr 11 16:26:36 2007 From: vivacarlie at gmail.com (Nehemiah Dacres) Date: Wed, 11 Apr 2007 09:26:36 -0500 Subject: [Pythonmac-SIG] Suggested revisions for MacPython documentation section 1--please review In-Reply-To: References: <461573F8.6000100@codebykevin.com> Message-ID: <65fadfc30704110726m27efbe3an8077d6d42a8d0c31@mail.gmail.com> right, what Oussoren said, and for appscript, direct them to the pyosa script documentation.You can also mention the more mac like alternatives to the unix commandline tools like aquamacs and macvim. subthaedit is also a good editor to mention. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20070411/04bf3ea9/attachment.htm From kw at codebykevin.com Wed Apr 11 16:39:40 2007 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 11 Apr 2007 10:39:40 -0400 Subject: [Pythonmac-SIG] Suggested revisions for MacPython documentation section 1--please review In-Reply-To: References: <461573F8.6000100@codebykevin.com> Message-ID: <461CF32C.4010803@codebykevin.com> Thanks for the help! I'll fold these suggestions in to the new docs and submit them to the tracker shortly. Ronald Oussoren wrote: > > On 6 Apr, 2007, at 0:11, Kevin Walzer wrote: > >> I've taken some time to prepare a draft update to section 1 of the >> MacPython documentation that ships with the standard Python 2.5 >> distribution: the anchor link for this is >> file:///Library/Frameworks/Python.framework/Versions/2.5/Resources/English.lproj/Documentation/mac/using.html. >> >> >> The current docs are obsolete, referring to the old PythonIDE, >> PackageManager, bundlebuilder/build as applet, etc. I've taken some time >> to revise them to reflect the current state of Python on the Mac, at >> least in terms of "getting started." I've added stuff on downloading >> from Python.org, IDLE as the standard editor with MacPython, a brief >> intro on GUI toolkits, py2app, and so on. >> >> I'm not going to touch the other documentation, i.e. the Carbon modules, >> as I'm not knowledgable enough about the Carbon bits. (I would suggest >> replacing all the OSA bits with a reference to appscript, but I'm not >> going to write that part myself.) I am wondering, however, if some >> additional sections to the Mac library could simply be lifted from >> docstrings and added? Running pydoc shows stuff like plistlib, >> Terminal(?) and other stuff that isn't included in the standard >> documentation. >> >> Could someone review the text below and let me know what should be >> changed? Also, what is the best way to get this submitted/committed for >> the next point release of Python 2.5.x? I'm still learning that >> process. :-) > > The next point release (2.5.1) is impossible to get into, that is in a > complete freeze. 2.5.2 should be possible. > > File a patch or bug at the SF bugtracker for python when your done (in > the documentation category) and let me know the bug number, that way I > can at least add a comment to say that these changes should go in. > > The source of the documentation are latex files in the subdirectory > Doc/mac. Uploading your changes as a patch to the documentation should > expedite things, but otherwise several of the documentation maintainers > have publicly stated that they will translate your changes into latex > for you. > > Ronald > >> >> Thanks, >> Kevin >> >> ------ >> >> "Using MacPython on a Macintosh" >> >> 1.1, Getting and Installing MacPython >> >> Mac OS X 10.4 comes with Python 2.3 pre-installed by Apple. However, you >> are encouraged to install the most recent of version of Python from the >> Python website (http://www.python.org). A "universal binary" build of >> Python 2.5, which runs natively on the Mac's new Intel and legacy PPC >> CPU's, is available there. (A separate, freeware commercial build of >> Python for OS X is available from http:///www.activestate.com.) > > I don't think you should mention ActiveState's python distribution, that > just confuses things. Why mention ActiveState but not fink or macports? > >> >> What you get after installing is a number of things: >> >> * A MacPython 2.5 folder in your Applications folder. In here you find >> IDLE, the development environment that is a standard part of official >> Python distributions; PythonLauncher, which handles double-clicking >> Python scripts from the Finder; and the "Build Applet" tool, which >> allows you to package Python scripts as standalone applications on your >> system. >> >> * A fairly standard Unix commandline Python interpreter in >> /usr/local/bin/python, but without the usual /usr/local/lib/python. > > /usr/local/bin/python is deprecated and only present for backward > compatiblity. The interpreter lives inside the framework and the binary > installer will update your shell profile to point to that location. > >> >> * A framework /Library/Frameworks/Python.framework, where all the action >> really is, but which you usually do not have to be aware of. > > That's not quite true. You'll be mightily surprised when using distutils > to install scripts and expect them to appear in /usr/local/bin. > >> >> To uninstall MacPython you can simply remove these three things. >> >> The Apple-provided build of Python is installed in >> /System/Library/Frameworks/Python.framework and /usr/bin/python, >> respectively. You should in principle never modify or delete these, as >> they are Apple-controlled and may be used by Apple- or third-party >> software. > > s/may be/are/ > >> >> IDLE includes a help menu that allows you to access Python >> documentation. If you are completely new to Python you should start >> reading the IDE introduction in that document. >> >> If you are familiar with Python on other Unix platforms you should read >> the section on running Python scripts from the Unix shell. >> >> 1.1.1 How to run a Python script >> >> Your best way to get started with Python on Mac OS X is through the IDLE >> integrated development environment, see section 1.2 and use the Help >> menu when the IDE is running. >> >> If you want to run Python scripts from the Terminal window command line >> or from the Finder you first need an editor to create your script. Mac >> OS X comes with a number of standard Unix command line editors, vim and >> emacs among them. If you want a more Mac-like editor BBEdit or >> TextWrangler from Bare Bones Software (see >> http://www.barebones.com/products/bbedit/index.shtml) are good choices. > > TextMate seems to be very popular these days and appears to be a much > better OSX citizen than BBEdit (at least the last time I look at both of > these, which for BBEdit is several years ago). > > >> >> To run your script from the Terminal window you must make sure that >> /usr/local/bin is in your shell search path. >> >> To run your script from the Finder you have two options: >> >> * Drag it to PythonLauncher >> * Select PythonLauncher as the default application to open your script >> (or any .py script) through the finder Info window and double-click it. >> PythonLauncher has various preferences to control how your script is >> launched. Option-dragging allows you to change these for one invocation, >> or use its Preferences menu to change things globally. >> >> 1.1.2 Running scripts with a GUI >> >> With older versions of Python, there is one Mac OS X quirk that you need >> to be aware of: programs that talk to the Aqua window manager (in other >> words, anything that has a GUI) need to be run in a special way. Use >> pythonw instead of python to start such scripts. >> >> With Python 2.5, you can use either python or pythonw. >> >> 1.1.3 configuration >> >> MacPython honours all standard Unix environment variables such as >> PYTHONPATH, but setting these variables for programs started from the >> Finder is non-standard as the Finder does not read your .profile or >> .cshrc at startup. You need to create a file >> ~/.MacOSX/environment.plist. See Apple's Technical Document QA1067 for >> details. >> >> For more information on installation Python packages in MacPython, see >> section 1.3, "Installing Additional Python Packages." >> >> 1.2 The IDE >> >> MacPython ships with the standard IDLE development environment. A good >> introduction to using IDLE can be found at >> http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html. >> >> ***remove all 1.2.x subsections--they pertain to the obsolete >> PythonIDE*** >> >> >> 1.3 Installing Additional Python Packages >> >> There are several methods to install additional Python packages: >> >> * http://pythonmac.org/packages/ contains selected compiled packages for >> Python 2.5, 2.4, and 2.3. >> >> * Packages can be installed via the standard Python distutils mode >> ("python setup.py install"). >> >> * Many packages can also be installed via the setuptools extension. >> >> >> 1.4 GUI Programming on the Mac >> >> There are several options for building GUI applications on the Mac with >> Python. >> >> The standard Python GUI toolkit is tkinter, based on the cross-platform >> Tk toolkit (http://www.tcl.tk). An Aqua-native version of Tk is bundled >> with OS X by Apple, and the latest version can be downloaded and >> installed from http://www.activestate.com; it can also be built from >> source. >> >> wxPython is another popular cross-platform GUI toolkit that runs >> natively on Mac OS X. Packages and documentation are available from >> http://www.wxpython.org. >> >> PyObjC is a Mac-only Python binding to the Cocoa toolkit that ships with >> Mac OS X. Information on PyObjC is available from >> http://pybojc.sourceforge.net. > > I'm a bit biased of course but would like to see PyObjC as the first > item in the list, we are talking about python on the mac after all :-) > >> >> 1.4 Distributing Python Applications on the Mac >> >> The "Build Applet" tool that is placed in the MacPython 2.5 folder is >> fine for packaging small Python scripts on your own machine to run as a >> standard Mac application. This tool, however, is not robust enough to >> distribute Python applications to other users. >> >> The standard tool for deploying standalone Python applications on the >> Mac is py2app. More information on installing and using py2app can be >> found at http://undefined.org/python/#py2app. >> >> 1.5 Other Resources >> >> A useful resource for Python on the Mac is at the MacPython wiki: >> >> http://wiki.python.org/moin/MacPython > > > Over all: a good document. Could you please add a short section about > application scripting as well, with a reference to appscript? > > Ronald >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > -- Kevin Walzer Code by Kevin http://www.codebykevin.com From ericleven at gmail.com Thu Apr 12 03:25:53 2007 From: ericleven at gmail.com (Eric Leven) Date: Wed, 11 Apr 2007 18:25:53 -0700 Subject: [Pythonmac-SIG] Python interpreter in the Terminal Message-ID: Noob question? No doubt. But I've asked around, and no one seems to know. If anyone can help, I'd appreciate it. Using the Python (2.3?) interpreter in OS 10.4 in the Terminal, I lose access to any shell keyboard shortcuts, for example, the arrow keys, ctrl-a, ctrl-e, etc. Instead I get odd control characters, and I end up doing a lot of painful cutting and pasting. I don't have this problem in Linux. Both machines are calling python from a tcsh shell. Is there a simple solution? Am I the only one running python from the terminal? Thanks a lot, -eric From ronaldoussoren at mac.com Thu Apr 12 11:22:28 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 12 Apr 2007 11:22:28 +0200 Subject: [Pythonmac-SIG] Python interpreter in the Terminal In-Reply-To: References: Message-ID: On 12 Apr, 2007, at 3:25, Eric Leven wrote: > Noob question? No doubt. But I've asked around, and no one seems to > know. If anyone can help, I'd appreciate it. > > Using the Python (2.3?) interpreter in OS 10.4 in the Terminal, I lose > access to any shell keyboard shortcuts, for example, the arrow keys, > ctrl-a, ctrl-e, etc. Instead I get odd control characters, and I end > up doing a lot of painful cutting and pasting. I don't have this > problem in Linux. Both machines are calling python from a tcsh shell. > > Is there a simple solution? Am I the only one running python from > the terminal? Install the readline extension, one way to this is the package at: http://www.python.org/pypi/readline (you'll have to build from source if you're running an intel mac). Ronald From Chris.Barker at noaa.gov Thu Apr 12 18:14:11 2007 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 12 Apr 2007 09:14:11 -0700 Subject: [Pythonmac-SIG] [Fwd: Re: Python interpreter in the Terminal] Message-ID: <461E5AD3.4020802@noaa.gov> Sorry Ronald, this should have gone only to the list. I just can't get used to that darn "reply all" thing.... -------- Original Message -------- Subject: Re: [Pythonmac-SIG] Python interpreter in the Terminal Date: Thu, 12 Apr 2007 09:12:45 -0700 From: Christopher Barker To: Ronald Oussoren Ronald Oussoren wrote: > Install the readline extension, one way to this is the package at: > http://www.python.org/pypi/readline Or install a new python -- there are many benefits to this anyway: http://pythonmac.org/packages -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From ronaldoussoren at mac.com Fri Apr 13 07:50:56 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 13 Apr 2007 07:50:56 +0200 Subject: [Pythonmac-SIG] [Fwd: Re: Python interpreter in the Terminal] In-Reply-To: <461E5AD3.4020802@noaa.gov> References: <461E5AD3.4020802@noaa.gov> Message-ID: On 12 Apr, 2007, at 18:14, Christopher Barker wrote: > Sorry Ronald, this should have gone only to the list. > > I just can't get used to that darn "reply all" thing.... > > -------- Original Message -------- > Subject: Re: [Pythonmac-SIG] Python interpreter in the Terminal > Date: Thu, 12 Apr 2007 09:12:45 -0700 > From: Christopher Barker > To: Ronald Oussoren > > Ronald Oussoren wrote: >> Install the readline extension, one way to this is the package at: >> http://www.python.org/pypi/readline > > Or install a new python -- there are many benefits to this anyway: Speaking of a new: python 2.5.1c1 is up on the website (at http:// www.python.org/download/releases/2.5.1/), but I don't think it was widely announced. Please test. I know of one issue with the mac build: I didn't have Tcl/Tk installed in /Library therefore Tkinter exclusively uses the system version of Tk. That will be fixed in the final build. Ronald From ronaldoussoren at mac.com Fri Apr 13 07:54:03 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 13 Apr 2007 07:54:03 +0200 Subject: [Pythonmac-SIG] Tkinter issue in 2.5 Message-ID: Does anyone know if Tcl/Tk 8.4.10 is particularly buggy? There's a bugreport on the python tracker that mentions a crash in IDLE with Tcl/Tk 8.4.10 that goes away when reverting to the default system version: https://sourceforge.net/tracker/? func=detail&atid=105470&aid=1621111&group_id=5470 Ronald From vip at avatar.com.au Fri Apr 13 09:12:42 2007 From: vip at avatar.com.au (David Worrall) Date: Fri, 13 Apr 2007 17:12:42 +1000 Subject: [Pythonmac-SIG] .so import bug python 2.3 vs 2.4 (++?) Message-ID: Hello all, OSX 2.4.9: A (largish) Xcode project compiled to a .so with the /System/Library python framework. The .so is produced and imports into python (2.3.4) When the whole process is repeated, replacing python 2.3.4 with 2.4.3 I get an >> ImportError: Inappropriate file type for dynamic loading can anyone shed any light on this for me please? (or just tell me what's gotta change :-) David _________________________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: www.canberra.edu.au/vc-forum/scrg From ronaldoussoren at mac.com Fri Apr 13 11:19:58 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 13 Apr 2007 02:19:58 -0700 Subject: [Pythonmac-SIG] .so import bug python 2.3 vs 2.4 (++?) In-Reply-To: References: Message-ID: On Friday, April 13, 2007, at 09:17AM, "David Worrall" wrote: >Hello all, >OSX 2.4.9: >A (largish) Xcode project compiled to a .so with the /System/Library >python framework. >The .so is produced and imports into python (2.3.4) > >When the whole process is repeated, replacing python 2.3.4 with 2.4.3 >I get an >>> ImportError: Inappropriate file type for dynamic loading > >can anyone shed any light on this for me please? >(or just tell me what's gotta change :-) What kind of object is the .so file you're building? You should build a bundle, not a dylib. That is file(1) should say "Mach-O bundle", not "Mach-O dynamically linked shared library". Ronald From kw at codebykevin.com Fri Apr 13 15:52:31 2007 From: kw at codebykevin.com (Kevin Walzer) Date: Fri, 13 Apr 2007 09:52:31 -0400 Subject: [Pythonmac-SIG] Tkinter issue in 2.5 In-Reply-To: References: Message-ID: <461F8B1F.40104@codebykevin.com> Ronald Oussoren wrote: > Does anyone know if Tcl/Tk 8.4.10 is particularly buggy? There's a > bugreport on the python tracker that mentions a crash in IDLE with > Tcl/Tk 8.4.10 that goes away when reverting to the default system > version: > > https://sourceforge.net/tracker/? > func=detail&atid=105470&aid=1621111&group_id=5470 > > Ronald > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > I don't think there's any particular problem with 8.4.10--I never had any problems with IDLE crashing with a Python 2.4.x/Tk 8.4.10 combination. Tk 8.4.10 is most likely PPC-only; could there be some obscure conflict between the universal Python tkinter.so and a PPC-only Tk? -- Kevin Walzer Code by Kevin http://www.codebykevin.com From kw at codebykevin.com Sun Apr 15 03:33:15 2007 From: kw at codebykevin.com (Kevin Walzer) Date: Sat, 14 Apr 2007 21:33:15 -0400 Subject: [Pythonmac-SIG] Update list of Mac applications using Python In-Reply-To: <461CEF7B.3000905@codebykevin.com> References: <461CEF7B.3000905@codebykevin.com> Message-ID: <462180DB.3090303@codebykevin.com> Kevin Walzer wrote: > Hi all, > > In addition to putting together some updates for the official MacPython > documentation (still in progress, but to be submitted to the tracker > soon), I also want to do some updates to the MacPython wiki, now hosted > at http://wiki.python.org/moin/MacPython. An area of particular interest > is the list of Mac applications that are built with Python, or integrate > Python in some significant way: > > http://wiki.python.org/moin/MacPython/MacSoftwareUsingPython > I have updated the page above. Thanks to all for their suggestions. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From danthorpe at gmail.com Wed Apr 18 23:14:39 2007 From: danthorpe at gmail.com (Daniel Thorpe) Date: Wed, 18 Apr 2007 22:14:39 +0100 Subject: [Pythonmac-SIG] accessing iPhoto star rating through appscript? Message-ID: Hi everyone... Does anyone know if it's possible to access the star rating of a photo from iPhoto using appscript? After looking in the iPhoto dictionary and not seeng any reference to it, I have a feeling it is not exposed through AppleScript. If anyone has found a way to get the number of stars, I'd love to know! Cheers Dan From delza at livingcode.org Thu Apr 19 00:28:52 2007 From: delza at livingcode.org (Dethe Elza) Date: Wed, 18 Apr 2007 15:28:52 -0700 Subject: [Pythonmac-SIG] accessing iPhoto star rating through appscript? In-Reply-To: References: Message-ID: <6CD23DC5-B2E2-471D-90A8-6D80E95C04CD@livingcode.org> On 18-Apr-07, at 2:14 PM, Daniel Thorpe wrote: > Hi everyone... > > Does anyone know if it's possible to access the star rating of a > photo from iPhoto using appscript? After looking in the iPhoto > dictionary and not seeng any reference to it, I have a feeling it is > not exposed through AppleScript. > > If anyone has found a way to get the number of stars, I'd love to > know! You don't strictly need AppleScript for this (unless you want data that has been changed since iTunes was last started, while it is running). The ratings are stored in an XML file: ~/Music/iTunes/ iTunes Music Library.xml It's in plist format, so you can use plistlib (part of the standard library on OS X), or you can use the XML tool of your choice to parse the file and extract the ratings. Each track has a element containing keys and values. You'll be looking for Rating followed by 100 where the integer corresponds to the star rating. The rating appears to be 20 * # of stars (5 stars = 100, 4 stars = 80, etc.) Tracks which are not rated don't appear to have a Ratings key, so don't make assumptions about every song having that key. HTH --Dethe A miracle, even if it's a lousy miracle, is still a miracle. --Teller From delza at livingcode.org Thu Apr 19 02:00:42 2007 From: delza at livingcode.org (Dethe Elza) Date: Wed, 18 Apr 2007 17:00:42 -0700 Subject: [Pythonmac-SIG] accessing iPhoto star rating through appscript? In-Reply-To: References: Message-ID: <56D80974-D0B0-409E-AE2F-CF48899E7839@livingcode.org> Following up on my earlier reply, here is a script to print out all the star ratings: import plistlib, os tunes = plistlib.readPlist(os.path.expanduser('/~/Music/iTunes/iTunes Music Library.xml')) for track in tunes.Tracks.values(): if hasattr(track, 'Rating'): print '%s: %d stars' % (track.Name, track.Rating / 20) else: print '%s: not rated' % track.Name --Dethe "...coding isn't the poor handmaiden of design or analysis. Coding is where your fuzzy, comfortable ideas awaken in the harsh dawn of reality. It is where you learn what your computer can do. If you stop coding, you stop learning." Kent Beck, Smalltalk Best Practice Patterns From simon at brunningonline.net Thu Apr 19 11:13:01 2007 From: simon at brunningonline.net (Simon Brunning) Date: Thu, 19 Apr 2007 10:13:01 +0100 Subject: [Pythonmac-SIG] accessing iPhoto star rating through appscript? In-Reply-To: <6CD23DC5-B2E2-471D-90A8-6D80E95C04CD@livingcode.org> References: <6CD23DC5-B2E2-471D-90A8-6D80E95C04CD@livingcode.org> Message-ID: <8c7f10c60704190213r14e9f089m1d16783b65a0c1d8@mail.gmail.com> On 4/18/07, Dethe Elza wrote: > On 18-Apr-07, at 2:14 PM, Daniel Thorpe wrote: > > Does anyone know if it's possible to access the star rating of a > > photo from iPhoto using appscript? > You don't strictly need AppleScript for this (unless you want data > that has been changed since iTunes was last started, while it is > running). The ratings are stored in an XML file: ~/Music/iTunes/ > iTunes Music Library.xml Err, that's iTunes. The OP wanted iPhoto. -- Cheers, Simon B. simon at brunningonline.net http://www.brunningonline.net/simon/blog/ GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues From hengist.podd at virgin.net Thu Apr 19 13:11:49 2007 From: hengist.podd at virgin.net (has) Date: Thu, 19 Apr 2007 12:11:49 +0100 Subject: [Pythonmac-SIG] accessing iPhoto star rating through appscript? In-Reply-To: References: Message-ID: Daniel Thorpe wrote: > Does anyone know if it's possible to access the star rating of a > photo from iPhoto using appscript? After looking in the iPhoto > dictionary and not seeng any reference to it, I have a feeling it > is not exposed through AppleScript. Nope. The ratings widget doesn't appear to be accessible via GUI Scripting either. You could try filing a feature request. > If anyone has found a way to get the number of stars, I'd love to > know! You could try digging around in ~/Pictures/iPhoto Library/ AlbumData.xml, I guess, though it's not something I've done myself. HTH has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org http://appscript.sourceforge.net/objc-appscript.html From delza at livingcode.org Thu Apr 19 16:24:10 2007 From: delza at livingcode.org (Dethe Elza) Date: Thu, 19 Apr 2007 07:24:10 -0700 Subject: [Pythonmac-SIG] accessing iPhoto star rating through appscript? In-Reply-To: <8c7f10c60704190213r14e9f089m1d16783b65a0c1d8@mail.gmail.com> References: <6CD23DC5-B2E2-471D-90A8-6D80E95C04CD@livingcode.org> <8c7f10c60704190213r14e9f089m1d16783b65a0c1d8@mail.gmail.com> Message-ID: On 19-Apr-07, at 2:13 AM, Simon Brunning wrote: > Err, that's iTunes. The OP wanted iPhoto. Oops. Sorry 'bout that. My bad. There are a couple of differences besides file names. All the images appear to have a default rating of 0 and images have Captions rather than Names. Also, rating go from 0 to 5 rather than 0 to 100, so you don't have to divide to get stars. library = plistlib.readPlist(os.path.expanduser('~/Pictures/ iPhoto Library/AlbumData.xml')) for photo in library['Master Image List'].values(): if hasattr(photo, 'Rating') and photo.Rating > 0: print '%s: %d stars' % (photo.Caption, photo.Rating) How's that? --Dete I can't watch television without praying for nuclear holocaust. -- Bill Hicks From whenney at gmail.com Thu Apr 19 17:11:14 2007 From: whenney at gmail.com (Will Henney) Date: Thu, 19 Apr 2007 15:11:14 +0000 (UTC) Subject: [Pythonmac-SIG] accessing iPhoto star rating through appscript? References: <6CD23DC5-B2E2-471D-90A8-6D80E95C04CD@livingcode.org> <8c7f10c60704190213r14e9f089m1d16783b65a0c1d8@mail.gmail.com> Message-ID: Dethe Elza livingcode.org> writes: > library = plistlib.readPlist(os.path.expanduser('~/Pictures/ > iPhoto Library/AlbumData.xml')) > for photo in library['Master Image List'].values(): > if hasattr(photo, 'Rating') and photo.Rating > 0: > print '%s: %d stars' % (photo.Caption, photo.Rating) > > How's that? > Hi Dethe, Thanks for the example scripts! They work great if the comments only contain ascii characters, but I found I had to make a small modification to make it work with the captions in my database: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ import plistlib, os outputcodec = "latin-1" # or "utf-8", or "ascii", or .... library = plistlib.readPlist( os.path.expanduser('~/Pictures/iPhoto Library/AlbumData.xml')) for photo in library['Master Image List'].values(): if hasattr(photo, 'Rating') and photo.Rating > 0: try: thiscaption = photo.Caption.encode(outputcodec) except UnicodeEncodeError: thiscaption = "Cannot encode caption in codec %s" % outputcodec print '%s: %d stars' % (thiscaption, photo.Rating) +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ My initial try was to use "utf-8" as the output codec, but that wrote garbage characters when I ran it in Terminal.app - any idea why? Cheers Will From ronaldoussoren at mac.com Thu Apr 19 19:22:17 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 19 Apr 2007 19:22:17 +0200 Subject: [Pythonmac-SIG] accessing iPhoto star rating through appscript? In-Reply-To: References: <6CD23DC5-B2E2-471D-90A8-6D80E95C04CD@livingcode.org> <8c7f10c60704190213r14e9f089m1d16783b65a0c1d8@mail.gmail.com> Message-ID: <9186E64B-5CC3-4137-B3DE-522E07CE02C3@mac.com> On 19 Apr, 2007, at 17:11, Will Henney wrote: > Dethe Elza livingcode.org> writes: >> library = plistlib.readPlist(os.path.expanduser('~/Pictures/ >> iPhoto Library/AlbumData.xml')) >> for photo in library['Master Image List'].values(): >> if hasattr(photo, 'Rating') and photo.Rating > 0: >> print '%s: %d stars' % (photo.Caption, photo.Rating) >> >> How's that? >> > > Hi Dethe, > > Thanks for the example scripts! They work great if the comments > only contain > ascii characters, but I found I had to make a small modification to > make it work > with the captions in my database: > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > import plistlib, os > outputcodec = "latin-1" # or "utf-8", or "ascii", or .... > library = plistlib.readPlist( > os.path.expanduser('~/Pictures/iPhoto Library/AlbumData.xml')) > for photo in library['Master Image List'].values(): > if hasattr(photo, 'Rating') and photo.Rating > 0: > try: > thiscaption = photo.Caption.encode(outputcodec) > except UnicodeEncodeError: > thiscaption = "Cannot encode caption in codec %s" % outputcodec > print '%s: %d stars' % (thiscaption, photo.Rating) > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > My initial try was to use "utf-8" as the output codec, but that > wrote garbage > characters when I ran it in Terminal.app - any idea why? That's strange, I'd expect UTF-8 to work just fine (and it does on my machine). What's the Character Set Encoding in Terminal's Window Preferences (on the Display page)? Ronald > > Cheers > > Will > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070419/61e053c9/attachment.bin From gardenmadman at gmail.com Mon Apr 23 03:44:55 2007 From: gardenmadman at gmail.com (Ulysses Known) Date: Sun, 22 Apr 2007 21:44:55 -0400 Subject: [Pythonmac-SIG] easy_install question Message-ID: <1664c3b00704221844t1451fcflcecf60ea300a6f2c@mail.gmail.com> Hi, I just used easy_install to install a package on OSX 10.4.9 (MacBook Pro) and noted that the built egg has the following name: FOO-py2.5-macosx-10.3-fat.egg I looked inside the egg and yes, there are "fat" (PPC and Intel) shared objects. I tried looking through the PEAK website and the distutils docs, but there was nothing specific about how one might configure the build process on OSX. How do I configure easy install to build Intel only binaries for 10.4? From ronaldoussoren at mac.com Mon Apr 23 08:04:33 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 23 Apr 2007 08:04:33 +0200 Subject: [Pythonmac-SIG] easy_install question In-Reply-To: <1664c3b00704221844t1451fcflcecf60ea300a6f2c@mail.gmail.com> References: <1664c3b00704221844t1451fcflcecf60ea300a6f2c@mail.gmail.com> Message-ID: On 23 Apr, 2007, at 3:44, Ulysses Known wrote: > Hi, > > I just used easy_install to install a package on OSX 10.4.9 (MacBook > Pro) and noted that the built egg has the following name: > > FOO-py2.5-macosx-10.3-fat.egg > > I looked inside the egg and yes, there are "fat" (PPC and Intel) > shared objects. I tried looking through the PEAK website and the > distutils docs, but there was nothing specific about how one might > configure the build process on OSX. > > How do I configure easy install to build Intel only binaries for 10.4? Why do you want to do that? Anyway, you'll have to change the setup.py to build intel-only binaries. You have to add extra_link_args and and extra_compile_args to all, both of them ['-arch', 'i386']. Ronald > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070423/7934c2aa/attachment.bin From gardenmadman at gmail.com Mon Apr 23 14:46:08 2007 From: gardenmadman at gmail.com (Ulysses Known) Date: Mon, 23 Apr 2007 08:46:08 -0400 Subject: [Pythonmac-SIG] easy_install question In-Reply-To: References: <1664c3b00704221844t1451fcflcecf60ea300a6f2c@mail.gmail.com> Message-ID: <1664c3b00704230546r38b528e5naec3cdc53ee0493c@mail.gmail.com> On 4/23/07, Ronald Oussoren wrote: > On 23 Apr, 2007, at 3:44, Ulysses Known wrote: > > Hi, > > > > I just used easy_install to install a package on OSX 10.4.9 (MacBook > > Pro) and noted that the built egg has the following name: > > > > FOO-py2.5-macosx-10.3-fat.egg > > > > How do I configure easy install to build Intel only binaries for 10.4? > > Why do you want to do that? Ronald, thanks for your response. Well, since easy_install pulled down and built the package on this machine (a very slick and easy install indeed!) I see no need to have PPC binaries on it, since I would use that same install process on a PPC box. > Anyway, you'll have to change the setup.py to build intel-only > binaries. You have to add extra_link_args and and extra_compile_args > to all, both of them ['-arch', 'i386']. So I found setup.py and sections that build native code INSIDE the distributed tarball. I see how this would work, but this makes the slick and easy install not so easy. I was wondering more along the lines of distutils.cfg so that I would set it once for this system and then have it affect all the installs thereafter. Perhaps this is not possible, however I do see the following egg names through google so I wonder if it is possible: numpy-1.0.2.dev3507-py2.5-macosx-10.4-i386.egg Thanks for your help. From kw at codebykevin.com Mon Apr 23 15:22:37 2007 From: kw at codebykevin.com (Kevin Walzer) Date: Mon, 23 Apr 2007 09:22:37 -0400 Subject: [Pythonmac-SIG] easy_install question In-Reply-To: <1664c3b00704230546r38b528e5naec3cdc53ee0493c@mail.gmail.com> References: <1664c3b00704221844t1451fcflcecf60ea300a6f2c@mail.gmail.com> <1664c3b00704230546r38b528e5naec3cdc53ee0493c@mail.gmail.com> Message-ID: <462CB31D.5070608@codebykevin.com> Ulysses Known wrote: > > Well, since easy_install pulled down and built the package on this > machine (a very slick and easy install indeed!) I see no need to have > PPC binaries on it, since I would use that same install process on a > PPC box. > Is space at a premium on your machine? If not, what's the harm in having the PPC bits there? In many situations, building universal binaries is difficult. By contract, Universal MacPython has made this process so seamless and transparent that it's hard to *not* build extensions as universal binaries. I wish all my development tools made my work this easy! -- Kevin Walzer Code by Kevin http://www.codebykevin.com From ronaldoussoren at mac.com Mon Apr 23 15:30:41 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 23 Apr 2007 06:30:41 -0700 Subject: [Pythonmac-SIG] easy_install question In-Reply-To: <1664c3b00704230546r38b528e5naec3cdc53ee0493c@mail.gmail.com> References: <1664c3b00704221844t1451fcflcecf60ea300a6f2c@mail.gmail.com> <1664c3b00704230546r38b528e5naec3cdc53ee0493c@mail.gmail.com> Message-ID: On Monday, April 23, 2007, at 02:46PM, "Ulysses Known" wrote: >On 4/23/07, Ronald Oussoren wrote: >> On 23 Apr, 2007, at 3:44, Ulysses Known wrote: >> > Hi, >> > >> > I just used easy_install to install a package on OSX 10.4.9 (MacBook >> > Pro) and noted that the built egg has the following name: >> > >> > FOO-py2.5-macosx-10.3-fat.egg >> > >> > How do I configure easy install to build Intel only binaries for 10.4? >> >> Why do you want to do that? > >Ronald, thanks for your response. > >Well, since easy_install pulled down and built the package on this >machine (a very slick and easy install indeed!) I see no need to have >PPC binaries on it, since I would use that same install process on a >PPC box. > >> Anyway, you'll have to change the setup.py to build intel-only >> binaries. You have to add extra_link_args and and extra_compile_args >> to all, both of them ['-arch', 'i386']. > >So I found setup.py and sections that build native code INSIDE the >distributed tarball. I see how this would work, but this makes the >slick and easy install not so easy. But unless your disk is almost completely full building a "thin" binary instead of a universal one isn't worth the trouble :-). Even buildtime shouldn't be noticable faster on intel macs as gcc will run the PPC and x86 builds in parallel. > >I was wondering more along the lines of distutils.cfg so that I would >set it once for this system and then have it affect all the installs >thereafter. > >Perhaps this is not possible, however I do see the following egg names >through google so I wonder if it is possible: > >numpy-1.0.2.dev3507-py2.5-macosx-10.4-i386.egg > >Thanks for your help. I'm not sure why numpy doesn't distribute a universal binary egg, that's rather user unfriendly if you ask me. Universal binaries are the best way to package software, users shouldn't have to worry about what CPU type they have in their machine. Ronald From jerry.levan at eku.edu Mon Apr 23 15:52:25 2007 From: jerry.levan at eku.edu (Jerry LeVan) Date: Mon, 23 Apr 2007 09:52:25 -0400 Subject: [Pythonmac-SIG] wxPython problem... Message-ID: <00463F14-F867-4C0D-8945-1FD74DAAF901@eku.edu> Hi, I am running latest OSX 10.4.9, Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) and wxPython2.8-osx-unicode-2.8.3.0-universal10.4-py2.5.dmg. When I try help(wx) I get: >>> help(wx) Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site.py", line 346, in __call__ return pydoc.help(*args, **kwds) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1645, in __call__ self.help(request) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1689, in help else: doc(request, 'Help on %s:') File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1481, in doc pager(title % desc + '\n\n' + text.document(object, name)) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 324, in document if inspect.ismodule(object): return self.docmodule(*args) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1084, in docmodule contents.append(self.docother(value, key, name, maxlen=70)) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1283, in docother repr = self.repr(object) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/repr.py", line 24, in repr return self.repr1(x, self.maxlevel) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 951, in repr1 return cram(stripid(repr(x)), self.maxother) File "//Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/wx-2.8-mac-unicode/wx/_gdi.py", line 242, in __repr__ def __repr__(self): return 'wx.Colour' + str (self.Get(True)) File "//Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/wx-2.8-mac-unicode/wx/_gdi.py", line 230, in Get return _gdi_.Colour_Get(*args, **kwargs) TypeError: in method 'Colour_Get', expected argument 1 of type 'wxColour *' >>> Anyone know what the problem could be? Jerry From jhjensen at theory.ki.ku.dk Mon Apr 23 16:21:53 2007 From: jhjensen at theory.ki.ku.dk (Jan H. Jensen) Date: Mon, 23 Apr 2007 16:21:53 +0200 Subject: [Pythonmac-SIG] Numeric problem with Intel Mac OSX 10.4.8 Message-ID: Hi, I have the following problem. Can anyone help? best regards, Jan Jensen Python 2.4.4 (#1, Oct 18 2006, 10:34:39) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import Numeric Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Numeric/Numeric.py", line 91, in ? import multiarray ImportError: Inappropriate file type for dynamic loading >>> -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Jan H. Jensen Associate Research Professor Department of Chemistry jhjensen at theory.ki.ku.dk University of Copenhagen Phone: +45 35 32 02 39 Universitetsparken 5 FAX: +45 35 32 02 14 2100 Copenhagen Denmark http://propka.ki.ku.dk/~jhjensen =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- From vip at avatar.com.au Mon Apr 23 17:20:42 2007 From: vip at avatar.com.au (David Worrall) Date: Tue, 24 Apr 2007 01:20:42 +1000 Subject: [Pythonmac-SIG] Numeric problem with Intel Mac OSX 10.4.8 In-Reply-To: References: Message-ID: <70458AAA-045C-4F4B-BBA7-27C846C216AB@avatar.com.au> numeric is now called numpy see http://numpy.scipy.org/ also, all lower case... David On 24/04/2007, at 12:21 AM, Jan H. Jensen wrote: > Hi, I have the following problem. Can anyone help? > > best regards, Jan Jensen > > Python 2.4.4 (#1, Oct 18 2006, 10:34:39) > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import Numeric > Traceback (most recent call last): > File "", line 1, in ? > File > "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ > site-packages/Numeric/Numeric.py", > line 91, in ? > import multiarray > ImportError: Inappropriate file type for dynamic loading >>>> > > -- > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > Jan H. Jensen Associate Research Professor > Department of Chemistry jhjensen at theory.ki.ku.dk > University of Copenhagen Phone: +45 35 32 02 39 > Universitetsparken 5 FAX: +45 35 32 02 14 > 2100 Copenhagen Denmark > http://propka.ki.ku.dk/~jhjensen > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > _________________________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: www.canberra.edu.au/vc-forum/scrg vip=Verbal Interactivity Project From Chris.Barker at noaa.gov Mon Apr 23 18:24:17 2007 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 23 Apr 2007 09:24:17 -0700 Subject: [Pythonmac-SIG] Numeric problem with Intel Mac OSX 10.4.8 In-Reply-To: <70458AAA-045C-4F4B-BBA7-27C846C216AB@avatar.com.au> References: <70458AAA-045C-4F4B-BBA7-27C846C216AB@avatar.com.au> Message-ID: <462CDDB1.6000208@noaa.gov> David Worrall wrote: > numeric is now called numpy > see > http://numpy.scipy.org/ to clarify: "numpy" is a newer, next-generation version of the old and venerable "Numeric". numpy is newer, better, an under active development. The API is very similar, but not exactly the same as Numeric, so if you have an old package that requires Numeric, you may still need to use it. If this is the case: 1) Encourage the providers of said package to port to numpy -- it's not very hard, and the numpy developers will help. 2) let us know all your version and platform info, and where you got your Numeric build, and we may be able to help. if you can use numpy, get it from: http://pythonmac.org/packages -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From gardenmadman at gmail.com Mon Apr 23 18:43:24 2007 From: gardenmadman at gmail.com (Ulysses Known) Date: Mon, 23 Apr 2007 12:43:24 -0400 Subject: [Pythonmac-SIG] easy_install question In-Reply-To: References: <1664c3b00704221844t1451fcflcecf60ea300a6f2c@mail.gmail.com> <1664c3b00704230546r38b528e5naec3cdc53ee0493c@mail.gmail.com> Message-ID: <1664c3b00704230943n7211f204icad93e4a0b2aaedc@mail.gmail.com> Thanks to Ronald and Kevin for their replies. > On Monday, April 23, 2007, at 02:46PM, "Ulysses Known" wrote: > >I was wondering more along the lines of distutils.cfg so that I would > >set it once for this system and then have it affect all the installs > >thereafter. The answer (implied, but not explicitly stated) it that this is not possible, and that on OSX python installs with easy_install are targeted at OSX 10.3 and Universal binaries. From Chris.Barker at noaa.gov Mon Apr 23 19:47:05 2007 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 23 Apr 2007 10:47:05 -0700 Subject: [Pythonmac-SIG] easy_install question In-Reply-To: <1664c3b00704230943n7211f204icad93e4a0b2aaedc@mail.gmail.com> References: <1664c3b00704221844t1451fcflcecf60ea300a6f2c@mail.gmail.com> <1664c3b00704230546r38b528e5naec3cdc53ee0493c@mail.gmail.com> <1664c3b00704230943n7211f204icad93e4a0b2aaedc@mail.gmail.com> Message-ID: <462CF119.50806@noaa.gov> Ulysses Known wrote: > The answer (implied, but not explicitly stated) it that this is not > possible, and that on OSX python installs with easy_install are > targeted at OSX 10.3 and Universal binaries. not quite. easy_install uses distutils (or a modified version, anyway), which builds extensions to match the python it is run with. As pointed out here, there is little reason to have Intel only binaries, but if you really want them, then fin d(or build yourself) an Intel-only python, then it will build Intel-only extensions. (I think -- I've had no reason to try it) By the way, it's possible that the Intel-only numpy was partly built with Fortran, and no one seems to have figured out how to make gfortran build universal binaries yet. (or maybe it's using ATLAS). -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From gardenmadman at gmail.com Mon Apr 23 20:03:10 2007 From: gardenmadman at gmail.com (Ulysses Known) Date: Mon, 23 Apr 2007 14:03:10 -0400 Subject: [Pythonmac-SIG] easy_install question In-Reply-To: References: <1664c3b00704221844t1451fcflcecf60ea300a6f2c@mail.gmail.com> <1664c3b00704230546r38b528e5naec3cdc53ee0493c@mail.gmail.com> Message-ID: <1664c3b00704231103s471bf49fi73e4d8df81298f55@mail.gmail.com> > On Monday, April 23, 2007, at 02:46PM, "Ulysses Known" > >I was wondering more along the lines of distutils.cfg so that I would > >set it once for this system and then have it affect all the installs > >thereafter. Ulysses Known wrote: > The answer (implied, but not explicitly stated) it that this is not > possible, and that on OSX python installs with easy_install are > targeted at OSX 10.3 and Universal binaries. Thanks for the reply Chris, I was answering the above question for a standard Python install of the just released 2.5.1 -- I am sure that an Intel-only Python framework would do as you suggest. From robert.kern at gmail.com Mon Apr 23 21:31:07 2007 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 23 Apr 2007 14:31:07 -0500 Subject: [Pythonmac-SIG] easy_install question In-Reply-To: References: <1664c3b00704221844t1451fcflcecf60ea300a6f2c@mail.gmail.com> <1664c3b00704230546r38b528e5naec3cdc53ee0493c@mail.gmail.com> Message-ID: Ronald Oussoren wrote: > On Monday, April 23, 2007, at 02:46PM, "Ulysses Known" wrote: >> Perhaps this is not possible, however I do see the following egg names >> through google so I wonder if it is possible: >> >> numpy-1.0.2.dev3507-py2.5-macosx-10.4-i386.egg >> >> Thanks for your help. > > I'm not sure why numpy doesn't distribute a universal binary egg, that's rather user unfriendly if you ask me. Universal binaries are the best way to package software, users shouldn't have to worry about what CPU type they have in their machine. Please be careful with accusations of user-unfriendliness. Whatever reference Ulysses found, it certainly wasn't to any officially distributed egg. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From vip at avatar.com.au Tue Apr 24 02:13:32 2007 From: vip at avatar.com.au (David Worrall) Date: Tue, 24 Apr 2007 10:13:32 +1000 Subject: [Pythonmac-SIG] Numeric problem with Intel Mac OSX 10.4.8 In-Reply-To: <462CDDB1.6000208@noaa.gov> References: <70458AAA-045C-4F4B-BBA7-27C846C216AB@avatar.com.au> <462CDDB1.6000208@noaa.gov> Message-ID: <80595640-5E43-4DF4-B408-5B75D6D0966F@avatar.com.au> Thanks Christopher that's wot I meant but I was rushin' out the door.... Also, you'll find some of the matplotlib examples, amongst many others, still try to import numeric or even numarray. I've yet to have a problem by replacing them with numpy. Of course I haven't done intensive testing.... Also, I noticed that the manual at http://numpy.scipy.org/numpy.pdf still contains references to numarray. There's hope for us all! As to > 1) Encourage the providers of said package to port to numpy -- it's > not > very hard, and the numpy developers will help. > > 2) let us know all your version and platform info, and where you got > your Numeric build, and we may be able to help. the download address you give (http://pythonmac.org/packages) has paqckages for Numeric and numarray as well as numpy for both python 2.4 and 2.5 so a novice could be forgiven for feeling misled. This is the reason I pointed to the scipy site. Life moves too quickly sometimes..... David On 24/04/2007, at 2:24 AM, Christopher Barker wrote: > David Worrall wrote: >> numeric is now called numpy >> see >> http://numpy.scipy.org/ > > to clarify: > > "numpy" is a newer, next-generation version of the old and venerable > "Numeric". numpy is newer, better, an under active development. The > API > is very similar, but not exactly the same as Numeric, so if you > have an > old package that requires Numeric, you may still need to use it. If > this > is the case: > > 1) Encourage the providers of said package to port to numpy -- it's > not > very hard, and the numpy developers will help. > > 2) let us know all your version and platform info, and where you got > your Numeric build, and we may be able to help. > if you can use numpy, get it from: > > http://pythonmac.org/packages > > -Chris > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > _________________________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: www.canberra.edu.au/vc-forum/scrg vip=Verbal Interactivity Project From ronaldoussoren at mac.com Tue Apr 24 07:16:34 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 24 Apr 2007 07:16:34 +0200 Subject: [Pythonmac-SIG] Numeric problem with Intel Mac OSX 10.4.8 In-Reply-To: <70458AAA-045C-4F4B-BBA7-27C846C216AB@avatar.com.au> References: <70458AAA-045C-4F4B-BBA7-27C846C216AB@avatar.com.au> Message-ID: <7EE95970-5AA8-4815-872B-E118E1CC1C08@mac.com> On 23 Apr, 2007, at 17:20, David Worrall wrote: > numeric is now called numpy That's not very helpful :-) > see > http://numpy.scipy.org/ > > also, all lower case... Jan, how did you install Numeric? Did you use a binary package, if so where did you download it? Are you on an Intel or PPC mac? Ronald > > David > > On 24/04/2007, at 12:21 AM, Jan H. Jensen wrote: > >> Hi, I have the following problem. Can anyone help? >> >> best regards, Jan Jensen >> >> Python 2.4.4 (#1, Oct 18 2006, 10:34:39) >> [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin >> Type "help", "copyright", "credits" or "license" for more >> information. >>>>> import Numeric >> Traceback (most recent call last): >> File "", line 1, in ? >> File >> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ >> site-packages/Numeric/Numeric.py", >> line 91, in ? >> import multiarray >> ImportError: Inappropriate file type for dynamic loading >>>>> >> >> -- >> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- >> Jan H. Jensen Associate Research Professor >> Department of Chemistry jhjensen at theory.ki.ku.dk >> University of Copenhagen Phone: +45 35 32 02 39 >> Universitetsparken 5 FAX: +45 35 32 02 14 >> 2100 Copenhagen Denmark >> http://propka.ki.ku.dk/~jhjensen >> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > > _________________________________________________ > experimental polymedia: www.avatar.com.au > Sonic Communications Research Group, > University of Canberra: www.canberra.edu.au/vc-forum/scrg > vip=Verbal Interactivity Project > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070424/8afc4f5a/attachment.bin From ronaldoussoren at mac.com Tue Apr 24 07:52:52 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 24 Apr 2007 07:52:52 +0200 Subject: [Pythonmac-SIG] easy_install question In-Reply-To: References: <1664c3b00704221844t1451fcflcecf60ea300a6f2c@mail.gmail.com> <1664c3b00704230546r38b528e5naec3cdc53ee0493c@mail.gmail.com> Message-ID: On 23 Apr, 2007, at 21:31, Robert Kern wrote: > Ronald Oussoren wrote: >> On Monday, April 23, 2007, at 02:46PM, "Ulysses Known" >> wrote: > >>> Perhaps this is not possible, however I do see the following egg >>> names >>> through google so I wonder if it is possible: >>> >>> numpy-1.0.2.dev3507-py2.5-macosx-10.4-i386.egg >>> >>> Thanks for your help. >> >> I'm not sure why numpy doesn't distribute a universal binary egg, >> that's rather user unfriendly if you ask me. Universal binaries >> are the best way to package software, users shouldn't have to >> worry about what CPU type they have in their machine. > > Please be careful with accusations of user-unfriendliness. Whatever > reference > Ulysses found, it certainly wasn't to any officially distributed egg. I should have been more careful in phrasing my response, sorry about that. Ronald > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a > harmless enigma > that is made terrible by our own mad attempt to interpret it as > though it had > an underlying truth." > -- Umberto Eco > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070424/596d83ef/attachment.bin From kevino at theolliviers.com Tue Apr 24 07:51:29 2007 From: kevino at theolliviers.com (Kevin Ollivier) Date: Mon, 23 Apr 2007 22:51:29 -0700 Subject: [Pythonmac-SIG] wxPython problem... In-Reply-To: <00463F14-F867-4C0D-8945-1FD74DAAF901@eku.edu> References: <00463F14-F867-4C0D-8945-1FD74DAAF901@eku.edu> Message-ID: <9BE59966-D0C2-4D52-BB0D-77C8A9D75807@theolliviers.com> Hi Jerry, You should bring this up on the wxPython-users at lists.wxwidgets.org list. I'm pretty sure someone there will be able to help you. Regards, Kevin On Apr 23, 2007, at 6:52 AM, Jerry LeVan wrote: > Hi, > > I am running latest OSX 10.4.9, Python 2.5.1 (r251:54869, Apr 18 > 2007, 22:08:04) and > wxPython2.8-osx-unicode-2.8.3.0-universal10.4-py2.5.dmg. > > When I try help(wx) I get: > >>>> help(wx) > Traceback (most recent call last): > File "", line 1, in > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site.py", line 346, in __call__ > return pydoc.help(*args, **kwds) > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/pydoc.py", line 1645, in __call__ > self.help(request) > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/pydoc.py", line 1689, in help > else: doc(request, 'Help on %s:') > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/pydoc.py", line 1481, in doc > pager(title % desc + '\n\n' + text.document(object, name)) > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/pydoc.py", line 324, in document > if inspect.ismodule(object): return self.docmodule(*args) > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/pydoc.py", line 1084, in docmodule > contents.append(self.docother(value, key, name, maxlen=70)) > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/pydoc.py", line 1283, in docother > repr = self.repr(object) > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/repr.py", line 24, in repr > return self.repr1(x, self.maxlevel) > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/pydoc.py", line 951, in repr1 > return cram(stripid(repr(x)), self.maxother) > File "//Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/wx-2.8-mac-unicode/wx/_gdi.py", line 242, in > __repr__ > def __repr__(self): return 'wx.Colour' + str > (self.Get(True)) > File "//Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/wx-2.8-mac-unicode/wx/_gdi.py", line 230, > in Get > return _gdi_.Colour_Get(*args, **kwargs) > TypeError: in method 'Colour_Get', expected argument 1 of type > 'wxColour *' >>>> > > Anyone know what the problem could be? > > Jerry > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From brianh at llsys.com Mon Apr 23 19:03:39 2007 From: brianh at llsys.com (Brian Hunter) Date: Mon, 23 Apr 2007 13:03:39 -0400 Subject: [Pythonmac-SIG] Pythonmac 2.4.4 (PPC) and mod_python problems Message-ID: <86cd1e41912785dcfc7382b5ff3dfb25@llsys.com> Hi david, I was wondering if you found a work around for the $make problem as I have encountered the same thing. Any help would be appreciated. Thanks, -Brian Brian Hunter brianhunterstudio.com From brianzz at earthlink.net Tue Apr 24 05:45:07 2007 From: brianzz at earthlink.net (Brian Christensen) Date: Mon, 23 Apr 2007 21:45:07 -0600 Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app Message-ID: I have been distributing a mac application built with py2app. For months I have received reports of users who were not able to use the application because of the error "ImportError: No module named os". I was not able to reproduce the error and was unable to help them, except to suggest they run the application from the source code. I finally found a user (Michael) who had both the problem and the technical skills to track down the cause. > I think I have cracked the 'no module os' problem with GanttPV.app > under 10.4. > > Assuming that the problem was with the current path, I looked at > site.py. Now I haven't done any python yet, but it is all pretty > readable; what I don't know about is the significance of the .pyc > files - I guess I'll learn. Also, there is an alias in the python > > folder to the site.py file in the Resources folder, but it doesn't > seem to have to work ... > > Anyway, if you replace the line > sys.path.append(_parent + '/site-packages.zip') > > with the line > sys.path.append(_parent + '/site-packages') > > in site.py in the Resources folder of the Contents folder of the > GanttPV.app, GanttPV launching works. In my hands. > Following up on this lead we found that there is a problem with StuffIt 10. My application was distributed as a zip file so the user used StuffIt to unzip the file. It turns out that StuffIt was unzipping and deleting the site-packages.zip inside of the application! > I think we have discovered a bug (? feature?) in Stuffit. I am usng > Stuffit 10. It is set to NOT delete after unzipping, and to > continue unzipping if possible. If I turn off the latter, the > program works after unpacking. When continued unpacking is turned > on, the progam deletes the site-packages.zip file, but not the top > level zip file. As a partial work around I am not going to use .zip files to distribute my application. However, if anyone zips and then unzips the application it will stop working. Has anyone else run into this problem? From kw at codebykevin.com Wed Apr 25 02:05:33 2007 From: kw at codebykevin.com (Kevin Walzer) Date: Tue, 24 Apr 2007 20:05:33 -0400 Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app In-Reply-To: References: Message-ID: <462E9B4D.1020002@codebykevin.com> You could use a DMG instead of a zip file. That's more standard anyway. Also, have you tried unzipping the file with BOMarchive helper (the built-in unzipping tool that works with Finder)? If that works without corrupting your file, then you could just recommend that folks use that instead of Stuffit. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From whenney at gmail.com Wed Apr 25 07:14:14 2007 From: whenney at gmail.com (Will Henney) Date: Wed, 25 Apr 2007 05:14:14 +0000 (UTC) Subject: [Pythonmac-SIG] accessing iPhoto star rating through appscript? References: <6CD23DC5-B2E2-471D-90A8-6D80E95C04CD@livingcode.org> <8c7f10c60704190213r14e9f089m1d16783b65a0c1d8@mail.gmail.com> <9186E64B-5CC3-4137-B3DE-522E07CE02C3@mac.com> Message-ID: Ronald Oussoren mac.com> writes: > > > On 19 Apr, 2007, at 17:11, Will Henney wrote: > > > My initial try was to use "utf-8" as the output codec, but that > > wrote garbage > > characters when I ran it in Terminal.app - any idea why? > > That's strange, I'd expect UTF-8 to work just fine (and it does on my > machine). What's the Character Set Encoding in Terminal's Window > Preferences (on the Display page)? > Yeah, that's right - I had messed up my settings many moons ago in order to deal with an ssh session on a machine that didn't grok unicode. Thanks for the pointer. From ronaldoussoren at mac.com Wed Apr 25 07:50:54 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 25 Apr 2007 07:50:54 +0200 Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app In-Reply-To: References: Message-ID: On 24 Apr, 2007, at 5:45, Brian Christensen wrote: > > Following up on this lead we found that there is a problem with > StuffIt 10. My application was distributed as a zip file so the user > used StuffIt to unzip the file. It turns out that StuffIt was > unzipping and deleting the site-packages.zip inside of the > application! That's very lame behaviour on StufIt's part. > >> I think we have discovered a bug (? feature?) in Stuffit. I am usng >> Stuffit 10. It is set to NOT delete after unzipping, and to >> continue unzipping if possible. If I turn off the latter, the >> program works after unpacking. When continued unpacking is turned >> on, the progam deletes the site-packages.zip file, but not the top >> level zip file. > > As a partial work around I am not going to use .zip files to > distribute my application. However, if anyone zips and then unzips > the application it will stop working. Has anyone else run into this > problem? I haven't, but I dont' use stuffit either. It should be possibly to patch py2app to work around this issue (basically by adding a check that verifies if site-package.zip exists and if not adds site- packages instead). Ronald > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070425/ede07cd2/attachment.bin From Jack.Jansen at cwi.nl Wed Apr 25 10:00:44 2007 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Wed, 25 Apr 2007 10:00:44 +0200 Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app In-Reply-To: References: Message-ID: <157257C5-0921-4300-AA33-27BDE0E9ED25@cwi.nl> On 25-apr-2007, at 7:50, Ronald Oussoren wrote: > > On 24 Apr, 2007, at 5:45, Brian Christensen wrote: > >> >> Following up on this lead we found that there is a problem with >> StuffIt 10. My application was distributed as a zip file so the user >> used StuffIt to unzip the file. It turns out that StuffIt was >> unzipping and deleting the site-packages.zip inside of the >> application! > > That's very lame behaviour on StufIt's part. It's a preference. In Stuffit Expander it's called "Continue to expand if possible", in the full stuffit it's probably something similar. It's on by default, it's what makes stuffit do the full decoding and unpacking of, say, a .tar.gz. -- 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 ronaldoussoren at mac.com Wed Apr 25 11:22:54 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 25 Apr 2007 02:22:54 -0700 Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app In-Reply-To: <157257C5-0921-4300-AA33-27BDE0E9ED25@cwi.nl> References: <157257C5-0921-4300-AA33-27BDE0E9ED25@cwi.nl> Message-ID: On Wednesday, April 25, 2007, at 10:02AM, "Jack Jansen" wrote: > >On 25-apr-2007, at 7:50, Ronald Oussoren wrote: > >> >> On 24 Apr, 2007, at 5:45, Brian Christensen wrote: >> >>> >>> Following up on this lead we found that there is a problem with >>> StuffIt 10. My application was distributed as a zip file so the user >>> used StuffIt to unzip the file. It turns out that StuffIt was >>> unzipping and deleting the site-packages.zip inside of the >>> application! >> >> That's very lame behaviour on StufIt's part. > >It's a preference. In Stuffit Expander it's called "Continue to >expand if possible", in the full stuffit it's probably something >similar. >It's on by default, it's what makes stuffit do the full decoding and >unpacking of, say, a .tar.gz. I'll see if I can whip up a patch that add the workaround I described to the code generated by py2app, there's bound to be more users that use Stuffit. Ronald >-- >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 Wed Apr 25 11:53:33 2007 From: bob at redivi.com (Bob Ippolito) Date: Wed, 25 Apr 2007 02:53:33 -0700 Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app In-Reply-To: References: <157257C5-0921-4300-AA33-27BDE0E9ED25@cwi.nl> Message-ID: <6a36e7290704250253r16829949sf96826a4e4115f65@mail.gmail.com> On 4/25/07, Ronald Oussoren wrote: > > On Wednesday, April 25, 2007, at 10:02AM, "Jack Jansen" wrote: > > > >On 25-apr-2007, at 7:50, Ronald Oussoren wrote: > > > >> > >> On 24 Apr, 2007, at 5:45, Brian Christensen wrote: > >> > >>> > >>> Following up on this lead we found that there is a problem with > >>> StuffIt 10. My application was distributed as a zip file so the user > >>> used StuffIt to unzip the file. It turns out that StuffIt was > >>> unzipping and deleting the site-packages.zip inside of the > >>> application! > >> > >> That's very lame behaviour on StufIt's part. > > > >It's a preference. In Stuffit Expander it's called "Continue to > >expand if possible", in the full stuffit it's probably something > >similar. > >It's on by default, it's what makes stuffit do the full decoding and > >unpacking of, say, a .tar.gz. > > I'll see if I can whip up a patch that add the workaround I described to the code generated by py2app, there's bound to be more users that use Stuffit. I've had other strange problems with StuffIt's zip support that aren't directly relevant to py2app. For example I have a folder full of a bunch of text files (ActionScript source code) and if I zip it with BOMArchiveHelper, Python, *or* the zip command line tool then StuffIt refuses to unpack the archive with a strange error code. I actually have to use StuffIt or Windows to pack the archives in order to get something that is unpackable by StuffIt. The strangest thing is that there is absolutely nothing strange about the archive. A few folders with three-four character names, some files with all ASCII names less than 8.3 characters long, etc. StuffIt should die. It's sad that they broke the only de facto standard for cross-platform archives :( -bob From hraban at fiee.net Wed Apr 25 15:17:46 2007 From: hraban at fiee.net (Henning Hraban Ramm) Date: Wed, 25 Apr 2007 15:17:46 +0200 Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app In-Reply-To: <6a36e7290704250253r16829949sf96826a4e4115f65@mail.gmail.com> References: <157257C5-0921-4300-AA33-27BDE0E9ED25@cwi.nl> <6a36e7290704250253r16829949sf96826a4e4115f65@mail.gmail.com> Message-ID: <954f61110704250617s639ab438gf6db625ed6d048b4@mail.gmail.com> 2007/4/25, Bob Ippolito : > > I've had other strange problems with StuffIt's zip support that aren't > directly relevant to py2app. For example I have a folder full of a > bunch of text files (ActionScript source code) and if I zip it with > BOMArchiveHelper, Python, *or* the zip command line tool then StuffIt > refuses to unpack the archive with a strange error code. I actually > have to use StuffIt or Windows to pack the archives in order to get > something that is unpackable by StuffIt. Last week one of my customers complained he couldn't read a PDF that I compressed with the OSX 10.4 "system zipper" (BOMArchiveHelper, I guess). He used Stuffit on OS 9.2 to expand. I tried again with GNU Zip, and that worked. So I guess it's not only StuffIt that fails, but also the BOMArchiveHelper that creates ZIPs with resource fork included, which isn't really standard - is it? StuffIt should die. It's sad that they broke the only de facto > standard for cross-platform archives :( "It's clear that the pig must die!" (The Hunting of the Snark) ;-) Greetlings, Hraban -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20070425/e05f55ee/attachment.htm From frank.hoffsummer at gmail.com Wed Apr 25 16:45:02 2007 From: frank.hoffsummer at gmail.com (=?ISO-8859-1?Q?Frank_Hoffs=FCmmer?=) Date: Wed, 25 Apr 2007 16:45:02 +0200 Subject: [Pythonmac-SIG] Pythonmac 2.4.4 (PPC) and mod_python problems Message-ID: <60fae7c30704250745o3e87efbaodc9e4884e1760541@mail.gmail.com> hi, I also have trouble building the latest mod_python using the latest UB build of python (2.4.4 or 2.5.1) on a PowerPC OS X machine. My OS X version is 10.4.9 (Server) and the gcc version is 4.01 (build 5367 = latest XCode) I am trying to compile mod_python using the apxs from the build-in apache2 installation that comes with OS X 10.4 Server (/opt/apache2) heres what I am doing cd mod_python-3.3.1 ./configure --with-apxs=/opt/apache2/bin/apxs --with-python=/Library/Frameworks/Python.framework/Versions/Current/bin/python export MACOSX_DEPLOYMENT_TARGET=10.4 make the result is always (using UB python 2.4.4 or 2.5.1 from python.org) /usr/bin/ld: for architecture i386 /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libm.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libdl.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: warning fat file: /usr/lib/libSystem.B.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: ___sF referenced from Python expected to be defined in /usr/lib/libSystem.B.dylib _exit referenced from Python expected to be defined in /usr/lib/libSystem.B.dylib ..... ..... _setpwent referenced from Python expected to be defined in /usr/lib/libSystem.B.dylib _mktime referenced from Python expected to be defined in /usr/lib/libSystem.B.dylib _clock referenced from Python expected to be defined in /usr/lib/libSystem.B.dylib collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccAkqNp0.out (No such file or directory) apxs:Error: Command failed with rc=65536 . make[1]: *** [mod_python.so] Error 1 make: *** [do_dso] Error 2 this used to work with earlier versions of XCode/python/mod_python, but somehow I cannot compile the latest release apologies if this is the wrong group, but I saw the topic being discussed here earlier thanks for any insight you might have -frank -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20070425/9f59a527/attachment.html From ronaldoussoren at mac.com Wed Apr 25 17:09:15 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 25 Apr 2007 08:09:15 -0700 Subject: [Pythonmac-SIG] Pythonmac 2.4.4 (PPC) and mod_python problems In-Reply-To: <60fae7c30704250745o3e87efbaodc9e4884e1760541@mail.gmail.com> References: <60fae7c30704250745o3e87efbaodc9e4884e1760541@mail.gmail.com> Message-ID: On Wednesday, April 25, 2007, at 04:47PM, "Frank Hoffs?mmer" wrote: >hi, >I also have trouble building the latest mod_python using the latest UB build >of python (2.4.4 or 2.5.1) on a PowerPC OS X machine. >My OS X version is 10.4.9 (Server) and the gcc version is 4.01 (build 5367 = >latest XCode) Did you install the Univeral SDK as well? I'm not sure it that's selected by default. You can check by looking if /Developer/SDKs/MacOSX10.4u.sdk exists. Ronald From frank.hoffsummer at gmail.com Wed Apr 25 17:13:00 2007 From: frank.hoffsummer at gmail.com (=?ISO-8859-1?Q?Frank_Hoffs=FCmmer?=) Date: Wed, 25 Apr 2007 17:13:00 +0200 Subject: [Pythonmac-SIG] Pythonmac 2.4.4 (PPC) and mod_python problems In-Reply-To: <60fae7c30704250812j70b7d70bs792bb6c5a706179e@mail.gmail.com> References: <60fae7c30704250745o3e87efbaodc9e4884e1760541@mail.gmail.com> <60fae7c30704250812j70b7d70bs792bb6c5a706179e@mail.gmail.com> Message-ID: <60fae7c30704250813k46b522fdkf22f6c5b33b27dd7@mail.gmail.com> On 4/25/07, Frank Hoffs?mmer wrote: > > thanks ronald for your answer, > it seems the directory /Developer/SDKs/MacOSX10.4u.sdk exists on my > machine > > $ ls -la /Developer/SDKs/MacOSX10.4u.sdk > total 8 > drwxr-xr-x 7 root wheel 238 Sep 25 2006 . > drwxr-xr-x 4 root wheel 136 Apr 4 12:08 .. > drwxr-xr-x 3 root wheel 102 Sep 25 2006 Developer > drwxr-xr-x 3 root wheel 102 Sep 25 2006 Library > -rw-r--r-- 1 root wheel 369 Sep 23 2006 SDKSettings.plist > drwxr-xr-x 3 root wheel 102 Sep 25 2006 System > drwxr-xr-x 6 root wheel 204 Sep 25 2006 usr > > -frank > > On 4/25/07, Ronald Oussoren wrote: > > > > > > On Wednesday, April 25, 2007, at 04:47PM, "Frank Hoffs?mmer" < > > frank.hoffsummer at gmail.com> wrote: > > >hi, > > >I also have trouble building the latest mod_python using the latest UB > > build > > >of python (2.4.4 or 2.5.1) on a PowerPC OS X machine. > > >My OS X version is 10.4.9 (Server) and the gcc version is 4.01 (build > > 5367 = > > >latest XCode) > > > > Did you install the Univeral SDK as well? I'm not sure it that's > > selected by default. You can check by looking if > > /Developer/SDKs/MacOSX10.4u.sdk exists. > > > > Ronald > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20070425/3f9a5d48/attachment.htm From janssen at parc.com Wed Apr 25 17:31:01 2007 From: janssen at parc.com (Bill Janssen) Date: Wed, 25 Apr 2007 08:31:01 PDT Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app In-Reply-To: <157257C5-0921-4300-AA33-27BDE0E9ED25@cwi.nl> References: <157257C5-0921-4300-AA33-27BDE0E9ED25@cwi.nl> Message-ID: <07Apr25.083104pdt."57996"@synergy1.parc.xerox.com> > It's a preference. In Stuffit Expander it's called "Continue to > expand if possible", in the full stuffit it's probably something > similar. > It's on by default, it's what makes stuffit do the full decoding and > unpacking of, say, a .tar.gz. Thanks; I've been wondering what to turn off to prevent this. Bill From Chris.Barker at noaa.gov Wed Apr 25 18:56:56 2007 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 25 Apr 2007 09:56:56 -0700 Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app In-Reply-To: References: Message-ID: <462F8858.4@noaa.gov> Brian Christensen wrote: > I finally found a user (Michael) who had both the problem and the > technical skills to track down the cause. Wow! thanks for reporting this! If a *.dmg is a better bet, then: 1) is there a point-and-click and/or drag-and-drop way to create *.dmgs? 2) I don't think that *.dmgs are compressed, is it good practice to compress the resulting *.dmg (*.dmg.zip) Ideally, I'd like to get a "Make Disk Image" option when I right click in Finder, just like current "Create Archive" option. Does anyone know how to add an item to that menu? -thanks, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From kw at codebykevin.com Wed Apr 25 19:29:15 2007 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 25 Apr 2007 13:29:15 -0400 Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app In-Reply-To: <462F8858.4@noaa.gov> References: <462F8858.4@noaa.gov> Message-ID: <462F8FEB.5040103@codebykevin.com> Christopher Barker wrote: > 1) is there a point-and-click and/or drag-and-drop way to create *.dmgs? There are lots of freeware and shareware apps that do this--FreeDMG is a good one. There are also command-line wrappers for hdiutils. Just google. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From janssen at parc.com Wed Apr 25 20:52:43 2007 From: janssen at parc.com (Bill Janssen) Date: Wed, 25 Apr 2007 11:52:43 PDT Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app In-Reply-To: <462F8FEB.5040103@codebykevin.com> References: <462F8858.4@noaa.gov> <462F8FEB.5040103@codebykevin.com> Message-ID: <07Apr25.115245pdt."57996"@synergy1.parc.xerox.com> > Christopher Barker wrote: > > > 1) is there a point-and-click and/or drag-and-drop way to create *.dmgs? > > There are lots of freeware and shareware apps that do this--FreeDMG is a > good one. There are also command-line wrappers for hdiutils. Just google. I don't know about point and click, but a simple script app could be wrapped around this: /usr/bin/hdiutil create -srcfolder SOMEDIR -volname VOLUMENAME -ov OUTPUTFILE.dmg It creates a dmg with SOMEDIR as the contents. Bill From nad at acm.org Wed Apr 25 21:05:48 2007 From: nad at acm.org (Ned Deily) Date: Wed, 25 Apr 2007 12:05:48 -0700 Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app References: <462F8858.4@noaa.gov> Message-ID: In article <462F8858.4 at noaa.gov>, Christopher Barker wrote: > If a *.dmg is a better bet, then: > 1) is there a point-and-click and/or drag-and-drop way to create *.dmgs? Lots of ways. In 10.4 at least, move the files to be distributed into a folder with the name of the volume to be created, launch Disk Utility (/Applications/Utilities/Disk Utility.app), then drop the folder onto the Disk Utility icon in the dock. A "New Image From Folder" file dialog will appear with the correct name and with "compressed" selected as the default Image Format. Or from a shell command line: hdiutil create -srcfolder /path/to/folder /path/to/new_image.dmg > 2) I don't think that *.dmgs are compressed, is it good practice to > compress the resulting *.dmg (*.dmg.zip) The contents of images can be and are compressed by these methods. See the hdiutil man page for more gory details. > Ideally, I'd like to get a "Make Disk Image" option when I right click > in Finder, just like current "Create Archive" option. Does anyone know > how to add an item to that menu? Again in 10.4, a very simple way is to create a two-step Automator workflow using the Get Specified Finder Items action and the Create Disk Image From Files action (available here): Then Save As Plug-in... for Finder and the new workflow should show up in the Finder's right click menu under the Automator submenu. -- Ned Deily, nad at acm.org From rriem at free.fr Wed Apr 25 21:41:36 2007 From: rriem at free.fr (Romuald Riem) Date: Wed, 25 Apr 2007 21:41:36 +0200 Subject: [Pythonmac-SIG] a little problem Message-ID: Hello, I've created a small and basic application with PyQt4. It works as expected on MacOS X and Win XP. With the latest version of SIP and PyQT4, I've built a standalone application with py2app for MacOS X and py2exe for Windows and they work fine. I'm supprised by the size difference between the 2 applications (built with the standard options): when the Windows app is about 15 Mo, the Mac one is about 64 Mo. Is it normal ? How can I make a smaller Mac app ? Thanks Romuald Riem From ronaldoussoren at mac.com Wed Apr 25 22:11:05 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 25 Apr 2007 22:11:05 +0200 Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app In-Reply-To: <462F8858.4@noaa.gov> References: <462F8858.4@noaa.gov> Message-ID: On 25 Apr, 2007, at 18:56, Christopher Barker wrote: > Brian Christensen wrote: > >> I finally found a user (Michael) who had both the problem and the >> technical skills to track down the cause. > > Wow! thanks for reporting this! > > If a *.dmg is a better bet, then: > > 1) is there a point-and-click and/or drag-and-drop way to create > *.dmgs? > > 2) I don't think that *.dmgs are compressed, is it good practice to > compress the resulting *.dmg (*.dmg.zip) You can create compressed DMGs, zipping them is unnecessary if you use the right options when creating the image. > > Ideally, I'd like to get a "Make Disk Image" option when I right click > in Finder, just like current "Create Archive" option. Does anyone know > how to add an item to that menu? You can get quite close with an automator workflow. The default install of Automator includes an rather lame action for creating a DMG, the link below points to an action that is slightly better (but still not good enough to replicate the "Create Archive" menu. http://www.apple.com/downloads/macosx/automator/ creatediskimagefromfiles.html I'd like a action that has the option to automaticly place the resulting archive in the folder containing the source items, but haven't found one yet and don't want it badly to write one myself (which should be easy enough). Ronald > > -thanks, > -Chris > > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070425/6e03f00e/attachment.bin From daniellord at mac.com Thu Apr 26 01:14:40 2007 From: daniellord at mac.com (Daniel Lord) Date: Wed, 25 Apr 2007 16:14:40 -0700 Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app In-Reply-To: References: <462F8858.4@noaa.gov> Message-ID: <9CF8F8EF-DC76-4986-9497-45F8AED25333@mac.com> Shell script, Schmell script...do it in Python: I got this from someone somewhere long ago... import sys, os, os.path import commands if len(sys.argv) == 2: dir = sys.argv[1] print "Creating disk image %s.dmg" % (dir) status, output = commands.getstatusoutput("hdiutil create - volname %s -fs HFS+ -srcfolder %s %s.dmg" % (dir,dir, dir)) else: sys.stderr.write("***ERROR: must provide folder to source.\n") From fairwinds at eastlink.ca Thu Apr 26 02:53:51 2007 From: fairwinds at eastlink.ca (David Pratt) Date: Wed, 25 Apr 2007 21:53:51 -0300 Subject: [Pythonmac-SIG] Pythonmac 2.4.4 (PPC) and mod_python problems In-Reply-To: References: <60fae7c30704250745o3e87efbaodc9e4884e1760541@mail.gmail.com> Message-ID: <462FF81F.4030801@eastlink.ca> Hi Frank and Ronald. I was original poster to the mod_python problems. I have recently upgraded my PPC to 10.4.9. My linking problem went away for PyLucene built using gcc 3.4.6 from mac ports earlier today. I built on non-standard compiler since there are known issues with 4.0.1 building pyLucene. I will be attempting to build mod_python again shortly and will report back of my experience. I might try a different compiler also to test if it does not work to see if it makes a difference. In my gut, I am beginning to feel despite my best effort to keep the software of my machine up to date, my PPC is becoming a paper weight. This has really got me frustrated since my machine has still got plenty of life and I believed universal meant that PPC hardware users were not going to be left out in the cold. It has been an excellent development machine up to the time Universal build was introduced. I am running into similar linking issues with lxml. See below. What can be done about this :-( Regards David Buildout build ============== zc.buildout.easy_install: Getting new distribution for lxml Building lxml version 1.3.beta warning: no previously-included files found matching 'doc/pyrex.txt' warning: no previously-included files found matching 'src/lxml/etree.pxi' /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /opt/local/lib/libxslt.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /opt/local/lib/libexslt.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /opt/local/lib/libxml2.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /opt/local/lib/libz.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: for architecture ppc /usr/bin/ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libiconv.2.dylib referenced from: /opt/local/lib/libxslt.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2) /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /opt/local/lib/libxslt.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /opt/local/lib/libexslt.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /opt/local/lib/libxml2.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /opt/local/lib/libz.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: for architecture ppc /usr/bin/ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libiconv.2.dylib referenced from: /opt/local/lib/libxslt.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2) zc.buildout.easy_install: Got lxml 1.3beta An easy_setup build =================== Searching for lxml Reading http://cheeseshop.python.org/pypi/lxml/ Reading http://cheeseshop.python.org/pypi/lxml/1.3beta Reading http://codespeak.net/lxml Reading http://cheeseshop.python.org/pypi/lxml/1.2.1 Best match: lxml 1.3beta Downloading http://cheeseshop.python.org/packages/source/l/lxml/lxml-1.3beta.tar.gz Processing lxml-1.3beta.tar.gz Running lxml-1.3beta/setup.py -q bdist_egg --dist-dir /tmp/easy_install-uCUEox/lxml-1.3beta/egg-dist-tmp-tOf7Pb Building lxml version 1.3.beta warning: no previously-included files found matching 'doc/pyrex.txt' warning: no previously-included files found matching 'src/lxml/etree.pxi' /usr/bin/ld: for architecture ppc /usr/bin/ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libiconv.2.dylib referenced from: /opt/local/lib/libxslt.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2) /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /opt/local/lib/libxslt.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /opt/local/lib/libexslt.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /opt/local/lib/libxml2.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /opt/local/lib/libz.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: for architecture ppc /usr/bin/ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libiconv.2.dylib referenced from: /opt/local/lib/libxslt.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2) /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /opt/local/lib/libxslt.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /opt/local/lib/libexslt.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /opt/local/lib/libxml2.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /opt/local/lib/libz.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) Adding lxml 1.3beta to easy-install.pth file Installed /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/lxml-1.3beta-py2.4-macosx-10.3-fat.egg Processing dependencies for lxml From my logs: ============ Apr 25 14:32:05 Mac-PG crashdump[27220]: Python crashed Apr 25 14:32:15 Mac-PG crashdump[27220]: crash report written to: /Users/davidpratt/Library/Logs/CrashReporter/Python.crash.log Ronald Oussoren wrote: > > On Wednesday, April 25, 2007, at 04:47PM, "Frank Hoffs?mmer" wrote: >> hi, >> I also have trouble building the latest mod_python using the latest UB build >> of python (2.4.4 or 2.5.1) on a PowerPC OS X machine. >> My OS X version is 10.4.9 (Server) and the gcc version is 4.01 (build 5367 = >> latest XCode) > > Did you install the Univeral SDK as well? I'm not sure it that's selected by default. You can check by looking if /Developer/SDKs/MacOSX10.4u.sdk exists. > > Ronald > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From nad at acm.org Thu Apr 26 04:14:30 2007 From: nad at acm.org (Ned Deily) Date: Wed, 25 Apr 2007 19:14:30 -0700 Subject: [Pythonmac-SIG] Pythonmac 2.4.4 (PPC) and mod_python problems References: <60fae7c30704250745o3e87efbaodc9e4884e1760541@mail.gmail.com> <462FF81F.4030801@eastlink.ca> Message-ID: In article <462FF81F.4030801 at eastlink.ca>, David Pratt wrote: > I will be attempting to build mod_python again shortly and will report > back of my experience. I might try a different compiler also to test if > it does not work to see if it makes a difference. In my gut, I am > beginning to feel despite my best effort to keep the software of my > machine up to date, my PPC is becoming a paper weight. This has really > got me frustrated since my machine has still got plenty of life and I > believed universal meant that PPC hardware users were not going to be > left out in the cold. It has been an excellent development machine up to > the time Universal build was introduced. I am running into similar > linking issues with lxml. See below. What can be done about this :-( FWIW, lxml builds and runs just fine using easy_install on my PPC with the latest universal build pythonmac 2.5.1 on 10.4.9. One obvious difference apparent from your log file: on my system lxml is linking with the Apple-supplied libxml2, libxslt, and libexslt in /usr/lib/, not whatever you have in /opt/local/lib (presumably libs installed by port?). -- Ned Deily, nad at acm.org From fairwinds at eastlink.ca Thu Apr 26 05:14:39 2007 From: fairwinds at eastlink.ca (David Pratt) Date: Thu, 26 Apr 2007 00:14:39 -0300 Subject: [Pythonmac-SIG] Pythonmac 2.4.4 (PPC) and mod_python problems In-Reply-To: References: <60fae7c30704250745o3e87efbaodc9e4884e1760541@mail.gmail.com> <462FF81F.4030801@eastlink.ca> Message-ID: <4630191F.8070000@eastlink.ca> Hi Ned. I've removed the mac ports version of libxml2 and libxslt and it compiled - woo hoo!! I'll try a new build of mod_python tomorrow. Maybe things are not so bad after all. This is quite encouraging. I guess I am getting down about these linking issues and of course want some better reliability back into some of the software builds that I seemed to have before. Many thanks for this tip :-) Regards David Ned Deily wrote: > In article <462FF81F.4030801 at eastlink.ca>, > David Pratt wrote: >> I will be attempting to build mod_python again shortly and will report >> back of my experience. I might try a different compiler also to test if >> it does not work to see if it makes a difference. In my gut, I am >> beginning to feel despite my best effort to keep the software of my >> machine up to date, my PPC is becoming a paper weight. This has really >> got me frustrated since my machine has still got plenty of life and I >> believed universal meant that PPC hardware users were not going to be >> left out in the cold. It has been an excellent development machine up to >> the time Universal build was introduced. I am running into similar >> linking issues with lxml. See below. What can be done about this :-( > > FWIW, lxml builds and runs just fine using easy_install on my PPC with > the latest universal build pythonmac 2.5.1 on 10.4.9. One obvious > difference apparent from your log file: on my system lxml is linking > with the Apple-supplied libxml2, libxslt, and libexslt in /usr/lib/, not > whatever you have in /opt/local/lib (presumably libs installed by port?). > From Jack.Jansen at cwi.nl Thu Apr 26 12:58:23 2007 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Thu, 26 Apr 2007 12:58:23 +0200 Subject: [Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app In-Reply-To: <07Apr25.115245pdt."57996"@synergy1.parc.xerox.com> References: <462F8858.4@noaa.gov> <462F8FEB.5040103@codebykevin.com> <07Apr25.115245pdt."57996"@synergy1.parc.xerox.com> Message-ID: On 25-apr-2007, at 20:52, Bill Janssen wrote: >> Christopher Barker wrote: >> >>> 1) is there a point-and-click and/or drag-and-drop way to create >>> *.dmgs? >> >> There are lots of freeware and shareware apps that do this-- >> FreeDMG is a >> good one. There are also command-line wrappers for hdiutils. Just >> google. > > I don't know about point and click, but a simple script app could be > wrapped around this: > > /usr/bin/hdiutil create -srcfolder SOMEDIR -volname VOLUMENAME -ov > OUTPUTFILE.dmg > > It creates a dmg with SOMEDIR as the contents. Now that this thread goes more and more offtopic I'll add something I've been struggling with for a while: is there a way to programmatically set the background image in the resulting DMG? What I'm doing now is create an R/W DMG containing all the files plus the background image in a hidden folder, then mount that and ask the user (i.e. me:-) to set the folder background image and position the icons, then press return. Then the script continues, unmounting the image and converting to an RO compressed DMG. I can't seem to find a way to set the folder background image through a shell command or applescript or anything... -- 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 ronaldoussoren at mac.com Thu Apr 26 15:50:40 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 26 Apr 2007 15:50:40 +0200 Subject: [Pythonmac-SIG] Building a 64-bit version of python Message-ID: <890C1F36-04BA-4F0E-B3F8-929D443B0832@mac.com> I know several people on this list are interested in a 64-bit build of python. The following procedure is a hack that gets you a basic 64- bit build of python. The build is universal, but for me only one of the two archictures actually worked: I did my build on an Intel system and the 64-bit build worked on that machine, but didn't work on a G5 mac. That's probably something shallow, but as that machine doesn't have the Xcode installed and is on the other side of a slow network connection I haven't tried to debug this yet. 1) Edit the configure script, look for "-arch i386" and "-arch ppc" and change that those to "-arch ppc64" and "-arch x86_64". You'll have to make multiple changes to the configure file. 2) Build using: $ mkdir build $ cd build $ CFLAGS="-arch ppc64 -arch x86_64" ../configure --enable- universalsdk \ --disable-toolbox-glue --prefix=/opt/python25-64bit $ make $ make install 3) Optionally: run "make testall" to run the unittests and check pyconfig.h to check the various SIZEOF definitions. You now have a 64-bit build of python in /opt/python25-64bit. Note that this is a quick hack and I haven't done extensive testing (and probably won't do so until I get around to working on a patch to add native support for 4-way universal builds to the python build process, which won't be any time soon). Also note that several extensions won't build in this setup because only libSystem is 64-bit at the moment. You will therefore not have ssl support, zlib, bz2 and hashlib. If you want those you'll have to build the needed libraries (openssl, zlib, bz2, ...) as 64-bit binaries by hand and install those in /usr/local. This copy of python says: ./python.exe Python 2.5.1 (r251:54863, Apr 26 2007, 15:09:03) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.maxint 9223372036854775807 >>> Ronald From python at blackslens.com Thu Apr 26 17:25:17 2007 From: python at blackslens.com (Black) Date: Thu, 26 Apr 2007 11:25:17 -0400 Subject: [Pythonmac-SIG] distutils question Message-ID: <42D6E585-ABE2-433D-9B1D-EE043C73010A@blackslens.com> [apologies if this appears twice, I sent this last night, but it doesn't appear to have appeared on the list...] I'm having a odd problem with distutils that I'm not sure I understand. Here is the background information: Arch: i386 OS: 10.4.9 Python: 2.5.1 swig: 1.3.31 I'm trying to build and install a wrapper around an already existing C ++ library I wrote a while ago and I'm using distutils to handle the whole thing for me. here is my setup.py: from distutils.core import setup, Extension module1 = Extension('_GLFT', library_dirs = ['/usr/local/lib', '/System/ Library/Frameworks/OpenGL.framework/Versions/Current/Libraries'], libraries = ['GLFT', 'GL', 'freetype'], include_dirs= ['/usr/include/freetype2','/usr/ local/include/GLFT','/usr/local/include', '/usr/local/include/ freetype2'], sources=['GLFT.i'], swig_opts=['-c++'], language='c++') setup(name='GLFT', version='1.0', description='This is a wrapper around libGLFT', options={'build_ext':{'swig_opts':'-c++'}}, platforms=['i386'], ext_modules=[module1]) On Linux, I use python setup.py install and everything installs fine. On OSX, swig runs fine, all of the files appear to be built, but something seems to happen in the installation phase. The _GLFT.so module gets installed and the egg info, but the generated GLFT.py is left behind. Can anyone tell me why that might be and how I can fix it? -Black From omri at logiamobile.com Wed Apr 25 09:22:16 2007 From: omri at logiamobile.com (Omri Reuter) Date: Wed, 25 Apr 2007 10:22:16 +0300 Subject: [Pythonmac-SIG] looking for a python Mac developer for freelance work Message-ID: <497700600DF6A54EB1E369218E6FB0E4762208@logia-mail.logiamobile.com> Hi, We have a very cool application written in python WX that we need ported to Macintosh. I'm looking for a freelance developer that has experience in Python on Mac and can take this project ASAP. I'm open to discuss any working model Regards, Omri Reuter CTO EglooMedia omri at egloomedia.com +972-52-5556369 +972-73-2525252 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20070425/022a6cc9/attachment.html