WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Write Eye-tracking data to file (https://forum.worldviz.com/showthread.php?t=6200)

Vishav 10-17-2018 05:50 AM

Write Eye-tracking data to file
 
I want to write real-time eye-tracking data in file while vizard is running. I want my data values to get store upto 5 decimal places as tobii eyetracker is giving values upto 16 decimal places, If i use %s for writing but not working for %f. My code is:
data = '\t%f\t%f\t\t%f\n'%(st,gaze_left_eye1,gaze_right_e ye1)
f1.write(data)

Why this code not working?

Jeff 10-24-2018 09:17 PM

The string formatting page has different examples of formatting data including the number of digits after the decimal point.

Vishav 11-05-2018 10:20 PM

Thanks Jeff


All times are GMT -7. The time now is 02:19 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC