I hereby claim:
- I am seansummers on github.
- I am seansummers (https://keybase.io/seansummers) on keybase.
- I have a public key whose fingerprint is 69A9 3D5E 32A5 E596 F71C F241 1C35 48DF BC8A 5B0B
To claim this, I am signing this object:
| PORT = 9123 | |
| from org.apache import mina | |
| from java import net, nio, util | |
| class TimeServerHandler(mina.core.service.IoHandlerAdapter): | |
| def exceptionCaught(self, session, cause): | |
| cause.printStackTrace() | |
| def messageSent(self, session, message): | |
| print('Message written.... {}'.format(message)) |
| from com.pff import PSTFile, PSTObject | |
| a = PSTFile('outlook.ost') | |
| b = a.rootFolder | |
| def walkFolders(folder): | |
| print folder.descriptorNodeId, folder.displayName, folder.contentCount | |
| if folder.hasSubfolders(): | |
| for f in folder.subFolders: | |
| walkFolders(f) |
| <!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd"> | |
| <etl> | |
| <description>JEXL looping</description> | |
| <properties><include href="etl.properties"/></properties> | |
| <connection id="jexl" driver="jexl"/> | |
| <connection id="sql" url="$url"/> | |
| <query connection-id="jexl"> | |
| fileDir = new('java.io.File', '.' + class:forName('java.io.File').separator + etl.getParameter('directory')).getCanonicalFile(); | |
| if (fileDir.isDirectory() eq true) | |
| for (sqlFile : fileDir.listFiles()) |
| <!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd"> | |
| <etl> | |
| <description>Test Java Logging with Scriptella</description> | |
| <connection id="jexl" driver="jexl"/> | |
| <connection id="script" driver="script"/> | |
| <script connection-id="script"> <!-- averages 20ms per call --> | |
| etl.globals.put('nashornLOG', java.util.logging.Logger.getLogger('ETLscript')); | |
| etl.globals.get('nashornLOG').info('This is a test from nashorn.'); | |
| </script> | |
| <script connection-id="jexl"> <!-- averages 3ms per call --> |
| def loadJar(jarFile): | |
| '''load a jar at runtime using the system Classloader (needed for JDBC) | |
| adapted from http://forum.java.sun.com/thread.jspa?threadID=300557 | |
| Author: Steve (SG) Langer Jan 2007 translated the above Java to Jython | |
| Reference: https://wiki.python.org/jython/JythonMonthly/Articles/January2007/3 | |
| Author: seansummers@gmail.com simplified and updated for jython-2.5.3b3+ | |
| >>> loadJar('jtds-1.3.1.jar') | |
| >>> from java import lang, sql |
I hereby claim:
To claim this, I am signing this object: