AttributeError: ' module' object has no attribute 'PySimpleApp'

325 de afișări
Accesați primul mesaj necitit

Frijole

necitită,
22 mai 2008, 14:48:5322.05.2008
– Movable Python
I am new to wxPython, and not really an expert in python itself
either. I downloaded wxPython becuase I have a very simple script that
checks my gmail for new messages and I would like to give it some sort
of graphic. But, I keep getting this error whenever I try anything
with wxPython. This is the script I attempted originally, although
anything I have tried has given the same error albeit with a different
attribute that it cannot find:

import wx
app = wx.PySimpleApp()
frame = wx.Frame(None, wx.ID_ANY, "Hello World")
frame.Show(True)
app.MainLoop()

Even from the command line:

import wx

gives the same error for the attribute 'VERSION'

I would really appreciate some help with this, thanks for reading.

JimC

necitită,
23 mai 2008, 10:30:1223.05.2008
– Movable Python


On May 22, 1:48 pm, Frijole <joelkl...@gmail.com> wrote:
> I am new to wxPython, and not really an expert in python itself
> either. I downloaded wxPython becuase I have a very simple script that

When you say you downloaded wxPython...you do know that there's a
version of wxPython already in Movable Python? What did you do with
the new one?

-Jim C.

Michael Foord

necitită,
23 mai 2008, 14:23:1523.05.2008
– mo...@googlegroups.com
Frijole wrote:
> I am new to wxPython, and not really an expert in python itself
> either. I downloaded wxPython becuase I have a very simple script that
> checks my gmail for new messages and I would like to give it some sort
> of graphic. But, I keep getting this error whenever I try anything
> with wxPython. This is the script I attempted originally, although
> anything I have tried has given the same error albeit with a different
> attribute that it cannot find:
>
> import wx
> app = wx.PySimpleApp()
> frame = wx.Frame(None, wx.ID_ANY, "Hello World")
> frame.Show(True)
> app.MainLoop()
>
> Even from the command line:
>
> import wx
>

Sorry for the late reply.

Sending us the results of the following would probably help:

import wx
print wx.__file__
print dir(wx)

All the best,


Michael Foord
http://www.ironpythoninaction.com/

Răspundeți tuturor
Răspundeți autorului
Redirecționați
0 mesaje noi