
Python
文章平均质量分 86
余建新-18588497759
这个作者很懒,什么都没留下…
展开
-
Python,带你从小白到Python HelloWorld
写在前面: Why to learn Python?All in picture: 开始正文啦,本文截取了笔记中的部分,其他详细内容稍微会整理呈现在博客中... 本文解决以下问题: 一、什么是Python 二、配置Windows Python环境 三、配置Python的Eclipse开发环境 四、Hello World,Python,waiting f原创 2014-04-28 09:16:20 · 1736 阅读 · 0 评论 -
Python 记录
1 a=1 b=”str” print(“%d, %s” %(a, b)) 1, str print(“%d” %a) 1 print(“%d” %(a)) 1 0到100求和 range(101) sum(range(101))其他包 json js原创 2017-06-03 08:59:36 · 616 阅读 · 0 评论 -
Python django开发
问题1、 django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call set原创 2017-02-17 16:14:20 · 884 阅读 · 0 评论 -
Python 时间戳转化为时间格式化字符串
把long型时间戳转化为时间格式化字符串 Python vi timeTran.py # -*- coding: utf-8 -*- import time from datetime import datetime import sys def second_to_strtime(second): """将秒时间戳转化成本地普通时间 (字符串格式)""" retu原创 2016-10-07 16:43:47 · 674 阅读 · 0 评论 -
Python-一张图
原创 2016-02-04 09:41:43 · 793 阅读 · 0 评论 -
Python数据分析、展示
代码 from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import numpy as np fig = plt.figure() ax = fig.add_subplot(111, projection='3d') Z=['Room3-window', 'Veranda-door', 'Living原创 2016-01-26 19:42:50 · 1504 阅读 · 0 评论 -
Python-MySQL-1
一、import MySQLdb安装 creating dist creating 'dist/MySQL_python-1.2.3-py2.6-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything un原创 2015-02-05 15:33:51 · 1333 阅读 · 0 评论 -
Python-MySQL-2
#!/usr/bin/python import MySQLdb import time conn = MySQLdb.connect(host='localhost',user='root',passwd='123456',charset='utf8') cursor = conn.cursor() conn.select_db('db-yjx'); cdate原创 2015-02-05 15:36:32 · 583 阅读 · 0 评论 -
Python CGI编程
一、说明 HTTP GET请求调用Python脚本 Apache服务器环境,Python脚本放置路径:/opt/lampp/cgi-bin 二、Python脚本 #!/usr/bin/python #coding=utf-8 import cgi, cgitb form = cgi.FieldStorage() first_name = form.getvalue('firs原创 2015-04-17 20:42:00 · 876 阅读 · 0 评论 -
Python获取命令行参数
import sys for i in sys.argv: print i print 'The PYTHONPATH is', sys.path, '\n' print sys.argv[0] + "\t" + sys.argv[1] + "\t" + sys.argv[2]原创 2015-03-16 20:16:27 · 541 阅读 · 0 评论 -
Python中的不同package
optparse from optparse import OptionParser原创 2016-11-15 13:01:54 · 429 阅读 · 0 评论