I'm trying to write a dummy program with python using eclipse and I get the error message: Undefined variable: __init__.
My aim is to Run the program with eclipse 'Run as' --> Python Run.
When I remove the code:
if __init__=='__main__':
main()
and run it from the command line say_something() - it works ok. Any idea what am I doing wrong?

I think you're looking for if __name__ == '__main__':
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With