Message6204

Author otmarhumbel
Recipients SchlauFuchs, otmarhumbel
Date 2010-10-23.07:07:41
SpamBayes Score 2.87795e-06
Marked as misclassified No
Message-id <1287817662.44.0.964981695109.issue1624@psf.upfronthosting.co.za>
In-reply-to
Content
I put some System.out.println() statements right into the jython main program:

C:\stuff\jython\jython-7164>jython.bat -c "import sys; print sys.argv" "c:\Program Files\some\"
passed args:
 -c
 import sys; print sys.argv
 c:\Program Files\some"
parsed arguments:
 -c
 c:\Program Files\some"
executing import sys; print sys.argv
['-c', 'c:\\Program Files\\some" ']


Even if I call java directly, the trailing backslash is replaced by a double quote:
C:\stuff\jython\jython-7164>"C:\Program Files\Java\jre6\bin\java"  -Xmx512m -Xss1152k -Dpython.home="C:\stuff\jython\jython-7164" -Dpython.executable="C:\stuff\jython\jython-7164\jython.bat"  -classpath "C:\stuff\jython\jython-7164\jython.jar" org.python.util.jython -c "import sys; print sys.argv" "c:\Program Files\some\"
passed args:
 -c
 import sys; print sys.argv
 c:\Program Files\some"
parsed arguments:
 -c
 c:\Program Files\some"
executing import sys; print sys.argv
['-c', 'c:\\Program Files\\some"']


So I am sorry to say there is not much jython can do about this at the moment. There is a little chance that it is the java interpreter's fault, in which case a native launcher would help.


Workaround:
C:\stuff\jython\jython-7164>jython.bat -c "import sys; print sys.argv" "c:\Program Files\some\\"
passed args:
 -c
 import sys; print sys.argv
 c:\Program Files\some\
parsed arguments:
 -c
 c:\Program Files\some\
executing import sys; print sys.argv
['-c', 'c:\\Program Files\\some\\']
History
Date User Action Args
2010-10-23 07:07:42otmarhumbelsetmessageid: <1287817662.44.0.964981695109.issue1624@psf.upfronthosting.co.za>
2010-10-23 07:07:42otmarhumbelsetrecipients: + otmarhumbel, SchlauFuchs
2010-10-23 07:07:42otmarhumbellinkissue1624 messages
2010-10-23 07:07:41otmarhumbelcreate