I am trying to pass a set of tuple strings from a file to a function I
have defined.  Each tuple is on a separate line, and looks something
like this:
 ('note',2048)
The function has two parameters , and is defined thus: def
findindex(dval,ticks):
Apparently, I need to cast the second value as an integer in the body
of the function in order to work with it as such, but when I attempt
int(ticks) I get
ValueError: invalid literal for int() with base 10: '2048)'

Upon searching for elucidation of this on the internet I find nothing
but esoterica, at least as far as I am concerned.
Any pointers would make me happy.

--
Mayo Adams



mayoad...@gmail.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to