Duncan Booth wrote:
Peter Hansen wrote:
This should make it work:
 python %0.bat %*

Only, among other issues, if you type the full path to the batch file, or if it's in the current directory. This approach fails if you put the batch file in a directory somewhere along your path.


The simplest fix, assuming we aren't talking Win9x is probably:

python "%~f0" %*

Wow. The myriad things that get slipped into these little operating systems while you aren't looking. Windows XP's command shell begins to border on being marginally acceptable for some limited types of scripting.

Unfortunately, Google makes it hard to search for such things,
but after a while I was able to dig up this master reference:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/percent.mspx

Thanks, Duncan!

-Peter
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to