I have been diving a little into the world of Jython. This is another example of the usefulness of Python as a glue language. This little snippet of code shows how to reuse custom built Java JAR libraries without having to add too much code. It also demonstrates an example of simplifying the process of generating Java listeners and connecting them.
import sys class MDFDrv: def __init__(self): sys.path.append(r'C:\sdk.jar') def accept(self, event): print "Accept called" def reject(self, event): print "Reject called" def unselect(self, event): print "unselect called" def start(self): from MDF.sdk.netif import * from MDF.sdk.event import * cmdr = Commander(accept=self.accept, reject=self.reject, configuration=self.configuration, end=self.end, unselect=self.unselect) print "===> INSTANTIATED" cmdr.connect("172.18.91.131") print "===> CONNECTED" cmdr.remoteNegotiation() print "===> RTPNEGOTIATE" if __name__ == "__main__": driver = MDFDrv() driver.start()
Earlier in the month I began my trek once again across the country. This time I took the traditional Route 66 which allowed more in-the-car views of the northern states of the mid-west. My destination on this drive across America is Huntsville, Alabama. The area is right next to Redstone Arsenal and the technical work is mainly military. Guess what yours truly will be working with?
Huntsville's claim-to-fame might just be that it is where space-camp is located. One of these weekends I would just have to visit the space museum and do the tourist thing. Huntsville is also located smack within Madison county and we've barely skirted the touchdown of several tornadoes within the past month. When the winds got a little high, I was actually overwhelmed by the whirling sirens coming from the direction of the arsenal region.
Unfortunately I don't have access to the base so this view as well as what goes on behind the perimeter is out of my reach.