-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcamera.py
More file actions
35 lines (28 loc) · 747 Bytes
/
camera.py
File metadata and controls
35 lines (28 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import web
from imgToCode import *
from web.wsgiserver import CherryPyWSGIServer
CherryPyWSGIServer.ssl_certificate = "/etc/ssl/server.crt"
CherryPyWSGIServer.ssl_private_key = "/etc/ssl/server.key"
urls = (
"/", "index",
"/hello", "Hello"
)
render = web.template.render('templates/')
class index:
def GET(self):
name='bob'
return render.index(name)
#return 'Hello, world!'
class Hello:
def GET(self):
return "get"
def POST(self):
tmp = web.input()
data = web.data()
convert = ConvertToCode()
res = convert.webDataToCode(data)
print res
return "true"
if __name__ == "__main__":
app = web.application(urls, globals())
app.run()