View Single Post
  #5  
Old 02-06-2019, 10:55 AM
fivel_lab fivel_lab is offline
Member
 
Join Date: Mar 2011
Posts: 36
Sure!

Directory structure is set up like this:

Code:
FIVEL/                       top-level enclosing folder
          fvl/                        package
              __init__.py                     package initalization
              likertScaleObj.py                  example package module(s)
          VRproject/                         project directory
              F18/
                    F18.py                    last semester's version of the exp
              S19/
                   S19.py                    current semester's version
the code in S19.py ::::
Code:
import sys
import os
import os.path as path

sys.path.insert(0, path.dirname(path.dirname(path.dirname(__file__))))

#confirm path info with print statements
print path.dirname(__file__)
print path.dirname(path.dirname(__file__))
print path.dirname(path.dirname(path.dirname(__file__)))
print sys.path
print os.listdir(path.dirname(path.dirname(path.dirname(__file__))))

import fvl #no error
but.. after that no magic autocomplete

thanks!
Reply With Quote