Skip to content

Commit

Permalink
Fix paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenFrantzDale committed Apr 26, 2016
1 parent 30a3622 commit 6f7e9c0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions examples/context.py
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-

import sys
import os
import inspect
from os.path import dirname

# Add parent directory to sys.path so we find OpenFL.
sys.path.insert(0, dirname(dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))))


from OpenFL import FLP
from OpenFL import Printer
3 changes: 1 addition & 2 deletions examples/image_to_laser_moves.py
Expand Up @@ -8,6 +8,7 @@
# Add parent directory to sys.path so we find OpenFL.
sys.path.append(dirname(dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))))

from context import FLP, Printer

GERBER_EXTENSIONS = ('.gbl', '.gbs', '.gtl')

Expand Down Expand Up @@ -97,7 +98,6 @@ def __samplesToFLP(dtxypower, xymmToDac=None):
xyticks = []
import numpy as np
dtxypower = np.asarray(dtxypower)
from OpenFL import FLP
result = FLP.Packets()
result.append(FLP.TimeRemaining(int(sum(dtxypower[:,0]))))
import numpy as np
Expand Down Expand Up @@ -242,7 +242,6 @@ def image_to_flp(imagefilename, flpfilename, pixel_mm=0.1, **kwargs):

if __name__ == '__main__':
inImageFilename, outFlpFilename = sys.argv[1], sys.argv[2]
from OpenFL import Printer
p = Printer.Printer()
image_to_flp(inImageFilename, outFlpFilename,
printer=p)
1 change: 1 addition & 0 deletions tests/context.py
Expand Up @@ -8,5 +8,6 @@
# Add parent directory to sys.path so we find OpenFL.
sys.path.insert(0, dirname(dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))))


from OpenFL import FLP
from OpenFL import Printer

0 comments on commit 6f7e9c0

Please sign in to comment.