TL;DR: AFAIK, nobody tries to use Microsoft Word for programming in Python, or programming in general, and TextEdit is dicy here at best.
slps01 wrote:
red_menace:
That's my problem: no matter how I set the preferences in the applications, the smart quotes won't go away.
There is clearly an issue with smart quotes in your configuration. The global smart quotes setting is not being honored, nor is any local setting that might exist.
Which particular application are you using to edit your Python code when this problem arises?
(As with programming in general, details matter here.)
Did the tools you are using also get restarted after the global settings were changed?
Why ask this stuff? This information will allow folks to see if there's something else going on within that particular application, and it's also because there are text tools around that just won't create text files that the Python interpreter can process — whatever you're using here is probably closer to creating a plain-text file than some, as you're noticing the smart quotes here, though. Of what you've mentioned so far, Microsoft Word is not known for its ability to create ASCII or UTF-8 text files, and TextEdit is dicy here at best as that tool is quite fond of using RTF formats.
But if it's Word or TextEdit you're using? That won't work at all well. TextWrangler (free) is a common choice for folks that prefer a GUI editor, or MacVim (free) or whatever emacs is current (also free) or other such if you'd prefer a more advanced editor. (Note: vim and emacs are much more cryptic, and much more powerful editors.) Or use the included nano editor (has an on-screen list of commands), or the integrated vim or emacs editors at the command line. There are also Python IDE packages around, as well. (Xcode doesn't support Python, though there are reports of some success with it.) These tools all work, and these tools all produce the sorts of sequential text files that the compilers and interpreters can process. In some cases, these tools also provide syntax highlighting and other features, which can be very useful when coding, too.