On 02/10/2009, Thomas Heller <thel...@ctypes.org> wrote: > Martin (gzlist) schrieb: >> >> If there's a way to run the shortcut without going through cmd that >> method might be okay.
Okay, can use ShellExecute, unfortunately I still can't build a reliable test on top of that as I don't get a process handle returned when it's a .lnk as the target. >> Suggestions for improvements welcome. > > Thanks for the patch, but I get these errors when I run the tests: Fantastic, thanks for testing this. I've only been able to check this on one machine so far, and haven't been completely sure of the right things to be asserting. Is possible to induce all kinds of weird things from the shortcut code (like creating .pif files), so is really more about finding the set of useful things that will work reliably across systems. > AssertionError: 'c:\\python25\\python.exe' != u'C:\\Python25\\python.exe' I've used os.path.normcase for now. > AssertionError: 0 != 8L In retrospect this is obvious, the relative path can be automatically derived, so it's unsuprising other versions of windows could do that. > The first failure is easy to fix (use case insensitive comparison), but > I don't know about the others. The attached revised patch resolves those failures, and also contains my flailings around trying to test actually *running* the .lnk files. For commiting, I can rip a lot of that out. If you've got any other ideas here or answers to some of the questions scattered in comments, I'm happy to keep poking things. Martin
comtypes_shelllinkdatalist_wip_B.diff
Description: Binary data
------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf
_______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users