Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
I have two problems with the last version:
if I execute:
I receive this error:
File "pype.py", line 4082, in main
File "/usr/lib/python2.3/site-packages/wx-2.6-gtk2-ansi/wx/gdi.py", line 4672, in AddIcon
return _gdi.ImageList_AddIcon(args, *kwargs)
wx._core.PyAssertionError: C++ assertion "(bitmap.GetWidth() == m_width && bitmap.GetHeight() == m_height) || (m_width == 0 && m_height == 0)" failed in ../src/generic/imaglist.cpp(81): invalid bitmap size in wxImageList: this might work on this platform but definitely won't under Windows.
If I comment the line 4082, pype work.
The second is that if I modify the source with the previous trick, when I try to open a python source file (with the file->open menu), pype say me this:
[ Wed Nov 9 14:26:51 2005 ] Loading history from /home/michele/.pype/history.txt
[ Wed Nov 9 14:26:58 2005 ] found filetype-specific defaults python
So it crash. What I can do for help you to debug?
Add debug printouts to PythonSTC.SetText to discover where the segfault is happening.
The problem was at line 3325:
wxNotebook.AddPage(self, page, text, switch, which)
because the notebook didn't find the imagelist, that I remove for the previous problem, so for resolve this problem I had to resolve the first. At line 4086 I add this code because you must add to the wxImageList an icon that has the same size that you declare:
img = wxImageFromBitmap(wxBitmap('icons/py.ico'))
bmp = wxBitmapFromImage(img)
Make all work fine,
I've incorporated a variant of your change into PyPE, and will be releasing a new version shortly.
Thank you for your help.