← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #174609]: X-1.0rc3: IDE: Indentation issue with rc2 script --- set tab-width in Preferences

 

Question #174609 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/174609

RaiMan proposed the following answer:
Thanks for confirming.

--- So finally we have this:

-indentation tabs are not handled at the time a script is loaded, only
when editing a script in the IDE. Or more generally: when loading a
script, indentation is not normalized according to the current settings
in the IDE's preferences.

- So you might come up, with a situation like yours, that a loaded
script does not conform to the current tab settings and things get
messed up, when you start editing.

- A workaround would be, to change all tabs to the required spaces in a
capable editor directly in the .py files with search-and-replace.

--- comment on your second video
When using Python language in any editor, that handles tabs, to show some defined indentation in the editor window, you should always stick to one of these 2 method2:
- use tabs as is (real tabs)
- let the editor automatically change a tab to e.g. 4 spaces

The second version is the one to prefer, since you will never have any
problems in any other editor.

For a Python interpreter is only relevant, what is really in a source
file, not what you can see in the editor window. So take care, that you
know, what will be in the source file, if you do something with
indentation in the editor.

I will turn this question into a request bug accordingly.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.