[Pythonmac-SIG] PackMan issues

Kevin Ollivier kevino at tulane.edu
Sun Nov 2 14:54:43 EST 2003


Hi Bob,

On Nov 2, 2003, at 11:16 AM, Bob Ippolito wrote:

> It's getting there!  This one works (w/ wxPython, 5-6 "bouncemarks" on  
> my 1ghz pbg4) but:
> 	1) the executable is almost 29 megs! woah!  Doesn't even include  
> Python itself :)

Yeah, that's because I did simple copy-and-paste, which includes a  
bunch of contrib libs not even used in wxPackMan. When doing  
semi-standalone it's much more intelligent about what to put in there,  
dropping the size considerably. (7.6 MB was the size if I remember  
correctly.) I should be able to trim off the extra stuff in the next  
build, but I just wanted to make sure it works first!

> 	2) it doesn't work w/o Jack's MacPython installed because you put  
> #!/usr/local/bin/python in the bootstrap script

Since wxPython is compiled with gcc 3.1, it wouldn't work without  
MacPython anyways. ;-) I hope to have this issue resolved soon, but in  
the meantime it needs to run from Jack's installation.

> 	3) Lots of messages like this in the Console:
> Traceback (most recent call last):
>   File  
> "/Users/bob/Desktop/wxPackageManager.app/Contents/Resources/ 
> wxPackageManager.py", line 498, in OnListClick
>     self.lblVersion.SetLabel("Version: " + pkg.version())
> TypeError: cannot concatenate 'str' and 'NoneType' objects

Thanks, I missed that. Obviously a simple fix (check that version()  
returns something!) and will be in the next version.

> 	4) "View Homepage" button is activated for the first entry, even  
> though IDLE doesn't have a homepage associated.  Doesn't validate  
> these controls until you change to another package.

Another simple fix I missed. I just need to set a selection on launch.

> 	5) cmd-Q doesn't work

But does work for wxWindows apps and bundlebuilder apps using  
standalone. (Though I noticed the Apple-Q shortcut does not appear next  
to the quit menu, although it works.) I think there's an issue with  
Python itself defining the Quit menu key. I set the key for the File  
menu (which should set it for the app as well), but to reinforce this  
I'll also add it as a program-wide accelerator key.

> 	6) visual bugs (probably wxWindows' fault)
> 		- "bullet" doesn't have transparent background, so it has a white  
> square when highlighted

Looks like this might be my fault... they aren't showing a transparent  
background in Preview.app either. ^_^; I'll set the transparency and  
see if it still happens.

> 		- sometimes (about 1/2 the time) when scrolling down by keyboard the  
> highlight only covers the bottom 3/4 or so of the item

I'll see if I can figure out the reason for this.

All except the last one (and possibly #5) will probably be a quick fix,  
so I'll work on posting a new version in the next day or two with these  
issues resolved. I'm currently working on a Panther build of wxPython  
as there is a quickly growing demand for this!

Thanks,

Kevin


> 	
> On Nov 2, 2003, at 12:38 PM, Kevin Ollivier wrote:
>
>> Hi all,
>>
>> First off, let me say thanks for all your help in testing this!
>>
>> The ImportError was a result of my trying (unsuccessfully) to fix the  
>> error message Bob got. I thought it was a sys.path problem, but turns  
>> out it wasn't. Bob, I figured out the reason for the error you're  
>> getting - PyXML. Although none of the modules in wxPackMan nor  
>> PackMan use it, since the xml package is used, some parts of PyXML  
>> are picked up and included by bundlebuilder when doing  
>> semi/standalone. Unfortunately, this seems to lead to confusion over  
>> the expat library in the bundle - looks like PyXML has its own  
>> wrapper for expat? In any case, when trying to load the packages from  
>> the plist file, I get errors about no "parsers.expat".
>>
>> I resolved this for wxPM by putting "_xmlplus" in the list of  
>> excludeModules. So one problem is solved here!
>>
>> However, there is another one now. ^_^; Even when building in  
>> semi-standalone mode, sys.path is stripped down to only include  
>> Contents/Resources in it. This means, of course, wxPM doesn't "see"  
>> any system/user installed Python(s), and that becomes a big problem  
>> for wxPM. For the moment, I have two (less than ideal) solutions:
>>
>> - Provide a package (not semi-standalone or standalone) with the  
>> entire wxPython module manually copied in, which bloats the package  
>> to 5.6 MB.
>>
>> - Provide an alternate package (also not semi-standalone or  
>> standalone) for those with wxPython installed.
>>
>> I have gone ahead and done this and posted the packages to  
>> http://www.theolliviers.com/python/wxpm/. I have tested the  
>> wxPython-included package by renaming my wxPython package (and thus  
>> making it 'disappear'), and it worked for me, but YMMV. (wxPython is  
>> the only module I use which is not system-installed.)
>>
>> In the meantime, if anyone has a solution to the sys.path issue that  
>> would work with semi-standalone, I would greatly appreciate it! Also,  
>> as soon as I can get out a wxPython package for Apple Python for  
>> Panther, I can make another bundle for that as well. =)
>>
>> Thanks,
>>
>> Kevin
>>
>> On Nov 1, 2003, at 3:22 PM, Bob Ippolito wrote:
>>
>>>
>>> On Nov 1, 2003, at 6:15 PM, Nicholas Riley wrote:
>>>
>>>> On Sat, Nov 01, 2003 at 02:56:06PM -0800, Kevin Ollivier wrote:
>>>>> I created a new package and uploaded it to the same place
>>>>> (http://www.theolliviers.com/python/wxpm/) if anyone wants to give  
>>>>> this
>>>>> a shot. Hopefully now you can do more than just look at the  
>>>>> screenshot!
>>>>
>>>> Still getting the same problem (no wxPython), unfortunately.  I see  
>>>> it
>>>> in Modules.zip but it must be that it's not ending up on the path.
>>>>
>>>> Traceback (most recent call last):
>>>>   File "Contents/Resources/wxPackageManager.py", line 32, in ?
>>>>     from wxPython.wx import *
>>>> ImportError: No module named wxPython.wx
>>>
>>> I put this at the top of wxPackageManager.py:
>>> import sys, os
>>> os.chdir(os.path.split(__file__)[0])
>>> sys.path.append(os.path.realpath('Modules.zip'))
>>>
>>> The new traceback is:
>>> Traceback (most recent call last):
>>>   File  
>>> "/Users/bob/download/wxPackageManager.app/Contents/Resources/ 
>>> wxPackageManager.py", line 727, in ?
>>>     app = MyApp(0)
>>>   File  
>>> "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ 
>>> site-packages/wxPython/wx.py", line 1951, in __init__
>>>   File  
>>> "/Users/bob/download/wxPackageManager.app/Contents/Resources/ 
>>> wxPackageManager.py", line 92, in OnInit
>>>     self.frame = PackageManagerMain()
>>>   File  
>>> "/Users/bob/download/wxPackageManager.app/Contents/Resources/ 
>>> wxPackageManager.py", line 219, in __init__
>>>     self.LoadPackages()
>>>   File  
>>> "/Users/bob/download/wxPackageManager.app/Contents/Resources/ 
>>> wxPackageManager.py", line 360, in LoadPackages
>>>     packages = self.mypimp.packages
>>> AttributeError: PimpInterface instance has no attribute 'packages'
>>>
>>> -bob
>>>
>>>
>>> _______________________________________________
>>> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>>>
>>
>>
>> _______________________________________________
>> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>




More information about the Pythonmac-SIG mailing list