Skip to content

Commit

Permalink
Finally created propert import
Browse files Browse the repository at this point in the history
  • Loading branch information
joequery committed Jun 3, 2012
1 parent ecac29f commit 28f6a9a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tasks/grab_feed.py
Original file line number Original file line Diff line number Diff line change
@@ -1,8 +1,10 @@
import os import os


# We're 2 away from the parent directory (PARENT/tasks/somefile.py) # Hack to import modules from a sibling directory. Ew >_>
# parentDir is just the root directory of the project.
parentDir = os.path.abspath(__file__).rsplit('/', 2)[0] parentDir = os.path.abspath(__file__).rsplit('/', 2)[0]
import sys; sys.path.insert(0, parentDir) vertDir = os.path.join(parentDir, "vertstudios")
import helpers import sys; sys.path.append(vertDir)
import helpers.rss


print(dir(helpers)) print(dir(helpers.rss))

0 comments on commit 28f6a9a

Please sign in to comment.