Skip to content

Commit

Permalink
fixing import problem (see PEP366). refs #21
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Feb 22, 2024
1 parent 4321428 commit 3aab714
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions tools/sumolib/net/generator/corridor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
# @date 2013-10-10

from __future__ import absolute_import
import os
import sys
# relative imports don't work if a file is used as a library and executable
# (https://peps.python.org/pep-0366/#rationale-for-change)
import os, sys
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
import network # noqa


Expand Down
4 changes: 4 additions & 0 deletions tools/sumolib/net/generator/cross.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
# @date 2013-10-10

from __future__ import absolute_import
# relative imports don't work if a file is used as a library and executable
# (https://peps.python.org/pep-0366/#rationale-for-change)
import os, sys
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
import network # noqa


Expand Down
7 changes: 4 additions & 3 deletions tools/sumolib/net/generator/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
# @date 2013-10-10

from __future__ import absolute_import
import os
import sys

# relative imports don't work if a file is used as a library and executable
# (https://peps.python.org/pep-0366/#rationale-for-change)
import os, sys
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
import network # noqa


Expand Down
7 changes: 4 additions & 3 deletions tools/sumolib/net/generator/straight.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
# @date 2013-10-10

from __future__ import absolute_import
import os
import sys

# relative imports don't work if a file is used as a library and executable
# (https://peps.python.org/pep-0366/#rationale-for-change)
import os, sys
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
import network # noqa


Expand Down

0 comments on commit 3aab714

Please sign in to comment.