原博文
2020-04-08 17:56 −
在Windows操作系统下默认使用Python自带的IDLE编辑器打开后缀名为.py的文件。
1. win+R打开运行
2. 输入regedit,确定
3. 在打开的注册表中找到以下目录:HKEY_CLASSES-ROOT->Python.file->shell->open->command
4. ...
相关推荐
2019-12-20 14:46 −
IDLE中常用的快捷键
https://www.cnblogs.com/rollenholt/archive/2013/12/03/3456259.html
加缩进
Ctrl+]
减缩进
Ctrl+[
加注释
Alt+3
去注释
Alt+4
上一条命令
Alt+p
下一条命...
2019-12-12 11:02 −
我们经常在python的模块目录中会看到 "__init__.py" 这个文件,那么它到底有什么作用呢?
1. 标识该目录是一个python的模块包(module package)
如果你是使用python的相关IDE来进行开发,那么如果目录中存在该文件,该目录就会被识别...
2019-12-05 15:53 −
```python
# https://github.com/confluentinc/confluent-kafka-python/blob/master/examples/consumer.py
#生产者
import json
from kafka import KafkaProducer
f...
2019-12-05 08:13 −
作为 pprint 模块的替代方案(json.dumps)
# `dict` 的标准字符串 `repr` 很难阅读:
>>> my_mapping = {'a': 23, 'b': 42, 'c': 0xc0ffee}
>>> my_mapping
{'b': ...
2019-12-19 14:53 −
1、执行test文件夹下的testA和testB
import os
path = "/Users/ddc-test/Downloads/pycharm/test"
lst = os.listdir(path)
for c in lst: if c.endswith('.py') and c...
2019-12-05 15:55 −
其实很简单,用python -m py_compile file.py
python -m py_compile /root/src/{file1,file2}.py编译成pyc文件。也可以写份脚本来做这事:Code:
import py_compile py_compile.co...
2019-12-06 14:58 −
- 采用pathlib库 ```python from pathlib import Path Path(__file__).name ```...
0
1685
2019-12-18 16:21 −
在安装 Python 后,会自动安装一个 IDLE,它是一个 Python Shell (可以在打开的 IDLE 窗口的标题栏上看到),程序开发人员可以利用 Python Shell 与 Python 交互。本节将以 Windows7 系统中的 IDLE 为例...
0
1401
2019-12-06 01:04 −
安装pyinstaller包
pip3 install pyinstaller
如果不行
pip3 install pyinstaller -i https://pypi.doubanio.com/simple
准备一个你要打包的.py文件,cd到该文件路径下,打开cmd
在命令行中输入:
...
2019-12-02 15:17 −
The jaw crusher is a large machine,and it needs lubrication to reduce the abrasion of the spare parts and daily rusty. When the crushing machine used ...