misterwolfy
09-16-2010, 03:23 PM
I am currently using a shell script using "grep" and "awk" to edit data text files. I'd like to do this using python if possible
Would anyone care to demonstrate how I could extract just the float values from the text below? Or let me know if it is awkward to be doing this kind of task in Python.
Adobe After Effects 8.0 Keyframe Data
Units Per Second 29.97
Source Width 900
Source Height 506
Source Pixel Aspect Ratio 1
Comp Pixel Aspect Ratio 1
Effects Sound Keys #1 Output 1 #22
Frame
131 0.263784
132 0.277537
133 0.342596
134 0.325534
135 0.246398
136 0.234771
137 0.304555
138 0.29599
I want:
0.263784
0.277537
0.342596
0.325534
0.246398
0.234771
0.304555
0.29599
Thanks for reading!
Would anyone care to demonstrate how I could extract just the float values from the text below? Or let me know if it is awkward to be doing this kind of task in Python.
Adobe After Effects 8.0 Keyframe Data
Units Per Second 29.97
Source Width 900
Source Height 506
Source Pixel Aspect Ratio 1
Comp Pixel Aspect Ratio 1
Effects Sound Keys #1 Output 1 #22
Frame
131 0.263784
132 0.277537
133 0.342596
134 0.325534
135 0.246398
136 0.234771
137 0.304555
138 0.29599
I want:
0.263784
0.277537
0.342596
0.325534
0.246398
0.234771
0.304555
0.29599
Thanks for reading!
