You are not logged in.
Hi,
today I noticed that the betterpythonconsole-plugin does not work anymore. After hitting F5 in gedit (which should open a python-console and execute the code opened with gedit) I get the following error:
File "/usr/lib/gedit-2/plugins/betterpythonconsole/consoleinterface.py", line 92
def seek(self, a): raise IOError, (29, 'Illegal seek')
^
SyntaxError: invalid syntaxProblem is I can't remember how I installed this plugin. It is not in the gedit-plugins package and gedit-plugins-extra was removed from community, maybe I installed this manually....Should I file a bug report in the arch bug tracker or upstream or what?
Offline
I'd say this is related to python3.
Just edit "/usr/lib/gedit-2/plugins/betterpythonconsole/consoleinterface.py" and on the first line replace "#!/usr/bin/python" with "#!/usr/bin/python2".
Oh, and make sure you have python2 installed too.
Hope that helps.
Offline
Unfortunately that does not fix it. :-( Same error as before. But thanks for your reply.
So I think I will open a bug report on the arch bugtracker.
EDIT: https://bugs.archlinux.org/task/22297
Last edited by Urfaust (2011-01-03 21:31:00)
Offline
Too bad it didn't work out...
But I think you should report the bug to the authors of the plugin, if that's not it, it doesn't seem to be arch related.
Keep us posted tough.
Edit: Ninja'ed - Guess Inout Biru already told you that...
Last edited by Stunts (2011-01-03 21:42:09)
Offline
https://bugzilla.gnome.org/show_bug.cgi?id=638756
Last edited by Urfaust (2011-01-05 18:12:36)
Offline
Offline
Yeah, I didn't noticed that this is a third-party plugin. :facepalm: ![]()
But I have some progress now: the code of the plugin is outdated, so I changed it to the new python syntax (print() instead of print, exec() instead of exec and so on). Now I get another error
:
Traceback (most recent call last):
File "/usr/lib/gedit-2/plugins/betterpythonconsole/consoleinterface.py", line 57, in <module>
import pygtk
ImportError: No module named pygtkAll packages are installed:
python2 2.7.1-3
python 3.1.3-1
pygtk 2.22.0-3
gtk 1.2.10-10
and the shebang of consoleinterface.py is #!/usr/bin/python2
Also:
>python2
Python 2.7.1 (r271:86832, Dec 20 2010, 11:54:29)
[GCC 4.5.1 20101125 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygtk
>>> works, but
>python
Python 3.1.3 (r313:86834, Dec 1 2010, 12:16:07)
[GCC 4.5.1 20101125 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pygtk
>>> doesn't.
I will look into this later. I'm a total python n00b so if you have an idea...:D Maybe I can learn something by fixing it myself. ![]()
Last edited by Urfaust (2011-01-06 17:53:23)
Offline
After installing the plugin myself, I have realized that gedit is still using python3 to load the plugins.
This is set in the plugin loader file.
Changing "Loader=python" to "Loader=python2" should solve the issue, but gedit doesn't recognize python2.
You may have to hack gedit's source code...
Maybe someone more experienced can give an opinion?
Offline
![]()
Thanks for pointing that out!
Offline