python / python/cpython

IDLE: Run ... Customized strips backslashes from arguments

Open
#93,016 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic-IDLE type-bug
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with IDLE's Run... Customized workflow and reproduce the Windows path cases described in the issue, including the saved-entry behavior. Review linked PR gh-157635 before making changes; done means arguments retain their backslashes and the customized-entry field preserves the entered path as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.