Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Vdebug is currently overwriting the built in 'dir' function when adding itself to the python path. Changing the name of the temporary variable fixes omni completion. #8

Merged
merged 1 commit into from

2 participants

@csomme

No description provided.

@csomme csomme Python omni completion is currently broken when Vdebug is installed.
Vdebug is currently overwriting the built in 'dir' function when adding
itself to the python path.  Changing the name of the temporary variable
fixes omni completion.
787dc72
@csomme

Hi joonty,

I'm new to github committing to a project on github, I probably should have filed an issue before submitting a pull request?

The plugin is great so far, thank you!

I noticed that once I installed Vdebug I lost python omni completion. I don't know the details of how the omni completion is implemented, but I'm guessing it relies on the 'dir' function, and it was being used as a temporary variable when you were adding the Vdebug modules to sys.path. Changing the name of that variables seems to fix everything.

@joonty joonty merged commit 3ed9194 into joonty:master
@joonty
Owner

Thanks for that, well spotted. This is the problem with ultra-dynamic languages, you can easily screw stuff up by using the wrong variables names!

I'll package it up as a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 1, 2012
  1. @csomme

    Python omni completion is currently broken when Vdebug is installed.

    csomme authored
    Vdebug is currently overwriting the built in 'dir' function when adding
    itself to the python path.  Changing the name of the temporary variable
    fixes omni completion.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 plugin/python/start_vdebug.py
View
4 plugin/python/start_vdebug.py
@@ -2,8 +2,8 @@
import os
import inspect
-dir = os.path.dirname(inspect.getfile(inspect.currentframe()))
-sys.path.append(dir)
+directory = os.path.dirname(inspect.getfile(inspect.currentframe()))
+sys.path.append(directory)
import socket
import traceback
Something went wrong with that request. Please try again.