From Jack.Jansen at cwi.nl Mon Dec 1 04:36:35 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Mon Dec 1 04:36:07 2003 Subject: [Pythonmac-SIG] package manager breaks mac help In-Reply-To: References: <72590B62-0E16-11D8-A2A3-0030655234CE@cwi.nl> Message-ID: Has anyone else seen Apple Help being broken after installing the Python documentation? This is the first report I've had of it, and I need a bit more to debug this. On 29 Nov 2003, at 20:24, Samuel M. Smith wrote: > Where does the help file for the python reference documentation get > put? (as installed by the package manager) > > After trashing my everything in > my ~user/library/com.apple.helpui folder. the python reference now > shows up if i search all help. Apple Help is a bit weird. The help books are usually located inside applications, and are registered automatically for Cocoa programs but not for Carbon programs. The "MacPython Help" help book is located inside the help application "Python.app", deep down in Python.framework. On Jaguar that is also where the downloaded "Python Documentation" is, but on Panther it is inside PythonIDE.app. It doesn't get added to the help database until you run the IDE for the first time, though, as that is what registers the help book. -- Jack Jansen http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Mon Dec 1 04:46:20 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Mon Dec 1 04:45:50 2003 Subject: [Pythonmac-SIG] docutils in package manager download fails In-Reply-To: <34DDD6CE-22A2-11D8-BA59-000A95C4B360@samuelsmith.org> References: <72590B62-0E16-11D8-A2A3-0030655234CE@cwi.nl> <34DDD6CE-22A2-11D8-BA59-000A95C4B360@samuelsmith.org> Message-ID: <37A1C1F4-23E3-11D8-80B0-0030655234CE@cwi.nl> On 29 Nov 2003, at 20:28, Samuel M. Smith wrote: > When trying to install docutils 0.3 from the package manager (Panther) > the download fails. It was referring to a sourceforge mirror that seems to be getting more flaky by the day. I've changed the database to use a different mirror, so everything should be fine again. -- Jack Jansen http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Mon Dec 1 04:53:43 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Mon Dec 1 04:53:14 2003 Subject: [Pythonmac-SIG] compiling gdal against macpython In-Reply-To: References: Message-ID: <3FD19610-23E4-11D8-80B0-0030655234CE@cwi.nl> On 30 Nov 2003, at 3:49, Byron Amerson wrote: > Hi there. > > I have compiled gdal(geospatial data abstraction lib) on my imac > running > 10.3.1 - without python. The default build is with python, which would > be cool to have. > > evidently(I think) make is dissatisfied and can not see any dynamic > libs. > here is a sample of the output: > > ...stuff above > > /bin/sh ../libtool --mode=link g++ gdal_wrap.lo numpydataset.lo > gdalnumeric.lo ../libgdal.la -lm -ldl -L/usr/local/pgsql/lib -lpq > -L../.libs -o _gdalmodule.la \ > -rpath > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/site- > packages \ > -no-undefined \ > -avoid-version \ > -module > g++ -Wl,-bind_at_load -o .libs/_gdalmodule.so -bundle > .libs/gdal_wrap.o > .libs/numpydataset.o .libs/gdalnumeric.o -L/usr/local/pgsql/lib > ../.libs/libgdal.dylib -lm -ldl -lpq > -L/usr/local/src/gdal/gdal-cvs-031104/.libs > ld: Undefined symbols: > _PyArg_Parse > _PyArg_ParseTuple > _PyDict_New > _PyDict_Next There is something wrong with the way gdal builds the extension. I assume it is Makefile-based and not distutils based, because I don't think distutils ever used libtool (correct?). What happens is that it doesn't include a reference to the Python framework. This is okay for most flavors of unix: they will just remember all external references that weren't satisfied during the link phase and try to satisfy these at runtime. It doesn't work for MacOSX, though. Your best bet is to add "-framework Python" to the link command. Try adding it to your PYTHON_LIBS definition and see what happens. -- 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 byronea at u.washington.edu Mon Dec 1 12:14:46 2003 From: byronea at u.washington.edu (Byron Amerson) Date: Mon Dec 1 12:15:02 2003 Subject: [Pythonmac-SIG] compiling gdal against macpython In-Reply-To: <3FD19610-23E4-11D8-80B0-0030655234CE@cwi.nl> References: <3FD19610-23E4-11D8-80B0-0030655234CE@cwi.nl> Message-ID: Hi Jack, thanks for the response.... I thought it was something like that, though my understanding of the terms and details are minimal! The answer to the libtools question is unknown to me. Can you please tell me in fairly exact terms how I should define the python libs? as in the proper path to type in. Now, when I do change the definition, do I do this in the make file before I compile or in the GDALmake.opt file after I compile(it seems that this file is made by make, correct?). And if the latter, then once I change it, I go ahead and make install? Sorry about these questions, but this is new territory for me to be delving into. thanks Byron Amerson MS student University of Washington Department of Earth and Space Sciences On Mon, 1 Dec 2003, Jack Jansen wrote: > > On 30 Nov 2003, at 3:49, Byron Amerson wrote: > > > Hi there. > > > > I have compiled gdal(geospatial data abstraction lib) on my imac > > running > > 10.3.1 - without python. The default build is with python, which would > > be cool to have. > > > > evidently(I think) make is dissatisfied and can not see any dynamic > > libs. > > here is a sample of the output: > > > > ...stuff above > > > > /bin/sh ../libtool --mode=link g++ gdal_wrap.lo numpydataset.lo > > gdalnumeric.lo ../libgdal.la -lm -ldl -L/usr/local/pgsql/lib -lpq > > -L../.libs -o _gdalmodule.la \ > > -rpath > > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > > python2.3/site- > > packages \ > > -no-undefined \ > > -avoid-version \ > > -module > > g++ -Wl,-bind_at_load -o .libs/_gdalmodule.so -bundle > > .libs/gdal_wrap.o > > .libs/numpydataset.o .libs/gdalnumeric.o -L/usr/local/pgsql/lib > > ../.libs/libgdal.dylib -lm -ldl -lpq > > -L/usr/local/src/gdal/gdal-cvs-031104/.libs > > ld: Undefined symbols: > > _PyArg_Parse > > _PyArg_ParseTuple > > _PyDict_New > > _PyDict_Next > > There is something wrong with the way gdal builds the extension. I > assume it is Makefile-based and not distutils based, because I don't > think distutils ever used libtool (correct?). > > What happens is that it doesn't include a reference to the Python > framework. This is okay for most flavors of unix: they will just > remember all external references that weren't satisfied during the link > phase and try to satisfy these at runtime. > > It doesn't work for MacOSX, though. Your best bet is to add "-framework > Python" to the link command. Try adding it to your PYTHON_LIBS > definition and see what happens. > > -- > 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 kevino at tulane.edu Mon Dec 1 13:06:01 2003 From: kevino at tulane.edu (Kevin Ollivier) Date: Mon Dec 1 13:07:17 2003 Subject: [Pythonmac-SIG] Where is wx-config? In-Reply-To: References: <1525DD42-238C-11D8-9893-000A956FDAC0@fonnesbeck.org> <3FCD630C-23A3-11D8-B158-000393CB1C86@tulane.edu> Message-ID: <058C11B2-2429-11D8-B158-000393CB1C86@tulane.edu> Hi, Yipes, I just double-checked the OS X installer packages and it isn't in either of them! (the base or the devel package) Which version of OS X are you running? Thanks, Kevin On Nov 30, 2003, at 6:18 PM, Christopher Fonnesbeck wrote: > Thanks ... I've looked in all the obvious places, like /usr/local/bin > and /usr/bin, but it is not there! > > On Nov 30, 2003, at 9:08 PM, Kevin Ollivier wrote: > >> Check and see if wx-config is located at /usr/local/bin, and if so, >> try adding /usr/local/bin to your PATH environment variable. >> >> Kevin >> >> On Nov 30, 2003, at 3:22 PM, Christopher Fonnesbeck wrote: >> >>> I'm trying to compile a GIS program called Thuban that requires >>> wxPython (among other things), but am running into a strange problem >>> -- I seem to have lost wx-config. I get the following error when >>> building: >>> >>> python setup.py build >>> sh: line 1: wx-config: command not found >>> "wx-config --cflags " failed >>> /System/Library/Frameworks/Python.framework/Versions/2.3/lib/ >>> python2.3/distutils/dist.py:213: UserWarning: 'licence' distribution >>> option is deprecated; use 'license' >>> warnings.warn(msg) >>> running build >>> running build_py >>> running build_ext >>> building 'Lib.wxproj' extension >>> gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp >>> -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall >>> -Wstrict-prototypes -faltivec -lcc_dynamic -Ilibraries/shapelib >>> -I/usr/local/include -Ilibraries/pyshapelib/ >>> -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ >>> python2.3 -c libraries/thuban/wxproj.cpp -o >>> build/temp.darwin-7.0.0-Power_Macintosh-2.3/libraries/thuban/ >>> wxproj.o >>> libraries/thuban/wxproj.cpp:31:19: wx/wx.h: No such file or directory >>> libraries/thuban/wxproj.cpp:178: error: syntax error before `*' token >>> libraries/thuban/wxproj.cpp:185: error: `num_vertices' was not >>> declared in this >>> scope >>> libraries/thuban/wxproj.cpp:185: error: `num_parts' was not declared >>> in this >>> scope >>> libraries/thuban/wxproj.cpp:186: error: syntax error before `*' token >>> libraries/thuban/wxproj.cpp:193: error: `num_vertices' was not >>> declared in this >>> scope >>> libraries/thuban/wxproj.cpp:193: error: parse error before `;' token >>> libraries/thuban/wxproj.cpp:193: error: syntax error before `++' >>> token >>> libraries/thuban/wxproj.cpp:197: error: `x' was not declared in this >>> scope >>> libraries/thuban/wxproj.cpp:197: error: `y' was not declared in this >>> scope >>> libraries/thuban/wxproj.cpp:197: error: `forward' was not declared >>> in this >>> scope >>> libraries/thuban/wxproj.cpp:197: error: `inverse' was not declared >>> in this >>> scope >>> libraries/thuban/wxproj.cpp:198: error: `scalex' was not declared in >>> this scope >>> libraries/thuban/wxproj.cpp:198: error: `scaley' was not declared in >>> this scope >>> libraries/thuban/wxproj.cpp:198: error: `offx' was not declared in >>> this scope >>> libraries/thuban/wxproj.cpp:198: error: `offy' was not declared in >>> this scope >>> libraries/thuban/wxproj.cpp:199: error: `xs' was not declared in >>> this scope >>> libraries/thuban/wxproj.cpp:199: error: `i' was not declared in this >>> scope >>> libraries/thuban/wxproj.cpp:199: error: `ys' was not declared in >>> this scope >>> libraries/thuban/wxproj.cpp:199: error: `i' was not declared in this >>> scope >>> libraries/thuban/wxproj.cpp:199: warning: ISO C++ forbids >>> declaration of ` >>> project_point' with no type >>> libraries/thuban/wxproj.cpp:199: error: `int project_point' >>> redeclared as >>> different kind of symbol >>> libraries/thuban/wxproj.cpp:135: error: previous declaration of `void >>> project_point(double*, double*, PJ*, PJ*, double, double, double, >>> double, >>> double, double)' >>> libraries/thuban/wxproj.cpp:199: warning: initializer list being >>> treated as >>> compound expression >>> libraries/thuban/wxproj.cpp:200: error: `i' was not declared in this >>> scope >>> libraries/thuban/wxproj.cpp:200: error: syntax error before `.' token >>> libraries/thuban/wxproj.cpp:201: error: `i' was not declared in this >>> scope >>> libraries/thuban/wxproj.cpp:201: error: syntax error before `.' token >>> libraries/thuban/wxproj.cpp:211: error: syntax error before `>' token >>> libraries/thuban/wxproj.cpp:211: error: syntax error before `--' >>> token >>> libraries/thuban/wxproj.cpp:232: error: syntax error before `*' token >>> libraries/thuban/wxproj.cpp: In function `PyObject* >>> draw_polygon_init(PyObject*, PyObject*)': >>> libraries/thuban/wxproj.cpp:282: error: 'struct s_draw_info' has no >>> member >>> named 'dc' >>> libraries/thuban/wxproj.cpp:282: error: `wxDC' undeclared (first use >>> this >>> function) >>> libraries/thuban/wxproj.cpp:282: error: (Each undeclared identifier >>> is reported >>> only once for each function it appears in.) >>> libraries/thuban/wxproj.cpp:282: error: parse error before `)' token >>> libraries/thuban/wxproj.cpp:283: error: 'struct s_draw_info' has no >>> member >>> named 'dc' >>> libraries/thuban/wxproj.cpp: In function `PyObject* >>> draw_polygon_shape(PyObject*, PyObject*)': >>> libraries/thuban/wxproj.cpp:323: error: `wxPoint' undeclared (first >>> use this >>> function) >>> libraries/thuban/wxproj.cpp:323: error: `points' undeclared (first >>> use this >>> function) >>> libraries/thuban/wxproj.cpp:324: error: `wxPen' undeclared (first >>> use this >>> function) >>> libraries/thuban/wxproj.cpp:324: error: `pen' undeclared (first use >>> this >>> function) >>> libraries/thuban/wxproj.cpp:325: error: `wxBrush' undeclared (first >>> use this >>> function) >>> libraries/thuban/wxproj.cpp:325: error: `brush' undeclared (first >>> use this >>> function) >>> libraries/thuban/wxproj.cpp:327: error: `dc' undeclared (first use >>> this >>> function) >>> libraries/thuban/wxproj.cpp:344: error: parse error before `)' token >>> libraries/thuban/wxproj.cpp:359: error: parse error before `)' token >>> libraries/thuban/wxproj.cpp:379: error: `project_points' undeclared >>> (first use >>> this function) >>> libraries/thuban/wxproj.cpp:380: error: 'struct s_draw_info' has no >>> member >>> named 'dc' >>> libraries/thuban/wxproj.cpp:385: error: `wxTRANSPARENT_BRUSH' >>> undeclared (first >>> use this function) >>> libraries/thuban/wxproj.cpp:387: error: `wxTRANSPARENT_PEN' >>> undeclared (first >>> use this function) >>> libraries/thuban/wxproj.cpp:395: error: 'struct s_draw_info' has no >>> member >>> named 'dc' >>> libraries/thuban/wxproj.cpp:396: error: 'struct s_draw_info' has no >>> member >>> named 'dc' >>> libraries/thuban/wxproj.cpp: In function `PyObject* >>> shape_centroid(PyObject*, >>> PyObject*)': >>> libraries/thuban/wxproj.cpp:635: error: `project_point' cannot be >>> used as a >>> function >>> libraries/thuban/wxproj.cpp:641: error: `project_point' cannot be >>> used as a >>> function >>> error: command 'gcc' failed with exit status 1 >>> >>> I have wxPython installed alongside MacPython, so where should >>> wx-config end up? >>> >>> Thanks, >>> -- >>> Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) >>> Georgia Cooperative Fish & Wildlife Research Unit, University of >>> Georgia >>> >>> >>> _______________________________________________ >>> Pythonmac-SIG maillist - Pythonmac-SIG@python.org >>> http://mail.python.org/mailman/listinfo/pythonmac-sig >>> >> >> >> > -- > Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) > Georgia Cooperative Fish & Wildlife Research Unit, University of > Georgia > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From hengist.podd at virgin.net Mon Dec 1 14:37:52 2003 From: hengist.podd at virgin.net (has) Date: Mon Dec 1 15:15:02 2003 Subject: [Pythonmac-SIG] [ann] AppScripting 0.2.0 Message-ID: Hi, AppScripting 0.2.0 now posted: http://freespace.virgin.net/hamish.sanderson/ Notes: - Fully supports all reference forms except 'whose', though the 'range' form has some outstanding issues (see notes). - Documentation. - Formats application terminology as XHTML. Main issue right now is with enumerated types and how best to represent them as the current approach is no good (see notes). Thoughts? Comments? has -- http://freespace.virgin.net/hamish.sanderson/ From bob at redivi.com Mon Dec 1 15:19:56 2003 From: bob at redivi.com (Bob Ippolito) Date: Mon Dec 1 15:20:49 2003 Subject: [Pythonmac-SIG] aeve app.make help In-Reply-To: References: Message-ID: On Nov 30, 2003, at 1:11 AM, Winston Wolff wrote: > Would somebody be able to help me with aeve? I'm trying to automate > OmniGraffle along the lines of this example: > http://www.designweenie.com/content.php/mappingWithGraffle01.php > Eventually I want to generate various UML diagrams in OmniGraffle. > But first I'm having trouble just getting the hang of AppleScript via > Python. I've never used AppleScript, but I've gone through the > AppleScript Language Guide. So far I've successfully installed aeve > (0.0.4), the iCal example works, and now I want to do the equivalent > of this in Python: > > tell front document of application "OmniGraffle" > set shp to make new shape at end of graphics with properties ? > {origin:{100, 100}, size:{20, 20}, draws shadow:false, name:"Circle"} > end tell > > And this is what I've got so far: > > import aeve > app = aeve.talkto('/Applications/OmniGraffle.app') > from aeve.Applications import OmniGraffle as og > > origin = og.???._aereg_.iterObjectsForName("origin", > aekind="property", deep=True).next() > size = og. .???.._aereg_.iterObjectsForName("size", > aekind="property", deep=True).next() > name = og. .???.._aereg_.iterObjectsForName("name", > aekind="property", deep=True).next() > > shape = app.make(new=og.shape, with_properties={ origin:(100,100), > size:(20,20), name:"Circle" } ) > > The problem seems to be this iterObjectsForName() call. I don't know > what object to send this call to. Can anybody help? Any of the suite modules should do for "???", because the "deep" kwarg means that it will look in sibling suites. You can try the aevegen script to generate a python package and take a look at the "generated python source". You can even just pull the four character codes for the origin, size, and name properties and use those as the dictionary keys. You might have to use lists instead of tuples for origin and size, or it might not work at all, I haven't tried that. Alternatively, this might work (depends on the application, some let you do things like this). import aeve app = aeve.talkto('OmniGraffle') from aeve.Applications import OmniGraffle as og shape = app.make(new=og.shape) shape.name = 'Circle' shape.origin = [100, 100] shape.size = [20, 20] if not then this might work: import aeve app = aeve.talkto('OmniGraffle') from aeve.Applications import OmniGraffle as og shape = app.make(new=og.shape, with_properties={og.shape.origin: [100, 100], og.shape.size: [20, 20], og.shape.name:'Circle'}) I can't really help you any more than this though. I'm working on the next version of aeve, that has a lot of significant internal differences that should make "with_properties" easier (I'll probably special case it). I don't plan on supporting 0.0.4 or earlier versions. -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031201/5cfef9f9/smime.bin From stuff at obsidiancore.com Mon Dec 1 17:26:30 2003 From: stuff at obsidiancore.com (Just Stuff) Date: Mon Dec 1 17:26:35 2003 Subject: [Pythonmac-SIG] make locations with aeve In-Reply-To: References: Message-ID: <6982C26C-244D-11D8-A764-0030657607F0@obsidiancore.com> Okay, I've got another question now about the make() command. I'm still trying to execute this applescript, and I've got all the properties working. But I need to specify this "at end of graphics" argument. tell front document of application "OmniGraffle" set shp to make new shape ? with properties {origin:{100, 100}, size:{20, 20}} ? at end of graphics end tell Here's what I've got so far in python: import aeve app = aeve.talkto('com.omnigroup.OmniGraffle') #'/Applications/ OmniGraffle.app') from aeve.Applications import OmniGraffle as og shape = app.make(new=og.shape,with_properties={ og.graphic.origin: [100, 100], og.graphic.size: [20, 20], og.shape.name: 'Circle' } ) But it fails because it doesn't have the at ... argument, i.e. if I run the applescript without the at... argument, I get the same error. Any hints? -winston p.s. If there is some documentation I should be reading so I don't ask these simple questions, please point me to it. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2243 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031201/6b05067e/attachment.bin From bob at redivi.com Mon Dec 1 18:10:18 2003 From: bob at redivi.com (Bob Ippolito) Date: Mon Dec 1 18:09:51 2003 Subject: [Pythonmac-SIG] make locations with aeve In-Reply-To: <6982C26C-244D-11D8-A764-0030657607F0@obsidiancore.com> References: <6982C26C-244D-11D8-A764-0030657607F0@obsidiancore.com> Message-ID: <87999F8A-2453-11D8-8C90-000A95686CD8@redivi.com> On Dec 1, 2003, at 5:26 PM, Just Stuff wrote: > Okay, I've got another question now about the make() command. I'm > still trying to execute this applescript, and I've got all the > properties working. But I need to specify this "at end of graphics" > argument. > > tell front document of application "OmniGraffle" > set shp to make new shape ? > with properties {origin:{100, 100}, size:{20, 20}} ? > at end of graphics > end tell > > Here's what I've got so far in python: > > import aeve > app = > aeve.talkto('com.omnigroup.OmniGraffle') #'/Applications/ > OmniGraffle.app') > from aeve.Applications import OmniGraffle as og > > shape = app.make(new=og.shape,with_properties={ og.graphic.origin: > [100, 100], og.graphic.size: [20, 20], og.shape.name: 'Circle' } ) > > But it fails because it doesn't have the at ... argument, i.e. if I > run the applescript without the at... argument, I get the same error. > Any hints? It doesn't look like the scripting terminology actually says that you can get graphics from a document.. it's possible (but extremely awkward) to build this kind of reference, and I don't remember how off the top of my head. I guess you will have to wait for the next version of aeve. You could try AppScripting until then. -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031201/d09565d2/smime-0001.bin From stuff at obsidiancore.com Mon Dec 1 18:16:04 2003 From: stuff at obsidiancore.com (Winston) Date: Mon Dec 1 18:16:15 2003 Subject: [Pythonmac-SIG] make locations with aeve In-Reply-To: <87999F8A-2453-11D8-8C90-000A95686CD8@redivi.com> References: <6982C26C-244D-11D8-A764-0030657607F0@obsidiancore.com> <87999F8A-2453-11D8-8C90-000A95686CD8@redivi.com> Message-ID: <56206532-2454-11D8-A764-0030657607F0@obsidiancore.com> > It doesn't look like the scripting terminology actually says that you > can get graphics from a document.. it's possible (but extremely > awkward) to build this kind of reference, and I don't remember how off > the top of my head. I guess you will have to wait for the next > version of aeve. You could try AppScripting until then. > > -bob Oh well. Any time frame for the next version of aeve? I.e. weeks or months? I'd probably rather wait unless it is going to be months away. -winston From bob at redivi.com Mon Dec 1 18:22:19 2003 From: bob at redivi.com (Bob Ippolito) Date: Mon Dec 1 18:21:51 2003 Subject: [Pythonmac-SIG] make locations with aeve In-Reply-To: <56206532-2454-11D8-A764-0030657607F0@obsidiancore.com> References: <6982C26C-244D-11D8-A764-0030657607F0@obsidiancore.com> <87999F8A-2453-11D8-8C90-000A95686CD8@redivi.com> <56206532-2454-11D8-A764-0030657607F0@obsidiancore.com> Message-ID: <359F7E7C-2455-11D8-8C90-000A95686CD8@redivi.com> On Dec 1, 2003, at 6:16 PM, Winston wrote: >> It doesn't look like the scripting terminology actually says that you >> can get graphics from a document.. it's possible (but extremely >> awkward) to build this kind of reference, and I don't remember how >> off the top of my head. I guess you will have to wait for the next >> version of aeve. You could try AppScripting until then. > > Oh well. Any time frame for the next version of aeve? I.e. weeks or > months? I'd probably rather wait unless it is going to be months > away. Weeks -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031201/2522d7fb/smime.bin From hengist.podd at virgin.net Mon Dec 1 20:22:15 2003 From: hengist.podd at virgin.net (has) Date: Mon Dec 1 20:24:09 2003 Subject: [Pythonmac-SIG] make locations with aeve In-Reply-To: <87999F8A-2453-11D8-8C90-000A95686CD8@redivi.com> References: <6982C26C-244D-11D8-A764-0030657607F0@obsidiancore.com> <87999F8A-2453-11D8-8C90-000A95686CD8@redivi.com> Message-ID: Bob wrote: >>Okay, I've got another question now about the make() command. I'm >>still trying to execute this applescript, and I've got all the >>properties working. But I need to specify this "at end of >>graphics" argument. >> >[...] >It doesn't look like the scripting terminology actually says that >you can get graphics from a document.. It does - see OmniGraffle suite > document class > Elements > graphic >You could try AppScripting until then. You can, but mind it's still very rough and nowhere near ready for primetime. Right now its major problem is lousy handling of enums, and this'll cause some stuff to barf. (This'll be sorted by the next release, once I've figured out a decent solution.) Anyway, using v0.2.0: import AppScripting as AS omnigraffle = AS.app('OmniGraffle.app') omnigraffle.documents[0].graphics.end.make( new='shape', with_properties={ 'origin': [100, 100], 'size': [20, 20]}) Note here that AS provides a special-case for the 'make' command, whereby it can use the reference upon which it's called as its 'at' parameter (see Manual.txt for details). But if that freaks you out, you can still use the 'traditional' form: omnigraffle.make( new='shape', at=omnigraffle.documents[0].graphics.end with_properties={ 'origin': [100, 100], 'size': [20, 20]}) HTH has -- http://freespace.virgin.net/hamish.sanderson/ From dp at ulaluma.com Mon Dec 1 20:24:28 2003 From: dp at ulaluma.com (Donovan Preston) Date: Mon Dec 1 20:24:44 2003 Subject: [Pythonmac-SIG] make locations with aeve In-Reply-To: <6982C26C-244D-11D8-A764-0030657607F0@obsidiancore.com> References: <6982C26C-244D-11D8-A764-0030657607F0@obsidiancore.com> Message-ID: <459A81AE-2466-11D8-B751-000A95864FC4@ulaluma.com> On Dec 1, 2003, at 5:26 PM, Just Stuff wrote: > Okay, I've got another question now about the make() command. I'm > still trying to execute this applescript, and I've got all the > properties working. But I need to specify this "at end of graphics" > argument. > > tell front document of application "OmniGraffle" > set shp to make new shape ? > with properties {origin:{100, 100}, size:{20, 20}} ? > at end of graphics > end tell I had this same problem (needing to specify the "insertion location") when I was doing a lot of application scripting with gensuitemodule. I wrote a few helper functions which Jack put in aetools which make it convenient to specify a relative insertion location. Read on... > Here's what I've got so far in python: > > import aeve > app = > aeve.talkto('com.omnigroup.OmniGraffle') #'/Applications/ > OmniGraffle.app') > from aeve.Applications import OmniGraffle as og > > shape = app.make(new=og.shape,with_properties={ og.graphic.origin: > [100, 100], og.graphic.size: [20, 20], og.shape.name: 'Circle' } ) > > But it fails because it doesn't have the at ... argument, i.e. if I > run the applescript without the at... argument, I get the same error. > Any hints? I tried this with TextEdit, and had the same problem. I couldn't make a new document without specifying the insertion location: >>> import aeve >>> te = aeve.talkto('TextEdit.app') >>> from aeve.Applications import TextEdit >>> te.make(new=TextEdit.document) Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site- packages/aeve/aetypes/aecomplex.py", line 467, in bound_event_method return self(inst, *args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site- packages/aeve/aetypes/aecomplex.py", line 489, in __call__ raise aetools.Error, aetools.decodeerror(_reply, _arguments, _attributes) aeve.aetypes.aetools.Error: (8, u'NSInternalScriptError', None) So, on a hunch, I tried my helper function and it worked fine. This should also work for you in your attempt to get OmniGraffle to do your bidding: >>> import aetools >>> e = aetools.end(None) >>> te.make(new=TextEdit.document, at=e) Note that in this case, we want to insert the document at the end of the application, so we pass None (no target means "the application"), in your case you'll probably have to pass the document you want to make the shape in: >>> aetools.end(te.document[0]) InsertionLoc(document(1), Enum('end ')) Bob, you can look at the source of the aetools.end function yourself, it just builds a specifier with the right enumeration code ('end ') > p.s. If there is some documentation I should be reading so I don't ask > these simple questions, please point me to it. There isn't really any. Personally, I'm glad you are bringing up these questions (keep it up! :-). There are lots of people working on a lot of not-really-finished ways to script applications using AppleEvents with Python, but we're all doing it in our spare time, so none of the techniques are really fully finished or well documented yet. Everyone has different use cases for wanting a bridge, and some people will do things that nobody has ever tried to do before. As we find out what the rough spots are, we can polish them off and hopefully converge towards a mechanism for scripting applications that is both highly pythonic and highly compatible (and easy to use) dp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 4784 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031201/3aba7eb1/attachment.bin From Jack.Jansen at cwi.nl Tue Dec 2 07:24:35 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 2 07:24:10 2003 Subject: [Pythonmac-SIG] How does AppleScript find unqualified properties? In-Reply-To: References: Message-ID: <7D68BE27-24C2-11D8-9ABE-0030655234CE@cwi.nl> When I looked at Winston's original posting again I noticed something I don't understand. Usually, when you refer to a property AppleScript has enough context to know where that property should come from, but in the case given here it seems it doesn't: > tell front document of application "OmniGraffle" > set shp to make new shape at end of graphics with properties ? > {origin:{100, 100}, size:{20, 20}, draws shadow:false, name:"Circle"} > end tell I pondered this for a while, and I can see only two ways in which this could work: 1. "make new shape" has magic that tells it that when it's parsing "with properties" the names there come from a shape object. 2. The properties are really a global namespace. Does anyone know what goes on here? For some reason I cannot run the script (I get "OmniGraffle got an error: NSCannotCreateScriptCommandError"), but it does seem that I can change the script to tell front document of application "OmniGraffle" set props to {origin:{100, 100}, size:{20, 20}, draws shadow:false, name:"Circle"} set shp to make new shape at end of graphics with properties props end tell and at least it still gets past the "set props", so I'm inclined to think that there's a global namespace for properties? Either way, it seems that "with properties" is magic. Could we use this in our wrappers? I'm thinking of something along the lines of making it possible to say >>> shape = ap.make(new=og.shape, origin=(100,100), size=(20,20), name="Circle") This would be implemented by having make() collect all the unknown keyword arguments, look them up in the properties dict, stuffing them in a dict and passing that as the with_properties argument. Or is this too much magic? -- 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 -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 4547 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031202/b54dc319/attachment-0001.bin From bob at redivi.com Tue Dec 2 08:40:04 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Dec 2 08:39:35 2003 Subject: [Pythonmac-SIG] How does AppleScript find unqualified properties? In-Reply-To: <7D68BE27-24C2-11D8-9ABE-0030655234CE@cwi.nl> References: <7D68BE27-24C2-11D8-9ABE-0030655234CE@cwi.nl> Message-ID: <092BB3DC-24CD-11D8-B9E1-000A95686CD8@redivi.com> On Dec 2, 2003, at 7:24 AM, Jack Jansen wrote: > When I looked at Winston's original posting again I noticed something > I don't understand. Usually, when you refer to a property AppleScript > has enough context to know where that property should come from, but > in the case given here it seems it doesn't: > >> tell front document of application "OmniGraffle" >> set shp to make new shape at end of graphics with properties ? >> {origin:{100, 100}, size:{20, 20}, draws shadow:false, >> name:"Circle"} >> end tell > > I pondered this for a while, and I can see only two ways in which this > could work: > 1. "make new shape" has magic that tells it that when it's parsing > "with properties" the names there come from a shape object. > 2. The properties are really a global namespace. There are two namespaces, one for extensions and one for the current application (as far as the tell block goes). So yeah, it's global. > Does anyone know what goes on here? For some reason I cannot run the > script (I get "OmniGraffle got an error: > NSCannotCreateScriptCommandError"), but it does seem that I can change > the script to > tell front document of application "OmniGraffle" > set props to {origin:{100, 100}, size:{20, 20}, draws shadow:false, > name:"Circle"} > set shp to make new shape at end of graphics with properties props > end tell > and at least it still gets past the "set props", so I'm inclined to > think that there's a global namespace for properties? > > Either way, it seems that "with properties" is magic. Could we use > this in our wrappers? I'm thinking of something along the lines of > making it possible to say > >>> shape = ap.make(new=og.shape, origin=(100,100), size=(20,20), > name="Circle") > > This would be implemented by having make() collect all the unknown > keyword arguments, look them up in the properties dict, stuffing them > in a dict and passing that as the with_properties argument. > > Or is this too much magic? How is that any different from: shape = app.make(new=og.shape, with_properties=dict(origin=(100, 100), size=(20, 20), name="Circle")) ? 'with properties' isn't special, it's just an optional "kwarg" of the make command. -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031202/6075a602/smime.bin From Jack.Jansen at cwi.nl Tue Dec 2 09:33:58 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 2 09:33:36 2003 Subject: [Pythonmac-SIG] How does AppleScript find unqualified properties? In-Reply-To: <092BB3DC-24CD-11D8-B9E1-000A95686CD8@redivi.com> References: <7D68BE27-24C2-11D8-9ABE-0030655234CE@cwi.nl> <092BB3DC-24CD-11D8-B9E1-000A95686CD8@redivi.com> Message-ID: <909092FE-24D4-11D8-9ABE-0030655234CE@cwi.nl> On 2 Dec 2003, at 14:40, Bob Ippolito wrote: >> Either way, it seems that "with properties" is magic. Could we use >> this in our wrappers? I'm thinking of something along the lines of >> making it possible to say >> >>> shape = ap.make(new=og.shape, origin=(100,100), size=(20,20), >> name="Circle") >> >> This would be implemented by having make() collect all the unknown >> keyword arguments, look them up in the properties dict, stuffing them >> in a dict and passing that as the with_properties argument. >> >> Or is this too much magic? > > How is that any different from: > shape = app.make(new=og.shape, with_properties=dict(origin=(100, 100), > size=(20, 20), name="Circle")) ? 'with properties' isn't special, > it's just an optional "kwarg" of the make command. "origin" won't work there, if I read the other mails in the thread correctly you would have to say dict(og.graphic.origin=(100, 100), og.graphic.size=(20, 20), og.shape.name="Circle"). Or do I misunderstand, and would the simpler dict(og.origin=(100, 100), og.size=(20, 20), og.name="Circle") work too? If that is the case then I'd be happy. Hmm, no, that won't fly. At least, with the old gensuitemodule stuff I came across overloaded names: the same name used for both a class and a property. -- 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 smithsm at samuelsmith.org Tue Dec 2 15:52:14 2003 From: smithsm at samuelsmith.org (Samuel M. Smith) Date: Tue Dec 2 15:52:20 2003 Subject: [Pythonmac-SIG] pyrex on Panther In-Reply-To: <72590B62-0E16-11D8-A2A3-0030655234CE@cwi.nl> References: <72590B62-0E16-11D8-A2A3-0030655234CE@cwi.nl> Message-ID: <68817192-2509-11D8-AC05-000A95C4B360@samuelsmith.org> Has anybody tried installing/using pyrex with python 2.3 on Panther. Anything special to build the shared extensions that differs from the tutorial docs for pyrex? From bob at redivi.com Tue Dec 2 16:06:12 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Dec 2 16:05:56 2003 Subject: [Pythonmac-SIG] pyrex on Panther In-Reply-To: <68817192-2509-11D8-AC05-000A95C4B360@samuelsmith.org> References: <72590B62-0E16-11D8-A2A3-0030655234CE@cwi.nl> <68817192-2509-11D8-AC05-000A95C4B360@samuelsmith.org> Message-ID: <5BD94942-250B-11D8-A0D4-000A95686CD8@redivi.com> On Dec 2, 2003, at 3:52 PM, Samuel M. Smith wrote: > Has anybody tried installing/using pyrex with python 2.3 on Panther. > Anything special > to build the shared extensions that differs from the tutorial docs for > pyrex? Works fine, use the distutils method. -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031202/ecf4e162/smime.bin From hengist.podd at virgin.net Tue Dec 2 16:45:09 2003 From: hengist.podd at virgin.net (has) Date: Tue Dec 2 16:57:12 2003 Subject: [Pythonmac-SIG] How does AppleScript find unqualified properties? In-Reply-To: <7D68BE27-24C2-11D8-9ABE-0030655234CE@cwi.nl> References: <7D68BE27-24C2-11D8-9ABE-0030655234CE@cwi.nl> Message-ID: Jack wrote: >When I looked at Winston's original posting again I noticed >something I don't understand. Usually, when you refer to a property >AppleScript has enough context to know where that property should >come from, but in the case given here it seems it doesn't: > >>tell front document of application "OmniGraffle" >> set shp to make new shape at end of graphics with properties ? >> {origin:{100, 100}, size:{20, 20}, draws >>shadow:false, name:"Circle"} >>end tell > >I pondered this for a while, and I can see only two ways in which >this could work: >1. "make new shape" has magic that tells it that when it's parsing >"with properties" the names there come from a shape object. >2. The properties are really a global namespace. There's no magic to the 'make' command or its 'with properties' parameter. However, the AppleScript compiler _does_ use some "magic" when parsing source code: it looks for 'tell application "Foo"' blocks in the source code and temporarily adds the additional terminology to its table of known keywords while it parses the code within that block. This might be what's confusing you. As regards a record like the one in the example above, the compiler doesn't care what the keys are as long as they're valid (i.e. a class/property/variable name), and the application doesn't. >Does anyone know what goes on here? For some reason I cannot run the >script (I get "OmniGraffle got an error: >NSCannotCreateScriptCommandError"), Works fine here. Dunno why you'd be getting that error. (e.g. You'll get an NSContainerSpecifierError if there's no documents present when you execute it, but that's what you'd expect.) has -- http://freespace.virgin.net/hamish.sanderson/ From hengist.podd at virgin.net Tue Dec 2 20:04:54 2003 From: hengist.podd at virgin.net (has) Date: Tue Dec 2 20:18:15 2003 Subject: [Pythonmac-SIG] make locations with aeve In-Reply-To: <459A81AE-2466-11D8-B751-000A95864FC4@ulaluma.com> References: <6982C26C-244D-11D8-A764-0030657607F0@obsidiancore.com> <459A81AE-2466-11D8-B751-000A95864FC4@ulaluma.com> Message-ID: Donovan wrote: >>But it fails because it doesn't have the at ... argument, i.e. if I >>run the applescript without the at... argument, I get the same >>error. Any hints? > > >I tried this with TextEdit, and had the same problem. I couldn't >make a new document without specifying the insertion location: This is an "feature" of TextEdit/Cocoa's built-in scripting support. Carbon applications are generally smart enough to know where a document object is supposed to be inserted and take care of it automatically. Indeed, if you try to use 'make new document at end of documents' in something like Tex-Edit Plus (whose scripting support is leagues ahead of TextEdit's), it'll complain about it. TextEdit, however, is stupid, so despite there being only one place a new document can go it insists on you specifying it anyway, and will even let you specifiy stupid locations such as 'end of windows' without bothering to complain. Rough rules of thumb: Cocoa apps are Stupid. Carbon apps are not quite as Stupid. Application dictionaries are painfully, painfully inadequate. Anticipate plenty of trial-and-error when figuring out how things work. FWIW, I reckon the best place to ask for advice on scripting specific apps is probably be the MacScrpt mailing list: while a lot of discussion is AppleScript related it's not an AppleScript-specific list, so you might feel a bit more comfortable there than in a pure AppleScript forum. >>p.s. If there is some documentation I should be reading so I don't >>ask these simple questions, please point me to it. > >There isn't really any. The AppleScript Language Guide explains how application scripting operates, though it's all mixed in with AppleScript language-specific stuff, which is a bit irritating. (I hate that Apple always insist on mooshing application scripting and AppleScript language together like this when they're two completely different things. Guess that's Apple for you...) FWIW, the AppScripting 0.2.0 manual does describe all currently supported reference forms, along with various examples that should give you an idea of how they can be used. Individual application dictionaries will tell you which reference forms are supported for which elements, as well as describing the general containment structure. (Though they leave you to work out which commands work on which objects; a well-known flaw that'll eventually be fixed once sdefs replace aetes.) If you look at AppScripting as providing a query-style interface that happens to use Python syntax, rather than a conventional object model (unless you're using an object model that happens to have built-in array processing support, that is), then I think you'll find it easier to grasp the basic principles. That still leaves you to learn the particular vagaries (read: bugs, quirks and inconsistencies) of individual applications, of course. Apple doesn't seem to do an HCI guide on scripting interface design, unfortunately, and there's an awful lot of variation in both style and quality from app to app. A few apps do come with additional documentation and/or example scripts included; beyond that it's a case of searching out third-party scripts for examples of use (e.g. see ), asking around the mailing lists, and good old trial-and-error. A good place to start is by practising on basic applications that have good scripting implementations: Tex-Edit Plus, for example; Finder's also quite good (though does have some longstanding bugs). Once you get the hang of how app scripting should ideally work, you'll find it much easier dealing with other apps that don't get it quite so right. Welcome to the weird and wonderful - and frequently frustrating - world of application scripting, ;) has -- http://freespace.virgin.net/hamish.sanderson/ From paul at donovansbrain.co.uk Wed Dec 3 04:42:21 2003 From: paul at donovansbrain.co.uk (paul@donovansbrain.co.uk) Date: Wed Dec 3 04:42:25 2003 Subject: [Pythonmac-SIG] libxml2 on 10.3 (Panther) Message-ID: <.194.223.200.197.1070444541.squirrel@www.donovansbrain.co.uk> Hi, Despite the fact that 10.3 ships with libxml2, there doesn't appear to be a module to use it with Python 2.3 - 'import libxml2' says that the module doesn't exist. So, how do I get this working? Do I have to recompile libxml2? I'm a bit clueless when it comes to Python modules and the way they relate to other libraries. Thanks in advance, Paul From Jack.Jansen at cwi.nl Wed Dec 3 04:44:11 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Wed Dec 3 04:43:44 2003 Subject: [Pythonmac-SIG] How does AppleScript find unqualified properties? In-Reply-To: References: <7D68BE27-24C2-11D8-9ABE-0030655234CE@cwi.nl> Message-ID: <3F8C308C-2575-11D8-B435-0030655234CE@cwi.nl> On 2 Dec 2003, at 22:45, has wrote: >> Does anyone know what goes on here? For some reason I cannot run the >> script (I get "OmniGraffle got an error: >> NSCannotCreateScriptCommandError"), > > Works fine here. Dunno why you'd be getting that error. (e.g. You'll > get an NSContainerSpecifierError if there's no documents present when > you execute it, but that's what you'd expect.) Found out with the help of dsp later yesterday: I'm running OmniGraffle 3 and the original author was probably running omnigraffle 2. In v3 you have to say tell front document of application "OmniGraffle" set shp to make new shape at end of graphics of page 1 with properties ? {origin:{100, 100}, size:{20, 20}, draws shadow:false, name:"Circle"} end tell -- Jack Jansen http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Wed Dec 3 07:19:13 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Wed Dec 3 07:18:46 2003 Subject: [Pythonmac-SIG] libxml2 on 10.3 (Panther) In-Reply-To: <.194.223.200.197.1070444541.squirrel@www.donovansbrain.co.uk> References: <.194.223.200.197.1070444541.squirrel@www.donovansbrain.co.uk> Message-ID: On 3 Dec 2003, at 10:42, paul@donovansbrain.co.uk wrote: > Hi, > > Despite the fact that 10.3 ships with libxml2, there doesn't appear to > be > a module to use it with Python 2.3 - 'import libxml2' says that the > module > doesn't exist. > > So, how do I get this working? Do I have to recompile libxml2? I'm a > bit > clueless when it comes to Python modules and the way they relate to > other > libraries. Someone actually has to create the module first... To use an existing C library from Python you need a wrapper module, which takes care of converting data representations from Python to C and vice versa. This wrapper module is then what you import into Python. Creating a wrapper module is not trivial, but there are some tools to help you with it. The most popular one is swig, which you feed modified .h files and which then spits out a set of Python and C modules that wrap the library. Swig will also create wrapper modules for Perl and other language. An alternative is bgen, which is similar but more powerful (and therefore more complex to use). You can also create the wrapper module by hand, in C, but this is a lot of boring work. creating the wrapper in Pyrex is a better alternative, as Pyrex is a sort of Python-C-hybrid that takes care of all the boring boilerplate you would otherwise have to write in C, but you still have to manually write all the wrapper. -- 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 mwh at python.net Wed Dec 3 07:45:11 2003 From: mwh at python.net (Michael Hudson) Date: Wed Dec 3 07:45:15 2003 Subject: [Pythonmac-SIG] libxml2 on 10.3 (Panther) In-Reply-To: (Jack Jansen's message of "Wed, 3 Dec 2003 13:19:13 +0100") References: <.194.223.200.197.1070444541.squirrel@www.donovansbrain.co.uk> Message-ID: <2mhe0ixe7c.fsf@starship.python.net> Jack Jansen writes: > On 3 Dec 2003, at 10:42, paul@donovansbrain.co.uk wrote: > >> Hi, >> >> Despite the fact that 10.3 ships with libxml2, there doesn't appear >> to be a module to use it with Python 2.3 - 'import libxml2' says >> that the module doesn't exist. >> >> So, how do I get this working? Do I have to recompile libxml2? I'm >> a bit clueless when it comes to Python modules and the way they >> relate to other libraries. > > Someone actually has to create the module first... > > To use an existing C library from Python you need a wrapper module, > which takes care of converting data representations from Python to C > and vice versa. This wrapper module is then what you import into > Python. > > Creating a wrapper module is not trivial, but there are some tools > to help you with it. For the specific case of libxml2, though, I'm pretty sure someone has already done it :-) Cheers, mwh -- Just getting something to work usually means writing reams of code fast, like a Stephen King novel, but making it maintainable and high-quality code that really expresses the ideas well, is like writing poetry. Art is taking away. -- Erik Naggum, comp.lang.lisp From wildpixel at mac.com Wed Dec 3 10:01:36 2003 From: wildpixel at mac.com (Daniel Lord) Date: Wed Dec 3 10:01:41 2003 Subject: [Pythonmac-SIG] OmniGraffle and aeve problems In-Reply-To: References: Message-ID: <9771D96A-25A1-11D8-BCC4-000A95E68572@mac.com> Before I can join this discussion on OmniGraffle, I need a little help I cannot even make aeve compile a module for OminGraffle and I have had this problem with a few other apps as well. What does one do in this case? Shouldn't all scriptable applications have an 'AETE" resource. Why can't aeve find it then? python ./aeve/compiler.py "/Applications/OmniGraffle/OmniGraffle.app" Traceback (most recent call last): File "./aeve/compiler.py", line 104, in ? if __name__ == '__main__': main(*sys.argv) File "./aeve/compiler.py", line 94, in main module = generate(identifier, verbose=verbose, dump=dump) File "./aeve/compiler.py", line 61, in generate raise ValueError, "Can not find aete for file %r" % (identifier,) ValueError: Can not find aete for file '/Applications/OmniGraffle/OmniGraffle.app\n' python ./compiler.py --dump /Applications/OmniGraffle/OmniGraffle.app Traceback (most recent call last): File "./compiler.py", line 104, in ? if __name__ == '__main__': main(*sys.argv) File "./compiler.py", line 94, in main module = generate(identifier, verbose=verbose, dump=dump) File "./compiler.py", line 61, in generate raise ValueError, "Can not find aete for file %r" % (identifier,) ValueError: Can not find aete for file '/Applications/OmniGraffle/OmniGraffle.app' ls /Applications/OmniGraffle/Omnigraffle.app Contents So it's there. So how did some of you get aeve to compile a module? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1644 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031203/5b9422a3/attachment-0001.bin From bob at redivi.com Wed Dec 3 10:54:02 2003 From: bob at redivi.com (Bob Ippolito) Date: Wed Dec 3 10:53:26 2003 Subject: [Pythonmac-SIG] OmniGraffle and aeve problems In-Reply-To: <9771D96A-25A1-11D8-BCC4-000A95E68572@mac.com> References: <9771D96A-25A1-11D8-BCC4-000A95E68572@mac.com> Message-ID: On Dec 3, 2003, at 10:01 AM, Daniel Lord wrote: > Before I can join this discussion on OmniGraffle, I need a little help > I cannot even make aeve compile a module for OminGraffle and I have > had this problem with a few other apps as well. > What does one do in this case? Shouldn't all scriptable applications > have an 'AETE" resource. Why can't aeve find it then? > > python ./aeve/compiler.py "/Applications/OmniGraffle/OmniGraffle.app" Use pythonw, not python Also, you don't need to compile a module, you can just use omnigraffle = aeve.talkto('OmniGraffle') from your script or the interactive prompt In any case, aeve 0.0.4 and earlier is not well suited for "with properties" interaction with applications. You all can keep screwing around with it if you like, but the next version of aeve is a big cleanup/rewrite that can reasonably deal with this use case and should fix a bunch of other problems. -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031203/bd132aa2/smime.bin From barronsnyder at mac.com Wed Dec 3 13:39:56 2003 From: barronsnyder at mac.com (Barron Snyder) Date: Wed Dec 3 13:40:01 2003 Subject: [Pythonmac-SIG] bundlebuilder.py not found Message-ID: <175106DB-25C0-11D8-B516-003065B90B56@mac.com> I'm sorry if the answer to this is somewhere in the list archives but I couldn't find it. I'm using Python on OS X 10.3 and I've installed the MacPython 2.3 for Panther addons. Using the Package Manager, I installed PyObjC and then tried the Currency Converter tutorial included in the PyObjC documentation. At one point, bundlebuilder.py is called for but it was never installed on my machine as part of the PyObjC download within Package Manager. How do I get bundlebuilder.py? Can I get it through Package Manager? Any idea why it wasn't installed as part of the PyObjC package? Thanks, Barron From bob at redivi.com Wed Dec 3 13:49:36 2003 From: bob at redivi.com (Bob Ippolito) Date: Wed Dec 3 13:49:05 2003 Subject: [Pythonmac-SIG] bundlebuilder.py not found In-Reply-To: <175106DB-25C0-11D8-B516-003065B90B56@mac.com> References: <175106DB-25C0-11D8-B516-003065B90B56@mac.com> Message-ID: <711F5754-25C1-11D8-9473-000A95686CD8@redivi.com> On Dec 3, 2003, at 1:39 PM, Barron Snyder wrote: > I'm sorry if the answer to this is somewhere in the list archives but > I couldn't find it. > > I'm using Python on OS X 10.3 and I've installed the MacPython 2.3 for > Panther addons. Using the Package Manager, I installed PyObjC and then > tried the Currency Converter tutorial included in the PyObjC > documentation. At one point, bundlebuilder.py is called for but it was > never installed on my machine as part of the PyObjC download within > Package Manager. > > How do I get bundlebuilder.py? You already have it, you probably want to ln -s /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ plat-mac/bundlebuilder.py to somewhere in your PATH, like /usr/local/bin .. or make a shell alias > Can I get it through Package Manager? No, it came with Python 2.3, which came with OS X 10.3. > Any idea why it wasn't installed as part of the PyObjC package? It only gets installed by way of PyObjC if you are running Python 2.2 -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031203/636c980c/smime.bin From barronsnyder at mac.com Wed Dec 3 14:30:49 2003 From: barronsnyder at mac.com (Barron Snyder) Date: Wed Dec 3 14:30:59 2003 Subject: [Pythonmac-SIG] Re: bundlebuilder.py not found In-Reply-To: <711F5754-25C1-11D8-9473-000A95686CD8@redivi.com> Message-ID: <33674146-25C7-11D8-B516-003065B90B56@mac.com> On Wednesday, December 3, 2003, at 12:49 PM, Bob Ippolito wrote: > > On Dec 3, 2003, at 1:39 PM, Barron Snyder wrote: > >> I'm sorry if the answer to this is somewhere in the list archives but >> I couldn't find it. >> >> I'm using Python on OS X 10.3 and I've installed the MacPython 2.3 >> for Panther addons. Using the Package Manager, I installed PyObjC and >> then tried the Currency Converter tutorial included in the PyObjC >> documentation. At one point, bundlebuilder.py is called for but it >> was never installed on my machine as part of the PyObjC download >> within Package Manager. >> >> How do I get bundlebuilder.py? > > You already have it, you probably want to ln -s > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/plat-mac/bundlebuilder.py to somewhere in your PATH, like > /usr/local/bin .. or make a shell alias > >> Can I get it through Package Manager? > > No, it came with Python 2.3, which came with OS X 10.3. > >> Any idea why it wasn't installed as part of the PyObjC package? > > It only gets installed by way of PyObjC if you are running Python 2.2 > > -bob Thanks for your quick reply! bundlebuilder.py was exactly where you said it would be. For some reason, it doesn't show up when doing a search from the Finder. (any idea why that is?) I thought that it was part of PyObjC because in the tutorial it states to use the command: $ python2.3 $PYLIB/plat-mac/PyObjC/bundlebuilder.py --link --nib=MainMenu \ --mainprogram=CurrencyConverter.py --resource=MainMenu.nib build but I guess that is incorrect because bundlebuilder.py is not in the PyObjC directory. Thanks again for your help, Barron From njriley at uiuc.edu Wed Dec 3 14:51:33 2003 From: njriley at uiuc.edu (Nicholas Riley) Date: Wed Dec 3 14:51:41 2003 Subject: [Pythonmac-SIG] Re: bundlebuilder.py not found In-Reply-To: <33674146-25C7-11D8-B516-003065B90B56@mac.com> References: <711F5754-25C1-11D8-9473-000A95686CD8@redivi.com> <33674146-25C7-11D8-B516-003065B90B56@mac.com> Message-ID: <20031203195133.GA50732@uiuc.edu> On Wed, Dec 03, 2003 at 01:30:49PM -0600, Barron Snyder wrote: > bundlebuilder.py was exactly where you said it would be. For some > reason, it doesn't show up when doing a search from the Finder. (any > idea why that is?) As of 10.3, "Find" in the Finder does not search /System unless you explicitly add it. This has come up on several other mailing lists I'm on. Please file a bug and perhaps Apple will see some sense for 10.4. -- =Nicholas Riley | From bob at redivi.com Wed Dec 3 15:00:46 2003 From: bob at redivi.com (Bob Ippolito) Date: Wed Dec 3 15:00:15 2003 Subject: [Pythonmac-SIG] Re: bundlebuilder.py not found In-Reply-To: <33674146-25C7-11D8-B516-003065B90B56@mac.com> References: <33674146-25C7-11D8-B516-003065B90B56@mac.com> Message-ID: <624EB4AA-25CB-11D8-9473-000A95686CD8@redivi.com> On Dec 3, 2003, at 2:30 PM, Barron Snyder wrote: > > On Wednesday, December 3, 2003, at 12:49 PM, Bob Ippolito wrote: > >> >> On Dec 3, 2003, at 1:39 PM, Barron Snyder wrote: >> >>> I'm sorry if the answer to this is somewhere in the list archives >>> but I couldn't find it. >>> >>> I'm using Python on OS X 10.3 and I've installed the MacPython 2.3 >>> for Panther addons. Using the Package Manager, I installed PyObjC >>> and then tried the Currency Converter tutorial included in the >>> PyObjC documentation. At one point, bundlebuilder.py is called for >>> but it was never installed on my machine as part of the PyObjC >>> download within Package Manager. >>> >>> How do I get bundlebuilder.py? >> >> You already have it, you probably want to ln -s >> /System/Library/Frameworks/Python.framework/Versions/2.3/lib/ >> python2.3/plat-mac/bundlebuilder.py to somewhere in your PATH, like >> /usr/local/bin .. or make a shell alias >> >>> Can I get it through Package Manager? >> >> No, it came with Python 2.3, which came with OS X 10.3. >> >>> Any idea why it wasn't installed as part of the PyObjC package? >> >> It only gets installed by way of PyObjC if you are running Python 2.2 >> >> -bob > > Thanks for your quick reply! > > bundlebuilder.py was exactly where you said it would be. For some > reason, it doesn't show up when doing a search from the Finder. (any > idea why that is?) As far as I know, Finder doesn't index anything you can't typically navigate to. What I do is (from terminal): [crack:~] bob% locate "*/bundlebuilder.py" /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ plat-mac/bundlebuilder.py also since it's a python module you could do (or the interpreter equivalent) [crack:~] bob% python -c "import bundlebuilder;print bundlebuilder.__file__" /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ plat-mac/bundlebuilder.pyc If your locate database is not up to date run sudo /usr/libexec/locate.updatedb > I thought that it was part of PyObjC because in the tutorial it states > to use the command: > > $ python2.3 $PYLIB/plat-mac/PyObjC/bundlebuilder.py --link > --nib=MainMenu \ > --mainprogram=CurrencyConverter.py --resource=MainMenu.nib build > > but I guess that is incorrect because bundlebuilder.py is not in the > PyObjC directory. If you file a bug, I'm sure someone will fix it: http://sourceforge.net/tracker/?atid=114534&group_id=14534&func=browse -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031203/ca3727d0/smime.bin From kranki2 at earthlink.net Wed Dec 3 15:11:54 2003 From: kranki2 at earthlink.net (Bob W) Date: Wed Dec 3 15:12:00 2003 Subject: [Pythonmac-SIG] xchat2 problems Message-ID: First off, I am very new to developing/debugging under OSX and Python. So, I apologize for my ignorance upfront. xchat2 has been ported to MacOSX via Darwinports. They disabled Python support because they could not get their plugin to compile and link. I have gotten it to compile and link using "-framework System -framework Python -framework CoreServices -framework Foundation" under OSX 10.3. However, it does not run, yet. (I am thinking that there might be another module that isn't compiled to call python.so, but I am not sure.) Anyway, has anyone else compiled a program which embeds Python in 10.3 and does it look like I am approaching it correctly? Also, in OSX 10.2, should xchat2 use the builtin Python2.2 or should the Fink one be required? I would appreciate opinions on this. BTW, X-Chat Aqua is in the same situation kinda since it references Fink's Python2.2 when it is run in 10.3 and should really be referencing the Python Framework. I am hoping to correct this as well, but am finding converting the program to use Xcode a big deal for me. Both have a flawed test for python setup in the configure.in file which needs to be updated to use the Framework, I believe. (X-Chat Aqua uses xchat2 internally, but puts an Aqua face on it.) Last, thanks for any pointers that you might have. I am also joining the xchat discussions to find out where the configure.in file came from and who has responsibility for it. Again, thanks for any help that you provide. From skip at pobox.com Wed Dec 3 16:14:20 2003 From: skip at pobox.com (Skip Montanaro) Date: Wed Dec 3 16:14:39 2003 Subject: [Pythonmac-SIG] Re: bundlebuilder.py not found In-Reply-To: <20031203195133.GA50732@uiuc.edu> References: <711F5754-25C1-11D8-9473-000A95686CD8@redivi.com> <33674146-25C7-11D8-B516-003065B90B56@mac.com> <20031203195133.GA50732@uiuc.edu> Message-ID: <16334.21036.653291.766774@montanaro.dyndns.org> Nicholas> As of 10.3, "Find" in the Finder does not search /System Nicholas> unless you explicitly add it. So that's why when I searched for "Python" at the local Apple Store last night it didn't turn up. I thought they were trying to keep me from benchmarking their systems. ;-) Skip From chris at chrisholtz.com Wed Dec 3 16:28:17 2003 From: chris at chrisholtz.com (Christopher Holtz) Date: Wed Dec 3 16:28:22 2003 Subject: [Pythonmac-SIG] WxPython and mouse scroll wheel Message-ID: <9C11DCFA-25D7-11D8-91FB-0003938C6966@chrisholtz.com> This is my first post the group, so please bear with me. I installed the (presumably) latest version of wxPython on Panther recently and have been running the demo apps. Has anyone been able to get their mouse's scroll wheel to work (I couldn't stand it, I had to replace the default mac mouse :) Thanks for the help. - Chris From michael at possibleworlds.com Wed Dec 3 16:31:03 2003 From: michael at possibleworlds.com (michael ferraro) Date: Wed Dec 3 16:31:10 2003 Subject: [Pythonmac-SIG] changing Application Menu from pythonw In-Reply-To: <3EF8CEA9.7010607@myrealbox.com> References: <3EF8CEA9.7010607@myrealbox.com> Message-ID: Anyone know how I might change the application menu from "pythonw" to, for example, the name of the GUI application. I'm not sure if this is a PyQt question or a MacPython Question but, I tried here first I am using qt-mac-free-3.2.2 the latest snapshost of PyQt and SIP4.0 the Apple installed pythonw on Panther (10.3.1) I am aware that Qt automatically move preferences, about and other menus to the appropriate places but I have found no way to change the name of the Application menu . Thanks Michael From paul at donovansbrain.co.uk Wed Dec 3 16:49:12 2003 From: paul at donovansbrain.co.uk (Paul Donovan) Date: Wed Dec 3 16:49:31 2003 Subject: [Pythonmac-SIG] libxml2 on 10.3 (Panther) In-Reply-To: <2mhe0ixe7c.fsf@starship.python.net> References: <.194.223.200.197.1070444541.squirrel@www.donovansbrain.co.uk> <2mhe0ixe7c.fsf@starship.python.net> Message-ID: <88D9BAA3-25DA-11D8-B851-000393998ACA@donovansbrain.co.uk> On 3 Dec 2003, at 12:45, Michael Hudson wrote: > Jack Jansen writes: >> >> To use an existing C library from Python you need a wrapper module, >> which takes care of converting data representations from Python to C >> and vice versa. This wrapper module is then what you import into >> Python. >> >> Creating a wrapper module is not trivial, but there are some tools >> to help you with it. > > For the specific case of libxml2, though, I'm pretty sure someone has > already done it :-) > Well, I did some more searching today, and thought I found the solution on the libxml2 project page ;-) On http://www.xmlsoft.org/python.html it says: ? Otherwise use the libxml2-python module distribution corresponding to your installed version of libxml2 and libxslt. Note that to install it you will need both libxml2 and libxslt installed and run "python setup.py build install" in the module tree. So I downloaded ftp://xmlsoft.org/python/libxml2-python-2.5.4.tar.gz, unpacked it and ran the setup.py program. I got the following output, which to my eyes doesn't look _too_ bad: ------------------- /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ xmllib.py:10: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead. DeprecationWarning) Found 1138 functions in libxml2-api.xml Found 45 functions in libxml2-python-api.xml Generated 706 wrapper functions, 293 failed, 184 skipped Missing type converters: xmlXPathFuncLookupFunc:1 xmlRegExecCallbacks:1 xmlInputMatchCallback:1 xmlLocationSetPtr:6 xmlEnumerationPtr:5 xmlElementTablePtr:2 const htmlEntityDesc *:2 xmlChar **:14 xmlRegExecCtxtPtr:2 xmlEntityReferenceFunc:1 xmlTextReaderErrorFunc:1 xmlOutputMatchCallback:1 xmlExternalEntityLoader:2 xmlOutputWriteCallback:1 xmlNsPtr *:1 size_t:1 xmlXPathObjectPtr:22 xmlAttributeType:1 xmlValidCtxtPtr:23 xmlEnumerationPtr *:2 xmlBufferAllocationScheme:2 xmlNotationTablePtr:2 xmlXPathVariableLookupFunc:1 xmlShellCtxtPtr:10 xlinkNodeDetectFunc:2 xmlRefTablePtr:1 xmlCharEncodingHandler *:4 xmlElementContentPtr *:1 xmlRelaxNGValidityErrorFunc:2 xlinkHandlerPtr:2 xmlAttributeTablePtr:2 xmlC14NIsVisibleCallback:1 xmlDeregisterNodeFunc:1 htmlStatus:1 xmlCatalogPrefer:1 xmlParserNodeInfoSeqPtr:3 xmlShellReadlineFunc:1 htmlElemDesc *:3 xmlCharEncodingHandlerPtr:7 xmlNodePtr *:1 xmlCharEncodingInputFunc:1 xmlAutomataPtr:15 xmlXPathCompExprPtr:4 xmlInputReadCallback:1 char **:5 const xmlParserNodeInfo *:1 xmlCharEncoding:12 xmlNodeSetPtr:32 xmlParserInputPtr:17 xmlEntitiesTablePtr:3 xmlRegisterNodeFunc:1 xmlIDTablePtr:1 xmlXPathFunction:4 xmlCatalogAllow:2 xmlElementContentType:1 xmlElementContent *:1 xmlParserNodeInfoPtr:1 void *:44 xmlTextReaderErrorFunc *:1 xmlElementContentPtr:4 xmlNotationPtr:1 const htmlElemDesc *:1 xlinkType:1 xmlGenericErrorFunc *:1 Found 195 functions in libxslt-api.xml Found 27 functions in libxslt-python-api.xml Generated 120 wrapper functions, 99 failed, 3 skipped Missing type converters: xsltTopLevelFunction:2 xsltDecimalFormatPtr:2 xmlChar **:1 xmlXPathCompExprPtr:3 xsltNumberDataPtr:1 xsltElemPreCompPtr:2 xsltSortFunc:2 xsltSecurityPrefsPtr:11 xsltTemplatePtr:6 pythonObject *:4 ...:1 xsltPreComputeFunction:2 xmlNodePtr *:3 xsltExtInitFunction:2 char **:6 xmlXPathObjectPtr *:1 xmlNodeSetPtr:2 xmlXPathFunction:4 xsltTransformFunction:5 xsltCompMatchPtr:3 void *:7 xmlOutputBufferPtr:1 xsltDocumentPtr:7 xsltStylePreCompPtr:18 xsltStackElemPtr:3 failed to find headers for libxslt: update includes_dir /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ distutils/dist.py:213: UserWarning: 'licence' distribution option is deprecated; use 'license' warnings.warn(msg) running build running build_py file drv_libxml2.py (for module drv_libxml2) not found creating build creating build/lib.darwin-7.0.0-Power_Macintosh-2.3 copying libxml2.py -> build/lib.darwin-7.0.0-Power_Macintosh-2.3 file drv_libxml2.py (for module drv_libxml2) not found running build_ext building 'libxml2mod' extension creating build/temp.darwin-7.0.0-Power_Macintosh-2.3 gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/include/libxml2 -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3 -c libxml2-py.c -o build/temp.darwin-7.0.0-Power_Macintosh-2.3/libxml2-py.o gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/include/libxml2 -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3 -c types.c -o build/temp.darwin-7.0.0-Power_Macintosh-2.3/types.o gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/include/libxml2 -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3 -c libxml.c -o build/temp.darwin-7.0.0-Power_Macintosh-2.3/libxml.o libxml.c: In function `libxml_xmlTextReaderSetErrorHandler': libxml.c:1554: warning: comparison of distinct pointer types lacks a cast libxml.c:1584: warning: passing arg 2 of `xmlTextReaderSetErrorHandler' from incompatible pointer type libxml.c: In function `libxml_xmlTextReaderGetErrorHandler': libxml.c:1606: warning: comparison of distinct pointer types lacks a cast libxml.c: In function `libxml_xmlFreeTextReader': libxml.c:1639: warning: comparison of distinct pointer types lacks a cast gcc -Wl,-F. -Wl,-F. -bundle -framework Python build/temp.darwin-7.0.0-Power_Macintosh-2.3/libxml2-py.o build/temp.darwin-7.0.0-Power_Macintosh-2.3/libxml.o build/temp.darwin-7.0.0-Power_Macintosh-2.3/types.o -L/usr/lib -lxml2 -lm -lz -o build/lib.darwin-7.0.0-Power_Macintosh-2.3/libxml2mod.so running install running install_lib copying build/lib.darwin-7.0.0-Power_Macintosh-2.3/libxml2.py -> /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ site-packages copying build/lib.darwin-7.0.0-Power_Macintosh-2.3/libxml2mod.so -> /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ site-packages byte-compiling /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ site-packages/libxml2.py to libxml2.pyc ---------------- Unfortunately, trying 'import libxml2' in python results in the following fatal error: >>> import libxml2 Fatal Python error: Interpreter not initialized (version mismatch?) Abort trap So my next step is to try Jack's swig suggestion, but that looks reasonably tricky. I'm a professional (videogames) programmer, so I can hack most stuff, but this is all new to me. Paul -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2377 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031203/df81da02/smime.bin From wildpixel at mac.com Wed Dec 3 18:22:44 2003 From: wildpixel at mac.com (Daniel Lord) Date: Wed Dec 3 18:23:02 2003 Subject: [Pythonmac-SIG] OmniGraffle and aeve problems In-Reply-To: References: <9771D96A-25A1-11D8-BCC4-000A95E68572@mac.com> Message-ID: <9912A8CC-25E7-11D8-BCC4-000A95E68572@mac.com> Bob, Thanks again for writing aeve. I'll wait for the next version to send any messages and not clutter the list with questions on this version. I will of course still keep trying things *grin* though. On Dec 3, 2003, at 7:54, Bob Ippolito wrote: > On Dec 3, 2003, at 10:01 AM, Daniel Lord wrote: > >> Before I can join this discussion on OmniGraffle, I need a little help >> I cannot even make aeve compile a module for OminGraffle and I have >> had this problem with a few other apps as well. >> What does one do in this case? Shouldn't all scriptable applications >> have an 'AETE" resource. Why can't aeve find it then? >> >> python ./aeve/compiler.py "/Applications/OmniGraffle/OmniGraffle.app" > > Use pythonw, not python > > Also, you don't need to compile a module, you can just use > omnigraffle = aeve.talkto('OmniGraffle') > > from your script or the interactive prompt > > In any case, aeve 0.0.4 and earlier is not well suited for "with > properties" interaction with applications. You all can keep screwing > around with it if you like, but the next version of aeve is a big > cleanup/rewrite that can reasonably deal with this use case and should > fix a bunch of other problems. > > -bob From kevino at tulane.edu Wed Dec 3 18:22:54 2003 From: kevino at tulane.edu (Kevin Ollivier) Date: Wed Dec 3 18:24:03 2003 Subject: [Pythonmac-SIG] WxPython and mouse scroll wheel In-Reply-To: <9C11DCFA-25D7-11D8-91FB-0003938C6966@chrisholtz.com> References: <9C11DCFA-25D7-11D8-91FB-0003938C6966@chrisholtz.com> Message-ID: <9F0F8E62-25E7-11D8-B158-000393CB1C86@tulane.edu> Hi Chris, The current version does not have mouse wheel support, but it is supported in the latest development version (2.5). However, there hasn't been a release in the 2.5 series yet. I anticipate within a month or two (at most) we'll be able to put out a 2.5.1 release for wxPython. It will also have some other niceties, like some significant performance increases. =) Thanks, Kevin On Dec 3, 2003, at 1:28 PM, Christopher Holtz wrote: > This is my first post the group, so please bear with me. > > I installed the (presumably) latest version of wxPython on Panther > recently and have been running the demo apps. Has anyone been able to > get their mouse's scroll wheel to work (I couldn't stand it, I had to > replace the default mac mouse :) > > Thanks for the help. > > - Chris > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From stuart at stuartbishop.net Wed Dec 3 19:01:07 2003 From: stuart at stuartbishop.net (Stuart Bishop) Date: Wed Dec 3 19:02:43 2003 Subject: [Pythonmac-SIG] libxml2 on 10.3 (Panther) In-Reply-To: <88D9BAA3-25DA-11D8-B851-000393998ACA@donovansbrain.co.uk> References: <.194.223.200.197.1070444541.squirrel@www.donovansbrain.co.uk> <2mhe0ixe7c.fsf@starship.python.net> <88D9BAA3-25DA-11D8-B851-000393998ACA@donovansbrain.co.uk> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/12/2003, at 8:49 AM, Paul Donovan wrote: > Well, I did some more searching today, and thought I found the > solution on the libxml2 project page ;-) > > On http://www.xmlsoft.org/python.html it says: > > ? Otherwise use the libxml2-python module distribution corresponding > to your installed version of libxml2 and libxslt. Note that to install > it you will need both libxml2 and libxslt installed and run "python > setup.py build install" in the module tree. > > So I downloaded ftp://xmlsoft.org/python/libxml2-python-2.5.4.tar.gz, > unpacked it and ran the setup.py program. I got the following output, > which to my eyes doesn't look _too_ bad: Works for me following the exact same steps. +1 for sticking this module in package manager since the version of the python bindings needs to match the version of libxml2 shipped with OSX. > Unfortunately, trying 'import libxml2' in python results in the > following fatal error: > >>> import libxml2 > Fatal Python error: Interpreter not initialized (version mismatch?) > Abort trap Looks like the errors you get when you have a second Framework build of Python installed in /Library/Frameworks. - -- Stuart Bishop http://www.stuartbishop.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQE/znlKAfqZj7rGN0oRApPQAJ9xsIMHarsuPAB4znWlk+IPIBW4/ACfV5H5 9qlbgcDqj0G5oI5MyxVrqII= =knML -----END PGP SIGNATURE----- From paul at donovansbrain.co.uk Thu Dec 4 04:10:29 2003 From: paul at donovansbrain.co.uk (Paul Donovan) Date: Thu Dec 4 04:10:45 2003 Subject: [Pythonmac-SIG] libxml2 on 10.3 (Panther) In-Reply-To: References: <.194.223.200.197.1070444541.squirrel@www.donovansbrain.co.uk> <2mhe0ixe7c.fsf@starship.python.net> <88D9BAA3-25DA-11D8-B851-000393998ACA@donovansbrain.co.uk> Message-ID: On 4 Dec 2003, at 00:01, Stuart Bishop wrote: > > On 04/12/2003, at 8:49 AM, Paul Donovan wrote: > >> Unfortunately, trying 'import libxml2' in python results in the >> following fatal error: >> >>> import libxml2 >> Fatal Python error: Interpreter not initialized (version mismatch?) >> Abort trap > > Looks like the errors you get when you have a second Framework build > of Python installed in /Library/Frameworks. > Ah, that was it. I must have accidentally copied it over when I was rebuilding my Panther clean install with stuff from by 10.2 install. Thanks! How do I go about putting the finished module into the Package Manager? Is there any documentation on the procedure? Paul -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2377 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031204/24a597ee/smime.bin From Jack.Jansen at cwi.nl Thu Dec 4 05:56:28 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Thu Dec 4 05:56:38 2003 Subject: [Pythonmac-SIG] libxml2 on 10.3 (Panther) In-Reply-To: References: <.194.223.200.197.1070444541.squirrel@www.donovansbrain.co.uk> <2mhe0ixe7c.fsf@starship.python.net> <88D9BAA3-25DA-11D8-B851-000393998ACA@donovansbrain.co.uk> Message-ID: <833C7BB8-2648-11D8-8D1A-000A27B19B96@cwi.nl> On 4-dec-03, at 10:10, Paul Donovan wrote: > Ah, that was it. I must have accidentally copied it over when I was > rebuilding my Panther clean install with stuff from by 10.2 install. > Thanks! > > How do I go about putting the finished module into the Package > Manager? Is there any documentation on the procedure? You ask me:-) Actually, you find a couple of people who are interested, and ask me all together. If the package is purely distutils based and the official source tarball compiles and builds out of the box then just send me the URL. If the package needs some additional stuff then you can speed things up by providing me with a complete recipe of what to download, where to put it and which commands to run. With this specific package the question is what we want to do about OSX 10.2: a) forget about it b) support it only if a specific libxml2 (fink?) has already been installed c) go all the way, and create a libxml2 module with a statically linked libxml2 inside it. I'm tempted to go for (a), so shout if you really really want (b). (c) I'll only do if someone else does the work. -- 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 rswerdlow at transpose.com Thu Dec 4 09:08:05 2003 From: rswerdlow at transpose.com (Bob Swerdlow) Date: Thu Dec 4 09:08:16 2003 Subject: [Pythonmac-SIG] Panther build has locale problem on Jaguar Message-ID: <07a801c3ba70$0d34e660$046fa8c0@RSWERDLOW800> I'm using bundlebuilder on a machine with Panther to create a standalone python application. When I run it on a Panther machine, it works fine. However, if I try to run the application under Jaguar, I get this error: dyld: /Applications/Goombah.app/Contents/MacOS/Goombah Undefined symbols:Python undefined reference to _nl_langinfo expected to be defined in /usr/lib/libSystem.B.dylib The locale and _locale modules are included in the build - I assume that the problem is that they load this _nl_langinfo file at runtime and it is not there under Jaguar (or maybe it is on machines that don't have the Development Tools). Anyway, how do I fix this? Are there other runtime-loaded libraries that I'm likely to need as well? Thanks, Bob Swerdlow COO Transpose rswerdlow@transpose.com 207-781-8284 http://www.transpose.com ---------------------------------- Fight Spam! Add this link to your signature (as I did): http://wecanstopspam.org Click through to find out more. ---------------------------------- From stuff at obsidiancore.com Thu Dec 4 12:28:30 2003 From: stuff at obsidiancore.com (Winston) Date: Thu Dec 4 12:28:36 2003 Subject: [Pythonmac-SIG] make locations with aeve Message-ID: <472ACA5C-267F-11D8-A949-0030657607F0@obsidiancore.com> Has- Well, AppScripting works well, so I'm on my way to generating diagrams in OmniGraffle programmatically. It's pretty fun to write little python lines and see boxes and circles immediately appear on the screen. Thanks everyone for the help -- Bob, Jack, Has, and anyone else I forgot. Also to one person who speculated I had OmniGraffle 2, yes you are right. I haven't bothered to get OmniGraffle 3 yet. -winston > From: has > Date: 1-December-2003 5:22:15 PM PST > To: pythonmac-sig@python.org > Subject: Re: [Pythonmac-SIG] make locations with aeve > > > Bob wrote: > >>> Okay, I've got another question now about the make() command. I'm >>> still trying to execute this applescript, and I've got all the >>> properties working. But I need to specify this "at end of graphics" >>> argument. >>> >> [...] >> It doesn't look like the scripting terminology actually says that you >> can get graphics from a document.. > > It does - see OmniGraffle suite > document class > Elements > graphic > > >> You could try AppScripting until then. > > You can, but mind it's still very rough and nowhere near ready for > primetime. Right now its major problem is lousy handling of enums, and > this'll cause some stuff to barf. (This'll be sorted by the next > release, once I've figured out a decent solution.) > > Anyway, using v0.2.0: > > import AppScripting as AS > > omnigraffle = AS.app('OmniGraffle.app') > > omnigraffle.documents[0].graphics.end.make( > new='shape', > with_properties={ > 'origin': [100, 100], > 'size': [20, 20]}) > > > Note here that AS provides a special-case for the 'make' command, > whereby it can use the reference upon which it's called as its 'at' > parameter (see Manual.txt for details). But if that freaks you out, > you can still use the 'traditional' form: > > omnigraffle.make( > new='shape', > at=omnigraffle.documents[0].graphics.end > with_properties={ > 'origin': [100, 100], > 'size': [20, 20]}) > > > HTH > > has > -- > http://freespace.virgin.net/hamish.sanderson/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2474 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031204/3bceddef/attachment.bin From paul at donovansbrain.co.uk Thu Dec 4 16:24:01 2003 From: paul at donovansbrain.co.uk (Paul Donovan) Date: Thu Dec 4 16:24:22 2003 Subject: [Pythonmac-SIG] libxml2 on 10.3 (Panther) In-Reply-To: <833C7BB8-2648-11D8-8D1A-000A27B19B96@cwi.nl> References: <.194.223.200.197.1070444541.squirrel@www.donovansbrain.co.uk> <2mhe0ixe7c.fsf@starship.python.net> <88D9BAA3-25DA-11D8-B851-000393998ACA@donovansbrain.co.uk> <833C7BB8-2648-11D8-8D1A-000A27B19B96@cwi.nl> Message-ID: <2E166EC2-26A0-11D8-B851-000393998ACA@donovansbrain.co.uk> On 4 Dec 2003, at 10:56, Jack Jansen wrote: > > On 4-dec-03, at 10:10, Paul Donovan wrote: > >> How do I go about putting the finished module into the Package >> Manager? Is there any documentation on the procedure? > > You ask me:-) Actually, you find a couple of people who are > interested, and ask me all together. > > If the package needs some additional stuff then you can speed things > up by providing me with a complete recipe of what to download, where > to put it and which commands to run. > curl -O ftp://xmlsoft.org/python/libxml2-python-2.5.4.tar.gz tar xzvf libxml2-python-2.5.4.tar.gz cd libxml2-python-2.5.4 sudo python setup.py build install /Library/Python/2.3/ will now contain libxml2.py, libxml2.pyc and libxml2mod.so You'll know better than me whether the .py* files are required. If you want to test that the module works, download: http://ftp.linux.org.uk/mirrors/ftp.gnome.org/sources/libxml2/2.5/ libxml2-2.5.4.tar.bz2 unpack it, then cd to libxml2-2.5.4/python/tests. Each of the .py files in that folder will test various aspects of libxml2. They should all return 'OK' when run, although I found that 3 of the xpath tests leaked 4 or 8 bytes. > With this specific package the question is what we want to do about > OSX 10.2: > a) forget about it Gets my vote ;-) > b) support it only if a specific libxml2 (fink?) has already been > installed > http://www.zveno.com/open_source/libxml2xslt.html has the 'official' binaries (linked to from www.xmlsoft.org). It currently has version 2.6.2 for 10.2. You'd then obviously need to download the correct python bindings as detailed above. I haven't tested if it works, and it would mean that PackageManager would need to supply two different modules. Cheers, Paul -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2377 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031204/dbd4b2da/smime.bin From bob at redivi.com Thu Dec 4 17:01:27 2003 From: bob at redivi.com (Bob Ippolito) Date: Thu Dec 4 17:00:56 2003 Subject: [Pythonmac-SIG] libxml2 on 10.3 (Panther) In-Reply-To: <2E166EC2-26A0-11D8-B851-000393998ACA@donovansbrain.co.uk> References: <.194.223.200.197.1070444541.squirrel@www.donovansbrain.co.uk> <2mhe0ixe7c.fsf@starship.python.net> <88D9BAA3-25DA-11D8-B851-000393998ACA@donovansbrain.co.uk> <833C7BB8-2648-11D8-8D1A-000A27B19B96@cwi.nl> <2E166EC2-26A0-11D8-B851-000393998ACA@donovansbrain.co.uk> Message-ID: <690400C5-26A5-11D8-BB20-000A95686CD8@redivi.com> On Dec 4, 2003, at 4:24 PM, Paul Donovan wrote: > On 4 Dec 2003, at 10:56, Jack Jansen wrote: > >> >> On 4-dec-03, at 10:10, Paul Donovan wrote: >> >>> How do I go about putting the finished module into the Package >>> Manager? Is there any documentation on the procedure? >> >> You ask me:-) Actually, you find a couple of people who are >> interested, and ask me all together. >> >> If the package needs some additional stuff then you can speed things >> up by providing me with a complete recipe of what to download, where >> to put it and which commands to run. >> > > unpack it, then cd to libxml2-2.5.4/python/tests. Each of the .py > files in that folder will test various aspects of libxml2. They should > all return 'OK' when run, although I found that 3 of the xpath tests > leaked 4 or 8 bytes. Same results here (3 leaking tests, one skipped). What about libxslt functionality? Unless it's compiled as part of libxml, I think that it's missing, because I don't see any libxslt on my harddrive. If it's going to go in Package Manager I think that it should also include the libxslt wrapper (with xslt linked statically). Does anyone know what version of libxslt corresponds to libxml 2.5.4? -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031204/388512bc/smime.bin From paul at donovansbrain.co.uk Thu Dec 4 17:15:41 2003 From: paul at donovansbrain.co.uk (Paul Donovan) Date: Thu Dec 4 17:15:57 2003 Subject: [Pythonmac-SIG] libxml2 on 10.3 (Panther) In-Reply-To: <690400C5-26A5-11D8-BB20-000A95686CD8@redivi.com> References: <.194.223.200.197.1070444541.squirrel@www.donovansbrain.co.uk> <2mhe0ixe7c.fsf@starship.python.net> <88D9BAA3-25DA-11D8-B851-000393998ACA@donovansbrain.co.uk> <833C7BB8-2648-11D8-8D1A-000A27B19B96@cwi.nl> <2E166EC2-26A0-11D8-B851-000393998ACA@donovansbrain.co.uk> <690400C5-26A5-11D8-BB20-000A95686CD8@redivi.com> Message-ID: <6624DDEC-26A7-11D8-B851-000393998ACA@donovansbrain.co.uk> On 4 Dec 2003, at 22:01, Bob Ippolito wrote: > Same results here (3 leaking tests, one skipped). What about libxslt > functionality? Unless it's compiled as part of libxml, I think that > it's missing, because I don't see any libxslt on my harddrive. If > it's going to go in Package Manager I think that it should also > include the libxslt wrapper (with xslt linked statically). Does > anyone know what version of libxslt corresponds to libxml 2.5.4? > > I think it's missing in Panther too. http://www.zveno.com/open_source/libxml2xslt.html provides libxml2 and libxslt seperately. He has libxml2 2.6.2 and libxslt 1.1.0, so there's obviously no direct correlation in version numbers. According to http://www.xmlsoft.org/news.html, libxml2 2.5.4 was released on Feb 20th 2003. http://www.xmlsoft.org/XSLT/news.html puts libxslt at 1.0.26 at that time. I'm going to have a go at a) making the module again using the binary of libxslt 1.1.0 and b) building libxslt 1.0.26 with the Project Builder package from http://www.zveno.com/open_source/libxml2xslt.html I've no idea how to test that the libxslt methods in the module are working though... Paul -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2377 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031204/e2aa63e6/smime.bin From Jack.Jansen at cwi.nl Fri Dec 5 04:05:01 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Fri Dec 5 04:05:15 2003 Subject: [Pythonmac-SIG] Panther build has locale problem on Jaguar In-Reply-To: <07a801c3ba70$0d34e660$046fa8c0@RSWERDLOW800> References: <07a801c3ba70$0d34e660$046fa8c0@RSWERDLOW800> Message-ID: <1BAD79A2-2702-11D8-989C-000A27B19B96@cwi.nl> On 4-dec-03, at 15:08, Bob Swerdlow wrote: > I'm using bundlebuilder on a machine with Panther to create a > standalone > python application. When I run it on a Panther machine, it works fine. > However, if I try to run the application under Jaguar, I get this > error: > > dyld: /Applications/Goombah.app/Contents/MacOS/Goombah Undefined > symbols:Python undefined reference to _nl_langinfo expected to be > defined in > /usr/lib/libSystem.B.dylib Did you build Python yourself on Panther? If so, you should look at the cross-development stuff, which allows you to build on Panther but for deployment on Jaguar. Hmm, even if you used Apple's Python you probably have this same problem, because I think we can be pretty sure they didn't build for 10.2 compatibility. Try loading the MacPython Jaguar distribution and using that to build your standalone application. I think that should work. -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Fri Dec 5 04:43:13 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Fri Dec 5 04:43:15 2003 Subject: [Pythonmac-SIG] libxml2 on 10.3 (Panther) In-Reply-To: <2E166EC2-26A0-11D8-B851-000393998ACA@donovansbrain.co.uk> References: <.194.223.200.197.1070444541.squirrel@www.donovansbrain.co.uk> <2mhe0ixe7c.fsf@starship.python.net> <88D9BAA3-25DA-11D8-B851-000393998ACA@donovansbrain.co.uk> <833C7BB8-2648-11D8-8D1A-000A27B19B96@cwi.nl> <2E166EC2-26A0-11D8-B851-000393998ACA@donovansbrain.co.uk> Message-ID: <71A5E690-2707-11D8-989C-000A27B19B96@cwi.nl> >>> How do I go about putting the finished module into the Package >>> Manager? Is there any documentation on the procedure? >> >> You ask me:-) Actually, you find a couple of people who are >> interested, and ask me all together. >> >> If the package needs some additional stuff then you can speed things >> up by providing me with a complete recipe of what to download, where >> to put it and which commands to run. >> > > curl -O ftp://xmlsoft.org/python/libxml2-python-2.5.4.tar.gz > tar xzvf libxml2-python-2.5.4.tar.gz > cd libxml2-python-2.5.4 > sudo python setup.py build install Ok, that's easy enough. I've added libxml2 to the official PackMan database, for Panther only. libxslt will have to wait until someone does the work. -- 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 tony.mcdonald at ncl.ac.uk Fri Dec 5 06:02:23 2003 From: tony.mcdonald at ncl.ac.uk (Tony McDonald) Date: Fri Dec 5 06:02:41 2003 Subject: [Pythonmac-SIG] libxml2 on 10.3 (Panther) In-Reply-To: <71A5E690-2707-11D8-989C-000A27B19B96@cwi.nl> References: <.194.223.200.197.1070444541.squirrel@www.donovansbrain.co.uk> <2mhe0ixe7c.fsf@starship.python.net> <88D9BAA3-25DA-11D8-B851-000393998ACA@donovansbrain.co.uk> <833C7BB8-2648-11D8-8D1A-000A27B19B96@cwi.nl> <2E166EC2-26A0-11D8-B851-000393998ACA@donovansbrain.co.uk> <71A5E690-2707-11D8-989C-000A27B19B96@cwi.nl> Message-ID: <80F5AF04-2712-11D8-A2B8-003065F95ABC@ncl.ac.uk> On 5 Dec 2003, at 09:43, Jack Jansen wrote: >>>> How do I go about putting the finished module into the Package >>>> Manager? Is there any documentation on the procedure? >>> >>> You ask me:-) Actually, you find a couple of people who are >>> interested, and ask me all together. >>> >>> If the package needs some additional stuff then you can speed things >>> up by providing me with a complete recipe of what to download, where >>> to put it and which commands to run. >>> >> >> curl -O ftp://xmlsoft.org/python/libxml2-python-2.5.4.tar.gz >> tar xzvf libxml2-python-2.5.4.tar.gz >> cd libxml2-python-2.5.4 >> sudo python setup.py build install > > Ok, that's easy enough. I've added libxml2 to the official PackMan > database, for Panther only. libxslt will have to wait until someone > does the work. > -- > Jack Jansen, , http://www.cwi.nl/~jack Thing is, the latest libxml2-python is 2.6.0 (I believe). BUT, I've had real trouble getting that to work. This is with 2.6.0; import libxml2mod ImportError: Failure linking new module: : dyld: /System/Library/Frameworks/Python.framework/Versions/2.3//bin/python Undefined symbols: _htmlCreateMemoryParserCtxt _htmlCtxtReadDoc _htmlCtxtReadFd _htmlCtxtReadFile _htmlCtxtReadMemory _htmlCtxtReset _htmlCtxtUseOptions _htmlReadDoc _htmlReadFd _htmlReadFile _htmlReadMemory _xmlBuildQName _xmlCleanupGlobals _xmlCtxtReadDoc _xmlCtxtReadFd _xmlCtxtReadFile _xmlCtxtReadMemory _xmlCtxtReset _xmlCtxtUseOptions _xmlErrMemory _xmlInitGlobals _xmlReadDoc _xmlReadFd _xmlReadFil However, if you follow the instructions above, you'll get libxml2 python bindings that do work (barring a few memory leaks). tone. -- Dr Tony McDonald, Asst Director, FMSC. 0191 245 4223 Project Manager, FDTL-4 ePortfolios http://www.eportfolios.ac.uk/ From Jack.Jansen at cwi.nl Fri Dec 5 09:05:17 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Fri Dec 5 09:05:14 2003 Subject: [Pythonmac-SIG] Yet another problem with two Pythons on Panther Message-ID: <0DE4A761-272C-11D8-989C-000A27B19B96@cwi.nl> I think I've found the reason why people get so many problems when having both Apple-Python and user-installed Python 2.3 on Panther: the way extension modules are linked. I was creating the libxml2 package, and running package manager linked against apple-installed Python, but still the resulting module would crash with "interpreter not initialized". It took me a while, but finally I realized it is distutils linking that goes wrong: the extension module is linked with a "--framework Python", but this picks up /Library/Frameworks/Python.framework in preference to /System/Library/Frameworks/Python.framework! It's all logical when you think about it, but I had missed this until now. This could probably be fixed by adding a -F/System/Library/Frameworks to the builds, but I don't think we can do this for the existing 10.3/2.3 distribution. Or can someone think of a workaround? -- 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 tmp_edp at to.tmp.co.jp Sat Dec 6 14:06:36 2003 From: tmp_edp at to.tmp.co.jp (tmp_edp@to.tmp.co.jp) Date: Sat Dec 6 14:01:58 2003 Subject: [Pythonmac-SIG] InterScan NT Alert Message-ID: <200312061906.EAA00017@mxtos004.to.tmp.co.jp> $BAw?.pJs(I<=CQ$B!d(B Date: Sun, 07 Dec 2003 04:06:36 +0900 Method: Mail From: To: File: application.pif Action: deleted Virus: WORM_SOBIG.F From stuart.b at commonground.com.au Sat Dec 6 19:55:51 2003 From: stuart.b at commonground.com.au (Stuart Bishop) Date: Sat Dec 6 19:56:36 2003 Subject: [Pythonmac-SIG] Yet another problem with two Pythons on Panther In-Reply-To: <0DE4A761-272C-11D8-989C-000A27B19B96@cwi.nl> References: <0DE4A761-272C-11D8-989C-000A27B19B96@cwi.nl> Message-ID: <1A4F55F3-2850-11D8-9487-000A95A06FC6@commonground.com.au> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/12/2003, at 1:05 AM, Jack Jansen wrote: > This could probably be fixed by adding a -F/System/Library/Frameworks > to the builds, but I don't think we can do this for the existing > 10.3/2.3 distribution. Or can someone think of a workaround? Add /Library/Python/2.3/sitecustomize.py: # Add a directory to the start of sys.path so we can override # modules shipped with OSX without actually modifying anything in # /System import sys if sys.version_info[:3] == (2, 3, 0): sys.path.insert(0, '/Library/Python/2.3.0-patches') Then stick a patched version of distutils in /Library/Python/2.3.0-patches to overshadow the real one. Extra points for renaming any existing /Library/Python/2.3/sitecustomize.py and importing it at the end of the new one. Hmmm.... I wonder if this gross and incredibly stupid hack would work? /Library/Python/2.3/sitecustomize.py: import sys, os if sys.version_info == (2, 3, 0, 'final', 0): # Relaunch with patch release Python os.execl( '/Library/Frameworks/Python.framework/Versions/2.3/bin/python', sys.argv ) :-) - -- Stuart Bishop http://www.stuartbishop.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQE/0nqbAfqZj7rGN0oRAqyyAJ9VEcWVzm0oMk5s5lzdzwjcWMJXkQCfX8Zo 1EXaCg08KTzDxj8R5CW0bNs= =K4JU -----END PGP SIGNATURE----- From zcorb at fluidarch.com Sat Dec 6 23:56:07 2003 From: zcorb at fluidarch.com (Zachery Corbiere) Date: Sat Dec 6 23:56:03 2003 Subject: [Pythonmac-SIG] omniORBpy weirdness on Panther Message-ID: I have a strange issue with omniORBpy on Panther. omniORBpy is a CORBA ORB written in C++. The python binding is, itself, a c++ file with the Python-important symbols declared "extern C {}". The problem is that "singleton" objects within the omniORB code are being created twice when I import the omniORB module into Python. However, I've verified that static constructors are only executed once (or at lest that's what it seems like). For example, in the following code: orbOptions& orbOptions::singleton() { static orbOptions* singleton_ = 0; if (!singleton_) { singleton_ = new orbOptions(); } return *singleton_; } singleton_ is being initialized two times. I've verified this both by placing debug printfs inside the if{} block as well as within the orbOptions constructor (which is private). This particular singleton is first accessed by some static constructors, and I haven't figured out how to trace into that with gdb yet (hints?). The same code works fine on Linux and Win32. I'm a total newbie in OSX development. I'm sort of hoping someone says something like, "Oh, yeah, that's such and so problem. Happens all the time, and you fix it like this..." ;-) Thanks for any help! -- Zac Corbiere zcorb@fluidarch.com From Jack.Jansen at cwi.nl Sun Dec 7 17:19:40 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Sun Dec 7 17:19:41 2003 Subject: [Pythonmac-SIG] Yet another problem with two Pythons on Panther In-Reply-To: <1A4F55F3-2850-11D8-9487-000A95A06FC6@commonground.com.au> References: <0DE4A761-272C-11D8-989C-000A27B19B96@cwi.nl> <1A4F55F3-2850-11D8-9487-000A95A06FC6@commonground.com.au> Message-ID: <735E5ACA-2903-11D8-B91D-000A27B19B96@cwi.nl> On 7-dec-03, at 1:55, Stuart Bishop wrote: > On 06/12/2003, at 1:05 AM, Jack Jansen wrote: > >> This could probably be fixed by adding a -F/System/Library/Frameworks >> to the builds, but I don't think we can do this for the existing >> 10.3/2.3 distribution. Or can someone think of a workaround? > > Add /Library/Python/2.3/sitecustomize.py: > > # Add a directory to the start of sys.path so we can override > # modules shipped with OSX without actually modifying anything in > # /System > import sys > if sys.version_info[:3] == (2, 3, 0): > sys.path.insert(0, '/Library/Python/2.3.0-patches') Good idea!! Unfortunately, it won't fly:-( Because what we need to edit is the Makefile in $prefix/lib/python2.3/config: this is where distutils picks up the configuration variables to use during build. I am fixing things up for 2.4 right now, but I don't see yet how this could be backported... -- 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 stuart.b at commonground.com.au Sun Dec 7 19:48:56 2003 From: stuart.b at commonground.com.au (Stuart Bishop) Date: Sun Dec 7 19:51:10 2003 Subject: [Pythonmac-SIG] Yet another problem with two Pythons on Panther In-Reply-To: <735E5ACA-2903-11D8-B91D-000A27B19B96@cwi.nl> References: <0DE4A761-272C-11D8-989C-000A27B19B96@cwi.nl> <1A4F55F3-2850-11D8-9487-000A95A06FC6@commonground.com.au> <735E5ACA-2903-11D8-B91D-000A27B19B96@cwi.nl> Message-ID: <4DCC00D7-2918-11D8-A82C-000A95A06FC6@commonground.com.au> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/12/2003, at 9:19 AM, Jack Jansen wrote: > On 7-dec-03, at 1:55, Stuart Bishop wrote: >> On 06/12/2003, at 1:05 AM, Jack Jansen wrote: >> >>> This could probably be fixed by adding a >>> -F/System/Library/Frameworks to the builds, but I don't think we can >>> do this for the existing 10.3/2.3 distribution. Or can someone think >>> of a workaround? >> >> Add /Library/Python/2.3/sitecustomize.py: >> >> # Add a directory to the start of sys.path so we can override >> # modules shipped with OSX without actually modifying anything in >> # /System >> import sys >> if sys.version_info[:3] == (2, 3, 0): >> sys.path.insert(0, '/Library/Python/2.3.0-patches') > > Good idea!! > > Unfortunately, it won't fly:-( > > Because what we need to edit is the Makefile in > $prefix/lib/python2.3/config: this is where distutils picks up the > configuration variables to use during build. But the point is we won't be running standard distutils after adding the above sitecustomize.py, but a patched version that can define any behavior we like. Sounds like the only patch needed to distutils would be to hard code the extra option in the parse_makefile function in distutils/sysconfig.py. Or just alter the get_makefile_filename function to use a different Makefile. It won't work for modules using the pre-distutils build methods, but they are getting pretty rare (?). - -- Stuart Bishop http://www.stuartbishop.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD4DBQE/08qAAfqZj7rGN0oRAoAMAJdurTzYHjXr/wHzWUML6zvSWlcqAJ9R8AtM dwmeQ5KrOwH+Ayqgt4qqmw== =I0MI -----END PGP SIGNATURE----- From kevin at wordtechweb.com Mon Dec 8 03:58:53 2003 From: kevin at wordtechweb.com (Kevin Walzer) Date: Mon Dec 8 04:06:17 2003 Subject: [Pythonmac-SIG] Newbie question on MacPython--Carbon & Cocoa Message-ID: I'm a newbie to programming and I'm starting with Python because the language is both simple and powerful. As a Mac person, though, I'm interested in developing small GUI applications. I have played around a little bit with Pythoncard and wxPython, and it seems to be a good combination, but I'd prefer to take advantage of OS X-specific technologies for the interface. My question concerns the integration of Python with the Carbon and Cocoa environments. Is it possible to build a GUI for MacPython with Interface Builder via the Carbon modules? The documentation I've read is not clear on that point. The same question applies to Cocoa via the PyObjC bridge. Could one build a GUI with Interface Builder if the PyObjC bridge is installed, with Python code on the back end? Does PyObjC translate cleanly between the two languages? If the answer to both questions is yes, which is simpler to work with? Thanks. --- Kevin Walzer, Ph.D. Editor WordTech Communications -- A New Paradigm of Poetry http://www.wordtechcommunications.com http://www.smallbizmac.com http://www.kevin-walzer.com mailto:kevin@wordtechweb.com From oussoren at cistron.nl Mon Dec 8 06:26:37 2003 From: oussoren at cistron.nl (Ronald Oussoren) Date: Mon Dec 8 06:26:44 2003 Subject: [Pythonmac-SIG] Newbie question on MacPython--Carbon & Cocoa In-Reply-To: References: Message-ID: <62D4EBBF-2971-11D8-AC03-0003931CFE24@cistron.nl> On 8 dec 2003, at 9:58, Kevin Walzer wrote: > I'm a newbie to programming and I'm starting with Python because the > language is both simple and powerful. As a Mac person, though, I'm > interested in developing small GUI applications. I have played around > a little bit with Pythoncard and wxPython, and it seems to be a good > combination, but I'd prefer to take advantage of OS X-specific > technologies for the interface. > > My question concerns the integration of Python with the Carbon and > Cocoa environments. Is it possible to build a GUI for MacPython with > Interface Builder via the Carbon modules? The documentation I've read > is not clear on that point. There is an Carbon.IBCarbon module, that probably can be used for this. > > The same question applies to Cocoa via the PyObjC bridge. Could one > build a GUI with Interface Builder if the PyObjC bridge is installed, > with Python code on the back end? Does PyObjC translate cleanly > between the two languages? Yes, using Interface Builder was one of the explicit goals of the PyObjC rewrite of last year. > > If the answer to both questions is yes, which is simpler to work with? I don't know Carbon.IBCarbon, but PyObjC is pretty easy to work with. The big advantage of Cocoa over Carbon is that Cocoa is an full-featured OO framework. Ronald From RBURNS at tacoma.k12.wa.us Mon Dec 8 15:08:58 2003 From: RBURNS at tacoma.k12.wa.us (RANDY BURNS) Date: Mon Dec 8 15:09:45 2003 Subject: [Pythonmac-SIG] I have a small python application that works fine on a pc and under the interpreter on a mac running Message-ID: I have a small python application that works fine on a pc and under the interpreter on a mac running OSX panther I'm attempting to package this as per the instructions here: http://www.python.org/cgi-bin/moinmoin/BundleBuilder I think the problem may be that I'm not specifying all the binary libraries needed I'd really appreciate a pointer here. Thanks! RJB =================================================== # these are the import statements from my application from PythonCardPrototype import model import os, re, sys from PythonCardPrototype.components import radiogroup import shutil ======================================== #here is the appbuilder file ########################### import bundlebuilder, os packageroot="/rjb/setserver" myapp=bundlebuilder.AppBuilder(verbosity=1) myapp.mainprogram=os.path.join(packageroot,"setserver.py") myapp.standalone=1 myapp.name="setserver" myapp.includePackages.append("/Library/Python/2.3/PythonCardPrototype/model") myapp.includePackages.append("/Library/Python/2.3/PythonCardPrototype/components/radiogroup") myapp.includePackages.append("os") myapp.includePackages.append("re") myapp.includePackages.append("sys") myapp.libs.append("/usr/local/lib/libwx_mac-2.4.0.dylib") myapp.libs.append("/usr/local/lib/libwx_mac-2.4.0.rsrc") myapp.setup() myapp.build() ========================== # here is the output when I run the following pythonw buildapp.py --standalone --strip build ############################################# Finding module dependencies /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-mac/Carbon/Controls.py:11: FutureWarning: hex/oct constants > sys.maxint will return positive values in Python 2.4 and up kDataBrowserClientPropertyFlagsMask = 0xFF000000 Building 'build/setserver.app' Copying files Adding Python modules Warning: couldn't find the following submodules: (Note that these could be false alarms -- it's not always possible to distinguish between "from package import submodule" and "from package import name") ? OverrideFrom23._Res ? os.path ? wxPython.lib.PyCrust.introspect Warning: couldn't find the following modules: ? Image ? _xmlplus ? clip_dndc ? cmndlgsc ? controls2c ? controlsc ? eventsc ? filesysc ? fontsc ? framesc ? gdic ? imagec ? mdic ? misc2c ? miscc ? printfwc ? readline ? sizersc ? stattoolc ? streamsc ? utilsc ? windows2c ? windows3c ? windowsc Done. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031208/d5db8f2d/attachment.html From bob at redivi.com Mon Dec 8 15:39:15 2003 From: bob at redivi.com (Bob Ippolito) Date: Mon Dec 8 15:38:40 2003 Subject: [Pythonmac-SIG] I have a small python application that works fine on a pc and under the interpreter on a mac running In-Reply-To: References: Message-ID: <96CFF714-29BE-11D8-B730-000A95686CD8@redivi.com> On Dec 8, 2003, at 3:08 PM, RANDY BURNS wrote: > I have a small python application that works fine on a pc and under > the interpreter on a mac running OSX?panther > ? > I'm attempting to package this? as per the instructions here: > http://www.python.org/cgi-bin/moinmoin/BundleBuilder > ? > I think the problem may be that I'm not specifying all the > binary?libraries needed > I'd really appreciate a pointer here. What you're showing here are bundlebuilder warnings, not errors. --standalone or --semi-standalone will almost always generate warnings because modulefinder tends to guess wrong, so this is expected behavior. It analyzes parse trees if Python code without executing it, so it can't always be correct due to the dynamic nature of Python. So in effect, your email doesn't actually state a problem. However, it is entirely possible (and probably likely) that you are missing modules, so the app bundle you have built might not work. The best way I've found to determine this is to run the application and look at the console output to determine which import caused a traceback. Another quick way to determine the modules that it needs is to have it dump sys.modules.keys() to the on exit, and you can compare the two (the working interpreter version, and the non-working standalone version) to see which modules/packages you need to add. This, of course, is only good if running your app causes it to load all of the modules it will use, but that's typical behavior for most applications (early import vs. late import). There is also a potential that you are missing dylib or framework libraries, which is a much more difficult issue to resolve (until I release my mach-o walking version of bundlebuilder) but will manifest itself as a dyld error and may tell you which file it's missing. If not, you'll have to otool -Lv somePythonExtension.so and look at the load commands to see which non-/System and non-/usr/lib files it links to. An example would be what you've done to include the wxWindows dylibs. It is also worthy of mention that --standalone is worthless for Python 2.3 on OS X 10.3, and you should be using --semi-standalone instead. This is because the executable produced is only compatible with OS X 10.3 (it is NOT backwards compatible to 10.2). Everyone currently capable of running your app (10.3 users) will already have the correct installation of Python, so --standalone is just unnecessary bloat. BTW, your bundlebuilder script might be clearer if you used the typical conventions (using kwargs of bundlebuilder.buildapp()) or at least changed the multiple calls to someList.append(...) to a single someList.extend([....]). -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031208/8c60efbf/smime.bin From rowen at cesmail.net Mon Dec 8 15:39:45 2003 From: rowen at cesmail.net (Russell E. Owen) Date: Mon Dec 8 15:39:49 2003 Subject: [Pythonmac-SIG] How easy to just replace Panther's Python? Message-ID: I hope this isn't a stupid question, but how easy is it to overwrite Panther's python (to avoid the issue of conficting versions of python)? Will the binary installer do it, or should one install from source? This is a very important question to me right now, because Python 2.3's tkFileDialog.askopenfilename is broken, breaking a feature of my application. I'm not sure what to tell users on MacOS X 10.3 as to how to safely install a newer python. -- Russell (By the way, I haven't gotten around to installing Panther myself, yet.) From RBURNS at tacoma.k12.wa.us Mon Dec 8 18:12:04 2003 From: RBURNS at tacoma.k12.wa.us (RANDY BURNS) Date: Mon Dec 8 18:12:53 2003 Subject: [Pythonmac-SIG] I have a small python application that works fineon a pc and under the interpret Message-ID: This is starting to work now. The basic problem was that I hadn't included to following line: myapp.resources.append(os.path.join(packageroot,"setserver.rsrc.py")) ===================== My remaining question: I understand how to invovike the ".app" directory from the finder. How can I Do this from a shell script? Thanks! RJB -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031208/9e2dea80/attachment.html From RBURNS at tacoma.k12.wa.us Mon Dec 8 18:42:19 2003 From: RBURNS at tacoma.k12.wa.us (RANDY BURNS) Date: Mon Dec 8 18:42:59 2003 Subject: [Pythonmac-SIG] I have a small python application thatworks fineon a pc and under the interpret Message-ID: I figured out how to invoke the .app directory-I have this problem solved now. Thanks! RJB -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031208/26d3eadf/attachment.html From n9yty at n9yty.com Mon Dec 8 21:38:19 2003 From: n9yty at n9yty.com (Steven Palm) Date: Mon Dec 8 21:38:24 2003 Subject: [Pythonmac-SIG] BundleBuilder help ? Message-ID: I am trying to build a version of the bitpim project for distribution. It's on sourceforge as bitpim.sourceforge.net. It utilizes wxPython if that makes any difference... Anyway, I used the example "build.py" approach (the longer one) from this page: http://www.python.org/cgi-bin/moinmoin/BundleBuilder It created a build directory with an App bundle, but it doesn't run properly, even on the machine where it was created. I get this when building: Finding module dependencies /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ plat-mac/Carbon/Controls.py:11: FutureWarning: hex/oct constants > sys.maxint will return positive values in Python 2.4 and up kDataBrowserClientPropertyFlagsMask = 0xFF000000 Building 'build/BitPim.app' Copying files Adding Python modules Warning: couldn't find the following submodules: (Note that these could be false alarms -- it's not always possible to distinguish between "from package import submodule" and "from package import name") ? OverrideFrom23._Res ? javax.comm ? os.path Warning: couldn't find the following modules: ? clip_dndc ? cmndlgsc ? controls2c ? controlsc ? eventsc ? filesysc ? fontsc ? framesc ? gdic ? htmlhelpc ? imagec ? libusb ? mdic ? misc2c ? miscc ? printfwc ? pywintypes ? readline ? sizersc ? stattoolc ? streamsc ? utilsc ? win32con ? win32event ? win32file ? windows2c ? windows3c ? windowsc Done. This in console log when running: Traceback (most recent call last): File "/Users/n9yty/my_cvs/bitpim/bitpim/build/bitpim.app/Contents/Resources/ bp.py", line 26, in ? gui.run(sys.argv) File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 330, in run m=MainApp(*args) File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 245, in __init__ wxApp.__init__(self, redirect=False, useBestVisual=True) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/wxPython/wx.py", line 1951, in __init__ _wxStart(self.OnInit) File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 269, in OnInit self.setuphelp() File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 293, in setuphelp self.helpcontroller.AddBook(guihelper.gethelpfilename()+".htb") File "/Users/n9yty/my_cvs/bitpim/bitpim/guihelper.py", line 167, in gethelpfilename assert False AssertionError Here is my build script: import bundlebuilder, os packageroot = "/Users/n9yty/my_cvs/bitpim/bitpim" myapp = bundlebuilder.AppBuilder(verbosity=1) myapp.mainprogram = os.path.join(packageroot, "bp.py") myapp.standalone = 1 myapp.name = "bitpim" myapp.resources.append(os.path.join(packageroot, "help")) myapp.libs.append("/usr/local/lib/libwx_mac-2.4.0.dylib") myapp.libs.append("/usr/local/lib/libwx_mac-2.4.0.rsrc") myapp.setup() myapp.build() -. ----. -.-- - -.-- Steve Palm - n9yty@n9yty.com -. ----. -.-- - -.-- From marlong at rogers.com Mon Dec 8 22:08:28 2003 From: marlong at rogers.com (Marlon A. Griffith) Date: Mon Dec 8 22:08:34 2003 Subject: [Pythonmac-SIG] Where is the full archive summary file? Message-ID: Hi again, About 3 or 4 weeks ago, when I first looked at this list, there was a master archive file in an email box format. I believe it was .mbox. I can not find this file on the archives web page. Can someone please point me to it. Now, I want this file because I saw an thread about compiling pyPgSql on Mac Os X. I would like to research the thread before bringing any questions to the sig. Thanks in advance. -- Love and live well! marlong@rogers.com http://members.rogers.com/kalyxsis "You gain strength, courage, and confidence by every experience in which you really stop and look fear in the face." Eleanor Roosevelt (1884-1962) "Do not parrot the words of famous people. Learn the meaning of what they say and repeat it in your own words." Mark Twain (not an exact quote). From kevino at tulane.edu Mon Dec 8 22:16:22 2003 From: kevino at tulane.edu (Kevin Ollivier) Date: Mon Dec 8 22:17:47 2003 Subject: [Pythonmac-SIG] BundleBuilder help ? In-Reply-To: References: Message-ID: <10D88DEB-29F6-11D8-B158-000393CB1C86@tulane.edu> Hi Steven, Looking at the bitpim source, my guess is that this line is causing the problem: resourcedirectory=os.path.abspath(os.path.join(os.path.dirname(sys.argv[ 0]), 'resources')) Using sys.argv like this can cause problems on OS X, which sends some extra args in when launched from the Finder. I'd suggest trying it with the following: resourcedirectory=os.path.abspath(os.path.join(sys.path[0]), 'resources')) That is how I determine the root directory of my program, which runs on Windows, Linux and Mac. Thanks, Kevin On Dec 8, 2003, at 6:38 PM, Steven Palm wrote: > > I am trying to build a version of the bitpim project for distribution. > It's on sourceforge as bitpim.sourceforge.net. It utilizes wxPython if > that makes any difference... > > Anyway, I used the example "build.py" approach (the longer one) from > this page: > > http://www.python.org/cgi-bin/moinmoin/BundleBuilder > > It created a build directory with an App bundle, but it doesn't run > properly, even on the machine where it was created. I get this when > building: > > Finding module dependencies > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/plat-mac/Carbon/Controls.py:11: FutureWarning: hex/oct > constants > sys.maxint will return positive values in Python 2.4 and > up > kDataBrowserClientPropertyFlagsMask = 0xFF000000 > Building 'build/BitPim.app' > Copying files > Adding Python modules > Warning: couldn't find the following submodules: > (Note that these could be false alarms -- it's not always > possible to distinguish between "from package import submodule" > and "from package import name") > ? OverrideFrom23._Res > ? javax.comm > ? os.path > Warning: couldn't find the following modules: > ? clip_dndc > ? cmndlgsc > ? controls2c > ? controlsc > ? eventsc > ? filesysc > ? fontsc > ? framesc > ? gdic > ? htmlhelpc > ? imagec > ? libusb > ? mdic > ? misc2c > ? miscc > ? printfwc > ? pywintypes > ? readline > ? sizersc > ? stattoolc > ? streamsc > ? utilsc > ? win32con > ? win32event > ? win32file > ? windows2c > ? windows3c > ? windowsc > Done. > > This in console log when running: > > Traceback (most recent call last): > File > "/Users/n9yty/my_cvs/bitpim/bitpim/build/bitpim.app/Contents/ > Resources/bp.py", line 26, in ? > gui.run(sys.argv) > File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 330, in run > m=MainApp(*args) > File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 245, in > __init__ > wxApp.__init__(self, redirect=False, useBestVisual=True) > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/site-packages/wxPython/wx.py", line 1951, in __init__ > _wxStart(self.OnInit) > File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 269, in OnInit > self.setuphelp() > File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 293, in > setuphelp > self.helpcontroller.AddBook(guihelper.gethelpfilename()+".htb") > File "/Users/n9yty/my_cvs/bitpim/bitpim/guihelper.py", line 167, in > gethelpfilename > assert False > AssertionError > > Here is my build script: > > import bundlebuilder, os > packageroot = "/Users/n9yty/my_cvs/bitpim/bitpim" > myapp = bundlebuilder.AppBuilder(verbosity=1) > myapp.mainprogram = os.path.join(packageroot, "bp.py") > myapp.standalone = 1 > myapp.name = "bitpim" > myapp.resources.append(os.path.join(packageroot, "help")) > myapp.libs.append("/usr/local/lib/libwx_mac-2.4.0.dylib") > myapp.libs.append("/usr/local/lib/libwx_mac-2.4.0.rsrc") > myapp.setup() > myapp.build() > > -. ----. -.-- - -.-- > Steve Palm - n9yty@n9yty.com > -. ----. -.-- - -.-- > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From n9yty at n9yty.com Mon Dec 8 22:20:04 2003 From: n9yty at n9yty.com (Steven Palm) Date: Mon Dec 8 22:20:11 2003 Subject: [Pythonmac-SIG] Where is the full archive summary file? In-Reply-To: References: Message-ID: <950130E6-29F6-11D8-83C5-000A95B1990C@n9yty.com> On Dec 8, 2003, at 9:08 PM, Marlon A. Griffith wrote: > About 3 or 4 weeks ago, when I first looked at this list, there was a > master archive file in an email box format. I believe it was .mbox. I > can not find this file on the archives web page. Can someone please > point me to it. > > Now, I want this file because I saw an thread about compiling pyPgSql > on Mac Os X. I would like to research the thread before bringing any > questions to the sig. I found this via a google search. I hope it's the relevant link: http://mail.python.org/pipermail/pythonmac-sig.mbox/pythonmac-sig.mbox -. ----. -.-- - -.-- Steve Palm - n9yty@n9yty.com -. ----. -.-- - -.-- From n9yty at n9yty.com Mon Dec 8 23:00:32 2003 From: n9yty at n9yty.com (Steven Palm) Date: Mon Dec 8 23:00:40 2003 Subject: [Pythonmac-SIG] BundleBuilder help ? In-Reply-To: <10D88DEB-29F6-11D8-B158-000393CB1C86@tulane.edu> References: <10D88DEB-29F6-11D8-B158-000393CB1C86@tulane.edu> Message-ID: <3BDCE8E4-29FC-11D8-B6C4-000A95B1990C@n9yty.com> On Dec 8, 2003, at 9:16 PM, Kevin Ollivier wrote: > Looking at the bitpim source, my guess is that this line is causing > the problem: Thanks for taking the time to help me dig into this. I'm new to python, just trying to help get this going since I do have a Mac and other programming background. > resourcedirectory=os.path.abspath(os.path.join(sys.path[0]), > 'resources')) > > That is how I determine the root directory of my program, which runs > on Windows, Linux and Mac. I've changed it to that format, it gets much further, and after finding some other modules that needed to be explicitly added, it works. It's a HUGE app bundle, 16.4MB. Ouch. I'll revisit what I'm adding and see if it can be cut down at all. ;-) Thanks for your help, though! I wouldn't have gotten it with you! -. ----. -.-- - -.-- Steve Palm - n9yty@n9yty.com -. ----. -.-- - -.-- From Jack.Jansen at cwi.nl Tue Dec 9 07:28:02 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 9 07:27:44 2003 Subject: [Pythonmac-SIG] How easy to just replace Panther's Python? In-Reply-To: References: Message-ID: <220D0AAE-2A43-11D8-A5D7-0030655234CE@cwi.nl> On 8 Dec 2003, at 21:39, Russell E. Owen wrote: > I hope this isn't a stupid question, but how easy is it to overwrite > Panther's python (to avoid the issue of conficting versions of python)? > > Will the binary installer do it, or should one install from source? I would seriously argue against it. But if you really want to do it: just installing a Jaguar MacPython and removing (or chmod 0-ing) /System/Library/Frameworks/Python.framework and /usr/bin/python* should do the trick. > This is a very important question to me right now, because Python 2.3's > tkFileDialog.askopenfilename is broken, breaking a feature of my > application. I'm not sure what to tell users on MacOS X 10.3 as to how > to safely install a newer python. Isn't it much easier to just replace tkFileDialog.askopenfilename? I.e. create your own replacement routine and use that, or even assign it to tkFileDialog.askopenfilename? -- Jack Jansen http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Tue Dec 9 07:36:10 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 9 07:35:42 2003 Subject: [Pythonmac-SIG] sys.argv in applications (was: BundleBuilder help ?) In-Reply-To: <10D88DEB-29F6-11D8-B158-000393CB1C86@tulane.edu> References: <10D88DEB-29F6-11D8-B158-000393CB1C86@tulane.edu> Message-ID: <44B4F996-2A44-11D8-A5D7-0030655234CE@cwi.nl> On 9 Dec 2003, at 4:16, Kevin Ollivier wrote: > Hi Steven, > > Looking at the bitpim source, my guess is that this line is causing > the problem: > > resourcedirectory=os.path.abspath(os.path.join(os.path.dirname(sys.argv > [0]), 'resources')) > Using sys.argv like this can cause problems on OS X, which sends some > extra args in when launched from the Finder. The finder adds a new sys.argv[1], the -psn business, but sys.argv[0] should be fine. Here's the output from a simple application that dumps sys.argv: Hello, sys.argv= ['/Users/jack/tmp/build/hello.app/Contents/Resources/hello.py', '-psn_0_2228225'] The bundlebuilder bootstrap code tries to put decent values into sys.argv, so if it fails to do this in certain circumstances please file a bug report... -- 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 n9yty at n9yty.com Tue Dec 9 09:06:54 2003 From: n9yty at n9yty.com (Steven Palm) Date: Tue Dec 9 09:07:03 2003 Subject: [Pythonmac-SIG] Re: sys.argv in applications (was: BundleBuilder help ?) In-Reply-To: <44B4F996-2A44-11D8-A5D7-0030655234CE@cwi.nl> References: <10D88DEB-29F6-11D8-B158-000393CB1C86@tulane.edu> <44B4F996-2A44-11D8-A5D7-0030655234CE@cwi.nl> Message-ID: On Dec 9, 2003, at 6:36 AM, Jack Jansen wrote: On 9 Dec 2003, at 4:16, Kevin Ollivier wrote: >> Looking at the bitpim source, my guess is that this line is causing >> the problem: >> >> resourcedirectory=os.path.abspath(os.path.join(os.path.dirname(sys.arg >> v[0]), 'resources')) >> Using sys.argv like this can cause problems on OS X, which sends some >> extra args in when launched from the Finder. > > The finder adds a new sys.argv[1], the -psn business, but sys.argv[0] > should be fine. Here's the output from a simple application that dumps > sys.argv: > > Hello, sys.argv= > ['/Users/jack/tmp/build/hello.app/Contents/Resources/hello.py', > '-psn_0_2228225'] > > The bundlebuilder bootstrap code tries to put decent values into > sys.argv, so if it fails to do this in certain circumstances please > file a bug report... Okay, well, in this case, Kevin's suggestions made it work, it was not working previously. I guess this should precipitate a bug report, then? Is that filed at python.org, or elsewhere? -. ----. -.-- - -.-- Steve Palm - n9yty@n9yty.com -. ----. -.-- - -.-- From bob at redivi.com Tue Dec 9 10:23:29 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Dec 9 10:22:48 2003 Subject: [Pythonmac-SIG] Naming schema for wrapped Apple frameworks Message-ID: This was moved from a discussion on the MacPython AIM chat room with Donovan, Jack, and me because Jack had to go and thought this issue should be brought up on the SIG anyhow. Please comment or add suggestions to help Jack come to a decision about how to proceed with this for future versions of MacPython. The problem discussed was that Carbon.ShortName (implementation) and Carbon.LongName (constants) way of wrapping things is annoying. Reasons: * The implementation isn't very useful without the constants, requiring two imports everywhere * You must know both the long name (which is ok, because that's generally the name of the framework or header file) AND the short name (not ok, these are made up semi-arbitrarily). * Throwing everything in the Carbon namespace sucks, not all of it is Carbon anyways * C programmers "#include " and then the kitchen sink is available. Python programmers have to know which framework they are talking to (not necessarily a problem). Proposed new schemes: * Make it flat like C (highly unlikely) * Decide to drop or not drop the Carbon prefix for everything (I say drop it, not everything in MacPython's Carbon is necessarily in the real Carbon anyhow) * Make each constants+implementation part of a separate package, f.ex. LaunchServices.LaunchServices (constants) LaunchServices.Launch (implementation) * Make each constants+implementation part of a separate package that imports * from constants and implementation in __init__.py, so it looks like a single module * Make each constants+implementation part of a separate package that has some consistent naming for constants and implementation modules, f.ex. LaunchServices.constants and LaunchServices.implementation (possibly with LaunchServices.LaunchServices as the "import *") * Make lots of namespaces, to mirror the apple setup. For example, ApplicationServices.LaunchServices Why constants and implementation have been separate for so long: Jack Jansen: Back when I had on LC2 1400 constants was a lot of memory. ..... Jack Jansen: And even today 15000 names (approx) is still a lot of memory. (this is probably referring to a flat "#import " namespace) -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031209/dbdc16a5/smime.bin From michael at possibleworlds.com Tue Dec 9 10:53:19 2003 From: michael at possibleworlds.com (michael ferraro) Date: Tue Dec 9 10:53:25 2003 Subject: [Pythonmac-SIG] bundlebuilder questions Message-ID: I have setup a buildapp.py script and successfully built an executed my app form the MacOSX 10.3.1 Finder. what I don't seem to be able to do is to load an image that is included in a Resources subdirectory. The image file is in the Resources/subdirector. The app starts and runs fine if Irun it from the command line when I am *in" the Resource directory. My module subdirectories load fine when I run from the Finder just the Images are not found. I'm guessing there is something I am overlooking with respect to paths. I thought I had seen a posting that described a similar problem but didn't find it when I search my email from this list. I am running the Mac installed Python 2.3 on Panther and using the most recent PyQt thanks Michael From michael at possibleworlds.com Tue Dec 9 11:23:09 2003 From: michael at possibleworlds.com (michael ferraro) Date: Tue Dec 9 11:23:13 2003 Subject: [Pythonmac-SIG] bundlebuilder questions In-Reply-To: References: Message-ID: I guess I should have paused a second before sending the previous post. fname = os.path.abspath (os.path.join (sys.path[0], fn)) pixmap.load (fname) did the trick On Dec 9, 2003, at 10:53 AM, michael ferraro wrote: > I have setup a buildapp.py script and successfully built > an executed my app form the MacOSX 10.3.1 Finder. > > what I don't seem to be able to do is to load an image > that is included in a Resources subdirectory. The image > file is in the Resources/subdirector. The app starts and runs > fine if Irun it from the command line when I am *in" the Resource > directory. > > My module subdirectories load fine when I run from the Finder > just the Images are not found. I'm guessing there is something > I am overlooking with respect to paths. > > I thought I had seen a posting that described a similar problem > but didn't find it when I search my email from this list. > > I am running the Mac installed Python 2.3 on Panther and using > the most recent PyQt > > thanks > > Michael > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From Jack.Jansen at cwi.nl Tue Dec 9 11:28:37 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 9 11:28:48 2003 Subject: [Pythonmac-SIG] Naming schema for wrapped Apple frameworks In-Reply-To: References: Message-ID: I'd like to take this "up one level" first, and decide on what problem we are trying to solve before coming up with solutions. Let's assume the user has found a C example involving the Drag Manager. And let's assume (for no particular reason:-) that there are two symbols in the C example code that she wants to use in her Python code: the NewDrag() method and the kDragHasLeftSenderWindow constant. Right now, the one is Carbon.Drag.NewDrag and the other Carbon.Drag.Dragconst. kDragHasLeftSenderWindow. Not ideal, but useable for someone who (a) has Inside Mac and (b) knows the MacPython shortname/longname convention. With the current Apple documentation (in as far as it is finished:-) things are worse, though, because all references to "Drag.h" have gone, there's only . So I think our goal could be stated as: Someone who knows there are things called "NewDrag" and "kDragHasLeftSenderWindow" in "Carbon" should be able to use those in Python without any additional knowledge. Does everyone agree, or is this goal too farfetched? Or, alternatively, is it too vague? If we agree this is the goal then note that (due to very careful typing on my part:-) we could solve part of the problem in the IDE. Something along the lines of the user typing "Carbon..NewDrag" and hitting F1 and the IDE turning it into "Carbon.Drag.NewDrag". Which means we could keep a reasonably deeply nested namespace (albeit probably with a different naming scheme than the one in use today). -- 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 marlong at rogers.com Tue Dec 9 12:14:39 2003 From: marlong at rogers.com (Marlon A. Griffith) Date: Tue Dec 9 12:14:46 2003 Subject: [Pythonmac-SIG] Where is the full archive summary file? In-Reply-To: <950130E6-29F6-11D8-83C5-000A95B1990C@n9yty.com> References: <950130E6-29F6-11D8-83C5-000A95B1990C@n9yty.com> Message-ID: At 9:20 PM -0600 12/8/03, Steven Palm wrote: >On Dec 8, 2003, at 9:08 PM, Marlon A. Griffith wrote: >> About 3 or 4 weeks ago, when I first looked at this list, >>there was a master archive file in an email box format. I believe >>it was .mbox. I can not find this file on the archives web page. >>Can someone please point me to it. >> >> Now, I want this file because I saw an thread about compiling >>pyPgSql on Mac Os X. I would like to research the thread before >>bringing any questions to the sig. > > I found this via a google search. I hope it's the relevant link: > > http://mail.python.org/pipermail/pythonmac-sig.mbox/pythonmac-sig.mbox > >-. ----. -.-- - -.-- >Steve Palm - n9yty@n9yty.com >-. ----. -.-- - -.-- Thanks Steve, that was the file I was looking for. 8 - ) Summarizing for other newbies: - going to this link displayed the entire mailbox in text format in my browser window - save the page through your browser - open Apple's Mail email program - Note: Eudora doesn't seem to know what to make of this file format - select "Import Mailboxes" under the File menu - choose "Standard mbox files" - proceed through the dialog boxes to import - after 5 or so minutes Mail will create an import area for the mailbox - the imported mailbox will be listed there. Performed using: - MacOs 10.2.8 - Mozilla 1.5 - Mail 1.2.5 - Eudora 6.0. -- Love and live well! marlong@rogers.com http://members.rogers.com/kalyxsis "You gain strength, courage, and confidence by every experience in which you really stop and look fear in the face." Eleanor Roosevelt (1884-1962) "Do not parrot the words of famous people. Learn the meaning of what they say and repeat it in your own words." Mark Twain (not an exact quote). From grobinson at transpose.com Tue Dec 9 15:55:33 2003 From: grobinson at transpose.com (Gary Robinson) Date: Tue Dec 9 15:55:44 2003 Subject: [Pythonmac-SIG] Later release of Python with MacPython on Jaguar? In-Reply-To: Message-ID: Is it possible/good/recommended to build a later release like Python 2.3.2 or 2.3.3RC1 on Jaguar to replace the MacPython-supplied python with it? Are their known problems with doing so? We're seeing some behavior that is mysterious enough that we currently think it might be a bug in python. We're wondering if it would clear up with a later python release than the MacPython-supplied one. --Gary -- Putting http://wecanstopspam.org in your email helps it pass through overzealous spam filters. Gary Robinson CEO Transpose, LLC grobinson@transpose.com 207-942-3463 Company: http://www.transpose.com Blog: http://www.garyrobinson.net From brian_l at mac.com Tue Dec 9 16:52:44 2003 From: brian_l at mac.com (Brian Lenihan) Date: Tue Dec 9 16:52:49 2003 Subject: [Pythonmac-SIG] Later release of Python with MacPython on Jaguar? In-Reply-To: References: Message-ID: <0523AA33-2A92-11D8-B66E-000A95841920@mac.com> On Dec 9, 2003, at 12:55 PM, Gary Robinson wrote: > Is it possible/good/recommended to build a later release like Python > 2.3.2 > or 2.3.3RC1 on Jaguar to replace the MacPython-supplied python with it? > > Are their known problems with doing so? > > We're seeing some behavior that is mysterious enough that we currently > think > it might be a bug in python. We're wondering if it would clear up with > a > later python release than the MacPython-supplied one. > > --Gary You are probably better off leaving Apple's Python alone. I just rename everything so I can put it back later. I wrote a script modeled after gcc_select to make it easy to switch back and forth. I have Jack's additions for Apple Python installed, which, if I remember correctly, added a MacPython-2.3 folder in Applications. Before this script is run, you must rename the files and folders in either the ApplePython or MacPython tuples by hand, e.g: /System/Library/Frameworks/Python.framework -> /System/Library/Frameworks/Python.framework-moved /usr/bin/python -> /usr/bin/python-moved /usr/bin/python2.3 -> /usr/bin/python2.3-moved /usr/bin/pythonw - > /usr/bin/pythonw-moved /usr/bin/pythonw2.3 -> /usr/bin/pythonw2.3-moved /usr/bin/pydoc -> /usr/bin/pydoc-moved And, if you have a MacPython-2.3 folder in /Applications: /Applications/MacPython-2.3 -> /Applications/MacPython-2.3-Apple py_select -------------- #!/usr/bin/env python import os import sys current_ver = "2.3" python_apps = "/Applications/MacPython-%s" % current_ver MacPython = ("/Library/Frameworks/Python.framework", "/usr/local/bin/python", "/usr/local/bin/python%s" % current_ver, "/usr/local/bin/pythonw", "/usr/local/bin/pythonw%s" % current_ver ) ApplePython = ("/System/Library/Frameworks/Python.framework", "/usr/bin/python", "/usr/bin/python%s" % current_ver, "/usr/bin/pythonw", "/usr/bin/pythonw%s" % current_ver, "/usr/bin/pydoc" ) def select_python(version, not_version): py_path = eval(version + "Python")[1] if os.path.exists(py_path): print "You are already using %sPython" % version sys.exit() elif os.geteuid() != 0: print """\ ******************************************* *** THE py_select SCRIPT MUST BE RUN *** *** AS root. *** *** NO CHANGES WERE MADE TO YOUR SETUP. *** ******************************************* """, sys.exit() for dir in eval(version + "Python"): os.rename("%s-moved" % dir, dir) for dir in eval(not_version + "Python"): os.rename(dir, "%s-moved" % dir) os.rename(python_apps, "%s-%s" % (python_apps, not_version)) os.rename("%s-%s" % (python_apps, version), python_apps) print "Default Python interpreter has been set to:" os.system("%s -c 'import sys; print sys.version'" % py_path) if len(sys.argv) == 1: print "Current default Python interpreter:" print sys.version elif sys.argv[1].lower() == 'apple': select_python('Apple', 'Mac') elif sys.argv[1].lower() == 'mac': select_python('Mac', 'Apple') else: print "usage: %s " % sys.argv[0] #---- From bob at redivi.com Tue Dec 9 17:07:01 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Dec 9 17:06:20 2003 Subject: [Pythonmac-SIG] Later release of Python with MacPython on Jaguar? In-Reply-To: <0523AA33-2A92-11D8-B66E-000A95841920@mac.com> References: <0523AA33-2A92-11D8-B66E-000A95841920@mac.com> Message-ID: <03DB582E-2A94-11D8-A598-000A95686CD8@redivi.com> On Dec 9, 2003, at 4:52 PM, Brian Lenihan wrote: > On Dec 9, 2003, at 12:55 PM, Gary Robinson wrote: > >> Is it possible/good/recommended to build a later release like Python >> 2.3.2 >> or 2.3.3RC1 on Jaguar to replace the MacPython-supplied python with >> it? >> >> Are their known problems with doing so? >> >> We're seeing some behavior that is mysterious enough that we >> currently think >> it might be a bug in python. We're wondering if it would clear up >> with a >> later python release than the MacPython-supplied one. > > You are probably better off leaving Apple's Python alone. I just > rename > everything so I can put it back later. I wrote a script modeled > after gcc_select > to make it easy to switch back and forth. Brian - These scripts are cool, but he is a Jaguar user and thus doesn't have this particular issue. Gay - There is no reason why you can't build and install a later release of Python *instead of* installing Jack's MacPython. However, you may not be able to use PackageManager, and you definitely should not attempt to have both yours and his installed at the same time (they want to live in the same place, and their site-packages want to live in the same place, etc). Also, it would be cool if you described some of the "mysterious behavior", just for our information -- maybe it's not a known bug, or maybe it's a bug that has a workaround for 2.3.0, etc. -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031209/45288176/smime.bin From geoff at cmrr.umn.edu Wed Dec 10 00:34:00 2003 From: geoff at cmrr.umn.edu (Geoff Ghose) Date: Wed Dec 10 00:34:06 2003 Subject: [Pythonmac-SIG] _program_name not found: dynamic libraries in Panther's Python Message-ID: <200312092334.07166.geoff@cmrr.umn.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I posted this query on usenet to not much avail, so I though I'd try a more directed audience. I'm trying to compile pybliographer, a python program for bibtex databases. Previously I had it working with fink's 2.2 python. Then I got the hair brained scheme to make use of the Python built into Panther ( 10.3). After some fudging with LDFLAGS (-framework Python) I can get the compiled python modules to compile and load. However, this is the output: [piglet:~/Development/pybliographer-1.0.11/compiled] geoff% pybliographer This is pybliographer, version 1.0.11 Copyright (C) 1998-2000 Frederic GOBRY This is free software with ABSOLUTELY NO WARRANTY. For details, type `warranty'. Useful commands: help to get some help quit to quit dyld: python Undefined symbols: _program_name Trace/BPT trap And BTW, I've upgraded to python 2.3 within fink and now the same thing happens when using the fink python. The trap happens after an import _recode where recode is a compiled Python module named _recodemodule.so And recodemodule does define "program_name". Looking at a ktrace it certainly appears like _recodemodule is be accessed. And this code is well tested on numerous other UNIX platforms. Is there something funny I should know about Python modules in OS X? Thanks, Geoff Ghose -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/1rBOqjXIZ5vyiW8RAmDoAKCGows0spkJZl44rT7MMAg/K3CNfQCeIIeV xGUHWU+dhFNZ/BvBOZc8PXQ= =G7Nq -----END PGP SIGNATURE----- From bob at redivi.com Wed Dec 10 00:53:45 2003 From: bob at redivi.com (Bob Ippolito) Date: Wed Dec 10 00:53:00 2003 Subject: [Pythonmac-SIG] _program_name not found: dynamic libraries in Panther's Python In-Reply-To: <200312092334.07166.geoff@cmrr.umn.edu> References: <200312092334.07166.geoff@cmrr.umn.edu> Message-ID: <37B7210E-2AD5-11D8-B0A7-000A95686CD8@redivi.com> On Dec 10, 2003, at 12:34 AM, Geoff Ghose wrote: > I posted this query on usenet to not much avail, so I though I'd try a > more directed audience. > > I'm trying to compile pybliographer, a python program for bibtex > databases. Previously I had it working with fink's 2.2 python. Then I > got the hair brained scheme to make use of the Python built into > Panther ( > 10.3). After some fudging with LDFLAGS (-framework Python) I can get > the > compiled python modules to compile and load. --cut-- > dyld: python Undefined symbols: > _program_name > Trace/BPT trap It's an issue with the way that pybliographer and/or some of the libraries it depends on were linked together. It's not an issue specific to Python, it's just that lots of software that hasn't been properly ported to OS X yet assumes that there is a "flat" namespace, where on OS X it is two level (unless bastardized into using one level namespaces, which is more of a hack than a solution). Fink's Python 2.2 build probably included one of these flat namespace bastardizations ("-flat-namespace -undefined suppress"). On Panther you can do it in a less-hackish way with "-undefined dynamic_lookup", but the real solution is to just link it together properly. Perhaps someone who's familiar with the linker can take a look at this? I'm going on vacation Thursday so I don't know if I will have time. -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031210/5d55a3bb/smime.bin From brian_l at mac.com Wed Dec 10 02:55:57 2003 From: brian_l at mac.com (Brian Lenihan) Date: Wed Dec 10 02:56:07 2003 Subject: [Pythonmac-SIG] Later release of Python with MacPython on Jaguar? In-Reply-To: <03DB582E-2A94-11D8-A598-000A95686CD8@redivi.com> References: <0523AA33-2A92-11D8-B66E-000A95841920@mac.com> <03DB582E-2A94-11D8-A598-000A95686CD8@redivi.com> Message-ID: <49EC899E-2AE6-11D8-8FF4-000A95841920@mac.com> On Dec 9, 2003, at 2:07 PM, Bob Ippolito wrote: > > Brian - These scripts are cool, but he is a Jaguar user and thus > doesn't have this particular issue. Whoops. In that case, all I did on Jaguar was use a much more simple version of the script that switched between /usr/bin/py* and /usr/local/bin/py* And yet another script that enables and disables Fink's Python(s). > Gay - There is no reason why you can't build and install a later > release of Python *instead of* installing Jack's MacPython. However, > you may not be able to use PackageManager, and you definitely should > not attempt to have both yours and his installed at the same time > (they want to live in the same place, and their site-packages want to > live in the same place, etc). Which is a big part of the reason I automated the process so I could run whichever version I needed or wanted to run without having to care about the potential conflicts. The most annoying feature of OS X to me is the difficulty of running multiple versions of Python concurrently like I can on the other two most popular operating systems. Well, I should say Solaris is now poised to become really, really, really big in China in the next five years, but it behaves like any other Unix as far as Python is concerned (more or less). From njriley at uiuc.edu Wed Dec 10 03:11:33 2003 From: njriley at uiuc.edu (Nicholas Riley) Date: Wed Dec 10 03:11:41 2003 Subject: [Pythonmac-SIG] _program_name not found: dynamic libraries in Panther's Python In-Reply-To: <200312092334.07166.geoff@cmrr.umn.edu> References: <200312092334.07166.geoff@cmrr.umn.edu> Message-ID: <20031210081133.GC16198@sabi.net> On Tue, Dec 09, 2003 at 11:34:00PM -0600, Geoff Ghose wrote: > [piglet:~/Development/pybliographer-1.0.11/compiled] geoff% Why are you using such an old version? 1.2.1 is current. > The trap happens after an import _recode where recode is a compiled > Python module named _recodemodule.so Looks like there is something wrong with your install of GNU recode. After some investigation, I'm surprised it ever worked for you; GNU recode is not exactly OS X-friendly. I guess you didn't install GNU recode with Fink, because the Fink package is incomplete. There's no info file for GNU recode in the 10.3 Fink distribution (for a good reason, as I later discovered), but I tried copying the one from the 10.2-gcc3.3 distribution and it compiled fine - but it didn't install 'recode.h' or librecode. I tried compiling recode from source, but GNU recode was so old it used a version of GNU libtool which didn't recognize Mac OS X. Running glibtoolize to fix the problem started a chain of events that led me to needing to patch recode. Apply the attached patch. Also, you need to apply the patch on this page, otherwise you get an error much later, when running the test suite for python-bibtex: After applying the patches, run in the source directory: % cp /usr/share/aclocal/libtool.m4 acinclude.m4 % LIBTOOLIZE=glibtoolize autoreconf --force --install % LDFLAGS="-L/sw/lib" CPPFLAGS="-I/sw/include -Dgetopt=rc_getopt -Dopterr=rc_opterr -Doptind=rc_optind -Doptopt=rc_optopt" ./configure (The LIBTOOLIZE=glibtoolize is a workaround for a bug in autoreconf as Apple ships it; I filed Radar 3505843 on it.) The -D parameters came from Fink's recode package; without them, you get a conflict with libSystem's getopt routines at link time. But then there's a link error for "_error", which is in libreco.a which because of a legitimate, not even Mac OS X-only recode bug, installed. This also conveniently explains why Fink doesn't have a current package for recode. :/ I didn't have any more luck massaging libtool than Ben Hines did in the thread referenced above, so I simply manually installed and ran ranlib on recode-3.6/lib/libreco.a. glib2 was also necessary, so I installed that with apt. python-bibtex had more problems, the first being Fink's fault; there was a namespace conflict between gettext-dev and libiconv. Removing gettext-dev, compiling gettext 0.13 from scratch (slow!), and doing a 'LDFLAGS="-lreco" python setup.py build' fixes the problem. I didn't bother to compile pybliographer, because it requires all of GNOME 2, which I do not have and do not wish installed. You would probably have to compile gnome-python yourself rather than using Fink, so it links with the OS X Python rather than the Fink Python. The moral of the story: GNU recode is old, crufty, broken and seemingly unmaintained. BibDesk is sure a lot easier to install. -- =Nicholas Riley | -------------- next part -------------- diff -ur recode-3.6/configure.in recode-3.6+njr/configure.in --- recode-3.6/configure.in Wed Jan 3 09:50:54 2001 +++ recode-3.6+njr/configure.in Wed Dec 10 00:25:33 2003 @@ -32,7 +32,6 @@ jm_FUNC_MALLOC jm_FUNC_REALLOC -AC_SUBST(LIBOBJS) AC_CANONICAL_HOST jm_LANGINFO_CODESET @@ -40,15 +39,6 @@ AM_WITH_DMALLOC fp_WITH_GETTEXT - -# This is necessary so that .o files in LIBOBJS are also built via -# the ANSI2KNR-filtering rules. -LIBOBJS=`echo $LIBOBJS | sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` - -LTALLOCA=`echo $ALLOCA | sed 's/\.o/.lo/g'` -AC_SUBST(LTALLOCA) -LTLIBOBJS=`echo $LIBOBJS | sed 's/\.o /.lo /g;s/\.o$/.lo/'` -AC_SUBST(LTLIBOBJS) AC_OUTPUT(Makefile contrib/Makefile doc/Makefile i18n/Makefile lib/Makefile libiconv/Makefile m4/Makefile src/Makefile tests/Makefile tests/atconfig) diff -ur recode-3.6/m4/gettext.m4 recode-3.6+njr/m4/gettext.m4 --- recode-3.6/m4/gettext.m4 Wed Jan 3 10:37:56 2001 +++ recode-3.6+njr/m4/gettext.m4 Wed Dec 10 00:27:19 2003 @@ -76,7 +76,7 @@ with_included_gettext=yes fi if test $with_included_gettext = yes; then - LIBOBJS="$LIBOBJS gettext.o" + AC_LIBOBJ([gettext]) AC_DEFINE(HAVE_GETTEXT) AC_DEFINE(HAVE_DCGETTEXT) else diff -ur recode-3.6/m4/malloc.m4 recode-3.6+njr/m4/malloc.m4 --- recode-3.6/m4/malloc.m4 Wed Aug 2 20:21:13 2000 +++ recode-3.6+njr/m4/malloc.m4 Wed Dec 10 00:26:53 2003 @@ -27,8 +27,7 @@ jm_cv_func_working_malloc=no) ]) if test $jm_cv_func_working_malloc = no; then - AC_SUBST(LIBOBJS) - LIBOBJS="$LIBOBJS malloc.$ac_objext" + AC_LIBOBJ([malloc]) AC_DEFINE_UNQUOTED(malloc, rpl_malloc, [Define to rpl_malloc if the replacement function should be used.]) fi diff -ur recode-3.6/m4/realloc.m4 recode-3.6+njr/m4/realloc.m4 --- recode-3.6/m4/realloc.m4 Wed Aug 2 20:21:13 2000 +++ recode-3.6+njr/m4/realloc.m4 Wed Dec 10 00:26:42 2003 @@ -27,8 +27,7 @@ jm_cv_func_working_realloc=no) ]) if test $jm_cv_func_working_realloc = no; then - AC_SUBST(LIBOBJS) - LIBOBJS="$LIBOBJS realloc.$ac_objext" + AC_LIBOBJ([realloc]) AC_DEFINE_UNQUOTED(realloc, rpl_realloc, [Define to rpl_realloc if the replacement function should be used.]) fi From Jack.Jansen at cwi.nl Wed Dec 10 06:34:31 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Wed Dec 10 06:34:03 2003 Subject: [Pythonmac-SIG] Later release of Python with MacPython on Jaguar? In-Reply-To: <0523AA33-2A92-11D8-B66E-000A95841920@mac.com> References: <0523AA33-2A92-11D8-B66E-000A95841920@mac.com> Message-ID: Brian, I like this script! Can I put it on the website? On 9 Dec 2003, at 22:52, Brian Lenihan wrote: > > On Dec 9, 2003, at 12:55 PM, Gary Robinson wrote: > >> Is it possible/good/recommended to build a later release like Python >> 2.3.2 >> or 2.3.3RC1 on Jaguar to replace the MacPython-supplied python with >> it? >> >> Are their known problems with doing so? >> >> We're seeing some behavior that is mysterious enough that we >> currently think >> it might be a bug in python. We're wondering if it would clear up >> with a >> later python release than the MacPython-supplied one. >> >> --Gary > > You are probably better off leaving Apple's Python alone. I just > rename > everything so I can put it back later. I wrote a script modeled > after gcc_select > to make it easy to switch back and forth. > > I have Jack's additions for Apple Python installed, which, if I > remember > correctly, added a MacPython-2.3 folder in Applications. > > Before this script is run, you must rename the files and folders in > either the > ApplePython or MacPython tuples by hand, e.g: > > /System/Library/Frameworks/Python.framework -> > /System/Library/Frameworks/Python.framework-moved > /usr/bin/python -> /usr/bin/python-moved > /usr/bin/python2.3 -> /usr/bin/python2.3-moved > /usr/bin/pythonw - > /usr/bin/pythonw-moved > /usr/bin/pythonw2.3 -> /usr/bin/pythonw2.3-moved > /usr/bin/pydoc -> /usr/bin/pydoc-moved > > And, if you have a MacPython-2.3 folder in /Applications: > > /Applications/MacPython-2.3 -> /Applications/MacPython-2.3-Apple > > > > py_select > -------------- > #!/usr/bin/env python > > import os > import sys > > current_ver = "2.3" > > python_apps = "/Applications/MacPython-%s" % current_ver > > MacPython = ("/Library/Frameworks/Python.framework", > "/usr/local/bin/python", > "/usr/local/bin/python%s" % current_ver, > "/usr/local/bin/pythonw", > "/usr/local/bin/pythonw%s" % current_ver > ) > > ApplePython = ("/System/Library/Frameworks/Python.framework", > "/usr/bin/python", > "/usr/bin/python%s" % current_ver, > "/usr/bin/pythonw", > "/usr/bin/pythonw%s" % current_ver, > "/usr/bin/pydoc" > ) > > def select_python(version, not_version): > > py_path = eval(version + "Python")[1] > > if os.path.exists(py_path): > print "You are already using %sPython" % version > sys.exit() > elif os.geteuid() != 0: > print """\ > ******************************************* > *** THE py_select SCRIPT MUST BE RUN *** > *** AS root. *** > *** NO CHANGES WERE MADE TO YOUR SETUP. *** > ******************************************* > """, > sys.exit() > > for dir in eval(version + "Python"): > os.rename("%s-moved" % dir, dir) > for dir in eval(not_version + "Python"): > os.rename(dir, "%s-moved" % dir) > os.rename(python_apps, "%s-%s" % (python_apps, not_version)) > os.rename("%s-%s" % (python_apps, version), python_apps) > print "Default Python interpreter has been set to:" > os.system("%s -c 'import sys; print sys.version'" % py_path) > > if len(sys.argv) == 1: > print "Current default Python interpreter:" > print sys.version > elif sys.argv[1].lower() == 'apple': > select_python('Apple', 'Mac') > elif sys.argv[1].lower() == 'mac': > select_python('Mac', 'Apple') > else: > print "usage: %s " % sys.argv[0] > #---- > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -- 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 brian_l at mac.com Wed Dec 10 08:04:19 2003 From: brian_l at mac.com (Brian Lenihan) Date: Wed Dec 10 08:04:29 2003 Subject: [Pythonmac-SIG] Later release of Python with MacPython on Jaguar? In-Reply-To: References: <0523AA33-2A92-11D8-B66E-000A95841920@mac.com> Message-ID: <5D847A36-2B11-11D8-8FF4-000A95841920@mac.com> On Dec 10, 2003, at 3:34 AM, Jack Jansen wrote: > Brian, > I like this script! Can I put it on the website? Yes. Do whatever you want with it. Thanks > On 9 Dec 2003, at 22:52, Brian Lenihan wrote: > >> >> On Dec 9, 2003, at 12:55 PM, Gary Robinson wrote: >> >>> Is it possible/good/recommended to build a later release like Python >>> 2.3.2 >>> or 2.3.3RC1 on Jaguar to replace the MacPython-supplied python with >>> it? >>> >>> Are their known problems with doing so? >>> >>> We're seeing some behavior that is mysterious enough that we >>> currently think >>> it might be a bug in python. We're wondering if it would clear up >>> with a >>> later python release than the MacPython-supplied one. >>> >>> --Gary >> >> You are probably better off leaving Apple's Python alone. I just >> rename >> everything so I can put it back later. I wrote a script modeled >> after gcc_select >> to make it easy to switch back and forth. >> >> I have Jack's additions for Apple Python installed, which, if I >> remember >> correctly, added a MacPython-2.3 folder in Applications. >> >> Before this script is run, you must rename the files and folders in >> either the >> ApplePython or MacPython tuples by hand, e.g: >> >> /System/Library/Frameworks/Python.framework -> >> /System/Library/Frameworks/Python.framework-moved >> /usr/bin/python -> /usr/bin/python-moved >> /usr/bin/python2.3 -> /usr/bin/python2.3-moved >> /usr/bin/pythonw - > /usr/bin/pythonw-moved >> /usr/bin/pythonw2.3 -> /usr/bin/pythonw2.3-moved >> /usr/bin/pydoc -> /usr/bin/pydoc-moved >> >> And, if you have a MacPython-2.3 folder in /Applications: >> >> /Applications/MacPython-2.3 -> /Applications/MacPython-2.3-Apple >> >> >> >> py_select >> -------------- >> #!/usr/bin/env python >> >> import os >> import sys >> >> current_ver = "2.3" >> >> python_apps = "/Applications/MacPython-%s" % current_ver >> >> MacPython = ("/Library/Frameworks/Python.framework", >> "/usr/local/bin/python", >> "/usr/local/bin/python%s" % current_ver, >> "/usr/local/bin/pythonw", >> "/usr/local/bin/pythonw%s" % current_ver >> ) >> >> ApplePython = ("/System/Library/Frameworks/Python.framework", >> "/usr/bin/python", >> "/usr/bin/python%s" % current_ver, >> "/usr/bin/pythonw", >> "/usr/bin/pythonw%s" % current_ver, >> "/usr/bin/pydoc" >> ) >> >> def select_python(version, not_version): >> >> py_path = eval(version + "Python")[1] >> >> if os.path.exists(py_path): >> print "You are already using %sPython" % version >> sys.exit() >> elif os.geteuid() != 0: >> print """\ >> ******************************************* >> *** THE py_select SCRIPT MUST BE RUN *** >> *** AS root. *** >> *** NO CHANGES WERE MADE TO YOUR SETUP. *** >> ******************************************* >> """, >> sys.exit() >> >> for dir in eval(version + "Python"): >> os.rename("%s-moved" % dir, dir) >> for dir in eval(not_version + "Python"): >> os.rename(dir, "%s-moved" % dir) >> os.rename(python_apps, "%s-%s" % (python_apps, not_version)) >> os.rename("%s-%s" % (python_apps, version), python_apps) >> print "Default Python interpreter has been set to:" >> os.system("%s -c 'import sys; print sys.version'" % py_path) >> >> if len(sys.argv) == 1: >> print "Current default Python interpreter:" >> print sys.version >> elif sys.argv[1].lower() == 'apple': >> select_python('Apple', 'Mac') >> elif sys.argv[1].lower() == 'mac': >> select_python('Mac', 'Apple') >> else: >> print "usage: %s " % sys.argv[0] >> #---- >> >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG@python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > -- > 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 rowen at cesmail.net Wed Dec 10 18:33:51 2003 From: rowen at cesmail.net (Russell E. Owen) Date: Wed Dec 10 18:34:14 2003 Subject: [Pythonmac-SIG] Re: How easy to just replace Panther's Python? References: <220D0AAE-2A43-11D8-A5D7-0030655234CE@cwi.nl> Message-ID: In article <220D0AAE-2A43-11D8-A5D7-0030655234CE@cwi.nl>, Jack Jansen wrote: > On 8 Dec 2003, at 21:39, Russell E. Owen wrote: > > > I hope this isn't a stupid question, but how easy is it to overwrite > > Panther's python (to avoid the issue of conficting versions of python)? > > > > Will the binary installer do it, or should one install from source? > > I would seriously argue against it. But if you really want to do it: > just installing a Jaguar MacPython and removing (or chmod 0-ing) > /System/Library/Frameworks/Python.framework and /usr/bin/python* should > do the trick. Could you give me some clue as to the dangers involved? > > This is a very important question to me right now, because Python 2.3's > > tkFileDialog.askopenfilename is broken, breaking a feature of my > > application. I'm not sure what to tell users on MacOS X 10.3 as to how > > to safely install a newer python. > > Isn't it much easier to just replace tkFileDialog.askopenfilename? I.e. > create your own replacement routine and use that, or even assign it to > tkFileDialog.askopenfilename? I'd much rather upgrade Python than work around bugs that have been fixed, especially since Python 2.3 has other known bugs. Looks like Brian Lenihan recently posted a script that may do the job. -- Russell From berkowit at silcom.com Wed Dec 10 19:27:51 2003 From: berkowit at silcom.com (Paul Berkowitz) Date: Wed Dec 10 19:27:56 2003 Subject: [Pythonmac-SIG] Re: How easy to just replace Panther's Python? In-Reply-To: Message-ID: On 12/10/03 3:33 PM, "Russell E. Owen" wrote: > I'd much rather upgrade Python than work around bugs that have been > fixed, especially since Python 2.3 has other known bugs. I find this a bit disturbing. New versions are always going to have some bugs that need fixing or working around. I think Python on the Mac will only be taken up in a big way when pretty well everyone agrees to work with what Apple supplies. You need to be be able to depend on users having the same Python as you, the developer. I think that's what Jack and others have been working towards, and have come much of the way. I keep waiting for the "all clear" to get more involved myself, but it never seems to come. Apple were pretty good about including Python 2.3 in OS 10.3 - even delaying the odd deadline or two, from what I've been told, or in any case coordinating them. Wouldn't the next step be to request Apple to include Python version updates in OS updates? So if Python 2.3.1 is ready for OS 10.3.2 beta testing, to please include it? Then you can just ask your users to update to OS 10.3.2 when it comes out. -- Paul Berkowitz From apicard at adobe.com Wed Dec 10 20:58:17 2003 From: apicard at adobe.com (Antoine Picard) Date: Wed Dec 10 20:58:48 2003 Subject: [Pythonmac-SIG] Application menu with BundleBuilder In-Reply-To: References: <0523AA33-2A92-11D8-B66E-000A95841920@mac.com> Message-ID: I'm using BundleBuilder to package a tkinter-based script on MacOS X.2.8 and I'm running into some weirdness where none of the key strokes associated with that menu (particularly Cmd-Q and Cmd-H) work. However, using the mouse to select those menu items does do the right thing. I define two of my own key combos with: self.master.bind("", self.foo) self.master.bind("", self.bar) but I otherwise stay away from the event handler. Any idea what I could be doing wrong? Thanks, -- Antoine Picard Type Department Adobe Systems, Inc. From janssen at parc.com Wed Dec 10 22:03:19 2003 From: janssen at parc.com (Bill Janssen) Date: Wed Dec 10 22:03:48 2003 Subject: [Pythonmac-SIG] Re: How easy to just replace Panther's Python? In-Reply-To: Your message of "Wed, 10 Dec 2003 16:27:51 PST." Message-ID: <03Dec10.190320pst."58611"@synergy1.parc.xerox.com> I like this idea. Bill > Wouldn't the next step be to request Apple to include > Python version updates in OS updates? So if Python 2.3.1 is ready for OS > 10.3.2 beta testing, to please include it? Then you can just ask your users > to update to OS 10.3.2 when it comes out. From grobinson at transpose.com Wed Dec 10 23:19:02 2003 From: grobinson at transpose.com (Gary Robinson) Date: Wed Dec 10 23:19:06 2003 Subject: [Pythonmac-SIG] ANN: Goombah for iTunes, a PyObjC app Message-ID: Thought the folks on this list, who have very patiently helped my partner and I with our newbie questions, might like to see what it's all been about: a Cocoa app written in Python that works with iTunes. >From the press release: """ Goombah is a new beta-stage software product that interacts with Apple iTunes Music Store on Mac OS X. Using distributed computing to analyze iTunes music libraries, it finds each user's "nearest neighbors" in musical taste. iTunes music libraries are revealed to neighbors, and used to generate reliable music recommendations. No music ratings are required; it's based on each person's iTunes music-listening history. Other included functionality includes a music-oriented blogging service and various utilities to help search for music on the Web. """ Press release here: http://www.transpose.com/pr_02_goombah.html Get the app here: http://goombah.emergentmusic.com Thanks! :) --Gary -- Putting http://wecanstopspam.org in your email helps it pass through overzealous spam filters. Gary Robinson CEO Transpose, LLC grobinson@transpose.com 207-942-3463 Company: http://www.transpose.com Blog: http://www.garyrobinson.net From RBURNS at tacoma.k12.wa.us Thu Dec 11 12:50:27 2003 From: RBURNS at tacoma.k12.wa.us (RANDY BURNS) Date: Thu Dec 11 12:51:21 2003 Subject: [Pythonmac-SIG] How to set the hosts file using Python Message-ID: I have a small application that runs on both win32 and MaxOS 10.x that creates an appropriate hosts file on demand(I'm doing this because I need folks to review a web page on development, test or production servers). I see how to set the host file manually on the mac. Does anyone have an idea how this might be done through a python script? Thanks! http://docs.info.apple.com/article.html?artnum=75085 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031211/7fa77002/attachment.html From speno at isc.upenn.edu Thu Dec 11 12:57:05 2003 From: speno at isc.upenn.edu (John P Speno) Date: Thu Dec 11 12:57:08 2003 Subject: [Pythonmac-SIG] Application menu with BundleBuilder In-Reply-To: References: <0523AA33-2A92-11D8-B66E-000A95841920@mac.com> Message-ID: <20031211175705.GA3332@isc.upenn.edu> On Wed, Dec 10, 2003 at 05:58:17PM -0800, Antoine Picard wrote: > I'm using BundleBuilder to package a tkinter-based script on MacOS > X.2.8 and I'm running into some weirdness where none of the key > strokes associated with that menu (particularly Cmd-Q and Cmd-H) > work. However, using the mouse to select those menu items does do the > right thing. > > I define two of my own key combos with: > self.master.bind("", self.foo) > self.master.bind("", self.bar) I seem to recall having a similar issue. I may have posted to the mac-tcl/tk list about it, so maybe you can search there for my name. Here's some code from my app that does work. Maybe this will help: self.event_add('<>', '') self.event_add('<>', '') self.event_add('<>', '') self.event_add('<>', '') quit = lambda e, parent=self: Quit.Confirm(parent) self.bind_all('', quit) I suppose you could try bind_all() with your Menu accelerators. I think that's what I switched to when just bind() didn't work. Good luck. From Jack.Jansen at cwi.nl Thu Dec 11 15:42:04 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Thu Dec 11 15:42:09 2003 Subject: [Pythonmac-SIG] How to set the hosts file using Python In-Reply-To: References: Message-ID: <7A7C3B02-2C1A-11D8-B616-000A27B19B96@cwi.nl> On 11-dec-03, at 18:50, RANDY BURNS wrote: > I have a small? application that runs on both win32 and MaxOS 10.x > that creates an appropriate > hosts file on demand(I'm doing this because I need folks to review a > web page on development, test or production servers). > I see how to set the host file manually on the mac. Does anyone have > an idea how this might be done through a python script? > Thanks! > ? > http://docs.info.apple.com/article.html?artnum=75085 Note that that document is about MacOS9, not about MacOSX! The hosts file exists on MacOSX (in /etc/hosts, the usual location for Unix) but there isn't really all that much in it by default. But if you want to add entries there to make a specific DNS address go to a specific IP address I think it will work, although I'm not sure in what order the nameserver and the /etc/hosts files are searched, so you may not be able to override things. Note that you probably have to run as superuser to write /etc/hosts. -- 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 RBURNS at tacoma.k12.wa.us Thu Dec 11 16:08:21 2003 From: RBURNS at tacoma.k12.wa.us (RANDY BURNS) Date: Thu Dec 11 16:09:04 2003 Subject: [Pythonmac-SIG] How to set the hosts file using Python Message-ID: I'm sorry, I wasn't clear on this. I'm running fine on win32 and MacOS 10.3 I _also_ need to run on MacOS 9.2 which is why I have that reference here. Thanks! RJB PS What my script does, it lets folks doing web pages point to a development, test or production server when they look at their web pages. Jack Jansen >> I have a small application that runs on both win32 and MaxOS 10.x >> that creates an appropriate >> hosts file on demand(I'm doing this because I need folks to review a >> web page on development, test or production servers). >> I see how to set the host file manually on the mac. Does anyone have >> an idea how this might be done through a python script? >> Thanks! >> >> http://docs.info.apple.com/article.html?artnum=75085 >Note that that document is about MacOS9, not about MacOSX! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031211/99bf60c3/attachment.html From RBURNS at tacoma.k12.wa.us Thu Dec 11 16:19:33 2003 From: RBURNS at tacoma.k12.wa.us (RANDY BURNS) Date: Thu Dec 11 16:20:23 2003 Subject: [Pythonmac-SIG] Nuances of Bundle Builder when moving between versions of Message-ID: What are the nuances in packageing a wxPython program so it can run on the various versions of Darwin. I have an application that runs fine on Panther, but when I moved it to Jaguar, I got the following console error. RJB =========================== $ cat error *log dyld: /Users/humphrey/setserver.app/Contents/MacOS/setserver Undefined symbols: Python undefined reference to _nl_langinfo expected to be defined in /usr/lib/li bSystem.B.dylib Dec 11 12:32:08 Instructional-Technologys-Computer crashdump: Crash report writt en to: /Users/humphrey/Library/Logs/CrashReporter/Python.crash.log dyld: /Users/humphrey/setserver.app/Contents/MacOS/setserver Undefined symbols: Python undefined reference to _nl_langinfo expected to be defined in /usr/lib/li bSystem.B.dylib Dec 11 12:32:42 Instructional-Technologys-Computer crashdump: Crash report writt en to: /Users/humphrey/Library/Logs/CrashReporter/Python.crash.log ============================ Date/Time: 2003-12-11 12:32:08 -0800 OS Version: 10.2.8 (Build 6R73) Host: global-054 Command: Python PID: 497 Exception: EXC_BREAKPOINT (0x0006) Code[0]: 0x00000001Code[1]: 0x8fe01220 Thread 0 Crashed: #0 0x8fe01220 in halt #1 0x8fe10654 in link_in_need_modules #2 0x8fe10270 in bind_lazy_symbol_reference #3 0x8fe00e60 in stub_binding_helper_interface #4 0x95fcad20 in _PySys_Init #5 0x95fc6850 in Py_Initialize #6 0x95fd1cd0 in Py_Main #7 0x00003c78 in 0x3c78 #8 0x00003aec in 0x3aec PPC Thread State: srr0: 0x8fe01220 srr1: 0x0002f030 vrsave: 0x00000000 xer: 0x20000000 lr: 0x8fe09bd8 ctr: 0x8fe293ac mq: 0x00000000 r0: 0x00000004 r1: 0xbffff950 r2: 0x8fe0b794 r3: 0x000000b0 r4: 0x00000000 r5: 0x000000b0 r6: 0x0000000a r7: 0x2e64796c r8: 0x2f6c6962 r9: 0x00000000 r10: 0x8fe4850c r11: 0x0000001a r12: 0x8fe71ad7 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000 r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0xa0006b4c r20: 0x00000003 r21: 0x00000000 r22: 0x000965f0 r23: 0xa5f5ac38 r24: 0xa0000cd4 r25: 0xa5f60ef4 r26: 0x960155e0 r27: 0x96026ca7 r28: 0x8fe4841c r29: 0x8fe484ec r30: 0x8fe484ec r31: 0x8fe0995c ********** Date/Time: 2003-12-11 12:32:42 -0800 OS Version: 10.2.8 (Build 6R73) Host: global-054 Command: Python PID: 506 Exception: EXC_BREAKPOINT (0x0006) Code[0]: 0x00000001Code[1]: 0x8fe01220 Thread 0 Crashed: #0 0x8fe01220 in halt #1 0x8fe10654 in link_in_need_modules #2 0x8fe10270 in bind_lazy_symbol_reference #3 0x8fe00e60 in stub_binding_helper_interface #4 0x95fcad20 in _PySys_Init #5 0x95fc6850 in Py_Initialize #6 0x95fd1cd0 in Py_Main #7 0x00003c78 in 0x3c78 #8 0x00003aec in 0x3aec PPC Thread State: srr0: 0x8fe01220 srr1: 0x0002f030 vrsave: 0x00000000 xer: 0x20000000 lr: 0x8fe09bd8 ctr: 0x8fe293ac mq: 0x00000000 r0: 0x00000004 r1: 0xbffff830 r2: 0x8fe0b794 r3: 0x000000b0 r4: 0x00000000 r5: 0x000000b0 r6: 0x0000000a r7: 0x2e64796c r8: 0x2f6c6962 r9: 0x00000000 r10: 0x8fe4850c r11: 0x0000001a r12: 0x8fe71ad7 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000 r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0xa0006b4c r20: 0x00000003 r21: 0x00000000 r22: 0x000965f0 r23: 0xa5f5ac38 r24: 0xa0000cd4 r25: 0xa5f60ef4 r26: 0x960155e0 r27: 0x96026ca7 r28: 0x8fe4841c r29: 0x8fe484ec r30: 0x8fe484ec r31: 0x8fe0995c -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031211/5bdce954/attachment.html From n9yty at n9yty.com Thu Dec 11 17:34:13 2003 From: n9yty at n9yty.com (Steven Palm) Date: Thu Dec 11 17:34:19 2003 Subject: [Pythonmac-SIG] Nuances of Bundle Builder when moving between versions of In-Reply-To: References: Message-ID: <252353B0-2C2A-11D8-9404-000A95B1990C@n9yty.com> On Dec 11, 2003, at 3:19 PM, RANDY BURNS wrote: > What are the nuances in packageing a wxPython program so it can run on > the various versions of Darwin. > I have an application that runs fine on Panther, but when I moved it > to Jaguar, I got the following console error. I am seeing the same thing here, but I don't believe it is a BundleBuilder problem, I believe it is more a problem with the wxWindows / wxPython libraries which are linked against certain system libraries depending on the machine they were built. I had the same problems trying to build a wxWindows program on Panther and have it work in a backwards-compatible fashion. In that case, I build it on Jaguar and found it would run on Panther as well. Unfortunatley, the new G4 iBook I have came with Panther preinstalled and won't even boot my old Jaguar system disk so I am at a standstill. -. ----. -.-- - -.-- Steve Palm - n9yty@n9yty.com -. ----. -.-- - -.-- From Jack.Jansen at cwi.nl Thu Dec 11 18:10:02 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Thu Dec 11 18:10:18 2003 Subject: [Pythonmac-SIG] Nuances of Bundle Builder when moving between versions of In-Reply-To: References: Message-ID: <2638A5D2-2C2F-11D8-B616-000A27B19B96@cwi.nl> On 11-dec-03, at 22:19, RANDY BURNS wrote: > What are the nuances in packageing a wxPython program so it can run on > the various versions of Darwin. > I have an application that runs fine on Panther, but when I moved it > to Jaguar, I got the following console error. The problem is indeed that something built on Panther will often not be deployable on Jaguar. One thing that definitely does not work is using bundlebuilder with --standalone: it will take the Panther Python framework along, which won't work on Jaguar. Whether there are similar issues when not using --standalone but incorporating wxPython I don't know. For now the only sure way to work around this is to build on Jaguar. We are thinking of ways to allow building on Panther, which would entail (at least) allowing the Jaguar Python framework to exist on Panther with adverse consequences to Panther Python (currently there are such consequences), and it may also have repercussions for distutils (which will have to build with the various environment variables that cause Jaguar compatibility). Good ideas for other ways to solve this are welcome, -- 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 marlong at rogers.com Fri Dec 12 01:01:42 2003 From: marlong at rogers.com (Marlon A. Griffith) Date: Fri Dec 12 01:01:47 2003 Subject: [Pythonmac-SIG] Running the pyPgSQL postgresql driver? In-Reply-To: References: <950130E6-29F6-11D8-83C5-000A95B1990C@n9yty.com> Message-ID: I have managed to install pyPgSQL on my mac: - X.2.8 - postgresql 7.3 - MacPython 2.3, the July 30th 2003 release... through the instructions at http://pypgsql.sourceforge.net/README.html and the modifications noted in an earlier post. I was running the testcases when I got this message: """ [Kalyxsis-Sways-Computer:~] postgres% python /Volumes/scratch/jython/pypgsql/test/PgSQLTestCases.py Traceback (most recent call last): File "/Volumes/scratch/jython/pypgsql/test/PgSQLTestCases.py", line 89, in ? from pyPgSQL import PgSQL ImportError: No module named pyPgSQL """ I tried to import the module using Apple's python and MacPython. MacPython worked and Apple's didn't. I got this error in Apple's python: """ [Kalyxsis-Sways-Computer:~] postgres% python Python 2.2 (#1, 07/14/02, 23:25:09) [GCC Apple cpp-precomp 6.14] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from pyPgSQL import PgSQL Traceback (most recent call last): File "", line 1, in ? ImportError: No module named pyPgSQL >>> ^D """ I then thought where is the module. The result is below: """ [Kalyxsis-Sways-Computer:~] postgres% locate pyPgSQL /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/libpq /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/libpq/libpqmodule.so /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/libpq/__init__.py /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/libpq/__init__.pyc /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/PgSQL.py /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/PgSQL.pyc /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/__init__.py /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pyPgSQL/__init__.pyc """ It appears then that the module was saved as a MacPython module. I would like to run this module in MacPython and Apple's python. I have two questions then: 1) How do I install this module in Apple's python. Is it a path thing that I need to add to the environmental var, $PATH? 2) How do I run the testcases from MacPython? When I try and run it, I don't get any feedback at all. If this is in some documentation then please point me to that. thanks for all you help. -- Love and live well! marlong@rogers.com http://members.rogers.com/kalyxsis "You gain strength, courage, and confidence by every experience in which you really stop and look fear in the face." Eleanor Roosevelt (1884-1962) "Do not parrot the words of famous people. Learn the meaning of what they say and repeat it in your own words." Mark Twain (not an exact quote). -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031212/b198f8dc/attachment-0001.html From rswerdlow at transpose.com Fri Dec 12 07:33:43 2003 From: rswerdlow at transpose.com (Bob Swerdlow) Date: Fri Dec 12 07:35:52 2003 Subject: [Pythonmac-SIG] Nuances of Bundle Builder when moving betweenversions of References: <2638A5D2-2C2F-11D8-B616-000A27B19B96@cwi.nl> Message-ID: <060e01c3c0ac$316275b0$046fa8c0@RSWERDLOW800> We had precisely this same problem and "solved" it by doing our builds on a machine with Jaguar. That works, but its a pain. On the other hand, I think it was C.A.R.Hoare who said in the early 1980s that "any program that works is better than one that doesn't" :-) - Bob ----- Original Message ----- From: "Jack Jansen" To: "RANDY BURNS" Cc: Sent: Thursday, December 11, 2003 6:10 PM Subject: Re: [Pythonmac-SIG] Nuances of Bundle Builder when moving betweenversions of > > On 11-dec-03, at 22:19, RANDY BURNS wrote: > > > What are the nuances in packageing a wxPython program so it can run on > > the various versions of Darwin. > > I have an application that runs fine on Panther, but when I moved it > > to Jaguar, I got the following console error. > > The problem is indeed that something built on Panther will often not be > deployable on Jaguar. > > One thing that definitely does not work is using bundlebuilder with > --standalone: it will take the Panther Python framework along, which > won't work on Jaguar. Whether there are similar issues when not using > --standalone but incorporating wxPython I don't know. > > For now the only sure way to work around this is to build on Jaguar. > > We are thinking of ways to allow building on Panther, which would > entail (at least) allowing the Jaguar Python framework to exist on > Panther with adverse consequences to Panther Python (currently there > are such consequences), and it may also have repercussions for > distutils (which will have to build with the various environment > variables that cause Jaguar compatibility). > > Good ideas for other ways to solve this are welcome, > -- > 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 Benjamin.Schollnick at usa.xerox.com Fri Dec 12 08:19:39 2003 From: Benjamin.Schollnick at usa.xerox.com (Schollnick, Benjamin) Date: Fri Dec 12 08:19:44 2003 Subject: [Pythonmac-SIG] How to set the hosts file using Python Message-ID: <51B62EFFBC83D6118ADA00096BB030A107CADCAC@usamcms7.mc.usa.xerox.com> Under Mac OS X, the article you have linked does not apply. The hosts file is in /etc/, as a text file named "hosts". Open the file, read the file, parse it to see if your entry is already included. If not, append the file with the new host entry. If it does exist, assuming the entry is correct, then don't touch the host file. If the entry is incorrect, you'll need to write the file with all the old information, just changing the single line that is incorrect. - Benjamin -----Original Message----- From: pythonmac-sig-bounces@python.org [mailto:pythonmac-sig-bounces@python.org]On Behalf Of RANDY BURNS Sent: Thursday, December 11, 2003 12:50 PM To: pythonmac-sig@python.org Subject: [Pythonmac-SIG] How to set the hosts file using Python I have a small application that runs on both win32 and MaxOS 10.x that creates an appropriate hosts file on demand(I'm doing this because I need folks to review a web page on development, test or production servers). I see how to set the host file manually on the mac. Does anyone have an idea how this might be done through a python script? Thanks! http://docs.info.apple.com/article.html?artnum=75085 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031212/9f5dccb8/attachment.html From n9yty at n9yty.com Fri Dec 12 09:01:52 2003 From: n9yty at n9yty.com (Steven Palm) Date: Fri Dec 12 09:01:59 2003 Subject: [Pythonmac-SIG] Nuances of Bundle Builder when moving betweenversions of In-Reply-To: <060e01c3c0ac$316275b0$046fa8c0@RSWERDLOW800> References: <2638A5D2-2C2F-11D8-B616-000A27B19B96@cwi.nl> <060e01c3c0ac$316275b0$046fa8c0@RSWERDLOW800> Message-ID: On Dec 12, 2003, at 6:33 AM, Bob Swerdlow wrote: > We had precisely this same problem and "solved" it by doing our builds > on a > machine with Jaguar. That works, but its a pain. On the other hand, I > think it was C.A.R.Hoare who said in the early 1980s that "any program > that > works is better than one that doesn't" :-) I would love to have some of you folks out here with more experience in this stuff to take a whack at it... I tried, but never quite got there. Panther has the cross-platform SDK's to link against the Jaguar system frameworks. This all works from within XCode by telling it what your deployment platform is. I thought that surely there must be a way to get this to work from a Makefile type build, but I never had any luck. Has anyone toyed with this? -. ----. -.-- - -.-- Steve Palm - n9yty@n9yty.com -. ----. -.-- - -.-- From Jack.Jansen at cwi.nl Fri Dec 12 09:45:53 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Fri Dec 12 09:45:47 2003 Subject: [Pythonmac-SIG] Nuances of Bundle Builder when moving betweenversions of In-Reply-To: References: <2638A5D2-2C2F-11D8-B616-000A27B19B96@cwi.nl> <060e01c3c0ac$316275b0$046fa8c0@RSWERDLOW800> Message-ID: On 12 Dec 2003, at 15:01, Steven Palm wrote: > > On Dec 12, 2003, at 6:33 AM, Bob Swerdlow wrote: >> We had precisely this same problem and "solved" it by doing our >> builds on a >> machine with Jaguar. That works, but its a pain. On the other hand, >> I >> think it was C.A.R.Hoare who said in the early 1980s that "any >> program that >> works is better than one that doesn't" :-) > > I would love to have some of you folks out here with more experience > in this stuff to take a whack at it... I tried, but never quite got > there. > > Panther has the cross-platform SDK's to link against the Jaguar > system frameworks. This all works from within XCode by telling it what > your deployment platform is. I thought that surely there must be a way > to get this to work from a Makefile type build, but I never had any > luck. > > Has anyone toyed with this? I don't have the time, but I would really like to hear it too if someone puts some time into this. I think that setting the appropriate environment variables should do the trick. What I can offer is a suggestion on how to test this: 1. Build Python from source, on Panther, with a normal configure --enable-framework/make frameworkinstall. 2. Ship this build to a Jaguar machine. It shouldn't work. 3. Redo the build (don't forget make clean), but now with the cross-development environment variables set. 4. Ship this build to a jaguar machine, it should now work. -- 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 rswerdlow at transpose.com Fri Dec 12 15:24:57 2003 From: rswerdlow at transpose.com (Bob Swerdlow) Date: Fri Dec 12 15:27:07 2003 Subject: [Pythonmac-SIG] buildapp --standalone not finding urllib2 at run time Message-ID: <073501c3c0ee$06694ea0$046fa8c0@RSWERDLOW800> We build our application with this command line: python -OO buildapp.py -v --standalone --strip --package=encodings --package=_strptime --package=urllib2 build We build on a Jaguar machine with MacPython 2.3 installed. A user complained of an error and sent up this output: "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/urllib2.py" , line 505, in proxy_open TypeError: iterable argument required I checked the output from the build and it includes: Adding Python module urllib2 I don't see urllib2 anywhere in the built application package. So, does this error output mean that the urllib2 module is not in the build, since it is reading from one in /Library instead of from our package? How do I ensure that it gets into the package? Thanks! Bob Swerdlow From just at letterror.com Fri Dec 12 15:49:51 2003 From: just at letterror.com (Just van Rossum) Date: Fri Dec 12 15:50:00 2003 Subject: [Pythonmac-SIG] buildapp --standalone not finding urllib2 at run time In-Reply-To: <073501c3c0ee$06694ea0$046fa8c0@RSWERDLOW800> Message-ID: Bob Swerdlow wrote: > We build our application with this command line: > python -OO > buildapp.py -v --standalone --strip --package=encodings --package=_strptime > --package=urllib2 build > > We build on a Jaguar machine with MacPython 2.3 installed. > > A user complained of an error and sent up this output: > > "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/urllib2 .py" > , line 505, in proxy_open > TypeError: iterable argument required > > I checked the output from the build and it includes: > Adding Python module urllib2 > > I don't see urllib2 anywhere in the built application package. > > So, does this error output mean that the urllib2 module is not in the > build, since it is reading from one in /Library instead of from our > package? How do I ensure that it gets into the package? That path is the path from which the .pyc was compiled, it is still loaded from the zip file in the app, which is located here: *.app/Contents/Resources/Modules.zip Just From r2b2 at myway.com Sun Dec 14 20:34:27 2003 From: r2b2 at myway.com (r2b2) Date: Sun Dec 14 20:34:36 2003 Subject: [Pythonmac-SIG] help macpython on panther Message-ID: <20031215013427.B536839A7@mprdmxin.myway.com> New to Mac and to programming. Bought a new mac G5 which came with Panther and macpython 2.3. I downloaded the Macpython addons and installed. The python IDE seems to be working fine. the small test programs i've run worked. Interactive mode works. But when I go to save it as an applet nothing happens when i double click on it to run it. my python preferences are set ; these were the defaults setting for file tye; python script interpreter: /usr/bin/pythonw run in terminal window is checked _______________________________________________ No banners. No pop-ups. No kidding. Introducing My Way - http://www.myway.com From keithn at 2xtreme.net Sun Dec 14 21:50:46 2003 From: keithn at 2xtreme.net (Keith Nemitz) Date: Sun Dec 14 21:50:51 2003 Subject: [Pythonmac-SIG] BundleBuilder aftermath Message-ID: <7B4D2F64-2EA9-11D8-8412-000393DB52E4@2xtreme.net> So what do you do with the 'app' that bundlebuilder creates? Basically, when I launch the one I built, it quits politely. I suppose my real question is, is the app version able to 'print' during it's execution? I'd love some feedback. Here is my build file: > import bundlebuilder, os > > # I set this to make adding subfolders into the package easier > packageroot = "/Users/musenik/wednesday/project" > > # Create the AppBuilder > myapp = bundlebuilder.AppBuilder(verbosity=1) > > # Tell it where to find the main script - the one that loads on startup > myapp.mainprogram = os.path.join(packageroot, "main.py") > > myapp.standalone = 1 > #myapp.strip = 1 > myapp.name = "testApp" > > # Here we build the app! > myapp.setup() > myapp.build() Here is the output after executing it: > Finding module dependencies > Building 'build/Wednesday the Witch.app' > Copying files > Adding Python modules > Warning: couldn't find the following submodules: > (Note that these could be false alarms -- it's not always > possible to distinguish between "from package import submodule" > and "from package import name") > ? AppKit.NSApp > ? AppKit.NSApplication > ? AppKit.NSCriticalRequest > ? AppKit.NSImage > ? AppKit.NSMenu > ? AppKit.NSMenuItem > ? AppKit.NSTerminateLater > ? Foundation.NSDictionary > ? Foundation.NSLog > ? Foundation.NSObject > ? objc.selector > ? objc.setClassExtender > ? objc.setSignatureForSelector > Warning: couldn't find the following modules: > ? messagebox > ? os.path > Done. I assume that the 'false alarms' really are false. I don't know what messagebox is, probably called from one of the libraries (pygame and such). There is no messagebox.py in my filesystem. I assume os.path is also a false alarm. I've spent the day searching for info on this topic, and I've found plenty and feel great about having got this far. But now I'm stuck. I would greatly appreciate some help from a more experienced bundle builder. Keith Nemitz From eppstein at ics.uci.edu Mon Dec 15 00:04:48 2003 From: eppstein at ics.uci.edu (David Eppstein) Date: Mon Dec 15 00:04:43 2003 Subject: [Pythonmac-SIG] Re: BundleBuilder aftermath References: <7B4D2F64-2EA9-11D8-8412-000393DB52E4@2xtreme.net> Message-ID: In article <7B4D2F64-2EA9-11D8-8412-000393DB52E4@2xtreme.net>, Keith Nemitz wrote: > So what do you do with the 'app' that bundlebuilder creates? Basically, > when I launch the one I built, it quits politely. When that happens to me, it usually means I have a Python error that shows up as a traceback on the console. Have you looked there for any messages that might explain the quitting behavior? -- David Eppstein http://www.ics.uci.edu/~eppstein/ Univ. of California, Irvine, School of Information & Computer Science From Jack.Jansen at cwi.nl Mon Dec 15 04:39:33 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Mon Dec 15 04:38:59 2003 Subject: [Pythonmac-SIG] help macpython on panther In-Reply-To: <20031215013427.B536839A7@mprdmxin.myway.com> References: <20031215013427.B536839A7@mprdmxin.myway.com> Message-ID: <96D9BE0A-2EE2-11D8-ABAA-0030655234CE@cwi.nl> On 15 Dec 2003, at 2:34, r2b2 wrote: > > New to Mac and to programming. > Bought a new mac G5 which came with Panther and macpython 2.3. > I downloaded the Macpython addons and installed. > > The python IDE seems to be working fine. the small test programs i've > run worked. Interactive mode works. > But when I go to save it as an applet nothing happens when i double > click on it to run it. > my python preferences are set ; these were the defaults > > setting for file tye; python script > interpreter: /usr/bin/pythonw > run in terminal window is checked This could be seen as a bug in the documentation. I just followed the exact steps you did (with the 'print "Hello World"' program), and indeed what happens is what you say: nothing. The reason that nothing happens is logical, if you know the background behind applets and such, but I agree that it is rather unexpected if you're new to Python on the Mac:-) Let me try to explain, maybe you (or other people on the list) can give suggestions as how to document this behavior. First: applets are meant specifically for GUI programs that don't use Terminal I/O, such as the IDE itself, or Package Manager. This should be made more clear in the documentation. Any normal Python output from an applet appears to get lost. (Sideline: it doesn't really get lost, it is sent to the console. If you open Applications->Utilities->Console you'll see the output of your applet there). Second: the interaction between the IDE commands Save, Save as Applet, Save Options... and Run with Commandline Python are obscure. And actually some of the setting in Save Options are no really correct either: the "File Creator: OSX PythonW interpreter" selection is silly, and should have been replaced with "PythonLauncher". The good news is that you can do this manually: select the "Other:" file creator, and type "PytL" (without the quotes) into the text box. Third: it seems that PythonLauncher somehow isn't the default application for running Python scripts, as it should be. I need to find out why this isn't so, I thought there where measures to make this the case. So, the workaround for running scripts with I/O from the command line is to use the save options dialog, select "Other" file creator and set the creator code to PytL. Next, save your script as a normal script, not an applet. Now, double-clicking your script in the Finder will bring up a Terminal window (provided you haven't changed the preferences in PythonLauncher). -- Jack Jansen http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Mon Dec 15 05:22:05 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Mon Dec 15 05:21:24 2003 Subject: [Pythonmac-SIG] Experimental modules for LaunchServices and OSA available Message-ID: <87A6275F-2EE8-11D8-ABAA-0030655234CE@cwi.nl> I've created modules to interface to LaunchServices and to the high-level OSA interfaces. I'd like some feedback on these before putting them in the official PackMan database, for now they are in the experimental database (and for now for Panther only): . I think the OSA module is incomplete, but I would like feedback as to which bits are missing. The LaunchServices module is complete, as far as I know, but also I'd like feedback. -- 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 rowen at cesmail.net Mon Dec 15 12:57:51 2003 From: rowen at cesmail.net (Russell E. Owen) Date: Mon Dec 15 12:59:09 2003 Subject: [Pythonmac-SIG] Re: Running the pyPgSQL postgresql driver? References: <950130E6-29F6-11D8-83C5-000A95B1990C@n9yty.com> Message-ID: In article , "Marlon A. Griffith" wrote: > I have managed to install pyPgSQL on my mac: > - X.2.8 > - postgresql 7.3 > - MacPython 2.3, the July 30th 2003 release... > through the instructions at > http://pypgsql.sourceforge.net/README.html and the modifications > noted in an earlier post. I was running the testcases when I got this > message: > """ > [Kalyxsis-Sways-Computer:~] postgres% python > /Volumes/scratch/jython/pypgsql/test/PgSQLTestCases.py > Traceback (most recent call last): > File "/Volumes/scratch/jython/pypgsql/test/PgSQLTestCases.py", line > 89, in ? from pyPgSQL import PgSQL > ImportError: No module named pyPgSQL > """ > > I tried to import the module using Apple's python and MacPython. > MacPython worked and Apple's didn't. I got this error in Apple's > python:.. The basic problems (I think) is that when you type "python setup.py" at the command line, you are telling setup.py WHICH python gets the module. If you want to install on more than one python, follow the installation instructions using each version of Python in turn. But do you really want two versions of python? MacPython 2.3 includes a command-line python installed in /usr/local/bin (this is a link to a file in the framework python 2.3). If you used that, then you could install packages once and have them available both from MacPython and command line python! One way to get python 2.3 as your command-line python is to put /usr/local/bin before /usr/bin in your PATH. One way to do this is create or edit a text file ~/.cshrc (preferably with unix line endings) to include: setenv PATH "/usr/local/bin:/Library/Tcl/bin:"$PATH I'm not sure this is the full answer. I somewhat suspect you already know what I wrote if you managed to install the package in MacPython 2.3 framework instead of Apple's built in python. In any case, I *hope* this helps. -- Russell P.S. if you plan to do any GUI programming and want to set your PYTHONPATH, you'll want to set it in ./MacOSX/environment.plist rather than in .cshrc. One set of instructions is my page . I hope the info is also in the MacPython documentation but I haven't looked recently. From keithn at 2xtreme.net Mon Dec 15 14:09:02 2003 From: keithn at 2xtreme.net (Keith Nemitz) Date: Mon Dec 15 14:09:07 2003 Subject: [Pythonmac-SIG] Re: BundleBuilder aftermath Message-ID: <24F589FA-2F32-11D8-9339-000393DB52E4@2xtreme.net> > When that happens to me, it usually means I have a Python error that > shows up as a traceback on the console. Have you looked there for any > messages that might explain the quitting behavior? > I was able to run the app from Terminal, and I solved a couple issues. Here's the latest built app that is working better. > import bundlebuilder, os > > # I set this to make adding subfolders into the package easier > packageroot = "/Users/musenik/wednesday/project" > > # Create the AppBuilder > myapp = bundlebuilder.AppBuilder(verbosity=1) > > # Tell it where to find the main script - the one that loads on startup > myapp.mainprogram = os.path.join(packageroot, "main.py") > > myapp.standalone = 1 > #myapp.strip = 1 > myapp.name = "myApp" > > # includePackages forces certain packages to be added to the app bundle > #myapp.includePackages.append("encodings") > myapp.includePackages.append("pygame") > #myapp.includeModules.append(os.path.join(packageroot, "fnfFont")) > > # Here you add supporting files and/or folders to your bundle > myapp.resources.append("/Library/Frameworks/Python.framework/Versions/ > 2.3/lib/python2.3/lib-dynload/cStringIO.so") > > # bundlebuilder does not yet have the capability to detect what shared > libraries > # are needed by your app - so in this case I am adding the wxPython > libs manually > #myapp.libs.append("/usr/local/lib/libwx_macd-2.4.0.dylib") > > # Here we build the app! > myapp.setup() > myapp.build() Now I have to figure out why pygame isn't finding surfarray. The .so is definitely in the pygame folder. Keith Nemitz From marlong at rogers.com Mon Dec 15 15:34:11 2003 From: marlong at rogers.com (Marlon A. Griffith) Date: Mon Dec 15 15:34:16 2003 Subject: [Pythonmac-SIG] Re: Running the pyPgSQL postgresql driver? In-Reply-To: References: <950130E6-29F6-11D8-83C5-000A95B1990C@n9yty.com> Message-ID: Thanks Russell, That was the problem. I was not using MacPython at the command line but getting Apple's python, which didn't have the driver installed for it. Since I have a command line and gui access to MacPython now, I don't really need Apple's python. I am set to go. The weird thing is that I can import the driver into MacPython but the command to run the test cases still doesn't work. I get a password error. I suspect that this is a problem with the privileges on PostgreSql not MacPython. Ahh, lots of things to learn! Thanks again for your suggestions. At 9:57 AM -0800 12/15/03, Russell E. Owen wrote: >In article , > "Marlon A. Griffith" wrote: > >> I have managed to install pyPgSQL on my mac: >> - X.2.8 >> - postgresql 7.3 >> - MacPython 2.3, the July 30th 2003 release... >> through the instructions at >> http://pypgsql.sourceforge.net/README.html and the modifications >> noted in an earlier post. I was running the testcases when I got this >> message: >> """ >> [Kalyxsis-Sways-Computer:~] postgres% python >> /Volumes/scratch/jython/pypgsql/test/PgSQLTestCases.py >> Traceback (most recent call last): >> File "/Volumes/scratch/jython/pypgsql/test/PgSQLTestCases.py", line >> 89, in ? from pyPgSQL import PgSQL >> ImportError: No module named pyPgSQL >> """ >> >> I tried to import the module using Apple's python and MacPython. >> MacPython worked and Apple's didn't. I got this error in Apple's >> python:.. > >The basic problems (I think) is that when you type "python setup.py" at >the command line, you are telling setup.py WHICH python gets the module. >If you want to install on more than one python, follow the installation >instructions using each version of Python in turn. > >But do you really want two versions of python? MacPython 2.3 includes a >command-line python installed in /usr/local/bin (this is a link to a >file in the framework python 2.3). If you used that, then you could >install packages once and have them available both from MacPython and >command line python! > >One way to get python 2.3 as your command-line python is to put >/usr/local/bin before /usr/bin in your PATH. One way to do this is >create or edit a text file ~/.cshrc (preferably with unix line endings) >to include: >setenv PATH "/usr/local/bin:/Library/Tcl/bin:"$PATH > >I'm not sure this is the full answer. I somewhat suspect you already >know what I wrote if you managed to install the package in MacPython 2.3 >framework instead of Apple's built in python. In any case, I *hope* this >helps. > >-- Russell > >P.S. if you plan to do any GUI programming and want to set your >PYTHONPATH, you'll want to set it in ./MacOSX/environment.plist rather >than in .cshrc. One set of instructions is my page >. I hope the info >is also in the MacPython documentation but I haven't looked recently. -- Make it a great day! http://members.rogers.com/kalyxsis "We move ahead by going deeper." Jennifer James (1943- ) American Writer "Don't let your schooling interfere with your education." Mark Twain "Do not parrot the words of famous people. Learn the meaning of what they say and repeat it in your own words." Mark Twain (not an exact quote). From stuart at stuartbishop.net Mon Dec 15 19:13:00 2003 From: stuart at stuartbishop.net (Stuart Bishop) Date: Mon Dec 15 19:13:56 2003 Subject: [Pythonmac-SIG] Yet another problem with two Pythons on Panther In-Reply-To: <4DCC00D7-2918-11D8-A82C-000A95A06FC6@commonground.com.au> References: <0DE4A761-272C-11D8-989C-000A27B19B96@cwi.nl> <1A4F55F3-2850-11D8-9487-000A95A06FC6@commonground.com.au> <735E5ACA-2903-11D8-B91D-000A27B19B96@cwi.nl> <4DCC00D7-2918-11D8-A82C-000A95A06FC6@commonground.com.au> Message-ID: <9BCF5650-2F5C-11D8-A648-000A95A06FC6@stuartbishop.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/12/2003, at 11:48 AM, Stuart Bishop wrote: >>>> This could probably be fixed by adding a >>>> -F/System/Library/Frameworks to the builds, but I don't think we >>>> can do this for the existing 10.3/2.3 distribution. Or can someone >>>> think of a workaround? If 'monkey patching' distutils is still an option (I haven't seen any other ideas on how to stop an installation of Python in /Library/Frameworks breaking the shipped installation in /System/Library/Frameworks), the adding the following three files into /Library/Python appears to work, and is about as clean as I can see this dubious-yet-supported mechanism getting. distutils_patch.py:: import sys if sys.version_info[:3] == (2, 3, 0): # Monkey patch distutils. Python 2.3.0 as shipped with OSX 10.3 # doesn't specify path of the Framework, causing packages with C # extensions to fail to build if othher versions of Python have been # installed in /Library/Frameworks import distutils.sysconfig, os.path def get_makefile_filename(): if distutils.sysconfig.python_build: return os.path.join(os.path.dirname(sys.executable), "Makefile") return "/Library/Python/2.3/Makefile-2.3.0.patched" distutils.sysconfig.get_makefile_filename = get_makefile_filename distutils_patch.pth:: import distutils_patch Makefile-2.3.0.patched:: A duplicate of /System/Library/[...]/config/Makefile, with '-F/System/Library/Frameworks' added to the start of the LDFLAGS= option. This should probably be generated by the MacPython installer to avoid any licensing issues with the Apple config/Makefile. - -- Stuart Bishop http://www.stuartbishop.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD4DBQE/3k4TAfqZj7rGN0oRAjzoAJdtKKsrt5IuIjo6DSpf44PgACCLAJ4qN0O/ ILUeF7IFWW4LhVkqui0i5Q== =kmGc -----END PGP SIGNATURE----- From hengist.podd at virgin.net Mon Dec 15 19:19:52 2003 From: hengist.podd at virgin.net (has) Date: Mon Dec 15 19:22:41 2003 Subject: [Pythonmac-SIG] [ann] AppScripting 0.3.0 Message-ID: Hi all, New version of AppScripting is available: http://freespace.virgin.net/hamish.sanderson/AppScripting-0.3.0.tar.gz Now handles AE and application classes and enumerated types sensibly, and implements almost complete support for by-test references (a.k.a. 'whose clauses'). Still lots to do, but seems like a good point to post and solicit some feedback [1] before Christmas. Cheers, has [1] That there's a cue, btw...;) -- http://freespace.virgin.net/hamish.sanderson/ From halloleo at myrealbox.com Tue Dec 16 00:41:25 2003 From: halloleo at myrealbox.com (leo) Date: Tue Dec 16 00:41:06 2003 Subject: [Pythonmac-SIG] SOAP via ZSI, or what? References: Message-ID: <003301c3c397$40e4cb80$a800000a@Odyssey.local> hi there want to write a little SOAP client. does anybody have experience with ZSI or SOAPpy? what would you recommend? thanks, leo From geoff at cmrr.umn.edu Tue Dec 16 01:32:44 2003 From: geoff at cmrr.umn.edu (Geoff Ghose) Date: Tue Dec 16 01:31:07 2003 Subject: [Pythonmac-SIG] Two level namespaces and python modules: any working examples? Message-ID: Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031216/ed7f7f0b/PGP.bin From Jack.Jansen at cwi.nl Tue Dec 16 05:39:50 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 16 05:39:09 2003 Subject: [Pythonmac-SIG] Yet another problem with two Pythons on Panther In-Reply-To: <9BCF5650-2F5C-11D8-A648-000A95A06FC6@stuartbishop.net> References: <0DE4A761-272C-11D8-989C-000A27B19B96@cwi.nl> <1A4F55F3-2850-11D8-9487-000A95A06FC6@commonground.com.au> <735E5ACA-2903-11D8-B91D-000A27B19B96@cwi.nl> <4DCC00D7-2918-11D8-A82C-000A95A06FC6@commonground.com.au> <9BCF5650-2F5C-11D8-A648-000A95A06FC6@stuartbishop.net> Message-ID: <2D0E86AC-2FB4-11D8-BA66-0030655234CE@cwi.nl> On 16 Dec 2003, at 1:13, Stuart Bishop wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 08/12/2003, at 11:48 AM, Stuart Bishop wrote: > >>>>> This could probably be fixed by adding a >>>>> -F/System/Library/Frameworks to the builds, but I don't think we >>>>> can do this for the existing 10.3/2.3 distribution. Or can someone >>>>> think of a workaround? > > If 'monkey patching' distutils is still an option (I haven't seen any > other ideas on how to stop an installation of Python in > /Library/Frameworks > breaking the shipped installation in /System/Library/Frameworks), the > adding the following three files into /Library/Python appears to work, > and is about as clean as I can see this dubious-yet-supported mechanism > getting. I was thinking along the same lines, but this has one large disadvantage: *every* python script that you run will start off by patching distutils. Not only is this bad for performance, but if there is an error somewhere in the patch it will lead to bery confusing error messages (to the end user). Can someone think a way of doing this patch *only* when distutils is run? -- 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 Benjamin.Schollnick at usa.xerox.com Tue Dec 16 09:44:03 2003 From: Benjamin.Schollnick at usa.xerox.com (Schollnick, Benjamin) Date: Tue Dec 16 09:44:40 2003 Subject: [Pythonmac-SIG] Yet another problem with two Pythons on Panth er Message-ID: <51B62EFFBC83D6118ADA00096BB030A107CADCB2@usamcms7.mc.usa.xerox.com> > I was thinking along the same lines, but this has one large > disadvantage: > *every* python script that you run will start off by patching > distutils. Not only > is this bad for performance, but if there is an error > somewhere in the > patch > it will lead to bery confusing error messages (to the end user). > > Can someone think a way of doing this patch *only* when distutils is > run? Jack, I'm not sure this will help, especially since my use of distutils, is next to zero... But what about checking to see if distutils has been imported? If it has been imported, and we're running the setup.py application (i.e. argv[0] ) then it's a application that is attempting to install a application... - Benjamin From bob at redivi.com Tue Dec 16 10:37:55 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Dec 16 10:37:40 2003 Subject: [Pythonmac-SIG] Yet another problem with two Pythons on Panth er In-Reply-To: <51B62EFFBC83D6118ADA00096BB030A107CADCB2@usamcms7.mc.usa.xerox.com> References: <51B62EFFBC83D6118ADA00096BB030A107CADCB2@usamcms7.mc.usa.xerox.com> Message-ID: On Dec 16, 2003, at 11:44 PM, Schollnick, Benjamin wrote: >> I was thinking along the same lines, but this has one large >> disadvantage: >> *every* python script that you run will start off by patching >> distutils. Not only >> is this bad for performance, but if there is an error >> somewhere in the >> patch >> it will lead to bery confusing error messages (to the end user). >> >> Can someone think a way of doing this patch *only* when distutils is >> run? > > I'm not sure this will help, especially since my use of distutils, > is > next to zero... > > But what about checking to see if distutils has been imported? If > it has > been imported, and we're running the setup.py application (i.e. > argv[0] ) > then it's a application that is attempting to install a > application... How about just making a folder somewhere, let's call it, stdlib-fixes, and putting the fixed distutils in there. Then you would create a sitecustomization.py (or PYTHONPATH, etc.) hook to put that before the normal stdlib in sys.path. This should probably work, since I don't think any modules in the stdlib depend on distutils. I'd also imagine that not many MacPythonistas have their own sitecustomization.py, so it should be relatively straightforward to make this happen by way of an installer or the like (with appropriate warnings/checks to make sure it doesn't stomp on an existing sitecustomization file). -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031217/428328f1/smime.bin From robin at reportlab.com Tue Dec 16 13:22:21 2003 From: robin at reportlab.com (Robin Becker) Date: Tue Dec 16 13:22:33 2003 Subject: [Pythonmac-SIG] font file resources Message-ID: <0Q9sDHBd103$Ewap@jessikat.fsnet.co.uk> A darwin client wishes to pass a TTF file from an embedding application into our python extension. I have made an interface which allows for us to copy the memory image if it is presented correctly. He mentioned that he thinks he will actually get a pointer to something called a resource fork that contains the font. If that is the case can I detect this case from the memory and do the copy from the right place etc? -- Robin Becker From njriley at uiuc.edu Tue Dec 16 14:02:14 2003 From: njriley at uiuc.edu (Nicholas Riley) Date: Tue Dec 16 14:02:18 2003 Subject: [Pythonmac-SIG] font file resources In-Reply-To: <0Q9sDHBd103$Ewap@jessikat.fsnet.co.uk> References: <0Q9sDHBd103$Ewap@jessikat.fsnet.co.uk> Message-ID: <20031216190213.GG74281@uiuc.edu> On Tue, Dec 16, 2003 at 06:22:21PM +0000, Robin Becker wrote: > A darwin client wishes to pass a TTF file from an embedding application > into our python extension. I have made an interface which allows for us > to copy the memory image if it is presented correctly. He mentioned that > he thinks he will actually get a pointer to something called a resource > fork that contains the font. If that is the case can I detect this case > from the memory and do the copy from the right place etc? Try using fondu to convert to TTF from a Mac-format resource-fork TrueType font: It's not perfect but it does a reasonably good job. Resource forks are structured binary data and typically accessed by the Mac Resource Manager APIs; while it would be possible (and it's been done many times before) to parse the resource data directly, it's likely not worth your time. Of course if you're running on a Mac, there are lots of Python modules to make your life easier when dealing with resources. The author of fondu also wrote PfaEdit, which has a scriptable mode that can be used if the font is one fondu can't handle. -- =Nicholas Riley | From robin at reportlab.com Tue Dec 16 14:50:14 2003 From: robin at reportlab.com (Robin Becker) Date: Tue Dec 16 14:50:47 2003 Subject: [Pythonmac-SIG] font file resources In-Reply-To: <20031216190213.GG74281@uiuc.edu> References: <0Q9sDHBd103$Ewap@jessikat.fsnet.co.uk> <20031216190213.GG74281@uiuc.edu> Message-ID: In article <20031216190213.GG74281@uiuc.edu>, Nicholas Riley writes >On Tue, Dec 16, 2003 at 06:22:21PM +0000, Robin Becker wrote: >> A darwin client wishes to pass a TTF file from an embedding application >> into our python extension. I have made an interface which allows for us >> to copy the memory image if it is presented correctly. He mentioned that >> he thinks he will actually get a pointer to something called a resource >> fork that contains the font. If that is the case can I detect this case >> from the memory and do the copy from the right place etc? > thanks for the pointer. I think the intention is to carry this out in memory as the application already loads these resources. It might be possible to use an external program automatically on the development machine, but the final app will not always be able to write out the files etc. It might be ok if fondu can be made to write into a stream of some kind. >Try using fondu to convert to TTF from a Mac-format resource-fork >TrueType font: > > > >It's not perfect but it does a reasonably good job. Resource forks >are structured binary data and typically accessed by the Mac Resource >Manager APIs; while it would be possible (and it's been done many >times before) to parse the resource data directly, it's likely not >worth your time. Of course if you're running on a Mac, there are lots >of Python modules to make your life easier when dealing with >resources. > >The author of fondu also wrote PfaEdit, which has a scriptable mode >that can be used if the font is one fondu can't handle. > -- Robin Becker From Jack.Jansen at cwi.nl Tue Dec 16 15:43:30 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 16 15:43:36 2003 Subject: [Pythonmac-SIG] Yet another problem with two Pythons on Panth er In-Reply-To: <51B62EFFBC83D6118ADA00096BB030A107CADCB2@usamcms7.mc.usa.xerox.com> References: <51B62EFFBC83D6118ADA00096BB030A107CADCB2@usamcms7.mc.usa.xerox.com> Message-ID: <81E8A3C4-3008-11D8-B3E2-000A27B19B96@cwi.nl> On 16-dec-03, at 15:44, Schollnick, Benjamin wrote: > I'm not sure this will help, especially since my use of distutils, > is > next to zero... > > But what about checking to see if distutils has been imported? If > it has > been imported, and we're running the setup.py application (i.e. > argv[0] ) > then it's a application that is attempting to install a > application... Problem is that the startup code is run before distutils is imported. But: we could conceivably do the mods only if the script name is "setup.py", but that is even a bit too gross for me:-) And Bob suggested: > How about just making a folder somewhere, let's call it, stdlib-fixes, > and putting the fixed distutils in there. Then you would create a > sitecustomization.py (or PYTHONPATH, etc.) hook to put that before the > normal stdlib in sys.path. This should probably work, since I don't > think any modules in the stdlib depend on distutils. This would work, and there's even a way to do this without touching sitecustomize.py: any line in a ".pth" file that starts with "import " is simply executed. So there's nothing to stop us from creating a file macpython-update-23.pth with the contents import sys; if sys.version_info[:3] == (2, 3, 0): sys.path.insert(1, "/Library/Python/2.3/macpython-update-23") (this is the trick I wasn't going to tell you about:-) -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Tue Dec 16 15:47:05 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 16 15:47:10 2003 Subject: [Pythonmac-SIG] font file resources In-Reply-To: <20031216190213.GG74281@uiuc.edu> References: <0Q9sDHBd103$Ewap@jessikat.fsnet.co.uk> <20031216190213.GG74281@uiuc.edu> Message-ID: <022820E6-3009-11D8-B3E2-000A27B19B96@cwi.nl> On 16-dec-03, at 20:02, Nicholas Riley wrote: > On Tue, Dec 16, 2003 at 06:22:21PM +0000, Robin Becker wrote: >> A darwin client wishes to pass a TTF file from an embedding >> application >> into our python extension. I have made an interface which allows for >> us >> to copy the memory image if it is presented correctly. He mentioned >> that >> he thinks he will actually get a pointer to something called a >> resource >> fork that contains the font. If that is the case can I detect this >> case >> from the memory and do the copy from the right place etc? > > Try using fondu to convert to TTF from a Mac-format resource-fork > TrueType font: > > > > It's not perfect but it does a reasonably good job. Resource forks > are structured binary data and typically accessed by the Mac Resource > Manager APIs; while it would be possible (and it's been done many > times before) to parse the resource data directly, it's likely not > worth your time. Of course if you're running on a Mac, there are lots > of Python modules to make your life easier when dealing with > resources. Robin, in addition, to access resource data have a look at the Carbon.Res module. -- 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 Tue Dec 16 16:00:45 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Dec 16 15:59:58 2003 Subject: [Pythonmac-SIG] [ann] AppScripting 0.3.0 In-Reply-To: References: Message-ID: On Dec 16, 2003, at 9:19 AM, has wrote: > New version of AppScripting is available: > > http://freespace.virgin.net/hamish.sanderson/AppScripting-0.3.0.tar.gz > > Now handles AE and application classes and enumerated types sensibly, > and implements almost complete support for by-test references (a.k.a. > 'whose clauses'). Still lots to do, but seems like a good point to > post and solicit some feedback [1] before Christmas. I haven't played with it yet, but my LaunchServices module is being replaced by Jack's lower level bgen wrapper (Jack's wrapper even has the same package name, too, so mine will be unusable in Python 2.4). I have a wrapper around his module that exposes the same API as my LaunchServices module if you're interested, but neither I nor Jack have a non-Panther version of the new LaunchServices package available (I'm guessing you still use Jaguar). -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031217/24617b9e/smime.bin From Jack.Jansen at cwi.nl Tue Dec 16 18:11:39 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 16 18:11:48 2003 Subject: [Pythonmac-SIG] LaunchServices (was AppScripting 0.3.0) In-Reply-To: References: Message-ID: <3405CE64-301D-11D8-B3E2-000A27B19B96@cwi.nl> On 16-dec-03, at 22:00, Bob Ippolito wrote: > I have a wrapper around his module that exposes the same API as my > LaunchServices module if you're interested, but neither I nor Jack > have a non-Panther version of the new LaunchServices package available > (I'm guessing you still use Jaguar). I'm really waiting for one or two people to say: "LaunchServices is good enough right now" and I'll move it to the official PackMan database, and I'll do a Jaguar version too at that time. -- 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 has.temp at virgin.net Tue Dec 16 17:40:48 2003 From: has.temp at virgin.net (has) Date: Tue Dec 16 19:13:32 2003 Subject: [Pythonmac-SIG] [ann] AppScripting 0.3.1 In-Reply-To: References: Message-ID: Hi all, Just posted an update that fixes a couple of bugs: http://freespace.virgin.net/hamish.sanderson/AppScripting-0.3.1.tar.gz has -- http://freespace.virgin.net/hamish.sanderson/ From hengist.podd at virgin.net Tue Dec 16 18:15:29 2003 From: hengist.podd at virgin.net (has) Date: Tue Dec 16 19:15:25 2003 Subject: [Pythonmac-SIG] [ann] AppScripting 0.3.1 In-Reply-To: References: Message-ID: Hi all, Just posted an update that fixes a couple of bugs: http://freespace.virgin.net/hamish.sanderson/AppScripting-0.3.1.tar.gz has -- http://freespace.virgin.net/hamish.sanderson/ From bob at redivi.com Tue Dec 16 19:40:14 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Dec 16 19:39:25 2003 Subject: [Pythonmac-SIG] LaunchServices (was AppScripting 0.3.0) In-Reply-To: <3405CE64-301D-11D8-B3E2-000A27B19B96@cwi.nl> References: <3405CE64-301D-11D8-B3E2-000A27B19B96@cwi.nl> Message-ID: <94073626-3029-11D8-A088-000A95686CD8@redivi.com> On Dec 17, 2003, at 8:11 AM, Jack Jansen wrote: > > On 16-dec-03, at 22:00, Bob Ippolito wrote: > >> I have a wrapper around his module that exposes the same API as my >> LaunchServices module if you're interested, but neither I nor Jack >> have a non-Panther version of the new LaunchServices package >> available (I'm guessing you still use Jaguar). > > I'm really waiting for one or two people to say: "LaunchServices is > good enough right now" and I'll move it to the official PackMan > database, and I'll do a Jaguar version too at that time. It's good enough right now for me, I've put it through it's paces for as much as I use it in aeve. -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031217/72c16b60/smime-0001.bin From hengist.podd at virgin.net Wed Dec 17 08:12:10 2003 From: hengist.podd at virgin.net (has) Date: Wed Dec 17 09:15:27 2003 Subject: [Pythonmac-SIG] Re: LaunchServices (was AppScripting 0.3.0) In-Reply-To: <3405CE64-301D-11D8-B3E2-000A27B19B96@cwi.nl> References: <3405CE64-301D-11D8-B3E2-000A27B19B96@cwi.nl> Message-ID: Bob wrote: >neither I nor Jack have a non-Panther version of the new >LaunchServices package available (I'm guessing you still use Jaguar). Yes. Will probably upgrade till sometime next year, but for now I'm on 10.2.6. I'll switch AS to Jack's LaunchServices once it supports 10.2 - sounds like this should be soon. Ta, has -- http://freespace.virgin.net/hamish.sanderson/ From Benjamin.Schollnick at usa.xerox.com Wed Dec 17 12:56:42 2003 From: Benjamin.Schollnick at usa.xerox.com (Schollnick, Benjamin) Date: Wed Dec 17 12:57:19 2003 Subject: [Pythonmac-SIG] .PTH files? Message-ID: <51B62EFFBC83D6118ADA00096BB030A107CADCC5@usamcms7.mc.usa.xerox.com> > This would work, and there's even a way to do this without touching > sitecustomize.py: any line in a ".pth" file that starts with > "import " > is simply executed. So there's nothing to stop us from > creating a file > macpython-update-23.pth with the contents > import sys; if sys.version_info[:3] == (2, 3, 0): sys.path.insert(1, > "/Library/Python/2.3/macpython-update-23") > (this is the trick I wasn't going to tell you about:-) <.Blink.> You can do that? I admit, I have not dug for information on the .PTH files... But I thought that they had one purpose, and only one way to be used.... Place a directory path in the .PTH file, so that you can import something that was not in the site-lib, or lib path. Is there more advanced ways to use .pth files? I don't recall seeing the .pth files really documented anywhere? Did I miss something? - Benjamin From wfspotz at sandia.gov Wed Dec 17 13:16:23 2003 From: wfspotz at sandia.gov (Bill Spotz) Date: Wed Dec 17 13:16:45 2003 Subject: [Pythonmac-SIG] vecLib Framework on the Mac and distutils Message-ID: <1EFC50F2-30BD-11D8-BAA5-0003930F2154@sandia.gov> I am hoping someone will be able to shed some light on this strange problem I'm having. I am trying to develop a C++ extension to python that must link with LAPACK. I am doing my development on the Mac, so I want to link with -framework veclib. OS: Mac OS X 10.2.8 python: 2.3 (via fink) gcc: 3.1 I am using distutils to build the extension, and assign ["-framework veclib -lSystem"] to the extra_link_args argument of the setup() command in setup.py. However, the resulting extension library built by distutils does not recognize the LAPACK routines. What is weird is that if I take the exact same link command generated by distutils and execute it on the command line, I get an extension library that DOES recognize the LAPACK routines and in fact passes its regression tests. On the mac, if you set the following environment variables: RC_TRACE_ARCHIVES and RC_TRACE_DYLIBS, you'll get a trace from ld specifying which static and dynamic libraries are loaded. Sure enough, when executed from distutils, the link step doesn't load in the vecLib framework, but it does when issued from the command line. All the other libraries are loaded the same, although the order is somewhat different between the two cases. For what it is worth, this is the generated link command: c++ -L/sw/lib -bundle -flat_namespace -undefined suppress build/temp.darwin-6.8-PowerMacintosh-2.3/Epetra_wrap.o -LCommon -L/usr/local/lib -L/usr/local/lib -L/sw/lib/python2.3/config -lcommon -lepetra -lswigpy -lpython2.3 -o build/lib.darwin-6.8-PowerMacintosh-2.3/_Epetra.so -framework veclib -lSystem Any help will be appreciated. ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-5451 ** ** Albuquerque, NM 87185-0316 Email: wfspotz@sandia.gov ** From postmaster at hogthrob.eatserver.nl Wed Dec 17 15:07:41 2003 From: postmaster at hogthrob.eatserver.nl (postmaster@hogthrob.eatserver.nl) Date: Wed Dec 17 15:07:46 2003 Subject: [Pythonmac-SIG] VIRUS IN YOUR MAIL Message-ID: <200312172007.hBHK7fA06882@hogthrob.eatserver.nl> V I R U S W A A R S C H U W I N G Onze virusscanner trof W32/Sobig.E@mm aan in uw email aan het volgende adres : -> De email is NIET aangenomen door onze systemen. Controleer uw systeem op virussen of vraag uw systeemadministrator dit voor u te doen. Hierna kunt u het bericht nogmaals verzenden. Ter informatie treft u hier de header van uw email aan. ------------------------- BEGIN HEADERS ----------------------------- From: To: Subject: Re: Movie Date: Fri, 17 Dec 1999 15:06:57 --0500 Importance: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MSMail-Priority: Normal X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="CSmtpMsgPart123X456_000_1D2DE507" -------------------------- END HEADERS ------------------------------ V I R U S A L E R T Our viruschecker found the W32/Sobig.E@mm virus(es) in your email to the following recipient(s): -> Delivery of the email was stopped! Please check your system for viruses, or ask your system administrator to do so. For your reference, here are the headers from your email: ------------------------- BEGIN HEADERS ----------------------------- From: To: Subject: Re: Movie Date: Fri, 17 Dec 1999 15:06:57 --0500 Importance: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MSMail-Priority: Normal X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="CSmtpMsgPart123X456_000_1D2DE507" -------------------------- END HEADERS ------------------------------ From Jack.Jansen at cwi.nl Wed Dec 17 15:29:16 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Wed Dec 17 15:29:22 2003 Subject: [Pythonmac-SIG] .PTH files? In-Reply-To: <51B62EFFBC83D6118ADA00096BB030A107CADCC5@usamcms7.mc.usa.xerox.com> References: <51B62EFFBC83D6118ADA00096BB030A107CADCC5@usamcms7.mc.usa.xerox.com> Message-ID: On 17-dec-03, at 18:56, Schollnick, Benjamin wrote: > > You can do that? I admit, I have not dug for information on the .PTH > files... But I thought that they had one purpose, and only one way to > be > used.... > > Place a directory path in the .PTH file, so that you can import > something > that was not in the site-lib, or lib path. > > Is there more advanced ways to use .pth files? I don't recall seeing > the > .pth files really documented anywhere? Did I miss something? Well... I think I would call this "creative use". The special case that lines starting with "import" is documented in site.py. The fact that you can do more than just an import may not have been intentional when the feature was designed:-) -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Wed Dec 17 15:30:59 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Wed Dec 17 15:31:08 2003 Subject: [Pythonmac-SIG] vecLib Framework on the Mac and distutils In-Reply-To: <1EFC50F2-30BD-11D8-BAA5-0003930F2154@sandia.gov> References: <1EFC50F2-30BD-11D8-BAA5-0003930F2154@sandia.gov> Message-ID: On 17-dec-03, at 19:16, Bill Spotz wrote: > I am hoping someone will be able to shed some light on this strange > problem I'm having. > > I am trying to develop a C++ extension to python that must link with > LAPACK. I am doing my development on the Mac, so I want to link with > -framework veclib. > > OS: Mac OS X 10.2.8 > python: 2.3 (via fink) > gcc: 3.1 > > I am using distutils to build the extension, and assign ["-framework > veclib -lSystem"] to the extra_link_args argument of the setup() > command in setup.py. However, the resulting extension library built > by distutils does not recognize the LAPACK routines. I always use constructs like ["-framework", "veclib", "-lSystem"]. Could it be that by passing it as a single string it is somehow passed to the linker as a single argument? -- 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 stuart at stuartbishop.net Tue Dec 16 23:53:05 2003 From: stuart at stuartbishop.net (Stuart Bishop) Date: Wed Dec 17 16:56:44 2003 Subject: [Pythonmac-SIG] Yet another problem with two Pythons on Panth er In-Reply-To: <81E8A3C4-3008-11D8-B3E2-000A27B19B96@cwi.nl> References: <51B62EFFBC83D6118ADA00096BB030A107CADCB2@usamcms7.mc.usa.xerox.com> <81E8A3C4-3008-11D8-B3E2-000A27B19B96@cwi.nl> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > This would work, and there's even a way to do this without touching > sitecustomize.py: any line in a ".pth" file that starts with "import " > is simply executed. So there's nothing to stop us from creating a file > macpython-update-23.pth with the contents > import sys; if sys.version_info[:3] == (2, 3, 0): sys.path.insert(1, > "/Library/Python/2.3/macpython-update-23") > (this is the trick I wasn't going to tell you about:-) And I thought *my* attempt was disgusting :-) - -- Stuart Bishop http://www.stuartbishop.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQE/3+E1AfqZj7rGN0oRAln+AJ9DKcUfhHIxUGB24ZbBn5f1ZxVsowCfX1Ly Ljf4JcUj+zNixVDLuyN98X8= =cy30 -----END PGP SIGNATURE----- From wfspotz at sandia.gov Wed Dec 17 17:26:39 2003 From: wfspotz at sandia.gov (Bill Spotz) Date: Wed Dec 17 17:26:53 2003 Subject: [Pythonmac-SIG] vecLib Framework on the Mac and distutils In-Reply-To: Message-ID: <156130FC-30E0-11D8-BAA5-0003930F2154@sandia.gov> Wow, that did it. That never would have occurred to me. Thanks. On Wednesday, December 17, 2003, at 01:30 PM, Jack Jansen wrote: > On 17-dec-03, at 19:16, Bill Spotz wrote: > >> I am hoping someone will be able to shed some light on this strange >> problem I'm having. >> >> I am trying to develop a C++ extension to python that must link with >> LAPACK. I am doing my development on the Mac, so I want to link with >> -framework veclib. >> >> OS: Mac OS X 10.2.8 >> python: 2.3 (via fink) >> gcc: 3.1 >> >> I am using distutils to build the extension, and assign ["-framework >> veclib -lSystem"] to the extra_link_args argument of the setup() >> command in setup.py. However, the resulting extension library built >> by distutils does not recognize the LAPACK routines. > > I always use constructs like ["-framework", "veclib", "-lSystem"]. > Could it be that by passing it as a single string it is somehow passed > to the linker as a single argument? > -- > Jack Jansen, , http://www.cwi.nl/~jack > If I can't dance I don't want to be part of your revolution -- Emma > Goldman ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-5451 ** ** Albuquerque, NM 87185-0316 Email: wfspotz@sandia.gov ** From wtbridgman at radix.net Wed Dec 17 22:34:16 2003 From: wtbridgman at radix.net (W.T. Bridgman) Date: Wed Dec 17 22:34:13 2003 Subject: [Pythonmac-SIG] Re: How easy to just replace Panther's Python? In-Reply-To: Message-ID: <0E902987-310B-11D8-94A9-0050E485FC7A@radix.net> Kind of late joining this thread but since no one voiced this issue. I dislike this idea. I predominantly develop for my own use (scientific research, in-house tool development) and having platform changes can set me back months. I last had VTK running with python wrappers under 10.1. When I upgraded to 10.2, many components wouldn't build and I've only recently got the entire system working again. I'm delaying upgrading to 10.3 due to this experience. If I encounter some type of code bug and I develop a work-around, I at least want to get some use out of the code on *my* time table - not that determined by a vendor update. When I've completed the project at hand and ready to update, then I can update knowing that I'll have to revise some of my code components. I don't want to be in a situation where I need to upgrade due to a OS security issue but must also take some update that may break my existing tools. As a result, I have traditionally ripped out Apple's installation and installed Python as a framework from scratch. My $0.02, Tom On Wednesday, December 10, 2003, at 07:27 PM, Paul Berkowitz wrote: > On 12/10/03 3:33 PM, "Russell E. Owen" wrote: > >> I'd much rather upgrade Python than work around bugs that have been >> fixed, especially since Python 2.3 has other known bugs. > > I find this a bit disturbing. New versions are always going to have > some > bugs that need fixing or working around. I think Python on the Mac > will only > be taken up in a big way when pretty well everyone agrees to work with > what > Apple supplies. You need to be be able to depend on users having the > same > Python as you, the developer. I think that's what Jack and others have > been > working towards, and have come much of the way. I keep waiting for the > "all > clear" to get more involved myself, but it never seems to come. > > Apple were pretty good about including Python 2.3 in OS 10.3 - even > delaying > the odd deadline or two, from what I've been told, or in any case > coordinating them. Wouldn't the next step be to request Apple to > include > Python version updates in OS updates? So if Python 2.3.1 is ready for > OS > 10.3.2 beta testing, to please include it? Then you can just ask your > users > to update to OS 10.3.2 when it comes out. > > -- > Paul Berkowitz > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From berkowit at silcom.com Wed Dec 17 23:01:25 2003 From: berkowit at silcom.com (Paul Berkowitz) Date: Wed Dec 17 23:01:32 2003 Subject: [Pythonmac-SIG] Re: How easy to just replace Panther's Python? In-Reply-To: <0E902987-310B-11D8-94A9-0050E485FC7A@radix.net> Message-ID: But that would apply to absolutely everything, including all built-in Apple applications, files, frameworks, etc. So the solution is simple for you: don't upgrade the OS until you're ready. -- Paul Berkowitz > From: "W.T. Bridgman" > Date: Wed, 17 Dec 2003 22:34:16 -0500 > To: PythonMac > Subject: Re: [Pythonmac-SIG] Re: How easy to just replace Panther's Python? > > Kind of late joining this thread but since no one voiced this issue. > > I dislike this idea. > > I predominantly develop for my own use (scientific research, in-house > tool development) and having platform changes can set me back months. > > I last had VTK running with python wrappers under 10.1. When I > upgraded to 10.2, many components wouldn't build and I've only recently > got the entire system working again. I'm delaying upgrading to 10.3 > due to this experience. > > If I encounter some type of code bug and I develop a work-around, I at > least want to get some use out of the code on *my* time table - not > that determined by a vendor update. When I've completed the project at > hand and ready to update, then I can update knowing that I'll have to > revise some of my code components. I don't want to be in a situation > where I need to upgrade due to a OS security issue but must also take > some update that may break my existing tools. > > As a result, I have traditionally ripped out Apple's installation and > installed Python as a framework from scratch. > > My $0.02, > Tom > > On Wednesday, December 10, 2003, at 07:27 PM, Paul Berkowitz wrote: > >> On 12/10/03 3:33 PM, "Russell E. Owen" wrote: >> >>> I'd much rather upgrade Python than work around bugs that have been >>> fixed, especially since Python 2.3 has other known bugs. >> >> I find this a bit disturbing. New versions are always going to have >> some >> bugs that need fixing or working around. I think Python on the Mac >> will only >> be taken up in a big way when pretty well everyone agrees to work with >> what >> Apple supplies. You need to be be able to depend on users having the >> same >> Python as you, the developer. I think that's what Jack and others have >> been >> working towards, and have come much of the way. I keep waiting for the >> "all >> clear" to get more involved myself, but it never seems to come. >> >> Apple were pretty good about including Python 2.3 in OS 10.3 - even >> delaying >> the odd deadline or two, from what I've been told, or in any case >> coordinating them. Wouldn't the next step be to request Apple to >> include >> Python version updates in OS updates? So if Python 2.3.1 is ready for >> OS >> 10.3.2 beta testing, to please include it? Then you can just ask your >> users >> to update to OS 10.3.2 when it comes out. >> >> -- >> Paul Berkowitz >> >> >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG@python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From Jack.Jansen at cwi.nl Thu Dec 18 15:56:56 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Thu Dec 18 15:57:01 2003 Subject: [Pythonmac-SIG] Re: How easy to just replace Panther's Python? In-Reply-To: <0E902987-310B-11D8-94A9-0050E485FC7A@radix.net> References: <0E902987-310B-11D8-94A9-0050E485FC7A@radix.net> Message-ID: On 18-dec-03, at 4:34, W.T. Bridgman wrote: > Kind of late joining this thread but since no one voiced this issue. > > I dislike this idea. > > I predominantly develop for my own use (scientific research, in-house > tool development) and having platform changes can set me back months. Note that this (theoretical: I don't think Apple will update Python, but that aside) discussion is purely about incorporating Python micro releases. These are supposed to be fully 100% backward compatible, to the point that any bugs which people might conceivably see as a feature are not fixed. I don't think I've ever heard reports of a Python micro release causing anyone any problems (except for the occasional situation where a release is pulled after a short while because of problems, as happened with 2.3.1). -- 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 eppstein at ics.uci.edu Thu Dec 18 17:56:54 2003 From: eppstein at ics.uci.edu (David Eppstein) Date: Thu Dec 18 17:56:59 2003 Subject: [Pythonmac-SIG] Re: How easy to just replace Panther's Python? References: <0E902987-310B-11D8-94A9-0050E485FC7A@radix.net> Message-ID: In article , Jack Jansen wrote: > I don't think I've ever heard reports of a Python micro > release causing anyone any problems (except for the occasional > situation where a release is pulled after a short while because of > problems, as happened with 2.3.1). Some of my code broke going from 2.2 to 2.3 when I last upgraded my OS, but it would have broken just the same if I had gone to I think 2.2.2 instead (you may have seen some discussion on python-dev about the issue a few weeks back: object.setattr(...) stopped working for certain objects). It was not hard to fix and I shouldn't have written it that way in the first place, but never causing anyone any problems is an exaggeration. -- David Eppstein http://www.ics.uci.edu/~eppstein/ Univ. of California, Irvine, School of Information & Computer Science From k3pjuz0a at juno.com Fri Dec 19 12:10:57 2003 From: k3pjuz0a at juno.com (Steve Clements) Date: Fri Dec 19 06:18:50 2003 Subject: [Pythonmac-SIG] Python-list-request yd uomjs ovs Message-ID: Hi Python-list-request , I have a picture online now. I just want someone to know me before they see me. I just feel better that way. (but believe me you wont be disappointed) Well i am 22 years old. I have a very out going personality. I love to meet new people, i am on the varsity cheerleading squad. I like the little romantic stuff and love to be swept off my feet and suprised. I am currently looking for a relationship. All around if i were to use 3 words to describe me id say Outgoing, sexy, and spontaneous :) And if u wanna chat or get to know me. If u really like what u see. youll do more than just send me a note. Talk to you soon I hope... :) Carolynn ps. my friend Maria is on with me as well. http://seeingnoone.com/confirm/?oc=52211091 I do not wish to go on any blind dates at all, now or in the future: http://seeingnoone.com/remove/?oc=1 m393nnm3m3oqkkf ptki akk op hycsa From blink at msn.com Sat Dec 20 05:49:02 2003 From: blink at msn.com (Reuben Crenshaw) Date: Fri Dec 19 15:55:21 2003 Subject: [Pythonmac-SIG] You tried diets and workouts, add this and be amazed!! bpvwvczpyztptp Message-ID: An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031220/9fee7bad/attachment.html From krjackson at lbl.gov Fri Dec 19 23:49:26 2003 From: krjackson at lbl.gov (Keith Jackson) Date: Sat Dec 20 13:13:10 2003 Subject: [Pythonmac-SIG] SOAP via ZSI, or what? In-Reply-To: <003301c3c397$40e4cb80$a800000a@Odyssey.local> Message-ID: depends on what you want to do. i'm a zsi developer SOAPpy offers a nice easy to use interface for dealing with fairly simple SOAP RPC messaging. It is really easy to get up and running with. If you need to deal with WSDL that uses complex types, or document literal encoding, i would recommend looking at ZSI. it offers a wsdl to python code generator that will generate bindings to the service. This includes the mapping of XML Schema defined types into python classes. --keith On Monday, December 15, 2003, at 09:41 PM, leo wrote: > hi there > > want to write a little SOAP client. > > does anybody have experience with ZSI or SOAPpy? what would you > recommend? > > thanks, leo > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From 188tfqbqgp at email.com Mon Dec 22 01:07:38 2003 From: 188tfqbqgp at email.com (Ebony Harden) Date: Sat Dec 20 22:11:57 2003 Subject: [Pythonmac-SIG] Fed UP with fad diets? Message-ID: An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031222/f62f98a3/attachment.html From kevin at wordtechweb.com Sun Dec 21 10:17:25 2003 From: kevin at wordtechweb.com (Kevin Walzer) Date: Sun Dec 21 10:18:16 2003 Subject: [Pythonmac-SIG] Python/Rich text Message-ID: I am trying to identify components to put together a basic text processor in Python that supports rich text format (RTF) export. I am looking to provide others with a simple text editing application that will allow them to format their manuscripts according to my publishing production process, which would reduce the time I spend on typesetting; but RTF seems to be a very elusive target in Python. Does such a library/module exist? --- Kevin Walzer, Ph.D. Editor WordTech Communications -- A New Paradigm of Poetry http://www.wordtechcommunications.com http://www.smallbizmac.com http://www.kevin-walzer.com mailto:kevin@wordtechweb.com From Martina at Oefelein.de Sun Dec 21 16:42:54 2003 From: Martina at Oefelein.de (Martina Oefelein) Date: Sun Dec 21 16:43:04 2003 Subject: [Pythonmac-SIG] Python/Rich text In-Reply-To: References: Message-ID: Hi Kevin, > I am trying to identify components to put together a basic text > processor in Python that supports rich text format (RTF) export. I am > looking to provide others with a simple text editing application that > will allow them to format their manuscripts according to my publishing > production process, which would reduce the time I spend on > typesetting; but RTF seems to be a very elusive target in Python. Does > such a library/module exist? Does it have to be cross-platform? If it's Mac-only, you can use PyObjC, which lets you easily access Cocoa's text-editing features. ciao Martina -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2367 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031221/458326ff/smime.bin From kent_johnson at skillsoft.com Mon Dec 22 15:07:49 2003 From: kent_johnson at skillsoft.com (Kent Johnson) Date: Mon Dec 22 15:08:17 2003 Subject: [Pythonmac-SIG] Building Python 2.3.3 on OSX 10.2 Message-ID: Python 2.3.3 didn't build for me on MacOSX 10.2 because Mac/OSX/Makefile is expecting xcodebuild instead of pbxbuild. The fix is already there, just change the commenting on the lines # For 10.2: PBXBUILD=pbxbuild # For 10.3: #PBXBUILD=xcodebuild but to find this I had to dig into the mailing list archives, it would be helpful if either - both configurations were handled automatically - the needed edit was documented in ./Mac/OSX/README It's a small thing but others will probably have the same problem. Thanks, Kent From rowen at cesmail.net Mon Dec 22 17:30:42 2003 From: rowen at cesmail.net (Russell E. Owen) Date: Mon Dec 22 17:30:48 2003 Subject: [Pythonmac-SIG] Tkinter on Panther? Message-ID: I've finally installed Panther today, and am trying to get my Python up to date. Unfortunately, I'm not sure what to do about Tkinter. The issue is that Apple seems to have included tcl with Panther (/System/Library/Frameworks/Tcl) but there's no sign of Tk (what was Apple thinking?). I could run the usual binary Tcl/Tk installer, but that would add both a Tk and Tcl framework to /Library/Frameworks, and I'm worried about the two Tcl frameworks colliding (e.g. something similar to the known problems with Python). The only other options I've thought of are: - Trash Tcl (and possibly Python) in System/Library/Frameworks and start over, putting everything in /Library/Frameworks. This has the advantage that I can easily apply updates. But I wonder if it'll break any Apple stuff that relies on Tcl (or Python). What are the dangers of this? - Run the tk binary installer and try to get it to see /System/Library/Frameworks/Tcl but then install Tk in /Library/Frameworks. Sounds ghastly. Any suggestions would be most welcome. -- Russell From bob at redivi.com Mon Dec 22 21:04:24 2003 From: bob at redivi.com (Bob Ippolito) Date: Mon Dec 22 21:03:25 2003 Subject: [Pythonmac-SIG] Tkinter on Panther? In-Reply-To: References: Message-ID: <54D7854E-34EC-11D8-B809-000A95686CD8@redivi.com> On Dec 23, 2003, at 7:30 AM, Russell E. Owen wrote: > I've finally installed Panther today, and am trying to get my Python up > to date. > > Unfortunately, I'm not sure what to do about Tkinter. The issue is that > Apple seems to have included tcl with Panther > (/System/Library/Frameworks/Tcl) but there's no sign of Tk (what was > Apple thinking?). They were probably thinking that TclTkAqua is buggy and unstable > I could run the usual binary Tcl/Tk installer, but that would add both > a > Tk and Tcl framework to /Library/Frameworks, and I'm worried about the > two Tcl frameworks colliding (e.g. something similar to the known > problems with Python). It's not really similar, in your case you almost definitely want /Library/Frameworks/Tcl to override /System/Library/Frameworks/Tcl for "-framework Tcl" .. which is what will happen. > The only other options I've thought of are: > - Trash Tcl (and possibly Python) in System/Library/Frameworks and > start > over, putting everything in /Library/Frameworks. This has the advantage > that I can easily apply updates. But I wonder if it'll break any Apple > stuff that relies on Tcl (or Python). What are the dangers of this? DO NOT EVER TRASH ANYTHING IN /System! EVER! (small patches to known broken files are ok, though) > - Run the tk binary installer and try to get it to see > /System/Library/Frameworks/Tcl but then install Tk in > /Library/Frameworks. Sounds ghastly. It's not, it works fine. -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031223/dc08ab8f/smime.bin From mark.asbach at post.rwth-aachen.de Tue Dec 23 05:15:00 2003 From: mark.asbach at post.rwth-aachen.de (Mark Asbach) Date: Tue Dec 23 05:46:39 2003 Subject: [Pythonmac-SIG] Embedding Python on OS X, nem to the list Message-ID: Hi list, first off, I'm new to this list, so here's my background: At the moment, I'm doing my diploma thesis on visualization of finite element data in the electric engineering department at Aachen university. This is also where I came into contact with Python, because the software package developed at the institute uses an embedded Python interpreter. These days I'm porting the software to Mac OS X and got it up and running on 10.2 already. What I'd like to do now is adapting it to the Python installation already present on OS X. My questions are - Am I right, that I need to build Python myself to get libpython that I can embed? - What do I need to do to get the configure script detect libreadline and what will I need to do to have my own project compile and link correctly? - What will I need to do to get a working Tcl/Tk setup? Thanks a lot, Mark From joanca at basedesign.com Tue Dec 23 11:03:45 2003 From: joanca at basedesign.com (Joancarles =?iso-8859-1?Q?Casas=EDn?=) Date: Tue Dec 23 11:04:02 2003 Subject: [Pythonmac-SIG] PIL & MacPython-Panther 2.3 Message-ID: After installing MacPython-Panther - 2.3 addons in a Panther machine I tried to install PIL using the PackageManager but I couldn't. Some error with the place where should download the PIL package. Is there any easy way? (no UNIX in my brain, sorry, real _mac_ user ;) Though i can follow step-by-step instruction or doc. I tried with Unix install instructions in PIL but couldn't do it. I installed other modules like reportlab only moving manually from "./site-packages" to lib/python/2.3 and they work but can't do it with PIL. And of course I'm in a hurry with that :( Many thanks for your help. Joancarles ----------------------------------- Joancarles Casas?n ----------------------------------- BaseBCN Manacor 3 / 08023 Barcelona / Spain ----------------------------------- T +34 93 390 87 50 F +34 93 418 95 56 ----------------------------------- Altres Bases BaseBRU / Brussels / Belgium T +32 2 219 0082 BaseNYC / New York / USA T +1 212 6259293 ----------------------------------- www.basedesign.com ----------------------------------- From rowen at cesmail.net Tue Dec 23 13:50:32 2003 From: rowen at cesmail.net (Russell E. Owen) Date: Tue Dec 23 13:50:41 2003 Subject: [Pythonmac-SIG] Re: Embedding Python on OS X, nem to the list References: Message-ID: In article , Mark Asbach wrote: > Hi list, > > first off, I'm new to this list, so here's my background: At the > moment, I'm doing my diploma thesis on visualization of finite element > data in the electric engineering department at Aachen university. This > is also where I came into contact with Python, because the software > package developed at the institute uses an embedded Python interpreter... I can only answer the last question: > - What will I need to do to get a working Tcl/Tk setup? It depends if you want an aqua interface (native MacOS look and feel) or unix X11. - Aqua Tk is very easy to install, but has some annoying cosmetic bugs. Also Python 2.3 itself has some bugs (including some standard tk file dialogs are broken) and on Panther you are stuck with it if you want aqua. - X11 is less mac-like but a bit more solid. Also, you can install a current version of Python. It is fairly easy to install from fink or source, but takes awhile. To install aqua Python and Tkinter: - Install Tcl/Tk from one of the aqua binary installers available from . - Download the MacPython binary for Panther or Jaguar (as appropriate) at the MacPython web site and run that. - Run the Package Manager (in /Applications/MacPython). If you keep your OS up to date, the package manager may not find the required URL, in which case see . - Use Package Manager to nstall _tkinter and anything else of interest. To install X11 Python and Tkinter: You can install everything (including python) from fink (a package manager for MacOS X; try google) or from source. Here are instructions from source: Install X11 and the X11 SDK first (there are other options, not discussed here). For Jaguar, you can download installers from apple. For Panther, X11 is an *optional* extra installation of the main operating system, so pay attention when you start your install (or perhaps Pacifist will let you get to it on the install CD). X11 SDK is part of the developer tools. It is helpful to install readlines. To install readlines 4.3, obtain the source and edit .../readlines-4.3/support/shobj-conf to change line 151 from: SHLIB_LIBS='-lSystem' to: SHLIB_LIBS='-lSystem -lncurses -lcc_dynamic' and then do the normal ./configure; make; sudo make install sequence. Install tcl/tk from source following the normal unix instructions. Install python from source, following the normal unix instructions. -- Russell From rowen at cesmail.net Tue Dec 23 13:58:07 2003 From: rowen at cesmail.net (Russell E. Owen) Date: Tue Dec 23 13:58:12 2003 Subject: [Pythonmac-SIG] Re: Tkinter on Panther? References: <54D7854E-34EC-11D8-B809-000A95686CD8@redivi.com> Message-ID: In article <54D7854E-34EC-11D8-B809-000A95686CD8@redivi.com>, Bob Ippolito wrote: > On Dec 23, 2003, at 7:30 AM, Russell E. Owen wrote: > > > I've finally installed Panther today, and am trying to get my Python up > > to date. > > > > Unfortunately, I'm not sure what to do about Tkinter. The issue is that > > Apple seems to have included tcl with Panther > > (/System/Library/Frameworks/Tcl) but there's no sign of Tk (what was > > Apple thinking?). > > They were probably thinking that TclTkAqua is buggy and unstable Interesting. I've personally not had stability problems and I use it a fair amount. I agree that it's got a lot of cosmetic bugs, but I find them tolerable. Still, I use X11 Tkinter a bit more often than aqua Tkinter. > > I could run the usual binary Tcl/Tk installer, but that would add both > > a > > Tk and Tcl framework to /Library/Frameworks, and I'm worried about the > > two Tcl frameworks colliding (e.g. something similar to the known > > problems with Python). > > It's not really similar, in your case you almost definitely want > /Library/Frameworks/Tcl to override /System/Library/Frameworks/Tcl for > "-framework Tcl" .. which is what will happen. Yes. Thanks! > > The only other options I've thought of are: > > - Trash Tcl (and possibly Python) in System/Library/Frameworks and > > start > > over, putting everything in /Library/Frameworks. This has the advantage > > that I can easily apply updates. But I wonder if it'll break any Apple > > stuff that relies on Tcl (or Python). What are the dangers of this? > > DO NOT EVER TRASH ANYTHING IN /System! EVER! > (small patches to known broken files are ok, though) Jack said something similar when I asked about updating Python on Panther. But...why? I would expect the OS to see the new version in /Library/Frameworks and life to be good. Apparently my expectation is false. > > - Run the tk binary installer and try to get it to see > > /System/Library/Frameworks/Tcl but then install Tk in > > /Library/Frameworks. Sounds ghastly. > > It's not, it works fine. Great. Thanks! -- Russell From Benjamin.Schollnick at usa.xerox.com Tue Dec 23 14:42:55 2003 From: Benjamin.Schollnick at usa.xerox.com (Schollnick, Benjamin) Date: Tue Dec 23 14:43:11 2003 Subject: [Pythonmac-SIG] Re: Tkinter on Panther? Message-ID: <51B62EFFBC83D6118ADA00096BB030A107CADCE0@usamcms7.mc.usa.xerox.com> > > DO NOT EVER TRASH ANYTHING IN /System! EVER! > > (small patches to known broken files are ok, though) > > Jack said something similar when I asked about updating Python on > Panther. But...why? I would expect the OS to see the new version in > /Library/Frameworks and life to be good. Apparently my expectation is > false Here's my view..... It's quite simple... The only people that guarantee what may or may not be placed into the system areas is Apple... So if you place a file in the system tree, one of two things may happen. 1) You overwrite a file 2) You add a file In either case, hopefully nothing "wrong" will happen... But if something does go wrong, now what? Does Apple support you, even though you have made unsupported changes? Let alone a patch later is expecting a specific file you may have replaced... What does the updater do? But now for something different, let's say the file that broke is indeed in the system folder, it is now affecting every user. If it had been in the ~/System tree, it would only affect the single user... It's far safer to modify only the ~/System folders.... Plus Apple (probably) is only going to change the /System folder tree... - Benjamin From berkowit at silcom.com Tue Dec 23 14:55:44 2003 From: berkowit at silcom.com (Paul Berkowitz) Date: Tue Dec 23 14:55:50 2003 Subject: [Pythonmac-SIG] Re: Tkinter on Panther? In-Reply-To: <51B62EFFBC83D6118ADA00096BB030A107CADCE0@usamcms7.mc.usa.xerox.com> Message-ID: On 12/23/03 11:42 AM, "Schollnick, Benjamin" wrote: > >>> DO NOT EVER TRASH ANYTHING IN /System! EVER! >>> (small patches to known broken files are ok, though) >> >> Jack said something similar when I asked about updating Python on >> Panther. But...why? I would expect the OS to see the new version in >> /Library/Frameworks and life to be good. Apparently my expectation is >> false > > Here's my view..... It's quite simple... > > The only people that guarantee what may or may not be placed into the system > areas is Apple... > > So if you place a file in the system tree, one of two things may happen. > > 1) You overwrite a file > 2) You add a file > > In either case, hopefully nothing "wrong" will happen... But if something > does go wrong, now what? > > Does Apple support you, even though you have made unsupported changes? > Let alone a patch later is expecting a specific file you may have > replaced... What does the updater do? > > But now for something different, let's say the file that broke is indeed in > the system folder, it is now affecting every user. If it had been in the > ~/System tree, it would only affect the single user... > > It's far safer to modify only the ~/System folders.... > > Plus Apple (probably) is only going to change the /System folder tree... There are occasions when you may want/need to change things for every user. That's what /Library is for. NEVER alter anything in /System/Library. -- Paul Berkowitz From Jack.Jansen at cwi.nl Tue Dec 23 16:34:09 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 23 16:35:00 2003 Subject: [Pythonmac-SIG] PIL & MacPython-Panther 2.3 In-Reply-To: References: Message-ID: On Dec 23, 2003, at 17:03, Joancarles Casas?n wrote: > After installing MacPython-Panther - 2.3 addons in a Panther machine I > tried to install > PIL using the PackageManager but I couldn't. Some error with the place > where should > download the PIL package. This "shouldn't happen". Assuming this is the official PackMan database (the one that opens automatically) please send the error message to me, and I'll try to find out what goes on. If it's a third-party database (such as Bob Ippolito's database) do the same, but send the error message to that maintainer. From paul at fxtech.com Tue Dec 23 16:44:21 2003 From: paul at fxtech.com (Paul Miller) Date: Tue Dec 23 16:44:28 2003 Subject: [Pythonmac-SIG] PIL & MacPython-Panther 2.3 In-Reply-To: References: Message-ID: <6.0.1.1.2.20031223154332.05968a08@mail.fxtech.com> >After installing MacPython-Panther - 2.3 addons in a Panther machine I >tried to install >PIL using the PackageManager but I couldn't. Some error with the place >where should >download the PIL package. I JUST upgraded to Panther yesterday, so I am just coming into this... but - Does MacPython no longer come with PIL (and Numeric)? From Jack.Jansen at cwi.nl Tue Dec 23 16:43:50 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 23 16:44:40 2003 Subject: [Pythonmac-SIG] Changing things in /System (was: Tkinter on Panther?) In-Reply-To: References: <54D7854E-34EC-11D8-B809-000A95686CD8@redivi.com> Message-ID: <18856F26-3591-11D8-BDD3-003065517236@cwi.nl> On Dec 23, 2003, at 19:58, Russell E. Owen wrote: > Jack said something similar when I asked about updating Python on > Panther. But...why? I would expect the OS to see the new version in > /Library/Frameworks and life to be good. Apparently my expectation is > false. The party line is "you shall not change anything in /System because Apple controls it". In actual fact that chance of adverse consequences aren't all that big if you are careful. If you replace Python 2.3 by Python 2.3.3 using the exact same build procedure Apple used (get it from the darwin CVS repository) the chance of you breaking anything for Apple is as good as zero. Apple could still break things for you, though, if they installed stuff over yours. If you replace Python 2.3 with Python 2.3.3 using the normal (python source distribution) build procedure the chances of breaking anything are still slim. The chance of breaking things gets quite a bit bigger if you remove Apple-installed Python, though. For one thing, Apple could decide to use python in a future installer (they did this with Perl for a quicktime installer, and people who had "upgraded" their perl in-place were seriously bitten). From owen at astro.washington.edu Tue Dec 23 17:18:43 2003 From: owen at astro.washington.edu (Russell E Owen) Date: Tue Dec 23 17:18:59 2003 Subject: [Pythonmac-SIG] Re: Changing things in /System (was: Tkinter on Panther?) In-Reply-To: <18856F26-3591-11D8-BDD3-003065517236@cwi.nl> References: <54D7854E-34EC-11D8-B809-000A95686CD8@redivi.com> <18856F26-3591-11D8-BDD3-003065517236@cwi.nl> Message-ID: >On Dec 23, 2003, at 19:58, Russell E. Owen wrote: >>Jack said something similar when I asked about updating Python on >>Panther. But...why? I would expect the OS to see the new version in >>/Library/Frameworks and life to be good. Apparently my expectation is >>false. > >The party line is "you shall not change anything in /System because Apple >controls it". In actual fact that chance of adverse consequences aren't all >that big if you are careful. If you replace Python 2.3 by Python 2.3.3 using >the exact same build procedure Apple used (get it from the darwin CVS >repository) the chance of you breaking anything for Apple is as good as zero. >Apple could still break things for you, though, if they installed >stuff over yours. >If you replace Python 2.3 with Python 2.3.3 using the normal (python source >distribution) build procedure the chances of breaking anything are still slim. >The chance of breaking things gets quite a bit bigger if you remove >Apple-installed >Python, though. For one thing, Apple could decide to use python in a future >installer (they did this with Perl for a quicktime installer, and >people who had "upgraded" their perl in-place were seriously bitten). Thank you. I am afraid I am still a bit confused, however. I think you are suggesting I install a new framework Python and let it coexist with Apple's framework Python. That's great if true. I really want some of the fixes in Python 2.3.x. But I thought you led a recent discussion on this mailing list saying this did not work (and was not likely to work until Python 2.4) -- that there was some problem with distutils, that modules installed in the user's Python would cause trouble because they'd link to Apple's Python. I am clearly misunderstanding something, but what? -- Russell P.S. I finally got an X11 python 2.3.3 installed. Bit of a struggle. It kept linking to my framework tcl instead of my x11 tcl. I finally trashed my framework tcl/tk and rebuilt everything from scratch and that did the trick. It's working beautifully, and Apple seems to have fixed some of the bugs in X11 (window height could be odd at times). Hallelujah! From Jack.Jansen at cwi.nl Tue Dec 23 18:03:29 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 23 18:04:20 2003 Subject: [Pythonmac-SIG] MacPython 2.3.3 - Candidate available Message-ID: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> Folks, a candidate installer for MacPython 2.3.3 for Jaguar is available at . Please give it a try and report back here with success or failure, and once I have enough positive feedback (and no negative:-) I'll announce it. I'm working on 2.3.3 for OS9 too, but I'm hampered quite a bit by the fact that I seem to have completely forgotten how OS9 works:-) From marlong at rogers.com Tue Dec 23 19:31:31 2003 From: marlong at rogers.com (Marlon A. Griffith) Date: Tue Dec 23 19:31:39 2003 Subject: [Pythonmac-SIG] Summary of installing the pyPgSQL postgresql driver on Mac Os X In-Reply-To: References: <950130E6-29F6-11D8-83C5-000A95B1990C@n9yty.com> Message-ID: Goal: to make it easier for a newbie to MacPython and Postgresql to communicate between Python and Postgresql on Mac Os X using the pyPgSQL driver. I found that the information is available but not compiled into one area. Hopefully, this will provide that area. References: 1) for installing Postgresql see "Postgresql on Mac OS X" at mother Apple, http://developer.apple.com/internet/macosx/postgres.html 2) for installing MacPython see the MacPython site, http://homepages.cwi.nl/~jack/macpython/ 3) for installing pyPgSQL see the readMe at http://pypgsql.sourceforge.net/ 4) Russell E. Owen for his Mon Dec 16, 2002 and Mon, 15 Dec 2003 emails on this list 5) the MacPython documentation and faq will give you an idea of where code is installed. Acknowledgements: thanks Russell. My configuration: - X.2.8 - postgresql 7.3 - MacPython 2.3, the July 30th 2003 release. Procedure: - install Postgresql as in reference 1 - install MacPython as in refernce 2 - begin installing pyPgSQL as in reference 3 - unfortunately, it will not compile correctly. Quoting Russell's solution in the Dec 16, 2002 email: """ One: the build process first failed with a complaint about a bad library table of contents, and suggested running ranlib. The following fixed that (knowing nothing about ranlib but finding the suggestion via google): cd /usr/local/pgsql/lib/ sudo ranlib libpq.a At this point the build and installation went fine (though I started with a freshly unpacked source directory, just to be on the safe side): python setup.py build sudo python setup.py install """ This worked great. - to further test the compiled module, boot up the pythonIDE program and type, from pyPgSQL import pgSQL then, dir(pgSQL) python will now inspect the module for you. - type, help(dir(pgSQL)) to get detailed help on methods and parameters for pgSQL. - when you are done playing, quit the pythonIDE program. - start Postgresql again if necessary, reference 1 - create the pypgsql database as in reference 3 - use Russell's Dec. 15 2003 suggestion to "put /usr/local/bin before /usr/bin in your PATH" variable since this will put the command line MacPython before Apple's python in your unix system search path. Type the following command, setenv PATH "/usr/local/bin:/Library/Tcl/bin:"$PATH - unfortunately, running the test script (reference 3): python test/PgSQLTestCases.py gave a password error when I ran the script as the Posgresql admin user. - the missing component was authentication permissions for my main user in the Postgresql pg_hba.conf file. Add this line to your pg_hba.conf file, #TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD local pypgsql macUserName trust where local refers to the localhost ip-address on your machine, macUserName is your login account that you do work with or will run MacPython from, and trust is the authentication method. It means give this user full access without prompting for a password. Note that you would change this method to a password in a production environment. See http://www.postgresql.org/docs/7.3/static/client-authentication.html. - start Posgresql using the pypgsql database (reference 1): psql pypgsql postgres where "postgres" is my Posgresql admin user. - create a user group for the database (reference 1): pypgsql=# create group pygsql; where "pypgsql=#" is the Posgresql prompt string for this database. In other words, you don't type that string. - create your testuser with no password for the database using the same user name that you added to the pg_hba.conf file (see reference 1): pypgsql=# create user macUserName; - add your testuser to the group, pypgsql=# alter group pypgsql add user macUserName; - you can exit Posgresql if you want - run the test script as above. Outcome: - I got, """ ..................................................................---------------------------------------------------------------------- Ran 66 tests in 4.405s OK """ You are now up and running. Happy Postgresql pythoning. -- Make it a great day! http://members.rogers.com/kalyxsis "We move ahead by going deeper." Jennifer James (1943- ) American Writer "Don't let your schooling interfere with your education." Mark Twain "Do not parrot the words of famous people. Learn the meaning of what they say and repeat it in your own words." Mark Twain (not an exact quote). -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031223/55e9f4f7/attachment-0001.html From owen at astro.washington.edu Tue Dec 23 20:04:10 2003 From: owen at astro.washington.edu (Russell E Owen) Date: Tue Dec 23 20:04:23 2003 Subject: [Pythonmac-SIG] Re: Changing things in /System (was: Tkinter on Panther?) In-Reply-To: References: <54D7854E-34EC-11D8-B809-000A95686CD8@redivi.com> <18856F26-3591-11D8-BDD3-003065517236@cwi.nl> Message-ID: >>On Dec 23, 2003, at 19:58, Russell E. Owen wrote: >>>Jack said something similar when I asked about updating Python on >>>Panther. But...why? I would expect the OS to see the new version in >>>/Library/Frameworks and life to be good. Apparently my expectation is >>>false. >> >>The party line is "you shall not change anything in /System because Apple >>controls it". In actual fact that chance of adverse consequences aren't all >>that big if you are careful. If you replace Python 2.3 by Python 2.3.3 using >>the exact same build procedure Apple used (get it from the darwin CVS >>repository) the chance of you breaking anything for Apple is as good as zero. >>Apple could still break things for you, though, if they installed >>stuff over yours. >>If you replace Python 2.3 with Python 2.3.3 using the normal (python source >>distribution) build procedure the chances of breaking anything are >>still slim. >>The chance of breaking things gets quite a bit bigger if you remove >>Apple-installed >>Python, though. For one thing, Apple could decide to use python in a future >>installer (they did this with Perl for a quicktime installer, and >>people who had "upgraded" their perl in-place were seriously >>bitten). > >Thank you. I am afraid I am still a bit confused, however. ... I think I get it now. When you say "replace" you mean it literally. Discard /System/Library/Frameworks/Python and put a new one in its place. I should have realized that the first time. Sorry for being so dense. That sounds scary (especially getting the file ownership and permissions right). Fortunately the tk dialog problem seems to have gone away (perhaps it's a bug in the Jaguar 2.3 that has been fixed in the Panther 2.3), so 2.3 is now fine. A huge relief!!! Thank you and Bob both for your help! -- Russell From bob at redivi.com Tue Dec 23 22:59:23 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Dec 23 22:58:26 2003 Subject: [Pythonmac-SIG] Changing things in /System (was: Tkinter on Panther?) In-Reply-To: <18856F26-3591-11D8-BDD3-003065517236@cwi.nl> References: <54D7854E-34EC-11D8-B809-000A95686CD8@redivi.com> <18856F26-3591-11D8-BDD3-003065517236@cwi.nl> Message-ID: <8F33DF2F-35C5-11D8-B398-000A95686CD8@redivi.com> On Dec 24, 2003, at 6:43 AM, Jack Jansen wrote: > > On Dec 23, 2003, at 19:58, Russell E. Owen wrote: >> Jack said something similar when I asked about updating Python on >> Panther. But...why? I would expect the OS to see the new version in >> /Library/Frameworks and life to be good. Apparently my expectation is >> false. > > The party line is "you shall not change anything in /System because > Apple > controls it". In actual fact that chance of adverse consequences > aren't all > that big if you are careful. If you replace Python 2.3 by Python 2.3.3 > using > the exact same build procedure Apple used (get it from the darwin CVS > repository) the chance of you breaking anything for Apple is as good > as zero. > Apple could still break things for you, though, if they installed > stuff over yours. > If you replace Python 2.3 with Python 2.3.3 using the normal (python > source > distribution) build procedure the chances of breaking anything are > still slim. > The chance of breaking things gets quite a bit bigger if you remove > Apple-installed > Python, though. For one thing, Apple could decide to use python in a > future > installer (they did this with Perl for a quicktime installer, and > people who had "upgraded" their perl in-place were seriously bitten). Fax cover pages probably won't get created properly if your Python 2.3.3 can't load Apple's CoreGraphics extension (and you replace their Python). -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031224/29edac9b/smime.bin From mwh at python.net Wed Dec 24 06:08:36 2003 From: mwh at python.net (Michael Hudson) Date: Wed Dec 24 06:08:40 2003 Subject: [Pythonmac-SIG] Changing things in /System In-Reply-To: <8F33DF2F-35C5-11D8-B398-000A95686CD8@redivi.com> (Bob Ippolito's message of "Wed, 24 Dec 2003 12:59:23 +0900") References: <54D7854E-34EC-11D8-B809-000A95686CD8@redivi.com> <18856F26-3591-11D8-BDD3-003065517236@cwi.nl> <8F33DF2F-35C5-11D8-B398-000A95686CD8@redivi.com> Message-ID: <2m65g6cw23.fsf@starship.python.net> Bob Ippolito writes: > Fax cover pages probably won't get created properly if your Python > 2.3.3 can't load Apple's CoreGraphics extension (and you replace their > Python). If it can't that's a bug and we'd like to know. Binary compatibility of extensions and bytecode between bugfix releases is a major goal (tho' as Jack said, you'll be wanting to get the copmile options the same...). Cheers, mwh -- Our Constitution never promised us a good or efficient government, just a representative one. And that's what we got. -- http://www.advogato.org/person/mrorganic/diary.html?start=109 From paul at fxtech.com Wed Dec 24 09:14:34 2003 From: paul at fxtech.com (Paul Miller) Date: Wed Dec 24 09:14:42 2003 Subject: [Pythonmac-SIG] MacPython 2.3.3 - Candidate available In-Reply-To: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> References: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> Message-ID: <6.0.1.1.2.20031224081418.05d40fc0@mail.fxtech.com> >I'm working on 2.3.3 for OS9 too, but I'm hampered quite a bit by the fact >that I seem to have completely forgotten how OS9 works:-) No major loss there! :-) From Chris.Barker at noaa.gov Wed Dec 24 12:04:19 2003 From: Chris.Barker at noaa.gov (Chris Barker) Date: Wed Dec 24 12:13:58 2003 Subject: [Pythonmac-SIG] Re: Changing things in /System In-Reply-To: References: <54D7854E-34EC-11D8-B809-000A95686CD8@redivi.com> <18856F26-3591-11D8-BDD3-003065517236@cwi.nl> Message-ID: <3FE9C713.8050508@noaa.gov> Russell E Owen wrote: > I think I get it now. When you say "replace" you mean it literally. > Discard /System/Library/Frameworks/Python and put a new one in its > place. I should have realized that the first time. Sorry for being so > dense. > > That sounds scary (especially getting the file ownership and permissions > right). Actually, I'd think that would be the easy part. the hard part would be to make sure that all libraries and extensions that Apple expects to be there are all there and working. Not to mention the whole upgrading (by Apple) issue... -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov From lzwjordfd at el-nacional.com Wed Dec 24 11:37:36 2003 From: lzwjordfd at el-nacional.com (Lawrence Willis) Date: Wed Dec 24 23:43:41 2003 Subject: [Pythonmac-SIG] Re: BEZJSBSK, from the house Message-ID: summary brood modish bookplate today'll persian promise checkup inhalation jutish perpetrate nausea populist cloister pneumococcus gallonage ensemble calvin supercilious orthophosphate bamberger sketch don week agway -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031224/6c6dab99/attachment.html From caryugeeqsz at el-nacional.com Wed Dec 24 12:27:45 2003 From: caryugeeqsz at el-nacional.com (Ken) Date: Thu Dec 25 00:31:33 2003 Subject: [Pythonmac-SIG] Re: RHP, the choirmaster bluffed Message-ID: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit effeminate mahogany breath actaeon olive ftc alterate fanout calculus bayonne stephanie babel clearheaded underclassmen win heterocyclic ran romano umbrella survive -------------- next part -------------- Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 8bit

Free Cable- TV

usn billion factorial etruscan childhood tinsel newton searchlight aphrodite highwaymen coffer
counteract archer depressor pdp bowstring holster austere leery married sanders citroen chicken thiocyanate rapture haplology plume sears cayenne brent nuclide stumble tot byzantine befuddle pedagogy resorcinol sacrament batten ruminate demonic resort armada teletype pedestrian aromatic
-------------- next part -------------- From hinsen at cnrs-orleans.fr Thu Dec 25 14:00:25 2003 From: hinsen at cnrs-orleans.fr (Konrad Hinsen) Date: Thu Dec 25 14:42:33 2003 Subject: [Pythonmac-SIG] Beginner's questions Message-ID: <9929006C-370C-11D8-8A34-000A95AB5F10@cnrs-orleans.fr> I am currently explorint my brand-new iBook, which of course includes installing Python on it. I already have the fink version, but MacPython looks interesting as well, so I installed the add-on package to the installation provided by Apple. Here's my first round of problems, hopefully not standard ones (I did scan the archives a bit, but with only a modem connection it isn't much fun). 1) My iBook runs MacOS 10.3.2, which apparently translates to Darwin 7.2.0. The package database for Panther is for 7.0.0, so I always need to type (or paste) a longish URL into the package manager. Is there any way to tell it to memorize that address? Or could the database managers be convinced to add a second URL for the existing database? 2) I installed the tkinter module plus an AquaTk binary distribution. When I run a Tk program with that combination from the MacPython IDE, nothing happens. Running the same program from the command line makes it run in the background (the terminal continues to have the keyboard focus), and when I try to bring the window to the front I get an error message. Not very usable to say the least... 3) MacPython does have distutils, so I thought I could install some additional packages. I didn't get very far: the first package I tried needs the NumPy header files, which are not part of the NumPy package (binary) that I installed through the package manager. Bug or feature? I do like the MacPython IDE, and the Python manuals in the help system are nice as well. Time will tell if I will finally accept something else than Emacs for Python development ;-) Konrad. From rvtyaz at tom.com Fri Dec 26 00:16:24 2003 From: rvtyaz at tom.com (Alonzo) Date: Fri Dec 26 12:19:00 2003 Subject: [Pythonmac-SIG] Re: JE, present people with Message-ID: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit diploid buchenwald sarasota diagnostic brindisi compline chesapeake colombo constructible dormant demonstrable bodied mit dewy patrolling darken ekstrom revenue concubine estella remorse anger arrhenius paratroop ian transgress agenda decennial -------------- next part -------------- Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 8bit

Free Cable- TV

vaunt cavil prophecy combinatoric togging augmentation yuck aqua nepal orange sunnyvale bushmaster clockwise celebrate clarke hologram logarithm cutset conservatory paine nabla jura hazard solstice pend acrylate villa oneself abstinent theorist magnetron stagnant formant inn ramrod
imp megohm procrustes triptych n gorse drench adject cosec suffer ranier shopkeep lissajous stirling sophisticate crescendo copyright abusive ampersand sank deface yang marriage alma mesquite bandwidth anglo
-------------- next part -------------- From xwmwybmvup at canada.com Fri Dec 26 01:39:37 2003 From: xwmwybmvup at canada.com (Bridgette Sutton) Date: Fri Dec 26 13:39:47 2003 Subject: [Pythonmac-SIG] Re: TABZ, the display windows Message-ID: edgar swing embrittle meyers vicky sahara budd pertain hardboard alba cranelike paranoid spice chair legerdemain exasperate arsenal bavaria hellbender johnsen wad crispin columbus -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031226/d06eef8b/attachment.html From rowen at cesmail.net Fri Dec 26 16:54:34 2003 From: rowen at cesmail.net (Russell E. Owen) Date: Fri Dec 26 16:54:41 2003 Subject: [Pythonmac-SIG] Re: Beginner's questions References: <9929006C-370C-11D8-8A34-000A95AB5F10@cnrs-orleans.fr> Message-ID: In article <9929006C-370C-11D8-8A34-000A95AB5F10@cnrs-orleans.fr>, Konrad Hinsen wrote: > 1) My iBook runs MacOS 10.3.2, which apparently translates to Darwin > 7.2.0. The package database for Panther is for 7.0.0, so I always need > to type (or paste) a longish URL into the package manager. Is there any > way to tell it to memorize that address? Or could the database managers > be convinced to add a second URL for the existing database? I don't know of any (though I hope somebody else does). Package Manager is still very new and has a few rough edges. > 2) I installed the tkinter module plus an AquaTk binary distribution. > When I run a Tk program with that combination from the MacPython IDE, > nothing happens. Running the same program from the command line makes > it run in the background (the terminal continues to have the keyboard > focus), and when I try to bring the window to the front I get an error > message. Not very usable to say the least... >From terminal, use the "pythonw" command (note the "w"). You'll have to do this for wxPython as well. I do not know of any way of doing the right thing from a "#!" line. This is one good reason to also have a fink python or other X11/unix python around. Another good reason is that aqua tk has some cosmetic bugs. The need for "pythonw" to run GUI scripts means it's easy to have both x11 and aqua pythons available at the same time. Simply set it up so that "python" runs the x11-based python and let "pythonw" run MacPython as usual and you're golden. > 3) MacPython does have distutils, so I thought I could install some > additional packages. I didn't get very far: the first package I tried > needs the NumPy header files, which are not part of the NumPy package > (binary) that I installed through the package manager. Bug or feature? If this is so, I'm surprised and I cannot help. But let me check one thing. I doubt this is the issue, but are you sure the correct python is being run for setup.py (MacPython and not your fink python)? Welcome aboard! -- Russell From Jack.Jansen at cwi.nl Fri Dec 26 16:54:51 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Fri Dec 26 16:54:56 2003 Subject: [Pythonmac-SIG] Beginner's questions In-Reply-To: <9929006C-370C-11D8-8A34-000A95AB5F10@cnrs-orleans.fr> References: <9929006C-370C-11D8-8A34-000A95AB5F10@cnrs-orleans.fr> Message-ID: <21884F86-37EE-11D8-AAC8-000A27B19B96@cwi.nl> On 25-dec-03, at 20:00, Konrad Hinsen wrote: > 1) My iBook runs MacOS 10.3.2, which apparently translates to Darwin > 7.2.0. The package database for Panther is for 7.0.0, so I always need > to type (or paste) a longish URL into the package manager. Is there > any way to tell it to memorize that address? Or could the database > managers be convinced to add a second URL for the existing database? This is my fault: I hadn't noticed Apple had updated the darwin version number for 10.3.2 (they didn't do so for 10.3.1). I really have to get a patch version of pimp out that is slightly more intelligent about database location (it should first try for "darwin-7.2.0" and if that fails fall back to "darwin-7" and maybe even "darwin"). I've fixed this by duplicating the database. > 2) I installed the tkinter module plus an AquaTk binary distribution. > When I run a Tk program with that combination from the MacPython IDE, > nothing happens. Running the same program from the command line makes > it run in the background (the terminal continues to have the keyboard > focus), and when I try to bring the window to the front I get an error > message. Not very usable to say the least... You cannot run Tkinter programs from the IDE. Nor, for that matter, Cocoa programs or wxWindows programs or anything else that uses a different GUI toolkit than the IDE does. I will add an FAQ entry on this (I thought this was already there, but apparently it wasn't). You need to run such scripts either through PythonLauncher (select "Open with" in the finder, select PythonLauncher) or through "pythonw script.py" from the Terminal command line. > 3) MacPython does have distutils, so I thought I could install some > additional packages. I didn't get very far: the first package I tried > needs the NumPy header files, which are not part of the NumPy package > (binary) that I installed through the package manager. Bug or feature? Definitely a known problem, but there is no "correct" solution: it's really a Python design problem. Numeric expects to install its headers into $prefix/include/python2.3, but on MacOSX 10.3 this directory is "owned" by Apple. The workaround is to make this directory writable, the hidden PackMan package WriteableInclude has a recipe for this, and then install Numeric. -- 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 rowen at cesmail.net Fri Dec 26 17:15:55 2003 From: rowen at cesmail.net (Russell E. Owen) Date: Fri Dec 26 17:16:00 2003 Subject: [Pythonmac-SIG] Help files not installed Message-ID: I have a new Panther 10.3.2 installation (via archive and install upgrading from 10.2.8, followed by a permissions fix). I installed the MacPython add-ons and ran Package manager to add various packages including python docs. Everything went fine with one odd exception: the MacPython, Package Manager and python help files are not found by the Help Viewer (and I have no idea if they actually exist). Asking for MacPython Help or Package Manager Help from within Package Manager brings up a blank help window. The Library menu in Help Viewer contains plenty of stuff, but none related to python. I also tried two long-shot things with no success: - I reinstalled Documentation-2.3-binary using overwrite. No change but no surprise. - I searched for one of the python doc html files (atom-literals.html). No luck, but again no surprise (Find doesn't seem to look inside packages). Everything else I have tried seems to work. The other packages I installed ended up in /Library/Python/2.3/ and the ones I've tried (readlines, Numeric, _tkinter) are fine. So it's no big deal. Overall MacPython is just fine. But I'd like to know what's going on and am happy to do any tests that might help debug a more widespread problem. -- Russell From Jack.Jansen at cwi.nl Fri Dec 26 17:27:35 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Fri Dec 26 17:27:39 2003 Subject: [Pythonmac-SIG] Help files not installed In-Reply-To: References: Message-ID: On 26-dec-03, at 23:15, Russell E. Owen wrote: > I have a new Panther 10.3.2 installation (via archive and install > upgrading from 10.2.8, followed by a permissions fix). I installed the > MacPython add-ons and ran Package manager to add various packages > including python docs. Everything went fine with one odd exception: the > MacPython, Package Manager and python help files are not found by the > Help Viewer (and I have no idea if they actually exist). You must run the IDE at least once after installing the documentation to make it show up. Have you tried this? And if you did try this, please try the following and report back whether it helps (so I can add it to the FAQ): - Remove ~/Library/Preferences/comp.apple.help.plist - Run the IDE This procedure will make all help books disappear, but the will re-appear once you run the corresponding applications. -- 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 owen at astro.washington.edu Fri Dec 26 18:00:35 2003 From: owen at astro.washington.edu (Russell E Owen) Date: Fri Dec 26 18:00:49 2003 Subject: [Pythonmac-SIG] Help files not installed In-Reply-To: References: Message-ID: >On 26-dec-03, at 23:15, Russell E. Owen wrote: > >>I have a new Panther 10.3.2 installation.... I installed the >>MacPython add-on... Everything went fine with one odd exception: >>the...help files are not found by the Help Viewer... > >You must run the IDE at least once after installing the documentation >to make it show up. Have you tried this? I had not run the IDE (I don't normally use the it). I just tried that and it worked exactly as you said it would. Thank you very much! -- Russell P.S. I figured out two easy way to locate help docs. This is handy in case you want to tell your normal web browser about them (though Help Viewer is getting pretty good): - Help Viewer has a "copy link to clipboard" contextual menu item (just like a real browser): great if Help Viewer knows about the files. - FileBuddy can search in packages: great if you know what you are looking for. From hinsen at cnrs-orleans.fr Sat Dec 27 06:10:55 2003 From: hinsen at cnrs-orleans.fr (Konrad Hinsen) Date: Sat Dec 27 07:10:54 2003 Subject: [Pythonmac-SIG] Beginner's questions In-Reply-To: <21884F86-37EE-11D8-AAC8-000A27B19B96@cwi.nl> References: <9929006C-370C-11D8-8A34-000A95AB5F10@cnrs-orleans.fr> <21884F86-37EE-11D8-AAC8-000A27B19B96@cwi.nl> Message-ID: <570DA348-385D-11D8-A7BF-000A95AB5F10@cnrs-orleans.fr> On 26.12.2003, at 22:54, Jack Jansen wrote: > You cannot run Tkinter programs from the IDE. Nor, for that matter, > Cocoa programs or wxWindows programs or anything else that uses a > different GUI toolkit than the IDE does. I will add an FAQ entry on > this (I thought this was already there, but apparently it wasn't). So what is the GUI toolkit used by the IDE? > You need to run such scripts either through PythonLauncher (select > "Open with" in the finder, select PythonLauncher) or through "pythonw > script.py" from the Terminal command line. That works indeed, thanks! > Definitely a known problem, but there is no "correct" solution: it's > really a Python design problem. Numeric expects to install its headers > into $prefix/include/ I am still hoping that one day distutils will take care of that by providing a special category "header files". > python2.3, but on MacOSX 10.3 this directory is "owned" by Apple. The > workaround is to make this directory writable, the hidden PackMan > package WriteableInclude has a recipe for this, and then install > Numeric. OK, I will try that. Konrad. From Jack.Jansen at cwi.nl Sat Dec 27 10:17:53 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Sat Dec 27 10:17:59 2003 Subject: [Pythonmac-SIG] Beginner's questions In-Reply-To: <570DA348-385D-11D8-A7BF-000A95AB5F10@cnrs-orleans.fr> References: <9929006C-370C-11D8-8A34-000A95AB5F10@cnrs-orleans.fr> <21884F86-37EE-11D8-AAC8-000A27B19B96@cwi.nl> <570DA348-385D-11D8-A7BF-000A95AB5F10@cnrs-orleans.fr> Message-ID: On 27-dec-03, at 12:10, Konrad Hinsen wrote: > On 26.12.2003, at 22:54, Jack Jansen wrote: > >> You cannot run Tkinter programs from the IDE. Nor, for that matter, >> Cocoa programs or wxWindows programs or anything else that uses a >> different GUI toolkit than the IDE does. I will add an FAQ entry on >> this (I thought this was already there, but apparently it wasn't). > > So what is the GUI toolkit used by the IDE? At the lowest level there is the Carbon toolkit: Carbon.Evt, Carbon.Win, Carbon.Dlg and such. On top of that there is a very old application framework (originally done by Guido himself) called Framework. On top of that there is the W toolkit, which the IDE uses. The Framework and W layers are somewhat "transparent", i.e. you don't lock yourself in to them when you use them, you can still use the lower layers. In other words: W and Framework applications should run fine under the IDE, and probably pure Carbon applications do too. >> Definitely a known problem, but there is no "correct" solution: it's >> really a Python design problem. Numeric expects to install its >> headers into $prefix/include/ > > I am still hoping that one day distutils will take care of that by > providing a special category "header files". Header files is one symptom of the problem, scripts have a similar problem, and so do packages, to an extent. I'm planning to do a PEP for 2.4, but then: I have so many plans:-) -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Sat Dec 27 10:28:56 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Sat Dec 27 10:29:02 2003 Subject: [Pythonmac-SIG] Re: Beginner's questions In-Reply-To: References: <9929006C-370C-11D8-8A34-000A95AB5F10@cnrs-orleans.fr> Message-ID: <62FA6BE4-3881-11D8-87A5-000A27B19B96@cwi.nl> On 26-dec-03, at 22:54, Russell E. Owen wrote: > From terminal, use the "pythonw" command (note the "w"). You'll have to > do this for wxPython as well. I do not know of any way of doing the > right thing from a "#!" line. Use "#!/System/Library/Frameworks/Python.framework/Versions/2.3/Resources/ Python.app/Contents/MacOS/Python", just like the pythonw script itself does. > This is one good reason to also have a fink python or other X11/unix > python around. Another good reason is that aqua tk has some cosmetic > bugs. Note that you can also do this without installing a second Python. If you put _tkinter.so for X11 in, say, ~/Library/X11-Python and you add that directory to $PYTHONPATH. You could create a script x11python containing #!/bin/sh PYTHONPATH=~/Library/X11-Python:$PYTHONPATH exec /usr/bin/python "$@" should do the trick, I think (untested). -- 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 kevin at wordtechweb.com Sat Dec 27 15:17:50 2003 From: kevin at wordtechweb.com (Kevin Walzer) Date: Sat Dec 27 15:18:39 2003 Subject: [Pythonmac-SIG] Solution to broken MacPython install Message-ID: I had some problems with my MacPython apps/packages after upgrading to Panther--I didn't see the instructions to remove everything prior to this. Also, deleting the MacPython after the fact didn't help either. Everything was still broken. However, re-installing all of the MacPython stuff that is compatible with 10.2 proved to be the solution. I don't know if this will cause other problems down the road, but now I can run wxPython, Pythonlauncher, and everything else that I ran before; I'm willing to live with the extra overhead of two Python installs. Doing a clean reinstall of Panther isn't really an option for me at this point. Anyway, just wanted to share this as a solution for anyone else in the same boat. --- Kevin Walzer, Ph.D. Editor WordTech Communications -- A New Paradigm of Poetry http://www.wordtechcommunications.com http://www.smallbizmac.com http://www.kevin-walzer.com mailto:kevin@wordtechweb.com From xinxfpskdlcgw at china.com Sat Dec 27 18:33:07 2003 From: xinxfpskdlcgw at china.com (Traci) Date: Sat Dec 27 18:33:04 2003 Subject: [Pythonmac-SIG] Re: NEWWF, beyond the grille Message-ID: cockleshell dispensate jalopy consumption cabin clarify boldface hardtop biggs sulfur therapy arena schloss note bystander cuddly fluorocarbon missy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031227/0ec26387/attachment.html From israel at uandmedance.com Sun Dec 28 02:29:51 2003 From: israel at uandmedance.com (israel@uandmedance.com) Date: Sun Dec 28 02:29:51 2003 Subject: [Pythonmac-SIG] installing 4suite Message-ID: <9FB7AD9E-3907-11D8-8F46-000393A47FF2@uandmedance.com> Hello all, After not finding a 4suite xml package on the PackageManager db I thought I'd try to install from source but I'm having trouble doing so. I'm using Python 2.3 on Mac OS X 10.2.8 (the later fixed version of that particular update) I've just installed Pyxml and that went swimmingly. Now, when I try to install 4Suite I get this error: iz@theOverneath:4Suite>sudo python setup.py install Password: running install running build running build_py running build_ext gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -c Ft/Server/Server/src/process.c -o build/temp.darwin-6.8-Power_Macintosh-2.3/Ft.Server.Server._processc/ Ft/Server/Server/src/process.o gcc -Wl,-x -Wl,-F. -bundle -framework Python -flat_namespace build/temp.darwin-6.8-Power_Macintosh-2.3/Ft.Server.Server._processc/ Ft/Server/Server/src/process.o -o build/lib.darwin-6.8-Power_Macintosh-2.3/Ft/Server/Server/_processc.so ld: Undefined symbols: _environ error: command 'gcc' failed with exit status 1 The first time I ran this, the messages were much longer and, I think, were related to the compilation of the various modules. I've been reading the 4suite site and I've missed any mention of problems installing onto mac os x. Would any of you possibly have a clue as to what my problem might be? Thank you for any assistance. ~Israel~ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1543 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031227/2622b08e/attachment.bin From gmtwjl at canada.com Sat Dec 27 15:00:51 2003 From: gmtwjl at canada.com (Carter Frank) Date: Sun Dec 28 03:03:34 2003 Subject: [Pythonmac-SIG] Re: WNPBA, levi sprang away Message-ID: schema scrotum assert utile abraham agnostic arcane jargon rainy taper axial chugging liverpudlian ostensible conspire callous trilogy grassland dangerous gamin longitudinal salvageable typewritten humidify coattail babysitter humid transpiration fortieth subsume -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031227/de5dbf85/attachment.html From krjackson at lbl.gov Sun Dec 28 04:49:56 2003 From: krjackson at lbl.gov (Keith Jackson) Date: Sun Dec 28 04:50:02 2003 Subject: [Pythonmac-SIG] installing 4suite In-Reply-To: <9FB7AD9E-3907-11D8-8F46-000393A47FF2@uandmedance.com> Message-ID: <317E3E65-391B-11D8-A253-000A9577489A@lbl.gov> See: http://lists.fourthought.com/pipermail/4suite/2003-November/005983.html I think that should do it for you. --keith On Saturday, December 27, 2003, at 11:29 PM, israel@uandmedance.com wrote: > Hello all, > > After not finding a 4suite xml package on the PackageManager db I > thought I'd try to install from source but I'm having trouble doing > so. > > I'm using Python 2.3 on Mac OS X 10.2.8 (the later fixed version of > that particular update) > I've just installed Pyxml and that went swimmingly. Now, when I try to > install 4Suite I get this error: > > iz@theOverneath:4Suite>sudo python setup.py install > Password: > running install > running build > running build_py > running build_ext > gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp > -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall > -Wstrict-prototypes > -I/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 > -c Ft/Server/Server/src/process.c -o > build/temp.darwin-6.8-Power_Macintosh-2.3/Ft.Server.Server._processc/ > Ft/Server/Server/src/process.o > gcc -Wl,-x -Wl,-F. -bundle -framework Python -flat_namespace > build/temp.darwin-6.8-Power_Macintosh-2.3/Ft.Server.Server._processc/ > Ft/Server/Server/src/process.o -o > build/lib.darwin-6.8-Power_Macintosh-2.3/Ft/Server/Server/_processc.so > ld: Undefined symbols: > _environ > error: command 'gcc' failed with exit status 1 > > The first time I ran this, the messages were much longer and, I think, > were related to the compilation of the various modules. > > I've been reading the 4suite site and I've missed any mention of > problems installing onto mac os x. Would any of you possibly have a > clue as to what my problem might be? > > Thank you for any assistance. > > > > ~Israel~_______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From feedback at smtp05.wxs.nl Sun Dec 28 06:16:56 2003 From: feedback at smtp05.wxs.nl (feedback@smtp05.wxs.nl) Date: Sun Dec 28 06:17:04 2003 Subject: [Pythonmac-SIG] I hate you Message-ID: I said, I love you..,, and you said NOTHING And now,,, Go Away From Me Here are my love-letter((s)) mock me mock me again and again . Enjoy it. blablabla GO! -------------- next part -------------- A non-text attachment was scrubbed... Name: Norton AntiVirus is verwijderd1.txt Type: plain/text Size: 118 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031228/d8d80d72/NortonAntiVirusisverwijderd1.bin From mkkybwi at india.com Sun Dec 28 11:37:48 2003 From: mkkybwi at india.com (Courtney) Date: Sun Dec 28 23:41:38 2003 Subject: [Pythonmac-SIG] Re: GAOJ, described his beloved Message-ID: declarative retribution handicraft quizzical chalcocite brochure coy bedimming osborne abbot sanguine faze hahn histamine quartz elsie basemen trustee relate galvanism crisscross colonist -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031228/7198a623/attachment.html From owen at astro.washington.edu Mon Dec 29 12:19:59 2003 From: owen at astro.washington.edu (Russell E Owen) Date: Mon Dec 29 12:20:15 2003 Subject: [Pythonmac-SIG] Re: Beginner's questions In-Reply-To: <62FA6BE4-3881-11D8-87A5-000A27B19B96@cwi.nl> References: <9929006C-370C-11D8-8A34-000A95AB5F10@cnrs-orleans.fr> <62FA6BE4-3881-11D8-87A5-000A27B19B96@cwi.nl> Message-ID: At 4:28 PM +0100 12/27/03, Jack Jansen wrote: >On 26-dec-03, at 22:54, Russell E. Owen wrote: > >>...This is one good reason to also have a fink python or other X11/unix >>python around.... > >Note that you can also do this without installing a second Python. If >you put _tkinter.so for X11 in, say, ~/Library/X11-Python and you add >that directory to $PYTHONPATH. You could create a script x11python >containing > > #!/bin/sh > PYTHONPATH=~/Library/X11-Python:$PYTHONPATH > exec /usr/bin/python "$@" > >should do the trick, I think (untested). That is a very interesting idea. I suppose one could do an x11 build of python, extract _tkinter.so and then discard the build, thus saving disk space and clutter over keeping two builds. But...might there some simpler way to obtain an x11-based _tkinter.so? -- Russell From Chris.Barker at noaa.gov Mon Dec 29 12:38:50 2003 From: Chris.Barker at noaa.gov (Chris Barker) Date: Mon Dec 29 12:50:17 2003 Subject: [Pythonmac-SIG] Re: Beginner's questions In-Reply-To: <62FA6BE4-3881-11D8-87A5-000A27B19B96@cwi.nl> References: <9929006C-370C-11D8-8A34-000A95AB5F10@cnrs-orleans.fr> <62FA6BE4-3881-11D8-87A5-000A27B19B96@cwi.nl> Message-ID: <3FF066AA.5080800@noaa.gov> Jack Jansen wrote: >> I do not know of any way of doing the >> right thing from a "#!" line. > Use > "#!/System/Library/Frameworks/Python.framework/Versions/2.3/Resources/ > Python.app/Contents/MacOS/Python", just like the pythonw script itself > does. #!/usr/bin/en pythonw Works just fine on Jaguar, python2.2 I hope it works on Panther too. That way, all I need to do is create a symlink: pythonw on linux, and my scripts are cross platform. Hardcoding specific paths into a #! line has always been distastful to me. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov From umdpdj at india.com Mon Dec 29 12:11:49 2003 From: umdpdj at india.com (Jermaine Bowles) Date: Tue Dec 30 00:18:56 2003 Subject: [Pythonmac-SIG] Re: PHZHGK, it was impossible Message-ID: brice script bent cluck turgid confute cretaceous scherzo beauteous bushnell calf droopy dissertation upon adulterate melee divisional immerse wither delicacy melanoma grow furthermost -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031229/34366124/attachment.html From Jack.Jansen at cwi.nl Tue Dec 30 07:36:43 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 30 07:36:46 2003 Subject: [Pythonmac-SIG] X11 and Tkinter (was: Beginner's questions) In-Reply-To: References: <9929006C-370C-11D8-8A34-000A95AB5F10@cnrs-orleans.fr> <62FA6BE4-3881-11D8-87A5-000A27B19B96@cwi.nl> Message-ID: On 29-dec-03, at 18:19, Russell E Owen wrote: >> Note that you can also do this without installing a second Python. If >> you put _tkinter.so for X11 in, say, ~/Library/X11-Python and you add >> that directory to $PYTHONPATH. You could create a script x11python >> containing >> >> #!/bin/sh >> PYTHONPATH=~/Library/X11-Python:$PYTHONPATH >> exec /usr/bin/python "$@" >> >> should do the trick, I think (untested). > > That is a very interesting idea. I suppose one could do an x11 build > of python, extract _tkinter.so and then discard the build, thus saving > disk space and clutter over keeping two builds. But...might there some > simpler way to obtain an x11-based _tkinter.so? Actually, it would be reasonably simple to create a PackMan package that contains an X11 _tkinter, puts it in /Library/Python/2.3/X11-Python and puts an x11python script in /usr/local/bin. How much interest would there be in such a thing? -- 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 jmzgqc at hongkong.com Mon Dec 29 19:58:05 2003 From: jmzgqc at hongkong.com (Conrad) Date: Tue Dec 30 08:04:59 2003 Subject: [Pythonmac-SIG] Re: IQJ, room was flooded Message-ID: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit costa doggone nicholls megalomania watchman alter lutheran extradite boulder ashamed ferment ghoulish alveolus coordinate aureomycin clapeyron needle schoolteacher enzymology thea stevenson sultanate cockleshell gold emory -------------- next part -------------- Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 8bit

Free Cable& TV

cast acrylic homophobia trough python waltzing communicant epidemiology musk grandnephew addressee alias e impoverish schoolroom hellebore solicitude highfalutin retrofitting pestle cabaret absentia astrophysics embroil gem hadn't cohomology dharma blutwurst blotch brewster horrible deformation aerodynamic grand brunette abbey dissipate flowery eh
crosslink wabash watchful bore cuttlefish orestes beforehand donna sarcastic proper parrot knowles econometric christmas throughout ukraine aborigine crave bistable
-------------- next part -------------- From bob at redivi.com Tue Dec 30 08:26:30 2003 From: bob at redivi.com (Bob Ippolito) Date: Tue Dec 30 08:25:30 2003 Subject: [Pythonmac-SIG] X11 and Tkinter (was: Beginner's questions) In-Reply-To: References: <9929006C-370C-11D8-8A34-000A95AB5F10@cnrs-orleans.fr> <62FA6BE4-3881-11D8-87A5-000A27B19B96@cwi.nl> Message-ID: On Dec 30, 2003, at 7:36 AM, Jack Jansen wrote: > > On 29-dec-03, at 18:19, Russell E Owen wrote: >>> Note that you can also do this without installing a second Python. If >>> you put _tkinter.so for X11 in, say, ~/Library/X11-Python and you add >>> that directory to $PYTHONPATH. You could create a script x11python >>> containing >>> >>> #!/bin/sh >>> PYTHONPATH=~/Library/X11-Python:$PYTHONPATH >>> exec /usr/bin/python "$@" >>> >>> should do the trick, I think (untested). >> >> That is a very interesting idea. I suppose one could do an x11 build >> of python, extract _tkinter.so and then discard the build, thus >> saving disk space and clutter over keeping two builds. But...might >> there some simpler way to obtain an x11-based _tkinter.so? > > Actually, it would be reasonably simple to create a PackMan package > that contains an X11 _tkinter, puts it in > /Library/Python/2.3/X11-Python and puts an x11python script in > /usr/local/bin. > > How much interest would there be in such a thing? I'd be interested in having X11 packages for somethings (gtk and tkinter stuff mostly, I think), but I'm not particularly interested in compiling them myself, or using Fink :) -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031230/17b3caf0/smime.bin From hrpzj at web.de Tue Dec 30 00:41:11 2003 From: hrpzj at web.de (Burnett Candace) Date: Tue Dec 30 12:44:52 2003 Subject: [Pythonmac-SIG] Re: AIKDWJS, yeshuas entry into Message-ID: epidermis brest bourn cossack individuate din belshazzar blinn directory despotic carey chignon revocable bloop mccabe standstill dent foliage organic doug valediction denature tuff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031230/fb73d243/attachment.html From Jack.Jansen at cwi.nl Tue Dec 30 15:39:53 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 30 15:39:57 2003 Subject: [Pythonmac-SIG] Re: X11 and Tkinter (was: Beginner's questions) In-Reply-To: References: <9929006C-370C-11D8-8A34-000A95AB5F10@cnrs-orleans.fr> <62FA6BE4-3881-11D8-87A5-000A27B19B96@cwi.nl> Message-ID: <52114366-3B08-11D8-8626-000A27B19B96@cwi.nl> On 30-dec-03, at 19:19, Russell E Owen wrote: >> On 29-dec-03, at 18:19, Russell E Owen wrote: >>>> Note that you can also do this without installing a second Python. >>>> If >>>> you put _tkinter.so for X11 in, say, ~/Library/X11-Python and you >>>> add >>>> that directory to $PYTHONPATH. You could create a script x11python >>>> containing >>>> >>>> #!/bin/sh >>>> PYTHONPATH=~/Library/X11-Python:$PYTHONPATH >>>> exec /usr/bin/python "$@" >>>> >>>> should do the trick, I think (untested). >>> >>> That is a very interesting idea. I suppose one could do an x11 build >>> of python, extract _tkinter.so and then discard the build, thus >>> saving disk space and clutter over keeping two builds. But...might >>> there some simpler way to obtain an x11-based _tkinter.so? >> >> Actually, it would be reasonably simple to create a PackMan package >> that contains an X11 _tkinter, puts it in >> /Library/Python/2.3/X11-Python and puts an x11python script in >> /usr/local/bin. >> >> How much interest would there be in such a thing? > > I would gladly use it. > > But it does raise a few issues that I fear may make it too much work > to justify the effort: > - One would need an X11 build of Tcl/Tk, making installation a bit > complicated. I don't know of any MacOS X binary installer for X11 > Tcl/Tk (other than fink). Bah, I forgot about that:-( That makes it too much work, indeed. Unless someone can provide an installer that installs X11 Tcl/Tk, that is. > - How would it work with packages that rely on Tkinter, such as IDLE? > Could they easily be convinced to run "either way" (x11 or aqua) or > would one need a separate build of each? This shouldn't be too much of a problem, only one of organisation. Depending on which _tkinter comes first in sys.path you'll get X11-Tk or Aqua-Tk. -- 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 ugly_411 at sympatico.ca Tue Dec 30 16:30:22 2003 From: ugly_411 at sympatico.ca (Wesley Fraser) Date: Tue Dec 30 16:28:58 2003 Subject: [Pythonmac-SIG] Quicktime digitizer in python Message-ID: <5FA269BC-3B0F-11D8-8758-000A95E96858@sympatico.ca> Hey. I wish to access the macam driver in python using the qt module. Does anyone know how to do this or know where I could look for information on this? Thanks Wes From taykrpcpnto at tom.com Tue Dec 30 05:08:28 2003 From: taykrpcpnto at tom.com (Magdalena Grover) Date: Tue Dec 30 17:13:21 2003 Subject: [Pythonmac-SIG] Re: QHCRBB, he had difficulty Message-ID: value brice alabamian alumnus troll sizzle mousy enchantress mesenteric model cromwell zag mcpherson anthology assassinate morsel dinnertime cecropia floorboard chlorophyll krieger velvety multiple scottish -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031230/89432193/attachment.html From Jack.Jansen at cwi.nl Tue Dec 30 17:59:03 2003 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Dec 30 17:59:06 2003 Subject: [Pythonmac-SIG] Quicktime digitizer in python In-Reply-To: <5FA269BC-3B0F-11D8-8758-000A95E96858@sympatico.ca> References: <5FA269BC-3B0F-11D8-8758-000A95E96858@sympatico.ca> Message-ID: On 30-dec-03, at 22:30, Wesley Fraser wrote: > Hey. > > I wish to access the macam driver in python using the qt module. Does > anyone know how to do this or know where I could look for information > on this? I've never used the quicktime module for input, and the quicktime module is basically interfaces to (a) the bits of the quicktime API that were easy to wrap and (b) the bits that I found missing over the years, so there's a good chance that you'll run into missing functionality. If you do please let me know, then I'll add whatever is needed. I can make this available as a PackMan download, as I'm planning to put quicktime into it's own package anyway for 2.4 (for two reasons: I've had the quicktime module running on Windows at some point in the past, and there's people who would like this, and moreover it really doesn't belong in the Carbon package). And if you do get things running: it would make a nice example, so if you would like to donate it that would be welcome too! -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From jhrsn at pitt.edu Tue Dec 30 22:49:03 2003 From: jhrsn at pitt.edu (Jim Harrison) Date: Tue Dec 30 22:49:02 2003 Subject: [Pythonmac-SIG] MacPython 2.3.3 - Zope 2.70? In-Reply-To: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> Message-ID: I'm trying to experiment with Zope 2.70 and MacPython 2.3.3. Since this version of Zope requires at least Python 2.3.2, this MacPython distro looked like a good opportunity to try it. The MacPython install seems OK and I have Zope pointed at MacPython. When I start Zope, I get this traceback: zopectl> start Traceback (most recent call last): File "/Users/harrison/Zope270/lib/python/Zope/Startup/zopectl.py", line 215, in ? main() File "/Users/harrison/Zope270/lib/python/Zope/Startup/zopectl.py", line 208, in main c.cmdloop() File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/cmd.py", line 133, in cmdloop stop = self.onecmd(line) File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/cmd.py", line 210, in onecmd return func(arg) File "/Users/harrison/Zope270/lib/python/Zope/Startup/zopectl.py", line 134, in do_start ZDCmd.do_start(self, arg) File "/Users/harrison/Zope270/lib/python/zdaemon/zdctl.py", line 214, in do_start os.spawnvp(flag, args[0], args) File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/os.py", line 543, in spawnvp return _spawnvef(mode, file, args, None, execvp) File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/os.py", line 504, in _spawnvef wpid, sts = waitpid(pid, 0) OSError: [Errno 10] No child processes The file paths are correct, but it appears that there was a problem getting child processes going (there were no errors specifically related to this). Zope requires threading compiled in and requires libpthread and not libpth. Does MacPython include threading? Jim Harrison Univ. of Pittsburgh From paul at fxtech.com Wed Dec 31 11:51:21 2003 From: paul at fxtech.com (Paul Miller) Date: Wed Dec 31 11:49:31 2003 Subject: [Pythonmac-SIG] building extensions for 2.3 (darwin build), and UUID generation In-Reply-To: References: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> Message-ID: <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> Two questions here, as I have just started working with 2.3 on OS X. The "old way" (ie. with CFM MacPython) to make extension modules was to build a shared library, but I don't see a shared library option for the Mach-O stationary, so I can only assume I need to build a Framework. I haven't done this yet - can someone point me to some documentation on how to build extension modules for the Mach-O Python? I can avoid the previous step if there is a standard Mac-specific module I can use to generate UUIDs (using the CFUUIDCreate API). Does such a beast exist? Many thanks! From njriley at uiuc.edu Wed Dec 31 12:10:14 2003 From: njriley at uiuc.edu (Nicholas Riley) Date: Wed Dec 31 12:10:32 2003 Subject: [Pythonmac-SIG] building extensions for 2.3 (darwin build), and UUID generation In-Reply-To: <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> References: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> Message-ID: <20031231171014.GA1039@uiuc.edu> On Wed, Dec 31, 2003 at 10:51:21AM -0600, Paul Miller wrote: > Two questions here, as I have just started working with 2.3 on OS X. > > The "old way" (ie. with CFM MacPython) to make extension modules was to > build a shared library, but I don't see a shared library option for the > Mach-O stationary, so I can only assume I need to build a Framework. I > haven't done this yet - can someone point me to some documentation on how > to build extension modules for the Mach-O Python? Extension modules aren't packages, they're just single Mach-O bundle files. I assume from your mention of stationery that you're using CodeWarrior. In the target settings, "PPC Mac OS X Target" pane, you should set "Project Type:" to "Bundle". I'm not sure if it is possible to specify the equivalent of the -bundle_loader flag for Apple's Mach-O linker, and when I tried to compile an extension, I got: Link Error : undefined: 'start' (code) which makes me think it's not actually trying to compile a bundle. This is on CW8.3, CW9 might have fixed some of these problems. You can also try using distutils, it does a reasonable (though not perfect) job. -- =Nicholas Riley | From bob at redivi.com Wed Dec 31 12:24:57 2003 From: bob at redivi.com (Bob Ippolito) Date: Wed Dec 31 12:23:30 2003 Subject: [Pythonmac-SIG] building extensions for 2.3 (darwin build), and UUID generation In-Reply-To: <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> References: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> Message-ID: <4135D2D7-3BB6-11D8-9047-000A95686CD8@redivi.com> On Dec 31, 2003, at 11:51 AM, Paul Miller wrote: > Two questions here, as I have just started working with 2.3 on OS X. > > The "old way" (ie. with CFM MacPython) to make extension modules was > to build a shared library, but I don't see a shared library option for > the Mach-O stationary, so I can only assume I need to build a > Framework. I haven't done this yet - can someone point me to some > documentation on how to build extension modules for the Mach-O Python? > > I can avoid the previous step if there is a standard Mac-specific > module I can use to generate UUIDs (using the CFUUIDCreate API). Does > such a beast exist? Here's an option: http://www.quecheesoftware.com/downloads/UUID.html You can use PyObjC to load this framework dynamically. I took a quick look at the headers and it looks like all the selectors you would need should bridge perfectly. -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031231/68399e77/smime.bin From paul at fxtech.com Wed Dec 31 12:33:03 2003 From: paul at fxtech.com (Paul Miller) Date: Wed Dec 31 12:31:08 2003 Subject: [Pythonmac-SIG] building extensions for 2.3 (darwin build), and UUID generation In-Reply-To: <20031231171014.GA1039@uiuc.edu> References: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> <20031231171014.GA1039@uiuc.edu> Message-ID: <6.0.1.1.2.20031231113136.049cfe48@mail.fxtech.com> >Extension modules aren't packages, they're just single Mach-O bundle >files. I assume from your mention of stationery that you're using >CodeWarrior. In the target settings, "PPC Mac OS X Target" pane, you >should set "Project Type:" to "Bundle". I'm not sure if it is >possible to specify the equivalent of the -bundle_loader flag for >Apple's Mach-O linker, and when I tried to compile an extension, I Okay, this makes sense. But, even though I have added the Python Framework to my project, it doesn't find Python.h. Apparently there is more to this than meets the eye (as is usual on the Mac - everything seems ten timers harder than it should be). >You can also try using distutils, it does a reasonable (though not >perfect) job. I'll try that. From bob at redivi.com Wed Dec 31 12:49:43 2003 From: bob at redivi.com (Bob Ippolito) Date: Wed Dec 31 12:48:16 2003 Subject: [Pythonmac-SIG] building extensions for 2.3 (darwin build), and UUID generation In-Reply-To: <6.0.1.1.2.20031231113136.049cfe48@mail.fxtech.com> References: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> <20031231171014.GA1039@uiuc.edu> <6.0.1.1.2.20031231113136.049cfe48@mail.fxtech.com> Message-ID: On Dec 31, 2003, at 12:33 PM, Paul Miller wrote: > >> Extension modules aren't packages, they're just single Mach-O bundle >> files. I assume from your mention of stationery that you're using >> CodeWarrior. In the target settings, "PPC Mac OS X Target" pane, you >> should set "Project Type:" to "Bundle". I'm not sure if it is >> possible to specify the equivalent of the -bundle_loader flag for >> Apple's Mach-O linker, and when I tried to compile an extension, I > > Okay, this makes sense. > > But, even though I have added the Python Framework to my project, it > doesn't find Python.h. Apparently there is more to this than meets the > eye (as is usual on the Mac - everything seems ten timers harder than > it should be). #include if you're doing it via framework and you haven't added the headers path specifically. >> You can also try using distutils, it does a reasonable (though not >> perfect) job. > > I'll try that. distutils is the best way, because it compiles and links everything properly and it's also cross-platform.. but you will be using gcc not CW. -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031231/8578aff9/smime.bin From paul at fxtech.com Wed Dec 31 12:53:44 2003 From: paul at fxtech.com (Paul Miller) Date: Wed Dec 31 12:51:50 2003 Subject: [Pythonmac-SIG] could someone send me a project file for a Python extension module? In-Reply-To: <20031231171014.GA1039@uiuc.edu> References: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> <20031231171014.GA1039@uiuc.edu> Message-ID: <6.0.1.1.2.20031231114704.04e05df8@mail.fxtech.com> I'm having trouble building a Python extension using CodeWarrior. Could someone send me a sample project file (Xcode, Project Builder, or CodeWarrior is fine) that shows all the settings needed to build a Mach-O compatible Python extension using the Python Framework? From paul at fxtech.com Wed Dec 31 13:02:50 2003 From: paul at fxtech.com (Paul Miller) Date: Wed Dec 31 13:00:56 2003 Subject: [Pythonmac-SIG] building extensions for 2.3 (darwin build), and UUID generation In-Reply-To: <443EDBC5-3BB9-11D8-9047-000A95686CD8@redivi.com> References: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> <4135D2D7-3BB6-11D8-9047-000A95686CD8@redivi.com> <6.0.1.1.2.20031231113307.04e02360@mail.fxtech.com> <443EDBC5-3BB9-11D8-9047-000A95686CD8@redivi.com> Message-ID: <6.0.1.1.2.20031231120033.02f88338@mail.fxtech.com> >>Interesting, but a rather big way of implementing this. I just need 2 >>function calls from the UUID API. I'll keep trying to get my own >>extension module buildling. > >"rather big"? You need to learn the principle of least time wasted ;) >Besides, the framework is 40k tarballed and 284k uncompressed. I was looking at the full download size, but my situation is more complicated than that. This is software being developed for another company, so then it becomes an issue of where to install the framework and how to give credit in documentation I have no control over. Also, add on the time it takes me to learn how to use the Mac Python ObjC interfaces to actually USE the API, and we're straddling a fine line between a bunch of wasted time no matter which way you look at it. Since I already have a working code and suitable module init code, it FEELS like getting my module working would be slightly easier. Obviously, it is not turning out that way! From bob at redivi.com Wed Dec 31 13:22:47 2003 From: bob at redivi.com (Bob Ippolito) Date: Wed Dec 31 13:21:20 2003 Subject: [Pythonmac-SIG] building extensions for 2.3 (darwin build), and UUID generation In-Reply-To: <6.0.1.1.2.20031231120033.02f88338@mail.fxtech.com> References: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> <4135D2D7-3BB6-11D8-9047-000A95686CD8@redivi.com> <6.0.1.1.2.20031231113307.04e02360@mail.fxtech.com> <443EDBC5-3BB9-11D8-9047-000A95686CD8@redivi.com> <6.0.1.1.2.20031231120033.02f88338@mail.fxtech.com> Message-ID: <55CF8984-3BBE-11D8-9047-000A95686CD8@redivi.com> On Dec 31, 2003, at 1:02 PM, Paul Miller wrote: > >>> Interesting, but a rather big way of implementing this. I just need >>> 2 function calls from the UUID API. I'll keep trying to get my own >>> extension module buildling. >> >> "rather big"? You need to learn the principle of least time wasted ;) >> Besides, the framework is 40k tarballed and 284k uncompressed. > > I was looking at the full download size, but my situation is more > complicated than that. This is software being developed for another > company, so then it becomes an issue of where to install the framework > and how to give credit in documentation I have no control over. Also, > add on the time it takes me to learn how to use the Mac Python ObjC > interfaces to actually USE the API, and we're straddling a fine line > between a bunch of wasted time no matter which way you look at it. The framework can go wherever you want.. including inside of a python package, which is how I normally do it (using __file__ from __init__.py to determine the base location). You just need to know the absolute path of the framework. Besides, I showed you how to use the interfaces, it takes three lines of code to load PyObjC and the framework then get a uuid string out of it ;) > Since I already have a working code and suitable module init code, it > FEELS like getting my module working would be slightly easier. > Obviously, it is not turning out that way! Of course not, because you're trying to setup a complicated compilation and linking procedure from a GUI tool without a template. Make a "setup.py" using distutils to build it. I have never heard of anyone compiling a Mach-O python bundle with CodeWarrior either. I'm sure it's possible, but everyone I know uses GCC, typically via distutils but sometimes with a Makefile or Xcode / PB. You could alternatively write your own ObjC framework and load it in as I demonstrated, which saves you from learning distutils if you already know your way around Xcode and ObjC. -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031231/e02dc5d6/smime-0001.bin From paul at fxtech.com Wed Dec 31 13:46:37 2003 From: paul at fxtech.com (Paul Miller) Date: Wed Dec 31 13:44:42 2003 Subject: [Pythonmac-SIG] building extensions for 2.3 (darwin build), and UUID generation In-Reply-To: <55CF8984-3BBE-11D8-9047-000A95686CD8@redivi.com> References: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> <4135D2D7-3BB6-11D8-9047-000A95686CD8@redivi.com> <6.0.1.1.2.20031231113307.04e02360@mail.fxtech.com> <443EDBC5-3BB9-11D8-9047-000A95686CD8@redivi.com> <6.0.1.1.2.20031231120033.02f88338@mail.fxtech.com> <55CF8984-3BBE-11D8-9047-000A95686CD8@redivi.com> Message-ID: <6.0.1.1.2.20031231124601.04dc4500@mail.fxtech.com> >from __init__.py to determine the base location). You just need to know >the absolute path of the framework. Besides, I showed you how to use the >interfaces, it takes three lines of code to load PyObjC and the framework >then get a uuid string out of it ;) Oh, er, yeah, you did. Er, thanks. :-) Okay, I'll give that a try. As long as I can stick that Framework right in my Python include path, I'll be happy. From bob at redivi.com Wed Dec 31 14:01:55 2003 From: bob at redivi.com (Bob Ippolito) Date: Wed Dec 31 14:00:27 2003 Subject: [Pythonmac-SIG] building extensions for 2.3 (darwin build), and UUID generation In-Reply-To: <6.0.1.1.2.20031231124601.04dc4500@mail.fxtech.com> References: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> <4135D2D7-3BB6-11D8-9047-000A95686CD8@redivi.com> <6.0.1.1.2.20031231113307.04e02360@mail.fxtech.com> <443EDBC5-3BB9-11D8-9047-000A95686CD8@redivi.com> <6.0.1.1.2.20031231120033.02f88338@mail.fxtech.com> <55CF8984-3BBE-11D8-9047-000A95686CD8@redivi.com> <6.0.1.1.2.20031231124601.04dc4500@mail.fxtech.com> Message-ID: On Dec 31, 2003, at 1:46 PM, Paul Miller wrote: > >> from __init__.py to determine the base location). You just need to >> know the absolute path of the framework. Besides, I showed you how >> to use the interfaces, it takes three lines of code to load PyObjC >> and the framework then get a uuid string out of it ;) > > Oh, er, yeah, you did. Er, thanks. :-) > > Okay, I'll give that a try. As long as I can stick that Framework > right in my Python include path, I'll be happy. For reference, here is my "__init__.py template" for simply wrapped ObjC frameworks. It will look for the framework in several places, but it looks in the same folder as the python script first, which is the general case. # change this to the name of the framework sans extension FRAMEWORKNAME = 'UNSystemConfiguration' # leave this alone import objc, Foundation, os def _findFramework(framework): SEARCHPATH = ( os.path.split(__file__)[0], Foundation.NSBundle.mainBundle().resourcePath(), os.path.expanduser('~/Library/Frameworks'), '/Library/Frameworks', '/System/Library/Frameworks', '/Network/Library/Frameworks', ) for path in SEARCHPATH: path = os.path.realpath(os.path.join(path, framework+'.framework')) if os.path.exists(path): return path else: raise ImportError, "Couldn't find %s.framework" % (framework,) objc.loadBundle(FRAMEWORKNAME, globals(), bundle_path=_findFramework(FRAMEWORKNAME)) del objc, Foundation, os, _findFramework -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20031231/e1f01731/smime.bin From Chris.Barker at noaa.gov Wed Dec 31 14:08:47 2003 From: Chris.Barker at noaa.gov (Chris Barker) Date: Wed Dec 31 14:19:26 2003 Subject: [Pythonmac-SIG] building extensions for 2.3 (darwin build), and UUID generation In-Reply-To: <20031231171014.GA1039@uiuc.edu> References: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> <20031231171014.GA1039@uiuc.edu> Message-ID: <3FF31EBF.3010200@noaa.gov> Nicholas Riley wrote: > You can also try using distutils, it does a reasonable (though not > perfect) job. What does it do imperfectly? By the way: through all these messages, I still havn't figured out why the OP hasn't just used distutils. It is VERY,VERY easy. (note that I havn't done it with Panther yet, but with 2.3 on Jaguar, I've always been able to simply: ./setup.py build with a setup.py I wrote on Linux, and writing the setup.py was EASY. Take a look at: http://www.python.org/doc/current/ext/building.html It should take you about 10 minutes to get your extension setup and built. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov From paul at fxtech.com Wed Dec 31 15:30:18 2003 From: paul at fxtech.com (Paul Miller) Date: Wed Dec 31 15:28:28 2003 Subject: [Pythonmac-SIG] building extensions for 2.3 (darwin build), and UUID generation In-Reply-To: <3FF31EBF.3010200@noaa.gov> References: <38BC7888-359C-11D8-BDD3-003065517236@cwi.nl> <6.0.1.1.2.20031231104829.0512e648@mail.fxtech.com> <20031231171014.GA1039@uiuc.edu> <3FF31EBF.3010200@noaa.gov> Message-ID: <6.0.1.1.2.20031231142920.04e05f40@mail.fxtech.com> >with a setup.py I wrote on Linux, and writing the setup.py was EASY. Take >a look at: > >http://www.python.org/doc/current/ext/building.html > >It should take you about 10 minutes to get your extension setup and built. Alas - the examples and docs there seem fairly unix-specific. What if I need to include some CoreFoundation framework headers and use the CoreFoundation framework? From twl at sauria.com Wed Dec 31 20:17:23 2003 From: twl at sauria.com (Ted Leung) Date: Wed Dec 31 20:17:57 2003 Subject: [Pythonmac-SIG] (no subject) Message-ID: <41023420-3BF8-11D8-AD9B-000A959A114E@sauria.com> ---- Ted Leung Blog: http://www.sauria.com/blog PGP Fingerprint: 1003 7870 251F FA71 A59A CEE3 BEBA 2B87 F5FC 4B42 From twl at sauria.com Wed Dec 31 20:18:19 2003 From: twl at sauria.com (Ted Leung) Date: Wed Dec 31 20:18:29 2003 Subject: [Pythonmac-SIG] IDLE from MacPython 2.3 Panther Add ons Message-ID: <62255DA3-3BF8-11D8-AD9B-000A959A114E@sauria.com> Hi, I grabbed the MacPython 2.3 for Panther addons because I wanted to play with IDLE, but when I double click IDLE an icon bounces in the dock and then goes away, but nothing happens. PythonIDE and PackageManager both seem to work fine. I'm interested in playing with BicycleRepairMan inside of IDLE. I'd appreciate any suggestions on how to track this down. Thanks, ---- Ted Leung Blog: http://www.sauria.com/blog PGP Fingerprint: 1003 7870 251F FA71 A59A CEE3 BEBA 2B87 F5FC 4B42 From dgoyxh at hongkong.com Wed Dec 31 09:59:40 2003 From: dgoyxh at hongkong.com (Ewing) Date: Wed Dec 31 22:08:13 2003 Subject: [Pythonmac-SIG] Re: IL, lighter type with Message-ID: ashley hokan slang delphi gambol pratt distribution terry lux rollback allude elution glottis hall albany gyrate syrupy gloucester pigeonfoot legislature emanate pillar trioxide comedy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031231/2c3e2dcb/attachment.html From rqvtibzrk at india.com Wed Dec 31 16:32:14 2003 From: rqvtibzrk at india.com (Harlan Kern) Date: Thu Jan 1 04:37:32 2004 Subject: [Pythonmac-SIG] Re: XDTQN, evening will have Message-ID: albert barre aberdeen throaty ferreira ernst cadre rancorous automorphism clonic definitive copperas coach improve downside argus throughout brighten autocratic accent volta craze chum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20031231/94a469b7/attachment.html