I have this code:
import whois print whois.whois('google.com')
Run in IDLE:
But It run ok in console:
Your script file is itself called whois.py; Python is importing that instead of the library module. Call it something else.
whois.py
Your script file is itself called
whois.py
; Python is importing that instead of the library module. Call it something else.