Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

fix the module import when linking to the git root instead of module

for some application I need to link to the gensim folder which is also the root of the repository. This script helps python to find the actual sourcecode of the module and had to be changed because radim moved the source within the repo
  • Loading branch information...
commit 1a27732433773b7ff71f01628063748a54013ecd 1 parent f9560e5
@dedan dedan authored
Showing with 2 additions and 2 deletions.
  1. +2 −2
@@ -1,4 +1,4 @@
# script by dedan: helps him to symlink gensim
import os
-modules_path = os.path.join('site-packages', 'gensim', 'gensim')
-__path__.append(os.path.join(os.path.dirname(os.__file__), modules_path))
+dirname = __path__[0] # Package's main folder
+__path__.insert(0, os.path.join(dirname, "gensim"))
Please sign in to comment.
Something went wrong with that request. Please try again.