tornado和telegraphy的helloworld
程序员文章站
2022-07-14 15:50:50
...
参考 http://www.tornadoweb.cn/
tar xvzf tornado-1.2.1.tar.gz
cd tornado-1.2.1
python setup.py build
sudo python setup.py install
helloworld
python hello.py
curl localhost:8888
websocket的
https://github.com/hiroakis/tornado-websocket-example
不好使.是因为需要国外使用google的js
-------------------------------------------------------------
尝试https://github.com/machinalis/telegraphy/
注意
https://github.com/machinalis/telegraphy/blob/master/developer_requirements.txt
这里说了依赖,依赖不对装不对呀
比如
pip install django_extensions==1.1.1
tar xvzf tornado-1.2.1.tar.gz
cd tornado-1.2.1
python setup.py build
sudo python setup.py install
helloworld
import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") application = tornado.web.Application([ (r"/", MainHandler), ]) if __name__ == "__main__": application.listen(8888) tornado.ioloop.IOLoop.instance().start()
python hello.py
curl localhost:8888
websocket的
https://github.com/hiroakis/tornado-websocket-example
不好使.是因为需要国外使用google的js
-------------------------------------------------------------
尝试https://github.com/machinalis/telegraphy/
注意
https://github.com/machinalis/telegraphy/blob/master/developer_requirements.txt
这里说了依赖,依赖不对装不对呀
比如
pip install django_extensions==1.1.1
virtualenv telegraphy . telegraphy/bin/activate pip install zope.interface yum install bzip2-devel cp /usr/lib64/python2.6/lib-dynload/bz2.so /data/mysocket/python/telegraphy/telegraphy/lib/python2.7/ pip install flake8==2.0 pip install django-nose==1.1 pip install ipdb==0.8 pip install mock==1.0.1 pip install django_extensions==1.1.1
virtualenv telegraphy . telegraphy/bin/activate pip install zope.interface yum install bzip2-devel cp /usr/lib64/python2.6/lib-dynload/bz2.so /data/mysocket/python/Telegraphy/telegraphy/lib/python2.7/ pip install six pip install six --upgrade pip install telegraphy pip install telegraphy --upgrade pip install django_extensions pip install pysqlite pip install listenWS (telegraphy)[root@VM_192_107_centos demo_project]# pwd /data/mysocket/python/Telegraphy/git/telegraphy/demo_project (telegraphy)[root@VM_192_107_centos demo_project]# python manage.py run_telegraph
推荐阅读
-
探究Python的Tornado框架对子域名和泛域名的支持
-
tornado和telegraphy的helloworld
-
Java基础学习-HelloWorld案例的编写和运行
-
探究Python的Tornado框架对子域名和泛域名的支持
-
探究Python的Tornado框架对子域名和泛域名的支持
-
php的扩展和嵌入--c扩展开发helloworld_PHP教程
-
php的扩展和嵌入--c扩展开发helloworld_PHP教程
-
生成二叉树和红黑树的helloworld(2)
-
python web开发基于正则的动态路由映射和通过路径/路由传参(Tornado框架、Django框架)
-
snaic和tornado的简单性能测试