Hi,
Firstly, I am quite new to python so hopefully this could be quick answer for any kind sole who give help.
I am trying to connect the data files created from one piece of equipment to another process that require similar, but not the same, data .txt files.
The first data file is generated to me in this format (sample data file attached below);
#sensor head correlation#
set initialised 0 0 0
set time division 50
set table dimension X mm 500
set table dimension Y mm 500
sensor head #1
T X Y
1 32 245
2 33.0568 244.167
3 33.7287 243.388
4 34.6067 242.538
5 35.4018 241.787
6 35.9536 241.022
.......etc,
And then I need to reformat this into a format like this ;
32 245
33.0568 244.167
33.7287 243.388
34.6067 242.538
35.4018 241.787
35.9536 241.022
...etc,
I can extract the data ok but I can't seem to format the final output as above, I either come out with ;
('32', '245')
('33.0568', '244.167')
('33.7287', '243.388')
('34.6067', '242.538')
('35.4018', '241.787')
('35.9536', '241.022')
or
32 245 33.0568 244.167 33.7287 243.388 34.6067 242.538 35.4018 241.787 35.9536 241.022
Nomatter which combinations of .write formatting or regex expression I have adjusted.
Script so far and datafile attached. I am so close to what I need so a massive thanks to any experienced python guy who can heeeeeelp me!!
Cheers,
Frank