tengo simple script en Python, 'first.py':Ejecutar archivo python: ¿qué función es main?
#first.py
def firstFunctionEver() :
print "hello"
firstFunctionEver()
que desee llamar a este script usando: python first.py
y tienen que llamar al firstFunctionEver()
. Pero, el script es feo: ¿a qué función puedo poner la llamada en firstFunctionEver()
y ejecutarla cuando se carga el script?
https://stackoverflow.com/questions/419163/what-does-if-name-main-do –