Python Editor Wish/Bug List

Hi All,

I have been doing a bit more python programming in Blender using the new editor. I have been experiencing some bugs and some “I wish it did this”.

I thought I’d start a thread to see if others are experencing similar problems.

I am running Blender 2.48a on windows XP SP3.

The biggest bug I have encountered is “cursor jump”. I’ll be typing along and all of a sudden the cursor has jumped to another part of my script. This is highly annoying because sometimes it does a selction before it jumps (several lines on occasion) and as I am typing, my previous code gets selected and typed over it while I am using the editor. At first, I thought, this could be a bug in the hardware of my laptop, but I also experience this on my desktop as well. Has anyone else expereinced this problem?

Minor Bugs:
Sometimes when I have a selection and I SHIFT-TAB, it will not move my text to the left. This is incredibly annoying. Because python relies on indentation, I use this feature a lot and it really sucks when it fails.

I find that the text plugins interfere with normal typing. It seems to be a problem when I type a space and then a +, the auto helper turns on and automatically picks import. Just make it work like .Net editor. Because this is so frickin annoying, I have to leave the text plugins off.

On my wish list:

Double click on a word should select it. All other programming editors do this and I am quite used to it. Let’s add it in.

CTRL-F for find should set focus to the find field in the pop-up form. Other editors do this as well. Also, if I have a word selected and press CTRL-F it should transfer that selection to the find field.

CTRL-G should pop-up a dialog box where you can type in a line #. This is standard in other editors as well. (Go to line #)

That’s my official rant, I thought I’d post here to see if others are experiencing similar issues before I craft a bug report.

I would like to see some external text editor embedded in Blender, like vim, emacs, gedit,… I don’t know how much of the code can be reused.

Also, another wish would be for the HOME/END functionality to work correctly. When you have a long line of text and the horizontal extents extends beyond the text viewport there is a problem. Click on that line. SHIFT-END will select all the text from the cursor point to the end of the line. Now press the END key again to move to the end of that selection and the editor deselects what you just selected. The opposite it true with the HOME key.

The END or HOME keys should not alter a selection when pressed by themeselves. They should only alter a selection when the SHIFT-Key combination is used.

I am going to add another anoyance to the list.

Every time (or randomly, it seems) I press the enter key in the python editor it automatically TABs in one indent level. I rarely want this to occur. If the author of this editor is going to use “smart” code to detect what I want, it needs to be a little more accurate. I only want the editor to indent when it detects an IF, FOR, WHILE statement on the line above.

Consider this code:

print "Distribution-Type:" + str(distribution_type)
print "--------------------------------"

If I move the insert caret to then of the first line, and press ENTER, the text editor will indent.
If I move the insert to the ent of the second line, and press ENTER, the text editor dose not indent.

This is not good enough for professional code work.

Not so random. The problem is the indentation seems to be based on the “:” character, but not all cases where it appears besides the beggining of loops or functions are considered.

I did report this bug, but was only corrected for the example I posted, which is when using slicing.

This was corrected:
a = b[:]

These cases and probably others still give bad indentation:
dictionary = {key:value}
valid_string = “a string can contain :”

I’d like to see syntax highlighting and a full IDE with debugging features. Maybe someday.

Er, doesn’t it already have syntax highlighting?

My one wish is for the editor to run a little faster…at least on mine, sometimes when I type fast the display lags behind. (Does this happen for anyone else?)

When you press the middle mouse button to drag the text panel around, the cursor should change into the hand icon (like Adobe apps).

Maybe there’s a way to do it already, but if not it would be nice if there was some way to see the output of the shell or console echoed in a Blender window. I know that this is really not an issue with the editor itself, but it is an issue when working with the editor.


Yes, I am constantly having to bring the console to the front when I get an error or to examine the result of some print statements. Even that little fix would be nice. Simply bring the console to the front if an error occurs.