0

I'm using mac osx mavericks (fully updated) and while looking for a pyscripter alternative, I decided to download CodeRunner from the app store.

I've noticed that certain programs I create in one application, don't always run the same in the other environment.

For example, there are times when I create a program using CodeRunner, but when I open the exact same program in the IDLE environment, it spits back an error. Usually complaining about the syntax or logic of the program. And the other way around can sometimes occur as well.

Is this normal behavior? Should I be saving the program in a different format? I assumed that since I'm coding in Python, the code would behave the same regardless of the environment I use.

John Zwinck
  • 239,568
  • 38
  • 324
  • 436
  • What's an example syntax error you see? At a guess, maybe the two programs have different settings for how wide a tab character is? Don't use tabs in Python. – John Zwinck Mar 29 '14 at 03:30
  • Thanks guys, you both helped a lot! There was an extra tab in one of the strings of code. Guess I'll have to watch out for that in Python. – user3462223 Mar 29 '14 at 11:15

1 Answers1

0

The different programs probably have different definitions of tabs and whitespace.In IDLE, you can use Format->Tabify/Untabify menu options to change between tabs and spaces. When you click on these menu options, you prompted for the columns per tab, which will default to 4(At least on my machine). Hope this helps!

  • 1
    The problem with your theory is that regardless of what your editor's tab settings are, the Python interpreter will execute a given script the same way. – martineau Mar 29 '14 at 07:53