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 · 1734 阅读 · 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 · 609 阅读 · 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 · 879 阅读 · 0 评论 -
Python 时间戳转化为时间格式化字符串
把long型时间戳转化为时间格式化字符串Pythonvi timeTran.py# -*- coding: utf-8 -*-import timefrom datetime import datetimeimport sysdef second_to_strtime(second): """将秒时间戳转化成本地普通时间 (字符串格式)""" retu原创 2016-10-07 16:43:47 · 662 阅读 · 0 评论 -
Python-一张图
原创 2016-02-04 09:41:43 · 785 阅读 · 0 评论 -
Python数据分析、展示
代码from mpl_toolkits.mplot3d import Axes3Dimport matplotlib.pyplot as pltimport numpy as npfig = plt.figure()ax = fig.add_subplot(111, projection='3d')Z=['Room3-window', 'Veranda-door', 'Living原创 2016-01-26 19:42:50 · 1491 阅读 · 0 评论 -
Python-MySQL-1
一、import MySQLdb安装creating distcreating 'dist/MySQL_python-1.2.3-py2.6-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to itremoving 'build/bdist.linux-x86_64/egg' (and everything un原创 2015-02-05 15:33:51 · 1325 阅读 · 0 评论 -
Python-MySQL-2
#!/usr/bin/pythonimport MySQLdbimport timeconn = 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 · 575 阅读 · 0 评论 -
Python CGI编程
一、说明HTTP GET请求调用Python脚本Apache服务器环境,Python脚本放置路径:/opt/lampp/cgi-bin二、Python脚本#!/usr/bin/python#coding=utf-8import cgi, cgitb form = cgi.FieldStorage() first_name = form.getvalue('firs原创 2015-04-17 20:42:00 · 870 阅读 · 0 评论 -
Python获取命令行参数
import sysfor i in sys.argv: print iprint 'The PYTHONPATH is', sys.path, '\n'print sys.argv[0] + "\t" + sys.argv[1] + "\t" + sys.argv[2]原创 2015-03-16 20:16:27 · 535 阅读 · 0 评论 -
Python中的不同package
optparse from optparse import OptionParser原创 2016-11-15 13:01:54 · 424 阅读 · 0 评论