Python
zhuohui307317684
什么时候才能发达,财务自由啊啊啊
展开
-
基金爬虫例程
参考:爬虫 -- 天天基金网数据简单爬取 代码如下: import requests import time import pandas as pd if __name__ == '__main__': for j in range(1, 49): url = f'http://fund.eastmoney.com/Data/Fund_JJJZ_Data.aspx?t=1&lx=1&letter=&gsid=&text=&sort=zd原创 2021-09-14 19:50:48 · 304 阅读 · 1 评论 -
Python错误:SyntaxError: invalid syntax
现象: 从网上拷贝一段代码下来,一运行,往往会出现如下的错误: “SyntaxError: invalid syntax” 提示是什么意思呢?其实是语法不以意思,也晃是编译器的版本不对,python3 和代码,用python2 也运行了。 在python3.x中输出语句print ("输出内容“”),必须加上括号 在python2.x中输出语句print "输出内容“”,无需加括号 解决方法: 要么把语法一一改正过来,要么换个对应版本的解析器,想想,还是换个python版本更快一点。 ...原创 2021-09-14 19:33:01 · 730 阅读 · 0 评论 -
python类型转换
Python 提供了将变量或值从一种类型转换成另一种类型的内置函数 int(x [,base ]) 将 x 转换为一个整数 long(x [,base ]) 将 x 转换为一个长整数 float(x ) 将 x 转换到一个浮点数 complex(real [,imag ]) 创建一个复数 str(x ) 将对象 x 转换为字符串 repr(x ) 将对象 x 转换为表达式字符串 eval(str ...原创 2020-03-20 15:02:33 · 212 阅读 · 0 评论 -
python替代批处理:打开IDEA等工程
# -*- coding: utf-8 -*- import os os.system('"C:/Program Files/JetBrains/IntelliJ IDEA Community Edition 2019.3.1/bin/idea64.exe" ./') #只能用正斜杠原创 2020-03-04 12:16:14 · 207 阅读 · 0 评论 -
python替代批处理
编译环境 从官网上下载安装 python.原创 2020-02-18 01:56:31 · 624 阅读 · 0 评论 -
Python Base Usage
Cause : python简明教程(中文完整版-高清-带书签).pdf https://download.csdn.net/download/github_34103268/10207978 Install download form official site: https://www.python.org/ then install, attention that select "AD...原创 2018-11-21 17:48:31 · 269 阅读 · 0 评论 -
[python package]pyserial
refer: windows下使用python进行串口通讯 - NiYintang的博客 - CSDN博客 1.Add serial lib python-2.5 serial Download pyserial-2.5.win32.exe, such as link https://pypi.org/project/pyserial/2.5/#files .Then click to...原创 2018-12-05 17:28:02 · 355 阅读 · 0 评论 -
[python code]File check modify
import os def IsModify(FileName) : ModificationTime = os.stat(FileName).st_mtime print(ModificationTime) global DictModifyTime for key in DictModifyTime : if key == FileName and DictModifyTime...原创 2018-12-12 08:53:42 · 154 阅读 · 0 评论 -
[python package]wxPython
Install method: Is install for python 2, then goto install path C:\Python27\Scripts, then input command pip2.7 install wxPython. Waiting until install succeed. Test if installed successfull. Input i...原创 2018-12-18 11:05:37 · 464 阅读 · 0 评论