Rakesh wrote:

> To quote a much smaller trimmed-down example, here is how it looks
> like:
> ## -----------------------------------------------
> # Entry Point to the whole program
> ## -----------------------------------------------
> def main():
>     mylist = GenerateList()
>     minnumber = min(mylist)
>     for num in mylist:
>         print num - minnumber
>         ## TODO: Interpreter errors above.


Try printing mylist. Then you'll know why - operand doesn't work. You're creating a nested tuple.

I'd recommend changing the original script to something like::

  seconds = []
  [snip]

      # Convert the date format to the seconds since epoch
      for i in xrange( len(dates) ):
          thissecond = parseDate(dates[i][1])
          seconds.append(thissecond)

or if you want to stick with tuple::

  seconds = ()
  [snip]

      # Convert the date format to the seconds since epoch
      for i in xrange( len(dates) ):
          thissecond = parseDate(dates[i][1])
          seconds += (thissecond, )

-- george
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to