I am using Jython to script for a test framework (jython is the language), but I'm hoping it is a generic question for Jython/Python.
I am trying to read each line from a file into a tuple which is then worked on. I am reading the line like so:
tupleUser = ast.literal_eval(anInterestingString)
This what the 'interesting string variable' looks like:
(1,SECOND_FIELD,242166347.d135e34.9c90e786e7ae4175bfdb08028969d567)
The code throws this error:
aborting process - Jython exception, : no viable alternative at input 'd135e34' (, line 1) [initialising test script] net.grinder.scriptengine.jython.JythonScriptExecutionException: : no viable alternative at input 'd135e34' (, line 1)
I am just going to try to parse this and use the values, but I would like to learn how to use 'ast' to parse things like this. It would be much easier.