I know, the title to this question is vague, but I don't really know how else to describe it. Here's what I'm trying to do though.
I'm using pyodbc to query a database, and I want to allow the user to specify a column, and for my code to fetch it dynamically. In other words, I need to do something like this:
row_id = "row.%s" % id_column
Of course, this returns a string. What pyodbc is expecting is a variable/property, like so:
row_id = row.id
Could someone please tell me how to do this? I tried searching for "python string to val" but all those pages tell me how to convert a string to an int- which is different than what I'm trying to do.