python - 粘贴到 cmd/powershell 会截掉第一个字母

标签 python powershell cmd sublimetext3

我只是尝试将一些导入粘贴到 python shell 中,但第一个字母被“忽略”。

enter image description here

你可以看到我尝试了 python 和 powershell,由于某种原因 PS 吃掉了 2 到 3 个字母。 当然,我在 python 上遇到语法错误,所以它不可见。

将其粘贴到 sublime 不会剪切掉任何字母。

最佳答案

您是通过哪个程序制作副本的?

您正在尝试哪个版本的 Powershell?

您的“复制和粘贴”中可能有一些空格或制表符吗?

test = '''
import numpy
import time
import datetime
import os
import sys
import random
import threading
'''

在 Pycharm 中尝试,然后在 Powershell 中复制:

enter image description here

Powershell 版本为 5.1.17763.316

您可以通过以下方式找到您的版本:

$psversiontable

关于python - 粘贴到 cmd/powershell 会截掉第一个字母,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55195564/

相关文章:

powershell - 批处理 - 运行循环命令时最小化窗口(不开始最小化)

powershell - 替换Word文件中页眉、页脚中的特定文本和普通文本

java - 如何方便终端用户启动Java GUI程序

batch-file - 检查 cmd shell 中的两个变量是否指向同一个文件夹的可靠方法

windows - 使用 Windows 命令 shell 创建多个文件

python - Pandas 条件格式不显示背景颜色。 (没有错误)

Python RandomForest - 未知标签错误

python - string.find 在 CPython 中是如何实现的?

Powershell非终止错误并尝试catch block

python - 如何覆盖子类中的类变量?