python / python/cpython

IDLE: Run ... Customized strips backslashes from arguments

未关闭
#93,016 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

topic-IDLE type-bug
主要语言
Python
星标
77.2k
派生
36k
PR 合并指标
PR 指标待抓取

描述

PART 1/2

Actions
In editor, do "Run... Customized"
In text box, Paste or type a valid Windows path (e.g.: c:\Users, \\server\share)
Select "OK"

Expected response:
script receives argument as entered without modification just as it does when run on the command line (e.g.: python prog.py c:\users)

Actual response:
script receives argument with backslashes treated as escape characters (e.g.: c:users, \servershare)

Workaround:
argument is not altered if entered in quotes. This is not the same behavior as the command line where quotes are accepted as part of the argument.

Part 2/2

Actions
In editor, do "Run... Customized"

Expected response:
text box is populated with previous entry, a legal windows path (e.g. `c:\Users)

Actual response:
text box is populated with previous entry mangled as above surrounded by curly braces (e.g.: {c:users}, {\serverpath}). If workaround above is used, then the string is correct, but quotes are gone and curly braces are present (e.g.: {c:\users}, {\\server\share}

System information

Windows 10 Home x86-64 (21H1 build 19043.1706)
Idle version 3.10.4

Linked PRs
  • gh-157635

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 IDLE 的 Run... Customized 工作流开始,复现 issue 中描述的 Windows 路径场景,包括已保存条目的行为。在进行更改之前,先查看链接的 PR gh-157635;完成标准是参数保留其反斜杠,并且自定义条目字段按预期保留输入的路径。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
desktop
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
描述清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。