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. DELPHI给整个项目加编译开关

    DELPHI给整个项目加编译开关 project--options

  2. Are query string keys case sensitive?

    Are query string keys case sensitive? @gbjbaanb's answer is incorrect: The RFCs only specify the all ...

  3. MFC调用CEF实现单页面单COOKIE管理《转》

    cookie简单介绍 cookie存储了网站的一些很重要的信息,如用户身份信息.常用设置.设置地理位置等等各种信息.使用cef访问网站时,如果设置了CefSettings.cache_path参数,则 ...

  4. [转]OpenGL编程指南(第9版)环境搭建--使用VS2017

    1.使用CMake Configure中选择VS2017 Win64 , Finish: 点击Generate. 2.进入build目录 打开GLFW.sln , 生成解决方案. 打开vermilio ...

  5. 前端 img标签显示 base64格式的 图片

    本文链接:https://blog.csdn.net/kukudehui/article/details/80409522在做项目的时候,我从后端返回了一个base64格式的图片文件,想把它渲染在前端 ...

  6. windows中kill端口为8080的进程(或子进程)

    1.netstat -aon|findstr "8080" 查出8080端口被9436进程占用 2.查看PID对应的进程 tasklist|findstr "9436&q ...

  7. Flutter ------- WebView加载网页

    在Flutter 加载网页?也是有WebView的哦,和Android一样 1.添加依赖 dependencies: flutter_webview_plugin: ^0.2.1+2 2.导入库 im ...

  8. IOS CocoaPods基本使用技巧

    目录: 什么是CocoaPods 如何下载并安装CocoaPods 如何使用CocoaPods 什么是CocoaPods 当开发iOS应用时,或多或少的都会引用第三方类库,例如AFNetworking ...

  9. DMA与PIO是什么东西?

    1. DMA全称是什么? Direct Memory Access 2. PIO全称是什么? Programming Input/Output 3. DMA与PIO是两种不同的模式 3.1 DMA 不 ...

  10. 各类型变量所占字节数,sizeof()

    与操作系统位数和编译器都有关. 可用sizeof()得到,当前主流编译器一般是32位或64位. 类型       16位       32位 64位 char 1            1 1 sho ...