Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #44536

Re: Drag and drop in Windows

From Christian Gollwitzer <auriocus@gmx.de>
Newsgroups comp.lang.python
Subject Re: Drag and drop in Windows
Date 2013-04-30 14:08 +0200
Organization A noiseless patient Spider
Message-ID <kloc0t$v95$1@dont-email.me> (permalink)
References <mailman.1148.1367231567.3114.python-list@python.org> <20130429204237.52A8F448266@nhs-pd1e-esg007.ad1.nhs.net> <mailman.1173.1367311190.3114.python-list@python.org>

Show all headers | View raw


Hi Robert,

Am 30.04.13 10:39, schrieb Robert Flintham:
> Thanks Christian.
>
> I've tried the following code: ################ import Tkinter
>
> root = Tkinter.Tk() root.title("DICOM Opener") root.tk.eval('lappend
> auto_path {K:/Python27/Lib/site-packages/tkdnd2.6}')
> root.tk.eval('package require tkdnd') ################
>
> But I get the following traceback: ################
> _tkinter.TclError: couldn't load library
> "K:/Python27/Lib/tkdnd2.6/tkdnd26.dll": invalid argument
> ################
>
> Is "invalid argument" as generic as it sounds, or does it mean
> something specific in this case?  Is Tcl expecting an additional
> argument in the 'package require' line?
>
> I assume the append auto path line is correct as it seems to have
> found the DLL (presumably from pkgIndex.tcl).

Yes, actually this means the the "package require" in principle succeeds 
to perfrom the necessary steps. The EINVALID on Windows in most cases 
menas, that the DLL has the wrong word size. I.e., you run Tcl in 32 bit 
and try to load tkdnd-DLL with 64 bit or vice versa. You can get the 
bitsize from Tcl with

	"set tcl_platform(pointerSize)"
If it tells 4, Tcl runs on 32bit, if 8, it runs on 64bit.

The second problem might be, that the tkdnd.dll depends on some other 
DLL which can't be found by Windows. To debug this, install a tool like 
"Dependency walker". I don't use Windows anymore, so my memory might be 
diffuse.

	Christian

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Drag and drop in Windows Robert Flintham <Robert.Flintham@uhb.nhs.uk> - 2013-04-29 11:25 +0100
  Re: Drag and drop in Windows Christian Gollwitzer <auriocus@gmx.de> - 2013-04-29 22:38 +0200
  RE: Drag and drop in Windows Robert Flintham <Robert.Flintham@uhb.nhs.uk> - 2013-04-30 09:39 +0100
    Re: Drag and drop in Windows Christian Gollwitzer <auriocus@gmx.de> - 2013-04-30 14:08 +0200
  Re: Drag and drop in Windows Kevin Walzer <kw@codebykevin.com> - 2013-04-30 10:33 -0400
  Re: Drag and drop in Windows Kevin Walzer <kw@codebykevin.com> - 2013-04-30 19:09 -0400
  RE: Drag and drop in Windows Robert Flintham <Robert.Flintham@uhb.nhs.uk> - 2013-05-01 09:06 +0100
    Re: Drag and drop in Windows Christian Gollwitzer <auriocus@gmx.de> - 2013-05-01 10:25 +0200

csiph-web