示例#1
0
from decision_interface_santorini_fhg import DecisionInterfaceSantoriniFHG
#from decision_interface_hungary import DecisionInterfaceHungary


class Index(App):
    def getHTML(self, params):
        return "Title Page Here"


#os.system('javac -cp \* ContextModule.java') #compile the source
#os.system('gnome-terminal -e \"java -cp .:\* ContextModule\"') #run the instance on a separate shell
#os.system('java -cp .:\* ContextModule &')

#gateway = JavaGateway() #launch the gateway server

#context_module = gateway.entry_point # get the ContextModule instance

a = DecisionInterfaceSantorini()
b = DecisionInterfaceSantoriniFHG()

#a.define_context(context_module)
#b.define_context(context_module)
#c.define_context(context_module)

site = Site(DecisionInterfaceSantorini)

site.addApp(DecisionInterfaceSantoriniFHG, '/app2')
#site.addApp(DecisionInterfaceHungary, '/app2/app3')

site.launch()
示例#2
0
from spyre.server import Site, App


from sliders_examples import SlidersApp
from stocks_example import StockExample
from image_editor import ImageEditor



class Index(App):
    def getHTML(self, params):
        return "Title Page Here"


#site = Site(Index)

site = Site(SlidersApp)

site.addApp(StockExample, '/app2')
site.addApp(ImageEditor, '/app2/app3')


site.launch()






示例#3
0
import sys
import os
from spyre import server

from spyre.server import Site, App

from topics_analyze import TopicApp
from topics_keys import TopicNameApp


class Index(App):
    def getHTML(self, params):
        return "Title Page Here"


#site = Site(Index)
if __name__ == '__main__':
    portnum = int(sys.argv[1])
    path = os.path.dirname(os.path.abspath(__file__))

    with open(path + os.sep + "args.txt", "w+") as f:
        for x in sys.argv[2:]:
            f.write(x + "\n")
    site = Site(TopicNameApp)
    site.addApp(TopicApp, '/analyze data')

    site.launch(port=portnum)