This is if you are open to new ideas and learn new things.
This is not a solution to your specific problem, that you want to join the two languages, it is a replacement for this idea to include everything in Python.
#!/usr/bin/python import pyglet from time import time, sleep class Window(pyglet.window.Window): def __init__(self): super(Window, self).__init__(vsync = False) self.alive = 1 self.click = None self.drag = False with open('map.png', 'rb') as fh: self.geodata_image = pyglet.image.load('map.png', file=fh) self.geo_info = self.geodata_image.width, self.geodata_image.height def on_draw(self): self.render() def on_mouse_press(self, x, y, button, modifiers): self.click = x,y def on_mouse_drag(self, x, y, dx, dy, buttons, modifiers): if self.click: self.drag = True print 'Drag offset:',(dx,dy) def on_mouse_release(self, x, y, button, modifiers): if not self.drag and self.click: print 'You clicked here', self.click, 'Relese point:',(x,y)
All you need is:
Python layout to work as a submodule in Javav
import sys for line in sys.stdin.readline(): if line == 'plot': pass
For example.
Torxed
source share