Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Python Question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
pYrania
Retired Dev
Retired Dev


Joined: 27 Oct 2002
Posts: 650
Location: Cologne - Germany

PostPosted: Sun May 04, 2003 1:14 pm    Post subject: Python Question Reply with quote

first, I want to learn python, so I am currently working on a setiathome statistic script, just like setistats4linux, but written in python.
i hacked up some working lines, that output me
percent done and processing time and speed.
but now, i copied my script to another gentoo box and python is always getting an overflow:

Code:
$ ./pYseti
Traceback (most recent call last):
  File "./pYseti", line 37, in ?
    cpuh    = string.zfill(int(cpu / 3600), 2)
OverflowError: float too large to convert


Code:
cpu     = float(setidata['cpu'])
cpuh    = string.zfill(int(cpu / 3600), 2)
cpum    = string.zfill(int((cpu % 3600) / 60), 2)


at that point "cpu" would be something like 3287.528
_________________
Markus Nigbur
Back to top
View user's profile Send private message
pYrania
Retired Dev
Retired Dev


Joined: 27 Oct 2002
Posts: 650
Location: Cologne - Germany

PostPosted: Mon May 05, 2003 5:13 am    Post subject: Reply with quote

Fixed.

Python-2.2.2 bug?
_________________
Markus Nigbur
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum