Re: problem moving from char to integer

2006-09-26 Thread Melih Onvural
I'm trying to calculate the checksum of a website so that I can get its PageRank. I'm modifying the code that I found here: http://blog.outer-court.com/archive/2004_06_27_index.html#108834386239051706 I apologize for being secretive, but I didn't mean to be. I'm trying to take characters and push

Re: problem moving from char to integer

2006-09-26 Thread John Machin
Melih Onvural wrote: > This is the error message that I'm having a tough time interpreting: > Traceback (most recent call last): > File "pagerank.py", line 101, in ? > main() > File "pagerank.py", line 96, in main > ch = strord(url) > File "pagerank.py", line 81, in strord > resu

Re: problem moving from char to integer

2006-09-26 Thread Larry Bates
Melih Onvural wrote: > This is the error message that I'm having a tough time interpreting: > Traceback (most recent call last): > File "pagerank.py", line 101, in ? > main() > File "pagerank.py", line 96, in main > ch = strord(url) > File "pagerank.py", line 81, in strord > resul

Re: problem moving from char to integer

2006-09-26 Thread Melih Onvural
This is the error message that I'm having a tough time interpreting: Traceback (most recent call last): File "pagerank.py", line 101, in ? main() File "pagerank.py", line 96, in main ch = strord(url) File "pagerank.py", line 81, in strord result[counter] = int(i); ValueError: inva

Re: problem moving from char to integer

2006-09-26 Thread Pontus Ekberg
Melih Onvural wrote: > Group, > > I'm trying to get a very basic cast from a string to an integer > working. Here is what I'm doing: > > for i in url: > result[counter] = int(i) > counter += 1; > > return result; > > anything that I'm doing drastically wrong? Mac OS 10.4, MacPython >