is there an addon for python autocomplete for the text editor?

in other programming ide’s iv seen when you type a variable name and hit . it will bring up a list of commands that can be used. like myString.find() sorry im not Familiar with all the terms.

this is what im talking about


any help would be appreciated :slight_smile:

is that the only way? nothing built in?

i guess ctrl + space brings up some options that kinda helps lol

I use eclipse and pydev, and it is well worth it. It does many things that the blender text editor can’t.
Like all new tools though, it does take getting used to.

I think pretty much every programmer hates the Blender Text Editor and only uses it for alt+P. It is even listed as “orphaned” in the Blender Module Owner List. I hope that in 2.7 or 2.8 it will get ripped out. With a little Python socket magic you could embed your favorite external editor inside Blender (well, not Pydev+Eclipse, but definitely something like IDLE).

As frequent user of python scripting I can do nothing but voice my 100% support on implementing autocomplete into the text editor (when in code highlight mode) that links to the current version of BGE API. I don’t even think it would require so much work as all the documentation is there anyway in the form of the online API reference. Is just very time consuming to navigate in alt-tab browser between KX_Scene and KX_GameObject as well as python list and string operations every time you need to check the syntax. And you can’t really learn all of them by heart such as playAction().

If you know what you are doing, you do not need code completion in that form. It is more a faster typing than “look what is available” feature.

As you seem to be at the beginning with Python, I really recommend to use a proper Python IDE (PyDev, PyCharm etc.). As external Python files precede before internal text blocks, it is very easy to use them. If you doubt about the space on your screen … you an skip the text window in Blender -> space for the IDE ;).

Most certainly from where you are standing. Practically everyone is. But please, I can currently do whatever I can imagine with BGE using python scripts and learning to use python more efficiently is only secondary to my interests.

One of the BGE advantages for me is the uninterrupted workflow inside Blender. If that is broken by something as silly as not being able to implement autocomplete for the internal API then I consider that a rather big shortcoming. In the meantime I rather try to master the syntax of most used methods and check online once in a while instead of keeping another window floating about and copy pasting text around all the time. Even if doing the latter granted me the title of not being “python beginner”.

Moreover I don’t want to be expert in python, I want to be expert on BGE. Would Python IDEs be able to link to current version of BGE API with classes such as KX_GameObject and their methods and variables?

It wouldn’t save you time.
If you are a BGE expert, you know the API so well that you don’t need auto-completion.
If you are a Python expert, you will catch your typos so fast that auto-completion helps only a little.
If you are not a Python expert nor a BGE expert, then you will spend most of your time thinking about your code, not typing.

There is no need to paste code over from one window to the other.

You simply tell your game where to find the python files. You can find more information in the guides of my signature.

I’m sorry but I can’t agree with that.
I work as a software developer (.NET, not Python) and I use code completion a lot, all the time.
Type the first few letters of your variablename, hit ctrl+space -> tab and you have your super long variable name in the editor. Even lower / upper case letters doesn’t matter in a good IDE.
For my style of coding code completion saves me a lot of time.

Especially with python which is case sensitive it takes a long time to memorize all the variable names especially those seldomly used.

If you know all the bge.logic constants by heart than kudos to you.

OK, you got me :slight_smile:
I am not claiming to be a BGE expert, and I never use bge.logic constants, always working with KX_GameObject directly.

Why bother wasting development resources on a clunky, frustrating text editor when there are way better options available (e.g., Eclipse)? The autocomplete for bpy probably works using introspection, which requires that you have the module available. However, the bge module is only available while running in the BGE. Therefore, you’d have to come up with another way to do the autocompletion for the bge module. Developing this type of stuff takes time, and a developer willing to actually work on it. I’d rather that developer and time were put to use elsewhere. However, if this is something you truly want, we do accept patches (i.e., you can spend your own time).

+1 :yes: Scarcity of manpower, human resource is so precious at the moment.

I decided it may be interesting to some people to see my system for developing games in blender. So if you’re bored or want ideas, read on.


Until a bug with my graphics drivers meant I couldn’t run games or anything graphics intensive on my linux partition (I am fixing it), I used a tiling window manager when coding in blender, meaning that my screen looks like:



This is i3wm (sorry, linux only) managing the desktop, takes a lot of getting used to, but this set up allows a lot of good stuff:

  • Moving the mouse over one window or the other changes to it. So no clicking windows when shifting between them. This makes Eclipse/pydev seem more like part of the native blender interface
  • No window overlap. The very thing that blender avoids by using it’s own internal management system. On this screen I have blender, the editor and the console. Everything I need for most development without having to change windows/desktops or have a big monitor.
  • However I do have more desktops. On desktop #2 (switched to using the key combination win+2) I have:


    Yup, the API. I still need it, and use it frequently. I also have my own private bug tracker: a text editor on which I write down issues and delete them when they’re fixed.
    If I’m just starting a project (unlike Neon ball, which these shots are of, and is now in finished game forum), then there will be two text editors, one containing the game plan, exactly what the game will be and when it will be considered finished (trust me, that last bit is the hardest part. When is it good enough?).

Even on my windows partition I use a similar set up (using virtuawin for multiple desktops), but using IDLE, and not having everything as neatly aligned. Also, did you ever realize how big the task bar is? It’s HUGE, like 8% of the screen! Add that to the window borders, and you’ve lost a huge chunk of (my laptops) small screen. Good thing I’ve nearly finished configuring my new Ubuntu partition.

im thinking there are other programs out there that do what blender does better so why add those featchers to blender? im thinking the idea of wanting a better python editor in blender is so blender is a all in one kind of app to make the work flow smoother and faster. any improvement is a improvement. :slight_smile:

What is the difference between an external program and an addon? In my mind, not much except that the one is integrated. As described in the above post, I integrate them together using my computers window management software, so that they act like a single program.

I think if you are serious going into Python coding a specific IDE is the way to go as it’s focus is to support you for exactly that purpose.

If you want to do a little bit of code you can use the text editor which is for small files sufficient enough.

What is the difference in workflow?

with IDE: you need to keep the code as files outside of the .blend
with Texteditor: you need to keep the code in as text block inside the blend.

with IDE:

  • focus the IDE application (e.g. click at the IDE’s window)
  • change the code
  • save the file
  • focus Blender
  • mouse over 3D window
  • <P>
    with Texteditor:
  • mouse over text editor
  • change the code
  • mouse over 3D window
  • <P>

It seems there are more steps with the IDE, but really it is minor. Dependent on your OS you might even switch on auto focus, which skips the focus steps.

An IDE usually offers much better supports larger text and multiple files then the texteditor.
With some effort you can even debug your Python code.

I strongly agree that autocompletion, for both python and bge API, would be highly desiderable in the blender editor environment.
The demand is not new, and solutions have been proposed in more or less recent past:
http://www.blendernation.com/2010/07/21/blender-python-bindings-for-notepad/
http://wiki.blender.org/index.php/Doc:2.4/Tutorials/Extensions/Python/Editors/SPE

What could be interesting if someone makes a file where you can use the blender Python lib as reference for your IDE instead of the standard PYTHON33 path. For example with eclipse you need to fix the path for pydev and for visual studio you need to find the python.exe file.