sublimetext2 - Python code runs but doesn't ask for user input, in Sublime Text -


this question has answer here:

this first line of program:

def main():     country = input('\nplease enter country>   ') 

i selected python build, , when click ctrl-b compiles fine, , tells me how long took. why doesn't print line , ask me input?

i assuming haven't called function main anywhere in code. can solve adding if __name__ == '__main__': main() @ end of code.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -