So I have some code that basically takes a file given with 4 points taken from a rotoscoped scene and spits out an output of information in the form of a list

Original File Format

Frame 1(Point(x,y,z,w,s),Point(x,y,z,w,s),Point(x,y,z,w,s),Point(x,y,z,w,s))
Frame 2(Point(x,y,z,w,s),Point(x,y,z,w,s),Point(x,y,z,w,s),Point(x,y,z,w,s))
Frame 3(Point(x,y,z,w,s),Point(x,y,z,w,s),Point(x,y,z,w,s),Point(x,y,z,w,s))
Frame 4(Point(x,y,z,w,s),Point(x,y,z,w,s),Point(x,y,z,w,s),Point(x,y,z,w,s))
Frame 5(Point(x,y,z,w,s),Point(x,y,z,w,s),Point(x,y,z,w,s),Point(x,y,z,w,s))
Frame 6(Point(x,y,z,w,s),Point(x,y,z,w,s),Point(x,y,z,w,s),Point(x,y,z,w,s))

Output
============
Frame 1
(x,y,z,w,s)
(x,y,z,w,s)
(x,y,z,w,s)
(x,y,z,w,s)
============
Frame 2
(x,y,z,w,s)
(x,y,z,w,s)
(x,y,z,w,s)
(x,y,z,w,s)
============
Frame 3
(x,y,z,w,s)
(x,y,z,w,s)
(x,y,z,w,s)
(x,y,z,w,s)

ETC

What I want to accomplish is the ability to separate each "X" each "Y" each "Z" each "W" and each "S" and give them a name so I can use them dynamically to make a vector that translates across a scene. Can anyone help me out?

Here is my code:

import re


data_directory = 'Z:/Blender_Roto/'
data_file = 'diving_board.shape4ae'
fullpath = data_directory + data_file

print("====init=====")

file = open(fullpath)
for line in file:
    current_line = line

    # massive room for optimized code here.

    # this assumes the last element of the line containing the words
    # "Units Per Second" is the number we are looking for.
    # this is a non float number, generally.
    if current_line.find("Units Per Second") != -1:
        fps = line_split = float(current_line.split()[-1])
        print("Frames Per Second:", fps)

    # source dimensions
    if current_line.find("Source Width") != -1:
        source_width = line_split = int(current_line.split()[-1])
        print("Source Width:", source_width)

    if current_line.find("Source Height") != -1:
        source_height = line_split = int(current_line.split()[-1])
        print("Source Height:", source_height)

    # aspect ratios
    if current_line.find("Source Pixel Aspect Ratio") != -1:
        source_px_aspect = line_split = int(current_line.split()[-1])
        print("Source Pixel Aspect Ratio:", source_px_aspect)

    if current_line.find("Comp Pixel Aspect Ratio") != -1:
        comp_aspect = line_split = int(current_line.split()[-1])
        print("Comp Pixel Aspect Ratio:", comp_aspect)



    # assumption, ae file can contain multiple mocha shapes.
    # without knowing the exact format i will limit the script
    # to deal with one mocha shape being animated N frames.

    # this gathers the shape details, and frame number but does not
    # include error checking yet.
    if current_line.find("XSpline") != -1:

        # record the frame number.

        frame = re.search("\s*(\d*)\s*XSpline", current_line)
        if frame.group(1) != None:
            frame = frame.group(1)
            print("frame:", frame)


        # pick part the part of the line that deals with geometry
        match = re.search("XSpline\((.+)\)\n", current_line)

        line_to_strip = match.group(1)
        points = re.findall('(\(.*?\))', line_to_strip)

        print(len(points))
        for point in points:
            print(point)
        print("="*40)

file.close()

and this outputs

====init=====
Frames Per Second: 24.0
Source Width: 2048
Source Height: 778
Source Pixel Aspect Ratio: 1
Comp Pixel Aspect Ratio: 1
frame: 0
6
(0.424755,1.05673,0,0.5,0.25)
(0.488942,1.06818,0,0.5,0.487698)
(0.429254,0.709884,0,0.5,0.25495)
(0.394548,0.576839,0,0.5,0.25)
(0.343352,0.565635,0,0.5,0)
(0.394073,0.926784,0,0.5,0.25)
========================================
frame: 1
6
(0.427972,1.07437,0,0.5,0.25)
(0.488347,1.07664,0,0.5,0.457986)
(0.425092,0.708505,0,0.5,0.254331)
(0.39459,0.576418,0,0.5,0.25)
(0.348077,0.599488,0,0.5,0.03125)
(0.395236,0.929091,0,0.5,0.25)
========================================
frame: 2
6
(0.429863,1.08776,0,0.5,0.25)
(0.484138,1.06008,0,0.5,0.428274)
(0.428652,0.758054,0,0.5,0.253713)
(0.404264,0.649867,0,0.5,0.25)
(0.357361,0.670674,0,0.5,0.0625)
(0.396596,0.937845,0,0.5,0.25)
========================================
frame: 3
6
(0.426959,1.08166,0,0.5,0.25)
(0.483668,1.07929,0,0.5,0.398562)
(0.433868,0.807004,0,0.5,0.253094)
(0.409762,0.691204,0,0.5,0.25)
(0.362965,0.717345,0,0.5,0.09375)
(0.393897,0.920012,0,0.5,0.25)
========================================
frame: 4
6
(0.426146,1.07289,0,0.5,0.161659)
(0.47871,1.07195,0,0.5,0.260458)
(0.444832,0.879519,0,0.5,0.252475)
(0.414274,0.731209,0,0.5,0.25)
(0.369364,0.762621,0,0.5,0.125)
(0.394333,0.922128,0,0.5,0.25)
========================================
frame: 5
6
(0.426758,1.08361,0,0.5,0.183745)
(0.478424,1.07588,0,0.5,0.257843)
(0.447372,0.906128,0,0.5,0.251856)
(0.418506,0.762148,0,0.5,0.25)
(0.372146,0.786164,0,0.5,0.15625)
(0.395536,0.927029,0,0.5,0.25)
========================================
frame: 6
6
(0.426683,1.08874,0,0.5,0.20583)
(0.47847,1.08166,0,0.5,0.255229)
(0.444406,0.900484,0,0.5,0.251238)
(0.421487,0.789611,0,0.5,0.25)
(0.37457,0.810139,0,0.5,0.1875)
(0.395231,0.924527,0,0.5,0.25)
========================================
frame: 7
6
(0.428735,1.09635,0,0.5,0.227915)
(0.479381,1.08748,0,0.5,0.252614)
(0.443189,0.905948,0,0.5,0.250619)
(0.423993,0.819708,0,0.5,0.25)
(0.374552,0.8256,0,0.5,0.21875)
(0.395494,0.928045,0,0.5,0.25)
========================================
frame: 8
6
(0.428384,1.1039,0,0.5,0.25)
(0.478622,1.08594,0,0.5,0.25)
(0.44429,0.911525,0,0.5,0.25)
(0.424091,0.831589,0,0.5,0.25)
(0.373933,0.83873,0,0.5,0.25)
(0.401264,0.971814,0,0.5,0.25)
========================================
frame: 9
6
(0.428253,1.10663,0,0.5,0.25)
(0.479155,1.09211,0,0.5,0.25)
(0.44265,0.908559,0,0.5,0.25)
(0.424385,0.840949,0,0.5,0.25)
(0.374437,0.848732,0,0.5,0.25)
(0.400895,0.978338,0,0.5,0.25)
========================================
frame: 10
6
(0.427448,1.1093,0,0.5,0.25)
(0.479324,1.09477,0,0.5,0.25)
(0.44359,0.913367,0,0.5,0.25)
(0.423895,0.844916,0,0.5,0.25)
(0.375752,0.861746,0,0.5,0.25)
(0.397559,0.973451,0,0.5,0.25)
========================================
frame: 11
6
(0.426787,1.11002,0,0.5,0.25)
(0.479093,1.09554,0,0.5,0.25)
(0.44267,0.908492,0,0.5,0.25)
(0.423669,0.852551,0,0.5,0.25)
(0.376826,0.869851,0,0.5,0.25)
(0.394941,0.966682,0,0.5,0.25)
========================================
frame: 12
6
(0.427276,1.11542,0,0.5,0.25)
(0.479218,1.09826,0,0.5,0.25)
(0.442834,0.911055,0,0.5,0.25)
(0.4261,0.864529,0,0.5,0.25)
(0.379311,0.882589,0,0.5,0.25)
(0.398635,0.983471,0,0.5,0.25)
========================================
frame: 13
6
(0.427252,1.11778,0,0.5,0.25)
(0.479944,1.10106,0,0.5,0.25)
(0.442411,0.910796,0,0.5,0.25)
(0.427073,0.876431,0,0.5,0.25)
(0.381005,0.892102,0,0.5,0.25)
(0.399712,0.991965,0,0.5,0.25)
========================================
frame: 14
6
(0.427057,1.11553,0,0.5,0.25)
(0.480226,1.10212,0,0.5,0.25)
(0.441156,0.906668,0,0.5,0.25)
(0.43061,0.880642,0,0.5,0.25)
(0.381143,0.893474,0,0.5,0.25)
(0.401719,1.00232,0,0.5,0.25)
========================================
frame: 15
6
(0.42776,1.11999,0,0.5,0.25)
(0.47987,1.09964,0,0.5,0.25)
(0.44189,0.908037,0,0.5,0.25)
(0.429171,0.878716,0,0.5,0.25)
(0.381177,0.894607,0,0.5,0.25)
(0.402308,1.00712,0,0.5,0.25)
========================================
frame: 16
6
(0.427448,1.11549,0,0.5,0.25)
(0.480484,1.10103,0,0.5,0.25)
(0.441433,0.907216,0,0.5,0.25)
(0.42755,0.875636,0,0.5,0.25)
(0.380204,0.886592,0,0.5,0.25)
(0.40241,1.00491,0,0.5,0.25)
========================================
frame: 17
6
(0.428381,1.11829,0,0.5,0.25)
(0.480291,1.10013,0,0.5,0.25)
(0.442027,0.904827,0,0.5,0.25)
(0.426105,0.868426,0,0.5,0.25)
(0.380142,0.889672,0,0.5,0.25)
(0.401772,0.999872,0,0.5,0.25)
========================================
frame: 18
6
(0.42768,1.11375,0,0.5,0.25)
(0.478911,1.09629,0,0.5,0.25)
(0.440703,0.900954,0,0.5,0.25)
(0.424634,0.865439,0,0.5,0.25)
(0.380596,0.887834,0,0.5,0.25)
(0.404137,1.01008,0,0.5,0.25)
========================================
frame: 19
6
(0.4288,1.11164,0,0.5,0.25)
(0.478426,1.09413,0,0.5,0.25)
(0.441617,0.906138,0,0.5,0.25)
(0.425707,0.863883,0,0.5,0.25)
(0.378596,0.880448,0,0.5,0.25)
(0.409556,1.02449,0,0.5,0.25)
========================================
frame: 20
6
(0.428838,1.1118,0,0.5,0.25)
(0.47875,1.09385,0,0.5,0.25)
(0.442603,0.908131,0,0.5,0.25)
(0.426597,0.855717,0,0.5,0.25)
(0.379435,0.880581,0,0.5,0.25)
(0.412108,1.04018,0,0.5,0.25)
========================================
frame: 21
6
(0.428306,1.11012,0,0.5,0.25)
(0.478239,1.09259,0,0.5,0.25)
(0.440842,0.902468,0,0.5,0.25)
(0.426349,0.858782,0,0.5,0.25)
(0.381702,0.881431,0,0.5,0.25)
(0.410084,1.02583,0,0.5,0.25)
========================================
frame: 22
6
(0.430494,1.11741,0,0.5,0.25)
(0.479119,1.093,0,0.5,0.25)
(0.441378,0.906359,0,0.5,0.25)
(0.426564,0.861227,0,0.5,0.25)
(0.383098,0.883217,0,0.5,0.126941)
(0.410546,1.02797,0,0.5,0.25)
========================================
frame: 23
6
(0.4305,1.11816,0,0.5,0.25)
(0.478131,1.08881,0,0.5,0.25)
(0.444013,0.918214,0,0.5,0.25)
(0.431742,0.876842,0,0.5,0.25)
(0.385632,0.892427,0,0.5,0.167961)
(0.411229,1.03141,0,0.5,0.25)
========================================
frame: 24
6
(0.431846,1.11561,0,0.5,0.25)
(0.479427,1.091,0,0.5,0.25)
(0.443846,0.913597,0,0.5,0.25)
(0.43499,0.881865,0,0.5,0.25)
(0.387617,0.898172,0,0.5,0.20898)
(0.4073,1.00826,0,0.5,0.25)
========================================
frame: 25
6
(0.431078,1.11332,0,0.5,0.25)
(0.478898,1.09457,0,0.5,0.25)
(0.460615,0.99396,0,0.5,0.25)
(0.439625,0.892783,0,0.5,0.25)
(0.389414,0.904874,0,0.5,0.25)
(0.409813,1.01378,0,0.5,0.25)
========================================
frame: 26
6
(0.431986,1.11442,0,0.5,0.25)
(0.479005,1.09289,0,0.5,0.25)
(0.457667,0.981134,0,0.5,0.25)
(0.441818,0.902634,0,0.5,0.25)
(0.393452,0.919205,0,0.5,0.25)
(0.411941,1.01691,0,0.5,0.25)
========================================
frame: 27
6
(0.431956,1.11564,0,0.5,0.25)
(0.479705,1.09413,0,0.5,0.25)
(0.459982,0.995895,0,0.5,0.25)
(0.442128,0.906538,0,0.5,0.25)
(0.394924,0.925786,0,0.5,0.25)
(0.412506,1.01779,0,0.5,0.25)
========================================
frame: 28
6
(0.430288,1.10966,0,0.5,0.25)
(0.478422,1.09577,0,0.5,0.25)
(0.460325,0.995757,0,0.5,0.25)
(0.443628,0.909137,0,0.5,0.25)
(0.395326,0.924539,0,0.5,0.25)
(0.414348,1.02668,0,0.5,0.25)
========================================
frame: 29
6
(0.430838,1.11107,0,0.5,0.25)
(0.479198,1.09277,0,0.5,0.25)
(0.461232,0.999209,0,0.5,0.25)
(0.441976,0.898279,0,0.5,0.25)
(0.395399,0.918568,0,0.5,0.25)
(0.414452,1.02861,0,0.5,0.25)
========================================
frame: 30
6
(0.429095,1.10499,0,0.5,0.25)
(0.480252,1.09854,0,0.5,0.25)
(0.44661,0.923801,0,0.5,0.25)
(0.437951,0.890612,0,0.5,0.25)
(0.392116,0.90857,0,0.5,0.25)
(0.411395,1.01499,0,0.5,0.25)
========================================
frame: 31
6
(0.429553,1.10627,0,0.5,0.25)
(0.480572,1.09292,0,0.5,0.25)
(0.45135,0.937483,0,0.5,0.25)
(0.441435,0.893705,0,0.5,0.25)
(0.392952,0.906863,0,0.5,0.25)
(0.397358,0.94063,0,0.5,0.25)
========================================
frame: 32
6
(0.436344,1.08923,0,0.5,0.25)
(0.490442,1.09225,0,0.5,0.25)
(0.459081,0.926394,0,0.5,0.25)
(0.451,0.892099,0,0.5,0.25)
(0.398348,0.889289,0,0.5,0.25)
(0.417673,0.999098,0,0.5,0.25)
========================================
frame: 33
6
(0.435699,1.08518,0,0.5,0.25)
(0.49106,1.09216,0,0.5,0.25)
(0.469426,0.974286,0,0.5,0.25)
(0.449282,0.874119,0,0.5,0.25)
(0.397043,0.869746,0,0.5,0.25)
(0.405929,0.933571,0,0.5,0.25)
========================================
frame: 34
6
(0.434326,1.08249,0,0.5,0.25)
(0.49115,1.09205,0,0.5,0.25)
(0.469678,0.976074,0,0.5,0.25)
(0.449145,0.870436,0,0.5,0.25)
(0.396853,0.866816,0,0.5,0.25)
(0.404962,0.934123,0,0.5,0.25)
========================================
frame: 35
6
(0.434958,1.08331,0,0.5,0.25)
(0.491387,1.08468,0,0.5,0.25)
(0.471021,0.975295,0,0.5,0.25)
(0.450114,0.871756,0,0.5,0.25)
(0.397204,0.864144,0,0.5,0.25)
(0.405644,0.935239,0,0.5,0.25)
========================================
frame: 36
6
(0.435111,1.0839,0,0.5,0.156396)
(0.491547,1.0856,0,0.5,0.25)
(0.472803,0.976555,0,0.5,0.25)
(0.45266,0.872479,0,0.5,0.25)
(0.397402,0.865628,0,0.5,0.25)
(0.405344,0.937445,0,0.5,0.25)
========================================
frame: 37
6
(0.435191,1.08408,0,0.5,0.158926)
(0.492682,1.0864,0,0.5,0.25)
(0.472782,0.97148,0,0.5,0.25)
(0.452543,0.867659,0,0.5,0.25)
(0.399177,0.863884,0,0.5,0.25)
(0.405078,0.936708,0,0.5,0.25)
========================================
frame: 39
6
(0.43471,1.07553,0,0.5,0.163986)
(0.492425,1.08529,0,0.5,0.25)
(0.473574,0.969043,0,0.5,0.25)
(0.451149,0.858733,0,0.5,0.25)
(0.400242,0.860888,0,0.5,0.25)
(0.404363,0.933289,0,0.5,0.25)
========================================
frame: 40
6
(0.434456,1.07487,0,0.5,0.166515)
(0.492344,1.0811,0,0.5,0.25)
(0.473516,0.963647,0,0.5,0.25)
(0.449527,0.854102,0,0.5,0.25)
(0.398914,0.857944,0,0.5,0.25)
(0.405139,0.934267,0,0.5,0.25)
========================================
frame: 41
6
(0.434207,1.07438,0,0.5,0.169045)
(0.492149,1.08085,0,0.5,0.25)
(0.473655,0.965589,0,0.5,0.25)
(0.450306,0.855416,0,0.5,0.25)
(0.398575,0.857988,0,0.5,0.25)
(0.405625,0.937101,0,0.5,0.25)
========================================
frame: 43
6
(0.432753,1.06935,0,0.5,0.174105)
(0.492113,1.08175,0,0.5,0.25)
(0.471965,0.966698,0,0.5,0.25)
(0.453405,0.870249,0,0.5,0.25)
(0.3996,0.869651,0,0.5,0.25)
(0.406234,0.94106,0,0.5,0.25)
========================================
frame: 44
6
(0.43295,1.07126,0,0.5,0.176635)
(0.492052,1.08397,0,0.5,0.25)
(0.471756,0.968208,0,0.5,0.25)
(0.453471,0.880026,0,0.5,0.23538)
(0.399235,0.878054,0,0.5,0.25)
(0.405236,0.936903,0,0.5,0.25)
========================================
frame: 45
6
(0.434058,1.07615,0,0.5,0.179165)
(0.489815,1.08082,0,0.5,0.25)
(0.472275,0.982706,0,0.5,0.25)
(0.453613,0.89626,0,0.5,0.235884)
(0.400174,0.894418,0,0.5,0.25)
(0.404853,0.936555,0,0.5,0.25)
========================================
frame: 46
6
(0.434003,1.07452,0,0.5,0.181694)
(0.488899,1.08227,0,0.5,0.25)
(0.471214,0.988819,0,0.5,0.25)
(0.453119,0.905701,0,0.5,0.236388)
(0.401673,0.904261,0,0.5,0.25)
(0.405314,0.936299,0,0.5,0.25)
========================================
frame: 47
6
(0.433676,1.07456,0,0.5,0.184224)
(0.487696,1.08081,0,0.5,0.25)
(0.458739,0.94181,0,0.5,0.25)
(0.451556,0.912035,0,0.5,0.236892)
(0.402031,0.910924,0,0.5,0.25)
(0.405942,0.941438,0,0.5,0.25)
========================================
frame: 48
6
(0.434366,1.07894,0,0.5,0.186754)
(0.487913,1.08156,0,0.5,0.25)
(0.458088,0.940866,0,0.5,0.25)
(0.450999,0.916033,0,0.5,0.237397)
(0.401872,0.914634,0,0.5,0.25)
(0.406536,0.944842,0,0.5,0.25)
========================================
frame: 49
6
(0.433858,1.0819,0,0.5,0.189284)
(0.488119,1.08241,0,0.5,0.25)
(0.458596,0.945664,0,0.5,0.25)
(0.4508,0.924182,0,0.5,0.237901)
(0.399826,0.91483,0,0.5,0.25)
(0.411806,0.987859,0,0.5,0.25)
========================================
frame: 50
6
(0.432151,1.07801,0,0.5,0.191814)
(0.486867,1.08567,0,0.5,0.25)
(0.479756,1.04346,0,0.5,0.25)
(0.456014,0.932482,0,0.5,0.238405)
(0.398214,0.924057,0,0.5,0)
(0.412659,1.00008,0,0.5,0)
========================================
frame: 51
6
(0.431527,1.07722,0,0.5,0.194344)
(0.486393,1.08431,0,0.5,0.25)
(0.47947,1.04136,0,0.5,0.25)
(0.456883,0.939136,0,0.5,0.0448652)
(0.396662,0.927668,0,0.5,0.0108696)
(0.416236,1.01847,0,0.5,0.0108696)
========================================
frame: 53
6
(0.431432,1.07722,0,0.5,0.199403)
(0.487653,1.08268,0,0.5,0.25)
(0.460248,0.949513,0,0.5,0.25)
(0.447641,0.926542,0,0.5,0.0635138)
(0.396318,0.922982,0,0.5,0.0326087)
(0.411915,1.00474,0,0.5,0.0326087)
========================================
frame: 54
6
(0.431349,1.07704,0,0.5,0.201933)
(0.486544,1.07918,0,0.5,0.25)
(0.458188,0.942475,0,0.5,0.25)
(0.440793,0.912972,0,0.5,0.0728381)
(0.39166,0.903836,0,0.5,0.0434783)
(0.412296,1.00563,0,0.5,0.0434783)
========================================
frame: 55
6
(0.429176,1.07063,0,0.5,0.204463)
(0.486276,1.07353,0,0.5,0.25)
(0.45614,0.937085,0,0.5,0.25)
(0.440809,0.901446,0,0.5,0.0821624)
(0.391327,0.900207,0,0.5,0.0543478)
(0.407914,0.986689,0,0.5,0.0543478)
========================================
frame: 56
6
(0.428141,1.06351,0,0.5,0.206993)
(0.485274,1.06853,0,0.5,0.25)
(0.46021,0.949893,0,0.5,0.25)
(0.440694,0.89364,0,0.5,0.0914867)
(0.387043,0.887026,0,0.5,0.0652174)
(0.406766,0.98036,0,0.5,0.0652174)
========================================
frame: 57
6
(0.429649,1.05747,0,0.5,0.209523)
(0.485277,1.06439,0,0.5,0.25)
(0.459646,0.948906,0,0.5,0.25)
(0.441329,0.891554,0,0.5,0.100811)
(0.386461,0.886216,0,0.5,0.198667)
(0.408041,0.978406,0,0.5,0.076087)
========================================
frame: 58
6
(0.428721,1.05502,0,0.5,0.212052)
(0.485765,1.06216,0,0.5,0.25)
(0.461755,0.95777,0,0.5,0.25)
(0.440686,0.886572,0,0.5,0.110135)
(0.387252,0.887484,0,0.5,0.201875)
(0.41038,0.983897,0,0.5,0.0869565)
========================================
frame: 59
6
(0.430436,1.05044,0,0.5,0.154187)
(0.484896,1.05613,0,0.5,0.148336)
(0.460402,0.952936,0,0.5,0.25)
(0.444371,0.886654,0,0.5,0.11946)
(0.390267,0.885414,0,0.5,0.205084)
(0.407097,0.956197,0,0.5,0.0978261)
========================================
frame: 60
6
(0.431383,1.04806,0,0.5,0.16103)
(0.484404,1.05369,0,0.5,0.155597)
(0.460999,0.956626,0,0.5,0.25)
(0.443321,0.885475,0,0.5,0.128784)
(0.390371,0.886617,0,0.5,0.208292)
(0.40748,0.957719,0,0.5,0.108696)
========================================
frame: 61
6
(0.431513,1.04977,0,0.5,0.167874)
(0.484893,1.05356,0,0.5,0.162859)
(0.462364,0.96221,0,0.5,0.25)
(0.442804,0.884374,0,0.5,0.138108)
(0.392172,0.884939,0,0.5,0.2115)
(0.406842,0.951184,0,0.5,0.119565)
========================================
frame: 62
6
(0.432714,1.05167,0,0.5,0.174718)
(0.483893,1.05181,0,0.5,0.170121)
(0.463833,0.967896,0,0.5,0.25)
(0.443951,0.887036,0,0.5,0.147433)
(0.391406,0.884242,0,0.5,0.214709)
(0.407938,0.957163,0,0.5,0.130435)
========================================
frame: 63
6
(0.43155,1.04828,0,0.5,0.181562)
(0.484584,1.05497,0,0.5,0.177383)
(0.460767,0.957442,0,0.5,0.25)
(0.443338,0.890039,0,0.5,0.156757)
(0.392546,0.889309,0,0.5,0.217917)
(0.408862,0.962355,0,0.5,0.141304)
========================================
frame: 64
6
(0.432821,1.05429,0,0.5,0.188406)
(0.484814,1.05719,0,0.5,0.184644)
(0.462552,0.964149,0,0.5,0.25)
(0.444811,0.89863,0,0.5,0.166081)
(0.394872,0.900692,0,0.5,0.221125)
(0.407045,0.955143,0,0.5,0.152174)
========================================
frame: 65
6
(0.433022,1.0586,0,0.5,0.195249)
(0.485336,1.06168,0,0.5,0.191906)
(0.460313,0.959183,0,0.5,0.25)
(0.448738,0.915981,0,0.5,0.175406)
(0.398765,0.913729,0,0.5,0.224334)
(0.408109,0.956945,0,0.5,0.163043)
========================================
frame: 66
6
(0.433608,1.06143,0,0.5,0.202093)
(0.486471,1.06538,0,0.5,0.199168)
(0.460618,0.960503,0,0.5,0.25)
(0.4504,0.927252,0,0.5,0.18473)
(0.400721,0.92398,0,0.5,0.227542)
(0.408251,0.961948,0,0.5,0.173913)
========================================
frame: 67
6
(0.433911,1.06471,0,0.5,0.208937)
(0.48718,1.06808,0,0.5,0.20643)
(0.460274,0.957905,0,0.5,0.25)
(0.452755,0.938685,0,0.5,0.194054)
(0.404285,0.943445,0,0.5,0.23075)
(0.418056,1.00499,0,0.5,0.184783)
========================================
frame: 68
6
(0.433485,1.06605,0,0.5,0.215781)
(0.48722,1.06737,0,0.5,0.213691)
(0.472768,1.00546,0,0.5,0.25)
(0.458491,0.953609,0,0.5,0.203378)
(0.405577,0.95087,0,0.5,0.233958)
(0.418182,1.00727,0,0.5,0.195652)
========================================
frame: 69
6
(0.43294,1.06765,0,0.5,0.222625)
(0.487286,1.0697,0,0.5,0.220953)
(0.473867,1.01172,0,0.5,0.25)
(0.459988,0.957437,0,0.5,0.212703)
(0.406304,0.959755,0,0.5,0.237167)
(0.417198,1.00939,0,0.5,0.206522)
========================================
frame: 70
6
(0.432418,1.06684,0,0.5,0.229469)
(0.485423,1.06888,0,0.5,0.228215)
(0.480655,1.04054,0,0.5,0.25)
(0.461408,0.961892,0,0.5,0.222027)
(0.408428,0.960815,0,0.5,0.240375)
(0.417537,1.01148,0,0.5,0.217391)
========================================
frame: 71
6
(0.432915,1.06843,0,0.5,0.236312)
(0.485642,1.06898,0,0.5,0.235477)
(0.478593,1.03284,0,0.5,0.25)
(0.461646,0.966674,0,0.5,0.231351)
(0.409343,0.961089,0,0.5,0.243583)
(0.409528,0.980571,0,0.5,0.228261)
========================================
frame: 72
6
(0.433201,1.06883,0,0.5,0.243156)
(0.485491,1.07072,0,0.5,0.242738)
(0.478407,1.03026,0,0.5,0.25)
(0.461309,0.963779,0,0.5,0.240676)
(0.407152,0.96758,0,0.5,0.246792)
(0.415699,1.01428,0,0.5,0.23913)
========================================
frame: 73
6
(0.431611,1.06798,0,0.5,0.25)
(0.485487,1.07266,0,0.5,0.25)
(0.480403,1.04119,0,0.5,0.25)
(0.46095,0.960834,0,0.5,0.25)
(0.407812,0.96185,0,0.5,0.25)
(0.409305,0.989316,0,0.5,0.25)
========================================
frame: 74
6
(0.432656,1.07345,0,0.5,0.25)
(0.48503,1.07178,0,0.5,0.25)
(0.480103,1.03631,0,0.5,0.25)
(0.460587,0.960411,0,0.5,0.25)
(0.405407,0.959161,0,0.5,0.25)
(0.41449,1.01295,0,0.5,0.25)
========================================
frame: 75
6
(0.432236,1.076,0,0.5,0.25)
(0.486257,1.06883,0,0.5,0.25)
(0.475018,1.01774,0,0.5,0.25)
(0.459825,0.954871,0,0.5,0.25)
(0.401302,0.954878,0,0.5,0.25)
(0.412367,1.00747,0,0.5,0.25)
========================================
frame: 76
6
(0.432173,1.0725,0,0.5,0.25)
(0.48525,1.06904,0,0.5,0.25)
(0.475096,1.01763,0,0.5,0.25)
(0.459237,0.951421,0,0.5,0.220183)
(0.398704,0.946106,0,0.5,0.25)
(0.412633,1.00733,0,0.5,0.25)
========================================
frame: 77
6
(0.431879,1.06926,0,0.5,0.25)
(0.484613,1.0659,0,0.5,0.25)
(0.47531,1.01875,0,0.5,0.25)
(0.455299,0.937699,0,0.5,0.25)
(0.395424,0.939683,0,0.5,0.25)
(0.416557,1.02313,0,0.5,0.25)
========================================
frame: 78
6
(0.430947,1.05972,0,0.5,0.261834)
(0.486903,1.06385,0,0.5,0.25)
(0.462773,0.96205,0,0.5,0.25)
(0.448038,0.927663,0,0.5,0.25)
(0.393498,0.926413,0,0.5,0.25)
(0.421205,1.02438,0,0.5,0.25)
========================================
frame: 79
6
(0.432013,1.05722,0,0.5,0.130917)
(0.487377,1.06468,0,0.5,0.25)
(0.463077,0.964048,0,0.5,0.25)
(0.44894,0.925181,0,0.5,0.25)
(0.395722,0.923711,0,0.5,0.25)
(0.413566,0.992807,0,0.5,0.25)
========================================
frame: 80
6
(0.422943,1.05757,0,0.5,0)
(0.47751,1.05953,0,0.5,0.25)
(0.454299,0.963525,0,0.5,0.25)
(0.440992,0.921155,0,0.5,0.25)
(0.391412,0.923829,0,0.5,0.25)
(0.397538,0.964266,0,0.5,0.25)
========================================
frame: 81
6
(0.423794,1.05646,0,0.5,0)
(0.478148,1.06095,0,0.5,0.0696827)
(0.4539,0.963649,0,0.5,0.25)
(0.444028,0.923909,0,0.5,0.25)
(0.392862,0.925406,0,0.5,0.25)
(0.400019,0.966263,0,0.5,0.25)
========================================
frame: 82
6
(0.42413,1.05671,0,0.5,0)
(0.477967,1.06244,0,0.5,0.0817038)
(0.456305,0.969795,0,0.5,0.25)
(0.445201,0.925862,0,0.5,0.25)
(0.391722,0.928792,0,0.5,0.25)
(0.399918,0.96548,0,0.5,0.25)
========================================
frame: 83
6
(0.423947,1.05223,0,0.5,0)
(0.477634,1.05946,0,0.5,0.093725)
(0.457966,0.978464,0,0.5,0.25)
(0.444525,0.919744,0,0.5,0.25)
(0.394261,0.921727,0,0.5,0.25)
(0.399939,0.964193,0,0.5,0.25)
========================================
frame: 84
6
(0.42527,1.05625,0,0.5,0)
(0.47869,1.06379,0,0.5,0.105746)
(0.458603,0.982155,0,0.5,0.25)
(0.445798,0.922112,0,0.5,0.25)
(0.393921,0.921989,0,0.5,0.25)
(0.401034,0.968943,0,0.5,0.25)
========================================
frame: 85
6
(0.42393,1.05271,0,0.5,0)
(0.478789,1.05918,0,0.5,0.117767)
(0.463348,0.988322,0,0.5,0.25)
(0.445035,0.919652,0,0.5,0.25)
(0.393207,0.920787,0,0.5,0.25)
(0.399962,0.963502,0,0.5,0.25)
========================================
frame: 86
6
(0.423775,1.0514,0,0.5,0)
(0.478434,1.06008,0,0.5,0.129788)
(0.463628,0.991724,0,0.5,0.25)
(0.443934,0.918749,0,0.5,0.25)
(0.393513,0.924805,0,0.5,0.25)
(0.400675,0.965722,0,0.5,0.25)
========================================
frame: 87
6
(0.423422,1.05348,0,0.5,0)
(0.478103,1.06096,0,0.5,0.14181)
(0.463914,0.995193,0,0.5,0.25)
(0.443595,0.922102,0,0.5,0.125122)
(0.393898,0.924877,0,0.5,0.25)
(0.401248,0.967342,0,0.5,0.25)
========================================
frame: 88
6
(0.42429,1.05687,0,0.5,0)
(0.477646,1.06088,0,0.5,0.153831)
(0.464178,0.998589,0,0.5,0.25)
(0.444454,0.925864,0,0.5,0.138997)
(0.392232,0.923443,0,0.5,0.25)
(0.400871,0.96518,0,0.5,0.25)
========================================
frame: 89
6
(0.424633,1.05767,0,0.5,0)
(0.475153,1.05684,0,0.5,0.165852)
(0.462879,1.00031,0,0.5,0.25)
(0.444771,0.929897,0,0.5,0.157231)
(0.392766,0.926888,0,0.5,0.25)
(0.401176,0.968549,0,0.5,0.25)
========================================
frame: 90
6
(0.424674,1.06084,0,0.5,0)
(0.475169,1.05871,0,0.5,0.177873)
(0.452734,0.969493,0,0.5,0.25)
(0.442264,0.929193,0,0.5,0.170484)
(0.391595,0.927104,0,0.5,0.25)
(0.400928,0.967063,0,0.5,0.25)
========================================
frame: 91
6
(0.425111,1.06208,0,0.5,0.19828)
(0.475132,1.06022,0,0.5,0.189894)
(0.452577,0.965955,0,0.5,0.25)
(0.44177,0.930469,0,0.5,0.183737)
(0.390774,0.927805,0,0.5,0.25)
(0.400702,0.967757,0,0.5,0.25)
========================================
frame: 92
6
(0.424229,1.06194,0,0.5,0.158624)
(0.476011,1.06061,0,0.5,0.201915)
(0.453304,0.970237,0,0.5,0.25)
(0.442087,0.935317,0,0.5,0.196989)
(0.390799,0.931729,0,0.5,0.25)
(0.401539,0.9776,0,0.5,0.25)
========================================
frame: 93
6
(0.423505,1.06195,0,0.5,0.118968)
(0.475653,1.06227,0,0.5,0.213937)
(0.45272,0.967098,0,0.5,0.25)
(0.442063,0.939336,0,0.5,0.210242)
(0.392369,0.938888,0,0.5,0.25)
(0.403215,0.990011,0,0.5,0.25)
========================================
frame: 94
6
(0.423338,1.06161,0,0.5,0.227777)
(0.476122,1.06321,0,0.5,0.225958)
(0.453233,0.967358,0,0.5,0.25)
(0.44352,0.947816,0,0.5,0.223495)
(0.394723,0.94783,0,0.5,0.25)
(0.4083,1.0074,0,0.5,0.25)
========================================
frame: 95
6
(0.422865,1.06481,0,0.5,0.113888)
(0.475804,1.06503,0,0.5,0.237979)
(0.459787,0.996188,0,0.5,0.25)
(0.44886,0.957096,0,0.5,0.236747)
(0.3976,0.958711,0,0.5,0.25)
(0.411703,1.01842,0,0.5,0.25)
========================================
frame: 96
6
(0.42464,1.06436,0,0.5,0)
(0.47584,1.06733,0,0.5,0.25)
(0.467295,1.02272,0,0.5,0.25)
(0.451993,0.95995,0,0.5,0.25)
(0.40155,0.965285,0,0.5,0.25)
(0.413692,1.02077,0,0.5,0.25)
========================================
frame: 97
6
(0.4244,1.06668,0,0.5,0)
(0.474933,1.06596,0,0.5,0.25)
(0.465073,1.01134,0,0.5,0.25)
(0.451314,0.959468,0,0.5,0.25)
(0.400576,0.962123,0,0.5,0.25)
(0.411788,1.01443,0,0.5,0.25)
========================================
frame: 98
6
(0.424089,1.06819,0,0.5,0)
(0.473913,1.06506,0,0.5,0.25)
(0.465878,1.01233,0,0.5,0.25)
(0.451849,0.960504,0,0.5,0.25)
(0.401161,0.958536,0,0.5,0.25)
(0.412148,1.01956,0,0.5,0.25)
========================================
frame: 99
6
(0.424274,1.0691,0,0.5,0)
(0.475352,1.06482,0,0.5,0.25)
(0.465084,1.01201,0,0.5,0.25)
(0.451415,0.961184,0,0.5,0.25)
(0.398434,0.966899,0,0.5,0.25)
(0.406248,1.01137,0,0.5,0.25)
========================================
frame: 100
6
(0.423357,1.07309,0,0.5,0)
(0.475237,1.06246,0,0.5,0.25)
(0.465669,1.01674,0,0.5,0.25)
(0.450636,0.957503,0,0.5,0.25)
(0.394474,0.959327,0,0.5,0.25)
(0.405983,1.01935,0,0.5,0.25)
========================================
frame: 101
6
(0.421809,1.07498,0,0.5,0)
(0.474983,1.06006,0,0.5,0.25)
(0.465476,1.01666,0,0.5,0.25)
(0.448248,0.948328,0,0.5,0.25)
(0.38724,0.956319,0,0.5,0.25)
(0.402672,1.02093,0,0.5,0.25)
========================================
frame: 102
6
(0.391154,1.10001,0,0.5,0)
(0.431831,1.05166,0,0.5,0.25)
(0.417853,1.00739,0,0.5,0.25)
(0.400092,0.95406,0,0.5,0.25)
(0.3514,0.998061,0,0.5,0.25)
(0.370601,1.05451,0,0.5,0.25)
========================================
frame: 103
6
(0.464694,1.29901,0,0.5,0)
(0.510806,1.2631,0,0.5,0.25)
(0.478938,1.19626,0,0.5,0.25)
(0.436511,1.12522,0,0.5,0.25)
(0.381079,1.1661,0,0.5,0.25)
(0.428434,1.24729,0,0.5,0.25)
========================================
frame: 104
6
(0.841874,1.81414,0,0.5,0)
(0.850326,1.70646,0,0.5,0.25)
(0.740912,1.5537,0,0.5,0.25)
(0.710079,1.5407,0,0.5,0.25)
(0.707723,1.63838,0,0.5,0.25)
(0.775316,1.72899,0,0.5,0.25)
========================================
frame: 105
6
(1.15663,2.3517,0,0.5,0)
(1.08601,2.17469,0,0.5,0.25)
(0.994215,2.07321,0,0.5,0.25)
(0.98472,2.08353,0,0.5,0.25)
(1.05493,2.24476,0,0.5,0.25)
(1.10717,2.3031,0,0.5,0.25)
========================================
frame: 106
6
(0.926875,2.05835,0,0.5,0)
(0.837959,1.87268,0,0.5,0.25)
(0.750442,1.78943,0,0.5,0.25)
(0.757164,1.81987,0,0.5,0.25)
(0.83826,1.98335,0,0.5,0.25)
(0.888565,2.02717,0,0.5,0.25)
========================================
frame: 107
6
(0.733199,1.81446,0,0.5,0)
(0.637463,1.63785,0,0.5,0.25)
(0.563647,1.58223,0,0.5,0.25)
(0.562423,1.5955,0,0.5,0.25)
(0.661583,1.77524,0,0.5,0.25)
(0.719552,1.81137,0,0.5,0.25)
========================================
frame: 108
6
(0.587054,1.64923,0,0.5,0)
(0.469784,1.44674,0,0.5,0)
(0.404014,1.40553,0,0.5,0.25)
(0.414674,1.43369,0,0.5,0.25)
(0.521202,1.61822,0,0.5,0.25)
(0.572092,1.64463,0,0.5,0.25)
========================================
frame: 109
6
(0.847233,2.00403,0,0.5,0)
(0.723128,1.79032,0,0.5,0.0227273)
(0.651817,1.74576,0,0.5,0.25)
(0.668831,1.78751,0,0.5,0.25)
(0.77711,1.96384,0,0.5,0.25)
(0.827757,1.99321,0,0.5,0.25)
========================================
frame: 110
6
(0.63557,1.72142,0,0.5,0)
(0.54966,1.57453,0,0.5,0.0454545)
(0.480138,1.52744,0,0.5,0.25)
(0.484303,1.55264,0,0.5,0.25)
(0.58674,1.72083,0,0.5,0.25)
(0.627614,1.74158,0,0.5,0.25)
========================================
frame: 111
6
(0.895628,2.08578,0,0.5,0)
(0.800913,1.92052,0,0.5,0.0681818)
(0.721698,1.85253,0,0.5,0.25)
(0.735786,1.89445,0,0.5,0.25)
(0.803362,2.00577,0,0.5,0.25)
(0.86441,2.07137,0,0.5,0.25)
========================================
frame: 112
6
(0.90955,2.10867,0,0.5,0)
(0.83193,1.96714,0,0.5,0.0909091)
(0.752909,1.88926,0,0.5,0.25)
(0.757554,1.91603,0,0.5,0.25)
(0.797502,1.99179,0,0.5,0.25)
(0.859648,2.05764,0,0.5,0.25)
========================================
frame: 113
6
(0.911777,2.11098,0,0.5,0)
(0.855032,2.00252,0,0.5,0.113636)
(0.818496,1.96136,0,0.5,0.25)
(0.776438,1.91851,0,0.5,0.25)
(0.786468,1.96591,0,0.5,0.25)
(0.860676,2.05585,0,0.5,0.25)
========================================
frame: 114
6
(0.919588,2.15634,0,0.5,0)
(0.841097,1.98296,0,0.5,0.136364)
(0.798795,1.93058,0,0.5,0.25)
(0.74686,1.86869,0,0.5,0.25)
(0.744928,1.89721,0,0.5,0.25)
(0.874557,2.10935,0,0.5,0.25)
========================================
frame: 115
6
(0.919963,2.1393,0,0.5,0)
(0.88429,2.04583,0,0.5,0.159091)
(0.851349,1.99783,0,0.5,0.25)
(0.792118,1.92227,0,0.5,0.25)
(0.773864,1.94128,0,0.5,0.25)
(0.886946,2.15665,0,0.5,0.25)
========================================
frame: 116
6
(0.911967,2.11695,0,0.5,0)
(0.904254,2.07345,0,0.5,0.181818)
(0.865164,2.01718,0,0.5,0.25)
(0.859831,2.01426,0,0.5,0.25)
(0.81421,1.94885,0,0.5,0.25)
(0.777346,1.94072,0,0.5,0.25)
========================================
frame: 117
6
(0.939089,2.15746,0,0.5,0.5725)
(0.903872,2.07502,0,0.5,0.409845)
(0.877162,2.0404,0,0.5,0)
(0.835945,1.97617,0,0.5,0.25)
(0.820357,1.96743,0,0.5,0.25)
(0.798904,1.96898,0,0.5,0.25)
========================================
frame: 118
6
(0.943104,2.1622,0,0.5,0.28625)
(0.901116,2.07728,0,0.5,0.329922)
(0.892291,2.07144,0,0.5,0.125)
(0.853721,2.00433,0,0.5,0.25)
(0.798431,1.96478,0,0.5,0.25)
(0.838531,2.04332,0,0.5,0.25)
========================================
frame: 119
6
(0.934095,2.1457,0,0.5,0)
(0.892397,2.06575,0,0.5,0.25)
(0.824724,2.00364,0,0.5,0.25)
(0.820325,2.0407,0,0.5,0.25)
(0.850121,2.06786,0,0.5,0.25)
(0.962359,2.2077,0,0.5,0.25)
========================================
frame: 120
6
(0.947929,2.23721,0,0.5,0)
(0.906231,2.15727,0,0.5,0.25)
(0.838556,2.09515,0,0.5,0.25)
(0.834157,2.13221,0,0.5,0.25)
(0.863955,2.15937,0,0.5,0.25)
(0.976191,2.29921,0,0.5,0.25)
========================================
>>>

Sorry for the amount of information in this post, it is kind of hard to describe. Any help is much appreciated, thank you in advance!

-jeff

Recommended Answers

All 2 Replies

Since each point appears to be a tuple, you can use

print(len(points))
for point in points:
    print(point)
    for each_point in point:
        print("  ", each_point)
        # etc.

Something like this gets you data from file and transposed data in each frame in dictionary:

from pprint import pprint
import itertools as it

def yield_info(fn = 'info.txt'):
    with open(fn) as info:
        for line in info:
            if line.startswith('frame:'):
                # read in frame number
                current = int(line.rsplit(': ')[-1])
            if line.startswith('('):
                yield current, eval(line)

data = dict([(group, tuple(point for frame, point in info))
             for group, info in it.groupby(yield_info(), key=lambda x: x[0])])
transposed_data = dict((key, list(zip(*data)))
                        for key, data in data.items())
print('Frames')
pprint(data)
print('Frame infos transposed')
pprint(transposed_data)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.