[Tutor] text processing lines variable content
ingo janssen
ingoogni at gmail.com
Thu Feb 7 04:27:09 EST 2019
On 07/02/2019 09:58, ingo janssen wrote:
>
> On 07/02/2019 09:29, Peter Otten wrote:
>> Where will you get the order from?
>
Ahrg, that should have been:
> #all output formatting options
> order = "%i %q %r %w %p %P %o %m %g %E %s %e %F %a %A %f %t %l %n %v %c %C"
> order = re.findall("%[a-z]",order,re.M|re.I)
> for i, line in enumerate(open("vorodat.vol",'r')):
> points = i
> line = line.strip()
> line = line.split(" ")
> for action in order:
> if action == "%i":
> try:
> lbl = f_label(label)
> except NameError as e:
label=[]
> lbl = f_number(label)
> elif action == "%q":
> try:
> f_vector(point)
> except NameError as e:
point = []
f_vector(point)
> elif action == "%r":
> try:
> f_value(radius)
> except NameError as e:
radius = []
> f_value(radius)
More information about the Tutor
mailing list