VoxCommando
Help and Support (Using VoxCommando) => Python Scripting => Topic started by: vulcanjedi on April 30, 2014, 01:21:11 PM
-
Not sure what to call it, but the python tester part of the PY plugin
http://voxcommando.com/mediawiki/index.php?title=Python (http://voxcommando.com/mediawiki/index.php?title=Python)
This is cool in app quick tester. I know its not meant to be an IDE, but w/ python being case/indent sensitive, can the tab key but used in there to indent versus change object focus?
-
Perhaps in a future version. For now I recommend you actually do your editing using notepad++.
I also recommend that you never, ever, EVER use actual tabs when writing python code. You should only indent your code using spaces.
Notepad++ can be set up so that when you press tab it inserts spaces instead, which is what I will do in the plugin if I ever get around to it.
-
Interesting, haven't encountered re spaces vs tab. I will make note, thanks!
Perhaps in a future version. For now I recommend you actually do your editing using notepad++.
I also recommend that you never, ever, EVER use actual tabs when writing python code. You should only indent your code using spaces.
Notepad++ can be set up so that when you press tab it inserts spaces instead, which is what I will do in the plugin if I ever get around to it.
-
It is actually OK to use tabs, but what inevitably seems to happen is that you end up with a mix of spaces and tabs, and then poof... errors... It looks like it is perfectly indented but python throws errors because it sees 4 spaces differently from how it sees 1 tab. The only reliable way I have found to always avoid this problem is to set notepad++ to only use spaces.
-
Here is an hilarious quote. It is not an argument in favour of spaces, but it makes me happy.
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out. -- Georg Brandl
If you want to read about a gajillion arguments for both sides including this quote, follow this link: http://stackoverflow.com/questions/119562/tabs-versus-spaces-in-python-programming/6338054#6338054?newreg=fed867ffb63c4a93b7d8c7b32b4dc671
-
Not sure what to call it, but the python tester part of the PY plugin
http://voxcommando.com/mediawiki/index.php?title=Python (http://voxcommando.com/mediawiki/index.php?title=Python)
This is cool in app quick tester. I know its not meant to be an IDE, but w/ python being case/indent sensitive, can the tab key but used in there to indent versus change object focus?
Behold. Version 2.0.0.0 has a new python editor. :D
http://voxcommando.com/forum/index.php?topic=1443.0
http://voxcommando.com/mediawiki/index.php?title=ChangeLog#Version_2_official_release
-
and it is fabulous - thanks