|
@@ -1,18 +1,19 @@
|
|
#!/usr/bin/env python
|
|
#!/usr/bin/env python
|
|
|
|
|
|
-from fileinput import input
|
|
|
|
|
|
+#from fileinput \
|
|
|
|
+import fileinput
|
|
|
|
|
|
|
|
|
|
def printpoint(b):
|
|
def printpoint(b):
|
|
print(b)
|
|
print(b)
|
|
obj = dict(zip(b[::2], b[1::2]))
|
|
obj = dict(zip(b[::2], b[1::2]))
|
|
if obj['0'] == 'AcDbMText':
|
|
if obj['0'] == 'AcDbMText':
|
|
- print('{}'.format(obj['100']))
|
|
|
|
|
|
+ print('{}'.format(obj['0']))
|
|
|
|
|
|
|
|
|
|
print('Code','Text')# header line
|
|
print('Code','Text')# header line
|
|
buffer = ['0', 'fake'] # give first pass through loop something to process
|
|
buffer = ['0', 'fake'] # give first pass through loop something to process
|
|
-for line in input("GV_12.DXF"):
|
|
|
|
|
|
+for line in fileinput.input("GV_12.DXF", errors="replace"):
|
|
line = line.rstrip()
|
|
line = line.rstrip()
|
|
print(line)
|
|
print(line)
|
|
if line == '0': # we've started a new section, so
|
|
if line == '0': # we've started a new section, so
|