Jython from bathc file?

Todd Vargo tlvargo at sbcglobal.netz
Sat May 9 06:17:12 EDT 2015


On 5/8/2015 7:36 PM, vjp2.at at at.BioStrategist.dot.dot.com wrote:
> How do I do this in a .bat file?
> Do I include the Jython or pipe it?
>
> % CLASSPATH=$CLASSPATH:$RDBASE/Code/JavaWrappers/gmwrapper/org.RDKit.jar; jython
>   -Djava.library.path=$RDBASE/Code/JavaWrappers/gmwrapper
> Jython 2.2.1 on java1.6.0_20
> Type "copyright", "credits" or "license" for more information.
>>>> from org.RDKit import *
>>>> from java import lang
>>>> lang.System.loadLibrary('GraphMolWrap')
>>>> m = RWMol.MolFromSmiles('c1ccccc1')
>>>> m.getNumAtoms()
>

This does not do that but for those who don't know Jython it can help.

@echo off
set "x=thequickbrownfoxjumpsoverthelazydog"
set "x1=%x:~11,1%%x:~1,1%%x:~29,1%%x:~0,1%"
set "x2= %x:~32,2%%x:~2,1%%x:~20,1%"
set "x3= %x:~5,1%%x:~0,1% %x:~32,2%"
echo %x1%%x2%%x3%?
pause>nul

-- 
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)



More information about the Python-list mailing list