PDA

View Full Version : Whitespace as the default indentation


jincheker
10-26-2009, 10:55 PM
Can I use space as the default indentation in vizard?

farshizzo
10-27-2009, 11:28 AM
No, this option is not currently available.

jincheker
10-27-2009, 07:38 PM
Or can I replace the whitespace indentation with tab? because some of my old code is done by using whitespace. Is there some software that can do this?

IGoudt
10-27-2009, 11:16 PM
Python can behave annoying sometimes when it comes to mixed indentation with tabs and spaces. Especially in the Vizard environment this can be stressing, I have 2 solutions for this:

1: Use Eclipse (or another IDE tool) to create your code and then run the code with vizard. (If you use the search you can check how to use Vizard inside Eclipse)

2: copy the code with the wrong indentation to notepad, there you can remove all the tabs and whitespaces, then copy the plaintext to the vizard IDE and all the indentation should be gone so you can rebuild it properly

jincheker
10-29-2009, 08:18 AM
Python can behave annoying sometimes when it comes to mixed indentation with tabs and spaces. Especially in the Vizard environment this can be stressing, I have 2 solutions for this:

1: Use Eclipse (or another IDE tool) to create your code and then run the code with vizard. (If you use the search you can check how to use Vizard inside Eclipse)

2: copy the code with the wrong indentation to notepad, there you can remove all the tabs and whitespaces, then copy the plaintext to the vizard IDE and all the indentation should be gone so you can rebuild it properly

Thank you very much

Jeff
10-30-2009, 11:50 AM
You can replace all the the indentation with tabs in the Vizard GUI. Select your code and then hit ALT+t or under edit select tabify region.