More python stuff

master
Yevgen Muntyan 2005-11-09 12:19:46 +00:00
parent ae9bd5c6b2
commit 57c86517b7
8 changed files with 23 additions and 10 deletions

View File

@ -6,7 +6,9 @@ moopython = $(moo_prefix)/moopython
moopython_srcdir = $(srcdir)/$(moopython)
moopython_plugins = \
$(moopython)/plugins/console.py
$(moopython)/plugins/console.py \
$(moopython)/plugins/pyconsole.py \
$(moopython)/plugins/pystuff.py
moopython_sources = \
$(moopython)/moo-pygtk.c \

View File

@ -1,3 +1,5 @@
"""moo module"""
import moo_utils as utils
import moo_term as term
import moo_edit as edit

View File

@ -1 +1,2 @@
"""moo.app module"""
from _moo_app import *

View File

@ -1 +1,2 @@
"""moo.edit module"""
from _moo_edit import *

View File

@ -1 +1,2 @@
"""moo.term module"""
from _moo_term import *

View File

@ -1,3 +1,4 @@
"""moo.utils module"""
import _moo_utils as _utils
from _moo_utils import *

View File

@ -17,8 +17,8 @@
# it creates the widget and 'starts' interactive session; see the end of
# this file.
#
# This widget is not intended to be used as a replacement for real terminal:
# gtk.TextView sucks as a terminal, and it can't be fixed.
# This widget is not a replacement for real terminal with python running
# inside: gtk.TextView sucks as a terminal, and it can't be changed.
# The use case is: you have a python program, you create this widget,
# and inspect your program interiors.

View File

@ -2,6 +2,8 @@ import moo
import gtk
import pango
SHOW_LOG_WINDOW = False
try:
import pyconsole
have_pyconsole = True
@ -25,13 +27,16 @@ class Plugin(object):
def init(self):
editor = moo.edit.editor_instance()
xml = editor.get_ui_xml()
moo.utils.window_class_add_action (moo.edit.EditWindow, "ShowLogWindow",
name="Show Log Window",
label="Show Log Window",
callback=self.show_log_window)
self.ui_merge_id = xml.new_merge_id()
xml.add_item(self.ui_merge_id, "Editor/Menubar/Tools",
"ShowLogWindow", "ShowLogWindow", -1)
if SHOW_LOG_WINDOW:
moo.utils.window_class_add_action (moo.edit.EditWindow, "ShowLogWindow",
name="Show Log Window",
label="Show Log Window",
callback=self.show_log_window)
xml.add_item(self.ui_merge_id, "Editor/Menubar/Tools",
"ShowLogWindow", "ShowLogWindow", -1)
if have_pyconsole:
moo.utils.window_class_add_action (moo.edit.EditWindow, "ShowPythonConsole",
@ -68,7 +73,7 @@ class Plugin(object):
console.modify_font(pango.FontDescription("Courier New 11"))
swin.add(console)
swin.set_size_request(400,300)
window.set_default_size(400,300)
window.show_all()
moo.edit.plugin_register(Plugin)