[Biopython-dev] Bio.Nexus
Michiel Jan Laurens de Hoon
mdehoon at ims.u-tokyo.ac.jp
Sun Feb 20 04:42:03 EST 2005
Frank Kauff wrote:
> Hi Michiel,
>
> On Fri, 2005-02-18 at 12:59 +0900, Michiel Jan Laurens de Hoon wrote:
>
>>Bio/Nexus/cnexus.c contains a "main" function that doesn't seem to be needed in
>>Biopython. Can I remove it? Since this function is exported, it may (in theory
>>at least) cause a conflict. Also, my compiler complains about it that "int main"
>>doesn't return an int.
>>
>
>
> Not sure - I simply strictly followed the Python documentation about
> extensions: http://docs.python.org/ext/methodTable.html, because it's
> the first extension I've ever written :-) The docs say that I need the
> main function for calling the initialization function that passes the
> method table to the interpreter.
You need the "main" function when you're embedding python (so when you write
your own program that contains the Python interpreter). Here you're extending
python, so you don't need the main function. The initialization function is
calling by the Python interpreter when you import your module.
--Michiel.
--
Michiel de Hoon, Assistant Professor
University of Tokyo, Institute of Medical Science
Human Genome Center
4-6-1 Shirokane-dai, Minato-ku
Tokyo 108-8639
Japan
http://bonsai.ims.u-tokyo.ac.jp/~mdehoon
More information about the Biopython-dev
mailing list