tags:

views:

114

answers:

2

I'm working my way through DiveIntoPython.com and I'm having trouble getting the import to work. I've installed ActiveState's Pythonwin on a windows xp prof environment.

In the website, there is an exercise which involves 'import odbchelper' and odbchelper.name

http://www.diveintopython.org/getting_to_know_python/testing_modules.html

When I run it interactive, i get:

>>> import odbchelper
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ImportError: No module named odbchelper
>>> odbchelper.__name__
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
NameError: name 'odbchelper' is not defined

I'm guessing either i don't have the pathing set correctly or the module does not exist referenced in one of the folders when I run 'sys.path'. Any ideas?

thanks in advance

+1  A: 

This module doesn't come packaged with Python2.6 for sure (just tried on my machine). Have you tried googling where this module might be?

Consider this post.

jldupont
yea i found something similar.. you beat me to it.
phill
A: 

figured it out..

found this:

http://www.faqs.org/docs/diveintopython/odbchelper_divein.html

downloaded the file and then put it into a folder. c:\temp\python\ in my case with the commands:

>> import sys 
>> sys.path.append('c:\\temp\\python\\')
phill