Gadfly or gadfly or Gadfly.gadfly() or _?
Tim Roberts
timr at probo.com
Tue Mar 9 02:13:55 EST 2004
"Eric @ Zomething" <eric at zomething.com> wrote:
>
>My interest was piqued enough to try Gadfly, but I find myself struggling to install it, a new problem for this newB. Not sure if any of this is the distribution's "fault" or just my lack of understanding of Python:
>
>1) I notice there is no py file named "gadfly.py". How does
>Python find and define the namespace?
The gadfly directory probably has a file called __init__.py. That turns
the directory into a "module" which can be imported.
>2) I have installed the files in this directory under a Windows XP OS:
> C:\Python23\Lib\site-packages\Gadfly
>3) "import gadfly", as shown in the docs, returns an ImportError
>4) "import Gadfly" does not return any errors. Is this because of
>the capitalization of the directory name?
Yes. Windows XP doesn't care, but Python does. Try renaming the directory
to "gadfly", and the results should be happier.
--
- Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list
mailing list