I use a Mac and I use Shift + Alt + / when I want to type a \
. I'm trying to learn Python and as you can see \ works fine, but not in IDLE.
How do I make backslash (\) work in IDLE?
I use a Mac and I use Shift + Alt + / when I want to type a \
. I'm trying to learn Python and as you can see \ works fine, but not in IDLE.
How do I make backslash (\) work in IDLE?
Since this problem still persists on OSX 10.8 with python 2.7.5 and 3.3.2 and since this is the first google hit when searching for backslash idle here is a more practical solution instead of copy and pasting: Go to:
idle->preferences->keys
Under Action-Keys replace:
expand-word <Option-Key-Slash>
with something you like for instance:
expand-word <Control-Option-Key-Slash>
This should fix it.
go to
idle -> preferences -> General -> default source encoding -> Locale-defined
Copy-Paste it from notepad.
or
Use command line python shell.
In IDLE, it worked with alt (option) + i.
Everyone i have an excellent solution to this problem. Go to "Terminal":
Write
Python
Now it works because it's like using IDLE just in terminal and in terminal the backslash will work perfectly fine.