Relative imports
Chris
chris.monnet at gmail.com
Sat Mar 5 10:08:43 EST 2005
After reading that link I tried to change my imports like this:
" from .myPythonFileInTheSameFolder import MyClass"
Well, this caused an error in PyLint:
Encountered "." at line 1, column 6. Was expecting one of: "or" ...
"and" ... "not" ... "is" ... "in" ... "lambda" ...
"if" ... "else" ... "elif" ... "while" ... "for" ...
"try" ... "except" ... "def" ... "class" ...
"finally" ... "print" ... "pass" ... "break" ...
"continue" ... "return" ... "yield" ... "import" ...
"from" ... "del" ... "raise" ... "global" ... "exec"
... "assert" ... "as" ... <NAME> ...
ID:E0001 invalid syntax
I'm getting more and more confused...
How can I correctly do a relative import ?
More information about the Python-list
mailing list