Revision 2 as of 2008-11-15 13:59:59

Clear message

When I try to do this, Windows tells me that the data file is not a valid Win32 application (of course it isn't!). Why is it that I can do this with other programs, but not with Python programs?

I find that it works with .bat files. If I right-click on a data file and open it with a .bat file that runs a .py file, that works. But it works only with one data file. If I make a .bat file containing:

my_prog.py %*

I think that should work with multiple data files, but it doesn't: only one of the data filenames reaches the .bat file, and therefore only one reaches the Python program.

I'm bewildered that I can't find any coverage of this issue on the Web, nor in the Python books that I have (Learning Python and Programming Python). Surely this is how any normal Windows user would expect to use a Python program (or any other program), but it doesn't work. It may well be Microsoft's fault that it doesn't work, but why no discussion of such a fundamental issue?

Unable to edit the page? See the FrontPage for instructions.