[Image-SIG] that's enough

Alec Bennett wrybread at gmail.com
Sun Aug 1 04:25:52 CEST 2010


Oh I get it, and looks like you're making progress. In the future, post the
exact traceback (error report), instead of simply highlighting the line
where the error occurred.

Anyway, you currently have:

bmp = wx("a_4.jpg", wx.BITMAP_TYPE_ANY.ConvertToBitmap()

What I think you meant is:

bmp = wx.Image("a_4.jpg", wx.BITMAP_TYPE_ANY).ConvertToBitmap()




On Sat, Jul 31, 2010 at 7:21 PM, Alec Bennett <wrybread at gmail.com> wrote:

> Since Python uses indenting as part of its syntax, I used periods to
> symbolize indentation, since otherwise most email readers would scrub out my
> indents.
>
> Honestly, if you didn't pick up on that, your chances of successfully
> diving into using the wxPython gui framework are kind of slim. I'd recommend
> first working with some basic Python tutorials.
>
> In the meantime, I have a feeling the Pygame example that someone sent over
> will be a bit simpler.
>
>
>
>
> On Sat, Jul 31, 2010 at 5:55 PM, Jack Uretsky <jlu at hep.anl.gov> wrote:
>
>>        Actually, I did in what I tried to run.  What I posted was a
>> verbatim copy from your e-mail.  But I'm getting an invalid syntax exception
>> at a different place, as follows:
>> _________________________________________
>> import wx
>>
>> class PicWin(wx.Frame):
>>
>>        def __init__(self, parent, id):
>>                wx.Frame.__init__(self, parent, id, "Window. Title",
>> size=(200,200), pos
>> =(50,50), style = wx.DEFAULT_FRAME_STYLE)
>>                panel = wx.Panel(self, -1)
>>                bmp = wx("a_4.jpg", wx.BITMAP_TYPE_ANY.ConvertToBitmap()
>>
>>                self.mainPic=wx.StaticBitmap(panel, -1, bmp)
>>                self.Show()
>>
>> app = wx.App(redirect=0)
>> PicWin(None, -1)
>> app.Mainloop0()
>> ____________________________________
>>        The error is marked (it doesn't show on the e-mail) on the "self"
>> in the "self.mainPic" line.  I've no idea what the problem is.
>>
>>                                                Regards,
>>                                                        Jack
>> "Trust me.  I have a lot of experience at this."
>>                General Custer's unremembered message to his men,
>>                just before leading them into the Little Big Horn Valley
>>
>>
>>
>>
>> On Fri, 30 Jul 2010, Alec Bennett wrote:
>>
>>  You didn't delete the periods that I put in to simulate indentations.
>>>
>>>
>>>
>>> On Fri, Jul 30, 2010 at 9:06 AM, donn <donn.ingle at gmail.com> wrote:
>>>
>>>  On 30/07/2010 17:48, Jack Uretsky wrote:
>>>>
>>>>  def__init__(self, parent, id):
>>>>> ^
>>>>> SyntaxError: invalid syntax
>>>>>
>>>>>  I imagine the spacing in the email was not preserved, but even so,
>>>> Python
>>>> is giving you a little arrow "^" to go look at....
>>>>
>>>> def, SPACE, dunder-init... etc.
>>>> def __init...
>>>>
>>>>
>>>> \d
>>>>
>>>> _______________________________________________
>>>> Image-SIG maillist  -  Image-SIG at python.org
>>>> http://mail.python.org/mailman/listinfo/image-sig
>>>>
>>>>
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20100731/2a28ea14/attachment.html>


More information about the Image-SIG mailing list