Author pekka.klarck
Recipients pekka.klarck
Date 2010-04-14.14:41:19
SpamBayes Score 8.61504e-07
Marked as misclassified No
Message-id <>
I submitted issue #1594 about patterns like *.txt being processed incorrectly by jython.bat few days ago. I was able to find a solution to that problem, but now I've found more issues in handling arguments:

C:\>jython-orig -c "import sys; print sys.argv[1:]" foo%1
C:\>jython-orig -c "import sys; print sys.argv[1:]" foo! bar :zap

I got same results both with the original jython.bat distributed with 2.5.1 and with my version with the fix to #1594. The problem seems to be related to how arguments are evaluated in the following for loop inside :scanArgs helper. I didn't find any fix/workaround for it easily.

  for /f "tokens=1,*" %%i in (%_ARGS%) do call :getArg "%%i" "%%j"

The problem with %1 is pretty annoying in Robot Framework project [1], because we use that syntax with one of our command line arguments [2]. It works fine elsewhere than on Windows with Jython 2.5, it works even with Jython 2.2. The second problem is more obscure, but I can tell it's rather annoying to debug when it occurs. Based on these findings I'm also a little worried that other special characters may cause similar problems.

Date User Action Args
2010-04-14 14:41:21pekka.klarcksetrecipients: + pekka.klarck
2010-04-14 14:41:21pekka.klarcksetmessageid: <>
2010-04-14 14:41:21pekka.klarcklinkissue1599 messages
2010-04-14 14:41:20pekka.klarckcreate