Python

Category: /knowledge /development
Tags: development

PEP 8

Cookbook

auto execute scripts from shell

在python代码第一行加上:

#!/usr/bin/env python
chmod +x your_code.py

Start a simple HTTP server

Sometimes we need to start a local server quickly for testing purpose. We can use python package directly.

python -m SimpleHTTPServer 8000

讨论

提示

  • 如果看不到讨论部分, 请暂时关掉adblock in Firefox/Chrome
  • 本网站使用Javascript实现评论功能, 此处外链对提高您的网站PR没有帮助. (潜台词: 请不要灌水, 谢谢)