Hi all,
I have a project which uses wx for a particular function. When the
project runs from source, this function works fine. When compiled
using py2exe, though, and then run from the .exe on a computer without
python installed, I get an exception "none type object has no
attribute 'Bind'" and it crashes. What is going on? Thanks.
--
Have a great day,
Alex (msg sent from GMail website)
mehgcap*******/mehgcap
--
To unsubscribe, send email to wxPython-users+unsubscribe*******
or visit http://groups.google.com/group/wxPython-users?hl=en
Which version are you using?
You have given none type bind methed.
äº=8E 2010-4-26 11:06, Alex Hall å=86=99é=81“:
--
To unsubscribe, send email to wxPython-users unsubscribe*******
or visit http://groups.google.com/group/wxPython-users?hl=en
--------------------------------------------------
What is the line that causes the error? What is on the left side of the
".Bind" on that line? Where does that come from?
--
Robin Dunn
Software Craftsman
http://wxPython.org
--
To unsubscribe, send email to wxPython-users+unsubscribe*******
or visit http://groups.google.com/group/wxPython-users?hl=en
self.mf.Bind(wx.EVT_KEY_DOWN, self.onKeyDown) #to close the dialog
on pressing "esc"
--
Have a great day,
Alex (msg sent from GMail website)
mehgcap*******/mehgcap
--
To unsubscribe, send email to wxPython-users+unsubscribe*******
or visit http://groups.google.com/group/wxPython-users?hl=en
What is self.mf and where does it come from?
--
Robin Dunn
Software Craftsman
http://wxPython.org
--
To unsubscribe, send email to wxPython-users+unsubscribe*******
or visit http://groups.google.com/group/wxPython-users?hl=en
It is the main frame of the window. Again, the entire thing works
perfectly when run from source, I just get this error when running
from the compiled .exe file.
--
Have a great day,
Alex (msg sent from GMail website)
mehgcap*******/mehgcap
--
To unsubscribe, send email to wxPython-users+unsubscribe*******
or visit http://groups.google.com/group/wxPython-users?hl=en
What I'm trying to ask is if self.mf is created in code directly of if
is is created with something like XRC. If so then the problem could be
that the XRC file is not found and so it is returning None.
--
Robin Dunn
Software Craftsman
http://wxPython.org
--
To unsubscribe, send email to wxPython-users+unsubscribe*******
or visit http://groups.google.com/group/wxPython-users?hl=en
Ah, that seems to be a possibility. I figured py2exe was smart enough
to see that dict.xrc was being read by dict.py and so would include
it, but my library.zip file does not seem to contain dict.xrc (from
which the program gets all its output). Thanks; when I get home I will
update my setup.py and try again!>
--
Have a great day,
Alex (msg sent from GMail website)
mehgcap*******/mehgcap
--
To unsubscribe, send email to wxPython-users+unsubscribe*******
or visit http://groups.google.com/group/wxPython-users?hl=en
I have a (possibly) related problem that a call to subprocess.Popen(cmds,
stdout=subprocess.PIPE) works fine from source but fails with an error
'invalid handle' when converted with py2exe - unfortunately I have to have
the output to parse as I do not get the error with no
stdout=subprocess.PIPE - I am considering using os.system with a pipe to a
file or wx.Process if I can not find a better solution.
Any suggestions?
Gadget/Steve
--------------------------------------------------
http://www.py2exe.org/index.cgi/Py2ExeSubprocessInteractions
--
Steven Sproat, BSc
http://www.launchpad.net/whyteboard
--
To unsubscribe, send email to wxPython-users+unsubscribe*******
or visit http://groups.google.com/group/wxPython-users?hl=en
Hello,
I'm not at all an expert in this, but got a similar problem and found
somewhere on the web that adding stdout.close() is a possible
workaround. So:
proc = subprocess.Popen(cmds, stdout=subprocess.PIPE)
proc.communicate()
proc.stdout.close()
May be that helps, at least it did for me (but with stdin and stderr)
It was described as a bug, but seems to never have been fixed.
Raphael
--
To unsubscribe, send email to wxPython-users+unsubscribe*******
or visit http://groups.google.com/group/wxPython-users?hl=en
XRC wouldn't be able to load it from library.zip anyway. You'll need to
include the file in addition to the files assembled by py2exe, and
update your code to be able to find it at runtime.
--
Robin Dunn
Software Craftsman
http://wxPython.org
--
To unsubscribe, send email to wxPython-users+unsubscribe*******
or visit http://groups.google.com/group/wxPython-users?hl=en
--------------------------------------------------
--------------------------------------------------
Thanks! My program now works as expected, from source AND from the
compiled file. Now I just have to write documentation and the beta is
ready!
--
Have a great day,
Alex (msg sent from GMail website)
mehgcap*******/mehgcap
--
To unsubscribe, send email to wxPython-users+unsubscribe*******
or visit http://groups.google.com/group/wxPython-users?hl=en
Alex,
Maybe do a page in the wiki with your solution for XRC and py2exe and
link it or add it to this page:
http://wiki.wxpython.org/py2exe
Or alternatively on the py2exe wiki.
Werner
--
To unsubscribe, send email to wxPython-users+unsubscribe*******
or visit http://groups.google.com/group/wxPython-users?hl=en