x = 10res = 'ok' if x > 3 else 'no'print(res)#列表解析l = ['egg%s'%i for i in range(10)]print(l)l = ['egg%s'%i for i in range(10) if i > 5]print(l)names = ...
分类:
编程语言 时间:
2017-09-12 19:50:24
阅读次数:
140
安装 setuptools 的时候,报如下错误: creating 'dist/setuptools-0.6c11-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to itTraceback (most recent call last): ...
分类:
编程语言 时间:
2017-09-12 16:10:04
阅读次数:
193
最近使用ubuntu16.04server版安装ipython的时候一直在报错:IPython6.0+doesnotsupportPython2.6,2.7,3.0,3.1,or3.2.
WhenusingPython2.7,pleaseinstallIPython5.xLTSLongTermSupportversion.
python2.7ipythonCommand"pythonsetup.pyegg_info"failedwitherrorcode1in/tmp/pip-..
分类:
编程语言 时间:
2017-09-07 09:54:49
阅读次数:
219
python安装Fabrix出现Command"pythonsetup.pyegg_info"failedwitherrorcode1in/tmp/pip-build-ynJnAl/pynacl/解决:向上查看发现Nopackage‘libffi‘found,原因是这个libffi库未安装所以使用:yuminstalllibffi-devel-y最后安装成功
分类:
编程语言 时间:
2017-09-04 22:33:39
阅读次数:
188
操作基本数据类型的流、内存操作流、打印流、标准输入流和标准的输出流、随机访问流、合并流、序列化流/反序列化流、属性集合类一、操作基本数据类型的流 DataInputStream:数据输入流 DataOutputStream:数据输出流 可以操作一些基本数据类型 egg: DataOutputStreamdos=newDat..
分类:
其他好文 时间:
2017-08-19 15:01:10
阅读次数:
215
工作中经常会碰到读写CSV文件的情况。记录下,方便自己以后查询并与大家一起分享: 写CSV文件方法一: import csv #导入CSV with open("D:\egg.csv","wb") as csvfile #新建一个叫egg.csv”的文件在D盘。 a=csv.writer(csvfi ...
分类:
编程语言 时间:
2017-08-14 23:46:25
阅读次数:
194
django目前支持三种mysql驱动来进行mysql的链接MySQLdbisanativedriverthathasbeendevelopedandsupportedforover
adecadebyAndyDustman.mysqlclientisaforkofMySQLdbwhichnotablysupportsPython3and
canbeusedasadrop-inreplacementforMySQLdb.Atthetimeofthiswriting,
thisist..
分类:
数据库 时间:
2017-08-08 12:37:06
阅读次数:
338
今天学习了egg最基本的controller和router的使用。 首先什么是controller和router呢?controller就是经典的MVC(module,view,controller)架构中的controller层,主要用来解决实际的业务逻辑。 router主要是用来分发来自页面的请 ...
分类:
Web程序 时间:
2017-08-03 22:44:34
阅读次数:
782
pip与linux中的yum非常类似,下载、安装软件包并解决依赖问题。安装C:\Python33\Scripts>easy_install.exepip
Searchingforpip
Bestmatch:pip9.0.1
Processingpip-9.0.1-py3.3.egg
pip9.0.1isalreadytheactiveversionineasy-install.pth
Installingpip3-script.pyscripttoC:..
分类:
编程语言 时间:
2017-08-03 10:04:16
阅读次数:
382
一、System类:publicfinalclassSystem(System类包含一些有用的类字段和方法。它不能被实例化)1、字段in——标准输入流IputStreamis=System.in;抽象类的多态!2、常用方法1)publicstaticvoidgc()运行垃圾回收器启动GC垃圾回收器其实是调用了Object中的finalize()方法;egg:2)pub..
分类:
其他好文 时间:
2017-07-30 10:22:06
阅读次数:
178