原创...大约 56 分钟
Text Alignment in Python is useful for printing out clean formatted output. Some times the data to be printed varies in length which makes it look messy when printed. By using String Alignment the output string can be aligned by defining the alignment as left, right or center and also defining space (width) to reserve for the string.
原创...大约 3 分钟
关闭 Python Console 运行模式
你好,我是悦创。
相关信息
我是在写代码的过程中,无意间打开这个模式的,但是真的很烦。
在 Python 里 run 的时候突然会发现,进入的不是 run 模式,而是 console 模式,这种运行模式能保留你每次的运行历史,因为会重开一个运行小页面,对于强迫症来说,甚是不爽啊,比如 🔽
Python console 运行模式如下:
原创...大约 2 分钟
1. 按照下面路径以此打开
2. 设置相关代码
##!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time : ${DATE} ${TIME}
# @Author : AI悦创
# @FileName: ${NAME}.py
# @Software: ${PRODUCT_NAME}
# @Blog :https://bornforthis.cn/
原创...大约 2 分钟
你好,我是悦创。
本来一直打开 terminal,会直接进入对应的虚拟环境,直到有一天更新 pycharm 后,发现打开 terminal 后直接进入了 base 环境,每次都要手动 activate 一下,比较麻烦仔细观察才发现,terminal 使用了 windows 的powershell,如下图所示:
解决办法:
Settings --> Tools --> Terminal --> Shell Path,将 powershell 修改为 cmd.exe
,如下图所示:
原创...大约 2 分钟