Dropping of files into a wx.Frame is not working if I launch the module from the command line. However the same module works from Eclipse. I need help figuring out what I have missed. This is on Windows 7-64bit.
import sys
if not hasattr(sys, ‘frozen’):
import wxversion
wxversion.select(‘2.8’)
import wx
if name == “main”:
app = wx.App()
window = TestWxDrop(None)
app.MainLoop()
When I launch from Eclipse files dragged over the window everything works as expected.
When launched from a console via “python testwxdrop.py” the cursor does not change when a file is dragged over the window and no OnDragOver events even fire.
Dropping of files into a wx.Frame is not working if I launch the module
from the command line. However the same module works from Eclipse. I
need help figuring out what I have missed. This is on Windows 7-64bit.
/
/import sys
if not hasattr(sys, 'frozen'):
import wxversion
wxversion.select('2.8')
import wx
When I launch from Eclipse files dragged over the window everything
works as expected.
When launched from a console via "python testwxdrop.py" the cursor does
not change when a file is dragged over the window and no OnDragOver
events even fire.
Any ideas?
It really shouldn't make a difference how it is launched on Windows. All things being equal it should work or not work the same way in both environments. Are you sure that the same Python and wxPython that are being used in each case?
I added some print statements and the same versions are listed.
Wx version: ['2.8-msw-unicode']
Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64
bit (AMD64)]
Your sample works fine for me when run from a command line, although I see from the above that you are using a 64-bit Python and I was using the 32-bit build, but I wouldn't think that would make a difference for DnD functionality.