TypeError: 'module' object is not callable

2007-03-16 Thread randomtalk
Hello everyone! i have the following test code: class temp: def __init__(self): self.hello = hello world! def printworld(self): print(self.hello) t = temp() and i tried to call profile('t.printworld()') but i received the following error: Traceback (most recent call

Re: returning none when it should be returning a list?

2006-05-01 Thread randomtalk
John Machin wrote: That's because it falls off the end of the function, which causes it to return None. However that's not your only problem. Major other problem is updating seed in situ. I'm not sure what falls off the end of the function means, i searched online, it seems to mean that the

returning none when it should be returning a list?

2006-04-30 Thread randomtalk
hello, i have another problem i feel that i have to be missing something.. Basically, i've written a recursive function to find all the prime up to a number (lim).. here is the function: The function basically takes in a list of all the prime number found, it takes the next number to be tested

opposite function to split?

2006-04-29 Thread randomtalk
hello everyone! I can't seem to find a function that combines a list of items into a string with a seperator between the individual elements.. Is there such a method that does the opposite of sting.split? thanks alot! -- http://mail.python.org/mailman/listinfo/python-list

append function problem?

2006-04-27 Thread randomtalk
hello, recently i tried to use list.append() function in seemingly logical ways, however, i cannot get it to work, here is the test code: seed = [2, 3, 4, 5] next = 7 seed1 = seed.append(next) seed1 print(str(seed1)) None def test(lst): ... print(str(lst)) ... test(seed.append(next))

download full sites?

2006-01-06 Thread randomtalk
hi, does anyone know of any package that will download a full site for offline viewing? It will change all url to match local urls and follow a logical structure (the site's structure would be suffice).. Please tell me if you have heard of such a package.. thanks alot :D --

recursive function return value problems

2005-12-28 Thread randomtalk
hi, i have the following recursive function (simplified to demonstrate the problem): def reTest(bool): ... result = [] ... if not bool: ... reTest(True) ... else: ... print YAHHH ... result = [should be the only thing returned] ... print

Re: recursive function return value problems

2005-12-28 Thread randomtalk
the final returned value is: [] the two values printed is (note i only have one print statement printing print result,. however, in the actualality, it's printed twice): printing result: ['should be the only thing returned'] printing result: [] therefore, sadly, i don't thinkg you've understand

Re: recursive function return value problems

2005-12-28 Thread randomtalk
ah, result = reTest(True) works, thanks alot :D -- http://mail.python.org/mailman/listinfo/python-list

fetching images from web?

2005-12-27 Thread randomtalk
hi, i want to automate some tasks of gathering photos from web, i tried urllib/urllib2, both ended up without much success (saved gifs with only a border, nothing else).. the code i used was: data = urllib2.urlopen(http://aspn.activestate.com/ASPN/img/komodo_aspn_other.gif;) #was looking

Re: fetching images from web?

2005-12-27 Thread randomtalk
ah, wb works :D thanks alot! -- http://mail.python.org/mailman/listinfo/python-list

query domain registry from python?

2005-11-19 Thread randomtalk
hi, does anyone know of a library that can query domain registry or any site that provide information to such an activity? as i want to build a simple domain name searching program for my own benefit.. thanks alot :D -- http://mail.python.org/mailman/listinfo/python-list