Question

I think I am in a world of hurt right now. I have written a script in Eclpse. This is the first time I've used it. Because I work in ArcGIS a lot, I learned how to script using IDLE. I made the switch to Eclipse on the recommendation of a coworker and I love the environment, however, I've done something to my script that is messing up the indentation and to eb hoenst, I don't know how I did it. I get this weird behavior.

In Eclipse, I receive an error "inconsistent Indent at line....". It's weird, because that specific line appears to be in the right indented spot.

I will open the script in IDLE and the line appears to be in a different indented location than what I see in Eclipse. This would explain the error, but it doesn't explain why the line appears indented in one IDE and not in the other.

I think I learned that it has something to do with the space-tab, tab-space option under 'Source' in Eclipse and the Tabify/Untabify option under 'Format' in IDLE. I try to fix it in one IDE, but then it either tabs too much or too little in the other. I'm at a loss. I think I havea mix tab/space thing going on and I want to fix it so that isn't happening. Does this sound like what my problem is? How do I fix it? How do I set Eclipse so that when this error comes up, the line is displaying the indentation in the wrong location so that I can identify why this error is coming up?

Was it helpful?

Solution

IDEs have an option to replace tab char with spaces and another option to indent by 'n' chars per tab (whether it will be replaced by spaces or not). It sounds like your IDEs have different settings for these.

If you configure both IDEs to do the same thing for tab replacement and indent, then retabify the source once, you should be OK.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top