mirror of
https://git.mirrors.martin98.com/https://github.com/petaflot/pygcode
synced 2025-07-28 22:02:02 +08:00
removed file, it's not contributing anything
This commit is contained in:
parent
9ca819d8c6
commit
c9d141b1bf
@ -1,28 +0,0 @@
|
|||||||
from .line import Line
|
|
||||||
|
|
||||||
#from .machine import AbstractMachine
|
|
||||||
|
|
||||||
class GCodeFile(object):
|
|
||||||
def __init__(self, filename=None):
|
|
||||||
self.filename = filename
|
|
||||||
|
|
||||||
# Initialize
|
|
||||||
self.lines = []
|
|
||||||
|
|
||||||
def append(self, line):
|
|
||||||
assert isinstance(line, Line), "invalid line type"
|
|
||||||
self.lines.append(line)
|
|
||||||
|
|
||||||
|
|
||||||
class GCodeParser(object):
|
|
||||||
"""Parse a gocde file"""
|
|
||||||
def __init__(self, filename):
|
|
||||||
self.filename = filename
|
|
||||||
self._fh = open(filename, 'r')
|
|
||||||
|
|
||||||
def iterlines(self):
|
|
||||||
for line in self._fh.readlines():
|
|
||||||
yield Line(line)
|
|
||||||
|
|
||||||
def close(self):
|
|
||||||
self._fh.close()
|
|
Loading…
x
Reference in New Issue
Block a user