debugging session dazu
This commit is contained in:
+7
-6
@@ -2,6 +2,7 @@ import argparse
|
||||
import configparser
|
||||
import ezdxf
|
||||
import os
|
||||
import sys
|
||||
|
||||
"""
|
||||
Dieses Programm:
|
||||
@@ -50,11 +51,11 @@ def get_dxf_file(filepath):
|
||||
return doc
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description='fetches positions from a dxf file', prog='get_positions')
|
||||
parser.add_argument('-f', '--filename', action='store', required=True, default="ST_6300_Steuerungstestlayout1_neueBloecke.dwg", help='which file should be fetched', metavar='file')
|
||||
parser.add_argument('-i', '--input', action='store_true', help='fetch all position of inputs', metavar='input')
|
||||
parser.add_argument('-o', '--output', action='store_true', help='fetch all positions of outputs', metavar='output')
|
||||
parser.add_argument('-r', '--rack', action='store_true', help='fetch all positions of all cable racks', metavar='output')
|
||||
parser = argparse.ArgumentParser(description='fetches the x/y positions from a dxf file', prog='getpositions')
|
||||
parser.add_argument('-f', '--filename', action='store', default="ST_6300_Steuerungstestlayout1_neueBloecke.dwg", help='which file should be fetched', metavar='myfile.dwg')
|
||||
parser.add_argument('-i', '--input', action='store_true', help='fetch all position of inputs')
|
||||
parser.add_argument('-o', '--output', action='store_true', help='fetch all positions of outputs')
|
||||
parser.add_argument('-r', '--rack', action='store_true', help='fetch all positions of all cable racks')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -62,7 +63,7 @@ if __name__ == '__main__':
|
||||
work_dir = os.environ.get('PROJECT_WORK')
|
||||
filename = args.filename
|
||||
|
||||
doc = get_dxf_file(os.path.join(out_dir, filename))
|
||||
doc = get_dxf_file(os.path.join(work_dir, filename))
|
||||
|
||||
res = dict()
|
||||
if args.input:
|
||||
|
||||
Reference in New Issue
Block a user