J
J
JRazor2014-03-04 20:55:34
Python
JRazor, 2014-03-04 20:55:34

Python: how to import a module one level up?

Hello. I want to ask a question (I can't answer it because I don't remember where to dig).
Let's say there is a folder. It contains the run and setting files. This folder has a modules subfolder, which contains the modules executable by run and __init__.py. Connoisseurs, attention, the question is: how can I import setting.py from modules without using sys and os?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nochkin, 2014-03-05
@nochkin

from modules import settings

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question