I am having a slight problem with gtk. I imported it into some python code I wrote awhile back and now whenever I import it, it loads that code on the interpreter. Is there any way to remove that dependency?
>>> import gtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.6/gtk-2.0/gtk/__init__.py", line 30, in <module>
import gobject as _gobject
File "/usr/lib/pymodules/python2.6/gtk-2.0/gobject/__init__.py", line 26, in <module>
from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
File "/usr/lib/pymodules/python2.6/gtk-2.0/glib/option.py", line 33, in <module>
import optparse
File "/usr/lib/python2.6/optparse.py", line 90, in <module>
from gettext import gettext
File "/usr/lib/python2.6/gettext.py", line 49, in <module>
import locale, copy, os, re, struct, sys
File "copy.py", line 42, in <module>
clipboard = gtk.clipboard_get()
AttributeError: 'module' object has no attribute 'clipboard_get'
Thanks
import gtk
. Maybe something wrong with the package configurations or so - starrify 2012-04-04 02:38
import gtk
, and then this error message would show - starrify 2012-04-04 02:40
You've called one of your scripts "copy.py", shadowing the copy
module in the stdlib. Rename it.