摘要: from tkinter import *from tkinter import ttkroot=Tk() label=ttk.Label(root,text="abc") #之前随便写一个label为abc label.pack() #一定要,没有就不显示label.config(text="i am very confusing, i want make a lot ofmoney,but i... 阅读全文
posted @ 2017-09-23 15:23 uxiuxi 阅读(192) 评论(0) 推荐(0)
摘要: 好久好久没更新。工作太忙,太杂了。心情也很烦躁。找了个视频,随便看看from tkinter import * from tkinter import ttk class HelloApp: def __init__(self,master): self.label=ttk.Label(master,text='Hello,Tkinter') #显示在master上有... 阅读全文
posted @ 2017-09-23 14:25 uxiuxi 阅读(234) 评论(0) 推荐(0)
摘要: 以上是书上的代码。可是无法实现。len(list(reader)) =0 查询官网知道。reader=csv.reader(fh) Return a reader object which will iterate over lines in the given csvfile. csvfile c 阅读全文
posted @ 2017-08-31 08:10 uxiuxi 阅读(1491) 评论(0) 推荐(0)
摘要: 近期看那个scrape章节。有个s_urls[0]['href'] 没法理解。以为python 有非数字下标数组。后面多方查询才知道这个是beautifulsoup 中的tag查询 https://stackoverflow.com/questions/5815747/beautifulsoup-g 阅读全文
posted @ 2017-08-30 08:09 uxiuxi 阅读(4065) 评论(1) 推荐(0)
摘要: 默认在open(‘data.csv’,'w+')模式下会有空行。在open后面添加newline=‘’ 即可解决。 https://stackoverflow.com/questions/41045510/pandas-read-csv-ignore-rows-after-a-blank-line 阅读全文
posted @ 2017-08-27 11:12 uxiuxi 阅读(368) 评论(0) 推荐(0)
摘要: 在看书的时候有点迷糊。尝试自己弄下。大概步骤是先找到图片的网 址。通过urllib解析网址之后得到data数据。 然后通过open函数写道firs_img.jpg文件中。这个是最关键的步骤 阅读全文
posted @ 2017-08-17 22:42 uxiuxi 阅读(130) 评论(0) 推荐(0)
摘要: 首先要区别shell的命令split,shell中split是主要将文件分割用途。 在awk 内置函数中是split string。 另外一个疑惑点是为啥 root@ubuntu:/home/koyaku# awk '{split("aa bb cc",a," ");print a[1]}'^C n 阅读全文
posted @ 2017-08-12 09:31 uxiuxi 阅读(118) 评论(0) 推荐(0)
摘要: 手动敲上面代码遇到几个问题和疑惑 1.按照书上给的是“\t” 实际敲的是“ ”,所有导致得不到正确的结果。第十行的意思是在当前目录中找到文件名为glossary的文件,并且由“ ”(空格分隔),将后面的赋值给前面比如entry[BASIC] =Beginners entry[CICS]= Custo 阅读全文
posted @ 2017-08-07 23:35 uxiuxi 阅读(136) 评论(0) 推荐(0)
摘要: 我的理解是读取第一行并且以new line character \n为分割符 附加到第一行, 之后在处理第二行(最开始的第三行)。 http://www.thegeekstuff.com/2009/11/unix-sed-tutorial-multi-line-file-operation-with 阅读全文
posted @ 2017-07-29 10:44 uxiuxi 阅读(197) 评论(0) 推荐(0)
摘要: https://stackoverflow.com/questions/10577256/numbering-lines-matching-the-pattern-using-sed 最简单的命令是 sed - '/abc/=' tab.txt 812 这种只是输出行号。 root@ubuntu:/ 阅读全文
posted @ 2017-07-28 00:10 uxiuxi 阅读(5129) 评论(0) 推荐(0)