Skip to content

Commit

Permalink
fix the module import when linking to the git root instead of module
Browse files Browse the repository at this point in the history
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
dedan committed Jun 27, 2011
1 parent f9560e5 commit 1a27732
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __init__.py
@@ -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"))

0 comments on commit 1a27732

Please sign in to comment.