Advertisement
ainsophical

Bottle / SL4A

Oct 4th, 2015
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. from bottle import route, run, template, static_file, redirect, request
  2. from multiprocessing import Process
  3. import android
  4.  
  5.  
  6. def showurl():
  7.     time.sleep(5)
  8.     droid.webViewShow("http:\/\/localhost:8080")
  9.  
  10.  
  11. if __name__ == '__main__':
  12.     droid = android.Android()
  13.     port = int(os.environ.get('PORT', 8080))
  14.     p = Process(target=showurl)
  15.     p.start
  16.     run(host='localhost', port=port, debug=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement