-3

I have this code:

import whois
print whois.whois('google.com')

Run in IDLE:

enter image description here

But It run ok in console:

enter image description here

Mureinik
  • 297,002
  • 52
  • 306
  • 350
MathSky
  • 3
  • 1

1 Answers1

3

Your script file is itself called whois.py; Python is importing that instead of the library module. Call it something else.

Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895