Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 81647 - pygoogle needs __init__.py
Summary: pygoogle needs __init__.py
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-11 11:34 UTC by Tim Lopez
Modified: 2007-09-21 13:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Lopez 2005-02-11 11:34:58 UTC
Need __init__.py file in the Python site-packages pygoogle directory.

Reproducible: Always
Steps to Reproduce:





pygoogle-0.6
Comment 1 Rob Cakebread (RETIRED) gentoo-dev 2005-02-22 20:00:31 UTC
Can you give us a little more info please? Why does it need __init__.py?
What error are you getting?
Comment 2 Tim Lopez 2005-02-22 22:03:29 UTC
It needs (an empty) __init__.py to make it a module.  

tux pygoogle # python
Python 2.3.4 (#1, Feb 18 2005, 14:11:27)
[GCC 3.4.2  (Gentoo Linux 3.4.2-r2, ssp-3.4.1-1, pie-8.7.6.5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygoogle
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named pygoogle
>>>

See http://www.python.org/doc/2.1.3/tut/node8.html:

"The __init__.py files are required to make Python treat the directories as containing packages; this is done to prevent directories with a common name, such as "string", from unintentionally hiding valid modules that occur later on the module search path. In the simplest case, __init__.py can just be an empty file, but it can also execute initialization code for the package or set the __all__ variable, described later."
Comment 3 Rob Cakebread (RETIRED) gentoo-dev 2005-02-22 23:31:46 UTC
You're using the wrong name. Try "import google".
Comment 4 ic+gentoo 2007-09-21 13:56:30 UTC
Isn't pygoogle 0.6 to be marked stable ? I don't see any issue with it for 2 years now.