I just tried this example, since anaconda-mode + company (which uses jedi) has been really good for me, it doesn't show variable1 for me.
I used to use the auto-complete package instead, which in some configs (with ac-source-words-in-buffer or ac-source-words-in-same-mode-buffers in the source list) basically tokenize the buffer and provide autocomplete on all words.