how to move in function ?

"Fredrik Lundh" <[EMAIL PROTECTED]> a écrit dans le message de news: 
[EMAIL PROTECTED]
> Olivier Noblanc wrote:
>
>> In the botom of this post you will see my source code.
>>
>> The problem is when i launch main.py that doesn't make anything why ?
>
> the "if __name__" statement checks the name of the module.  if you run
> Python file as a script, by passing a filename to the python interpreter, 
> the
> __name__ variable is set to  "__main__".  if you import a file as a 
> module,
> the __name__ is the name of the module, not "__main__".
>
> if you want main.py to do something, move that code to main.py (or move
> it into a function, and call it from main.py)
>
> </F>
>
> 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to