Python内置的下载服务器 http.server  Python的Web服务器

  1. python2 中SimpleHTTPServer
  2. python3 中 http.server

执行

 python -m http.server

会在当前目录启动一个文件下载服务器,默认打开8000端口

如果当前目录下有index.html文件,默认显示该文件的内容

如果没有,默认显示当前目录下的文件列表

Python Http-server 使用的更多相关文章

  1. Python 处理server返回gzip内容

    Python 如何处理server返回gzip压缩过的内容,代码如下: from StringIO import StringIOimport gzip request = urllib2.Reque ...

  2. 小测几种python web server的性能

    http://blog.csdn.net/raptor/article/details/8038476 因为换了nginx就不再使用mod_wsgi来跑web.py应用了,现在用的是gevent-ws ...

  3. Python Web Server Gateway Interface -- WSGI

    了解了HTTP协议和HTML文档,我们其实就明白了一个Web应用的本质就是: 浏览器发送一个HTTP请求: 服务器收到请求,生成一个HTML文档: 服务器把HTML文档作为HTTP响应的Body发送给 ...

  4. a simple and universal interface between web servers and web applications or frameworks: the Python Web Server Gateway Interface (WSGI).

    WSGI is the Web Server Gateway Interface. It is a specification that describes how a web server comm ...

  5. python socket server源码学习

    原文请见:http://www.cnblogs.com/wupeiqi/articles/5040823.html 这里就是自己简单整理一下: #!/usr/bin/env python # -*- ...

  6. Notes on PEP333 (Python Web Server Gateway Interface)

    This note is about PEP3333- Python Web Server Gateway Interface. Refer to (Source: http://legacy.pyt ...

  7. python web server gateway interface (wsgi ) notes

    前言: 注:如果需要得到支持批Python3.x以及包含了勘误表,附录,和说明的更新版规范,请查看PEP 3333 摘要: 这篇文档详细说明了一套在web服务器与Python web应用程序(web框 ...

  8. Python游戏server开发日记(一)目标

    到了新的环境.老大让我有空研究下一代server技术,作为一个长期任务. 新的server想达到的目标: 1.分布式系统,对象(Entity)之间的关系类似于Actor模型. 2.逻辑服务,是单进程. ...

  9. C# 启动 a Python Web Server with Flask

    概览 最近有个需求是通过c#代码来启动python 脚本.嘿~嘿!!! 突发奇想~~既然可以启动python脚本,那也能启动flask,于是开始着手操作. 先看一波gif图 通过打开控制台启动flas ...

  10. python http server handle json

    用Python实现一个http server # python2 # coding = utf-8 from BaseHTTPServer import HTTPServer, BaseHTTPReq ...

随机推荐

  1. 【caffe Net】使用举例和代码中文注释

    首先是Net使用的小例子: #include <vector> #include <iostream> #include <caffe/net.hpp> using ...

  2. 批量更新表注释 mysql

    -- 生成更新语句 SELECT CONCAT( 'ALTER TABLE ', T2.table_name, ' COMMENT ''', T1.TABLE_COMMENT, ''';' ) sql ...

  3. 作业要求2018092609-2 选题 Scrum立会报告+燃尽图 05

    此作业要求参见:https://edu.cnblogs.com/campus/nenu/2019fall/homework/8678 一.小组情况组长:贺敬文组员:彭思雨 王志文 位军营 杨萍队名:胜 ...

  4. CMU Database Systems - Storage and BufferPool

    Database Storage 存储分为volatile和non-volatile,越快的越贵越小 那么所以要解决的第一个问题就是,如果尽量在有限的成本下,让读写更快些 意思就是,尽量读写volat ...

  5. 制作 python解释器

    https://www.zhihu.com/tardis/sogou/qus/27286136

  6. iptables 4张表 5条链

  7. axios请求数据完整

    <template> <!-- 所有的内容要被根节点包含起来 --> <div id="home"> 首页组件 <button @clic ...

  8. spark.sql.shuffle.partitions和spark.default.parallelism的区别

    在关于spark任务并行度的设置中,有两个参数我们会经常遇到,spark.sql.shuffle.partitions 和 spark.default.parallelism, 那么这两个参数到底有什 ...

  9. 一行命令学会全基因组关联分析(GWAS)的meta分析

    为什么需要做meta分析 群体分层是GWAS研究中一个比较常见的假阳性来源. 也就是说,如果数据存在群体分层,却不加以控制,那么很容易得到一堆假阳性位点. 当群体出现分层时,常规手段就是将分层的群体独 ...

  10. Spring Boot与ActiveMQ的集成

    Spring Boot对JMS(Java Message Service,Java消息服务)也提供了自动配置的支持,其主要支持的JMS实现有ActiveMQ.Artemis等.本节中,将以Active ...