Skip to content

Commit

Permalink
move text_box.py - migration of text_box.py complete(ish)!
Browse files Browse the repository at this point in the history
  • Loading branch information
zadacka committed Apr 24, 2022
1 parent a7f7e61 commit d03e623
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion demos/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from easygui import ROOT_DIR, version
from easygui.boxes import utils as ut
from easygui.boxes.button_box import buttonbox
from easygui.boxes.text_box import textbox, codebox, exceptionbox
from easygui.text_box import textbox, codebox, exceptionbox
from easygui.boxes.diropen_box import diropenbox
from easygui.boxes.fileopen_box import fileopenbox
from easygui.boxes.filesave_box import filesavebox
Expand Down
2 changes: 1 addition & 1 deletion easygui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from .boxes.fileopen_box import fileopenbox
from .boxes.filesave_box import filesavebox

from .boxes.text_box import textbox, exceptionbox, codebox
from easygui.text_box import textbox, exceptionbox, codebox

from .boxes.derived_boxes import ynbox
from .boxes.derived_boxes import ccbox
Expand Down
4 changes: 2 additions & 2 deletions easygui/boxes/button_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
try:
from . import global_state
from . import utils as ut
from .text_box import textbox
from easygui.text_box import textbox
except (SystemError, ValueError, ImportError):
import global_state
import utils as ut
from text_box import textbox
from easygui.text_box import textbox

try:
import tkinter as tk # python 3
Expand Down
4 changes: 2 additions & 2 deletions easygui/boxes/derived_boxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
try:
from .fillable_box import __fillablebox
from .button_box import buttonbox
from . import text_box as tb
from .. import text_box as tb
from . import utils as ut
except (SystemError, ValueError, ImportError):
from fillable_box import __fillablebox
from button_box import buttonbox
import text_box as tb
import easygui.text_box as tb
import utils as ut

# -------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion easygui/boxes/text_box.py → easygui/text_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ def __init__(self, msg, title, text, codebox, callback):

self.MONOSPACE_FONT = tk_Font.Font(family='Courier')
self.text_area = self._configure_text_area(box_root=self.box_root, code_box=codebox)
self._set_text()
self._configure_buttons()

self._set_text()

def _configure_box_root(self, title):
box_root = tk.Tk()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_text_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from mock import patch, Mock, ANY

from easygui.boxes.text_box import TextBox, textbox
from easygui.text_box import TextBox, textbox
from tests import WAIT_0_MILLISECONDS, WAIT_1_MILLISECONDS
from easygui.boxes import tk

Expand Down

0 comments on commit d03e623

Please sign in to comment.