when i write import win32print in my python command line (IDLE) it works fine and it is imported... but when i write import win32print in my py file then it gives an error says no module named win32print
why am i not able to load the module when writing the same statement in a py script...im using windows XP
1 Answer 1
Check if you are running on the same installation. I'd do that by looking the path:
import sys
print sys.path
And compare the output on IDLE and when you run the .py
answered Feb 7, 2011 at 16:56
korbes
1,3631 gold badge12 silver badges19 bronze badges
Sign up to request clarification or add additional context in comments.
1 Comment
Pawan
thank you...i was actually running python 2.6 on idle and 2.5 to compile my script...
lang-py
win32printis not installed when you run your .py file, but it is from IDLE. Is your path to Python using a different Python installation?