Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=5107999
By: dwarnold

I have a file simple2.py which starts out:

from bundlebuilder import main
import wx
import images

class ToolbarFrame(wx.Frame):
    
    def __init__(self,parent,id):
        wx.Frame.__init__(self,parent,id,'Toolbars',size=(300,200))
        panel=wx.Panel(self)
        panel.SetBackgroundColour('White')
        
if __name__ == '__main__':
    app=wx.PySimpleApp()
    frame=ToolbarFrame(None,-1)
    frame.Show()
    app.MainLoop(

In the Eclipse editor for simple2.py, it reports a "error": Unresolved import:
images

I determined that I didn't have that module, so I created a new module in the
same package as simple2.py and added this code:

#----------------------------------------------------------------------
# This file was generated by encode_bitmaps.py
#
from wx import ImageFromStream, BitmapFromImage
from wx import EmptyIcon
import cStringIO

def getNewData():
    return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x0f\x08\x06\
\x00\x00\x00\xedsO/\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
[EMAIL PROTECTED](.\
\x0ef\x13\xe45\xa2\x92Vp\x92\xcf/\xd4\xaa\xb2\xcd\xb4\xc2\x14\x00\x00in\x90\
\x84ZUDl\xa9\xa7\xc3c\xcb-\x80\xfc\x87{d8B6=B\xdb\rfy\xc0\r\xc0\xf0\x0e\xfc\
\x1d\xaf\x84\xa7\xbf\xb1\x03\xe1,\x19&\x93\x9a\xd2\x97\x00\x00\x00\x00IEND\
\xaeB`\x82' 

def getNewBitmap():
    return BitmapFromImage(getNewImage())

def getNewImage():
    stream = cStringIO.StringIO(getNewData())
    return ImageFromStream(stream)

After saving this as images.py, my simple2.py still reports the same error:
Unresolved import: images.

Is there something further I have to do?




______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=293649

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Pydev-users mailing list
Pydev-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-users

Reply via email to