More python stuff
parent
ae9bd5c6b2
commit
57c86517b7
|
@ -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 \
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
"""moo module"""
|
||||
|
||||
import moo_utils as utils
|
||||
import moo_term as term
|
||||
import moo_edit as edit
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
"""moo.app module"""
|
||||
from _moo_app import *
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
"""moo.edit module"""
|
||||
from _moo_edit import *
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
"""moo.term module"""
|
||||
from _moo_term import *
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
"""moo.utils module"""
|
||||
import _moo_utils as _utils
|
||||
from _moo_utils import *
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@ import moo
|
|||
import gtk
|
||||
import pango
|
||||
|
||||
SHOW_LOG_WINDOW = False
|
||||
|
||||
try:
|
||||
import pyconsole
|
||||
have_pyconsole = True
|
||||
|
@ -25,11 +27,14 @@ class Plugin(object):
|
|||
def init(self):
|
||||
editor = moo.edit.editor_instance()
|
||||
xml = editor.get_ui_xml()
|
||||
|
||||
self.ui_merge_id = xml.new_merge_id()
|
||||
|
||||
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)
|
||||
self.ui_merge_id = xml.new_merge_id()
|
||||
xml.add_item(self.ui_merge_id, "Editor/Menubar/Tools",
|
||||
"ShowLogWindow", "ShowLogWindow", -1)
|
||||
|
||||
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue