[TriLUG] OT: beginner python question, what does "import" do
Joseph Mack NA3T
jmack at wm7d.net
Thu Aug 4 10:57:28 EDT 2005
I don't know anything about python, but preliminary googling
in Python tutorials hasn't found the answer.
I have a python program which has
import dbus
import gtk
and which runs without errors (so I assume it has found
dbus and gtk). The program install notes say to
make sure dbus.py is in PYTHONPATH (set to
"/usr/lib/python2.4;/usr/lib/python2.4/site-packages").
>From this instruction I would assume that the
"import dbus" call includes the file dbus.py.
However there is no dbus.py/pyc or gtk.py/pyc on the machine.
There is a _dbus.py and pygtk.py in $PYTHONPATH.
_dbus.py itself imports dbus, so can't be exporting it.
pygtk.py doesn't seem to export a label "gtk".
Where is the program importing dbus and gtk from?
Thanks Joe
--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
More information about the TriLUG
mailing list