Message6277

Author bcorliss
Recipients bcorliss
Date 2010-12-13.22:34:17
SpamBayes Score 0.0
Marked as misclassified No
Message-id <1292279657.83.0.172719007514.issue1686@psf.upfronthosting.co.za>
In-reply-to
Content
First off, I just want to say that I think Jython is awesome and I appreciate all of the work that has been put into it!!   :)

When passing an argument to jython that includes path encased in double quotes, jython will fail to preserve that raw path string:

This call works, and the image is opened:
jython.bat myapp.py -r 10 -c 10 -x 17 -y 17 "C:/Documents and Settings/.../A B/TP_0/lm_tile/tile_rgb_z1.png"

If a double spaced is added in between "A B" then the image cannot be found.  The python script has been tested and supports raw strings for paths.
 jython.bat myapp.py -r 10 -c 10 -x 17 -y 17 "C:/Documents and Settings/.../A  B/TP_0/lm_tile/tile_rgb_z1.png"
javax.imageio.IIOException: javax.imageio.IIOException: Can't read input file! 
Exception while removing reference: java.util.concurrent.RejectedExecutionException 
java.util.concurrent.RejectedExecutionException 
	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(Unknown Source) 
	at java.util.concurrent.ThreadPoolExecutor.reject(Unknown Source) 
	at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source) 
	at java.util.concurrent.AbstractExecutorService.submit(Unknown Source) 
	at sun.awt.shell.Win32ShellFolderManager2$ComInvoker.invoke(Unknown Source) 
	at sun.awt.shell.Win32ShellFolder2$FolderDisposer.dispose(Unknown Source) 
	at sun.java2d.Disposer.run(Unknown Source) 
	at java.lang.Thread.run(Unknown Source) 


As an aside, I am wondering why the argument parsing is handled in the .bat file and not in a java script that calls jython.  Having the argument parsing handled in one place instead of operating system specific scripts might be easier.  Is there any benefit to having the parsing done is the arcane language of the .bat file?

Thank you for your time.

Best Regards,
Bruce
History
Date User Action Args
2010-12-13 22:34:17bcorlisssetrecipients: + bcorliss
2010-12-13 22:34:17bcorlisssetmessageid: <1292279657.83.0.172719007514.issue1686@psf.upfronthosting.co.za>
2010-12-13 22:34:17bcorlisslinkissue1686 messages
2010-12-13 22:34:17bcorlisscreate