First time here? Check out the FAQ!
1

Pasting filenames into editor

Is there a good way to paste file and path names? I have always been copying from Windows explorer via "Copy as path", pasting into Wing and adding an 'r'.

E.g.

r"C:\Program Files\Wing Pro 11\bin\wing.exe"

This is awkward and has e.g. problems when you have a path like "...\U...". Is there a keyboard shortcut or e.g. a modifier key to drag a file to an editor window to insert the path with double backslashes? Alternatively, is there a Wing script?

Dietmar Schwertberger's avatar
33
Dietmar Schwertberger
asked 2026-06-23 19:03:36 +0000
Wingware Support's avatar
4.3k
Wingware Support
updated 2026-06-23 21:53:33 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

There's no paste-filename sort of command or script that I know of, but I'm not seeing how typing r"|" and pasting a filename into there at the | would ever be a problem. \U in a raw string is \U, right?

>>> x = r'\Test\Use'
>>> print(x)
\Test\Use

Not sure if I'm misunderstanding something...

Wingware Support's avatar
4.3k
Wingware Support
answered 2026-06-24 00:29:17 +0000
edit flag offensive 0 remove flag delete link

Comments

Yes, you're right. ISTR there were these problems, but probably only with old Python versions. I will make the switch to r-strings. Only a backslash at the end of an r-string is still odd.

Dietmar Schwertberger's avatar Dietmar Schwertberger (2026-06-25 20:20:20 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer