diff options
author | Paulo Henrique Silva <ph.silva@gmail.com> | 2015-02-18 13:29:38 -0200 |
---|---|---|
committer | Paulo Henrique Silva <ph.silva@gmail.com> | 2015-02-18 13:29:38 -0200 |
commit | ca5044224c4d7805fadc07574529323c10301fa3 (patch) | |
tree | 378b5fc7aa9fb1fe179c75cdbeaa14778450db4a /gerber | |
parent | ae19376c40ac6edf3b97e9b47acac81386cd3fe9 (diff) | |
parent | ed7d9ceb349f405ca40f43835a5fd6fc1beed98b (diff) | |
download | gerbonara-ca5044224c4d7805fadc07574529323c10301fa3.tar.gz gerbonara-ca5044224c4d7805fadc07574529323c10301fa3.tar.bz2 gerbonara-ca5044224c4d7805fadc07574529323c10301fa3.zip |
Merge pull request #16 from pklaus/relative-imports
Fixing more relative import statements
Diffstat (limited to 'gerber')
-rw-r--r-- | gerber/__main__.py | 6 | ||||
-rw-r--r-- | gerber/common.py | 6 | ||||
-rw-r--r-- | gerber/render/__init__.py | 4 | ||||
-rw-r--r-- | gerber/tests/test_cam.py | 2 | ||||
-rw-r--r-- | gerber/tests/test_common.py | 2 | ||||
-rw-r--r-- | gerber/tests/test_primitives.py | 2 | ||||
-rw-r--r-- | gerber/tests/test_rs274x.py | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/gerber/__main__.py b/gerber/__main__.py index 8f20212..a792182 100644 --- a/gerber/__main__.py +++ b/gerber/__main__.py @@ -16,8 +16,8 @@ # the License. if __name__ == '__main__': - from .common import read - from .render import GerberSvgContext + from gerber.common import read + from gerber.render import GerberSvgContext import sys if len(sys.argv) < 2: @@ -27,7 +27,7 @@ if __name__ == '__main__': ctx = GerberSvgContext() ctx.alpha = 0.95 for filename in sys.argv[1:]: - print "parsing %s" % filename + print("parsing %s" % filename) if 'GTO' in filename or 'GBO' in filename: ctx.color = (1, 1, 1) ctx.alpha = 0.8 diff --git a/gerber/common.py b/gerber/common.py index 83e3cb0..78da2cd 100644 --- a/gerber/common.py +++ b/gerber/common.py @@ -30,9 +30,9 @@ def read(filename): CncFile object representing the file, either GerberFile or ExcellonFile. Returns None if file is not an Excellon or Gerber file. """ - import rs274x - import excellon - from utils import detect_file_format + from . import rs274x + from . import excellon + from .utils import detect_file_format fmt = detect_file_format(filename) if fmt == 'rs274x': return rs274x.read(filename) diff --git a/gerber/render/__init__.py b/gerber/render/__init__.py index b4af4ad..1e60792 100644 --- a/gerber/render/__init__.py +++ b/gerber/render/__init__.py @@ -24,5 +24,5 @@ SVG is the only supported format. """ -from svgwrite_backend import GerberSvgContext -from cairo_backend import GerberCairoContext +from .svgwrite_backend import GerberSvgContext +from .cairo_backend import GerberCairoContext diff --git a/gerber/tests/test_cam.py b/gerber/tests/test_cam.py index 6296cc9..00a8285 100644 --- a/gerber/tests/test_cam.py +++ b/gerber/tests/test_cam.py @@ -4,7 +4,7 @@ # Author: Hamilton Kibbe <ham@hamiltonkib.be> from ..cam import CamFile, FileSettings -from tests import * +from .tests import * def test_filesettings_defaults(): diff --git a/gerber/tests/test_common.py b/gerber/tests/test_common.py index bf9760a..76e3991 100644 --- a/gerber/tests/test_common.py +++ b/gerber/tests/test_common.py @@ -5,7 +5,7 @@ from ..common import read from ..excellon import ExcellonFile from ..rs274x import GerberFile -from tests import * +from .tests import * import os diff --git a/gerber/tests/test_primitives.py b/gerber/tests/test_primitives.py index cada6d4..dab0225 100644 --- a/gerber/tests/test_primitives.py +++ b/gerber/tests/test_primitives.py @@ -3,7 +3,7 @@ # Author: Hamilton Kibbe <ham@hamiltonkib.be> from ..primitives import * -from tests import * +from .tests import * def test_primitive_implementation_warning(): diff --git a/gerber/tests/test_rs274x.py b/gerber/tests/test_rs274x.py index 27f6f49..5185fa1 100644 --- a/gerber/tests/test_rs274x.py +++ b/gerber/tests/test_rs274x.py @@ -5,7 +5,7 @@ import os from ..rs274x import read, GerberFile -from tests import * +from .tests import * TOP_COPPER_FILE = os.path.join(os.path.dirname(__file__), |