[python-sybase] GTK & Sybase

Sebők Norbert sebok1 at enternet.hu
Wed, 23 Feb 2005 17:09:12 +0100


Hi!

I have some problem, when I use Sybase module with GTK:

  cursor.execute(" select 1.2 ")
  num = cursor.fetchone()[0]
  print num           # 1.2
  print float(1.2)    # 1.2
  print float(num)    # 1.2

  import gtk
  print num           # 1.2
  print float(1.2)    # 1.2
  print float(num)    # 1.0  <- not 1.2


After import gtk, the float truncates the decimal.
How can I fix this?

Thanks,
Norbert Sebok