[Tutor] Declaring methods in modules.
crp at cmc.net
Sun Apr 11 14:30:54 CEST 2010
I am working on some stuff, and I would like to be able to write a
module which can be imported, and after it's been imported I would like
to be able to access it's functions as methods.
In other words, if I do the import of module ISPdetector, I want to then
be able to make calls like the following -
ipAddress = "18.104.22.168"
emails = ipAddress.GetEmailAddresses()
where GetEmailAddresses() is defined in module ISPdetector. Do I just
wite that function in ISPdetector.py as a normally deffed function, or
does it have to be part of a class within the module?
Thanks for any help you can be.
Later, Ray Parrish
Linux dpkg Software Report script set..
Ray's Links, a variety of links to usefull things, and articles by Ray.
Writings of "The" Schizophrenic, what it's like to be a schizo, and other
things, including my poetry.
More information about the Tutor