![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
文章平均质量分 89
汪汪星河
努力会让我变好
展开
-
(不用操作光标)Python读取文件指定行内容
Python读取文件指定行内容 python读取文件指定行内容 import linecache text=linecache.getline(r’C:\Users\Administrator\Desktop\SourceCodeofMongoRedis\chapter_5\generate_string.py’,10) 第十行内容为# info = ‘’‘1000001 王小小’’’ ...转载 2020-07-26 18:53:25 · 250 阅读 · 0 评论 -
Python笔记——网络编程基础.
笔记:20200130 OSI 七层模型 应用层 表示层 会话层 传输层 网络层 链路层 物理层 IP 获取主机名 import socket socket.gethostname() 通过主机名解析ip socket.gethostbyname('LAPTOP-UPG6SFJ0') '192.168.1.8' socket.gethostbyname('...原创 2020-03-30 14:57:56 · 227 阅读 · 0 评论 -
Pyinstaller(Python打包为exe文件)
Pyinstaller(Python打包为exe文件) 引用地址https://msd.misuland.com/pd/3223833238703184482转载 2019-12-02 13:23:41 · 182 阅读 · 0 评论 -
老虎证券爬取港股(对小米股价的实时显示和报警)
比如小米的实时股价 from bs4 import BeautifulSoup import requests url="https://www.laohu8.com/stock/010810" html=requests.get(url)//获取网页 a=soup.select('.stock-price .latest')//在网页中查找价格 print(a[0].text)//打印小米实时...原创 2019-11-08 15:59:12 · 3458 阅读 · 0 评论