diff --git a/joy/vui/core.py b/joy/vui/core.py
index 0501b30..6ed210b 100644
--- a/joy/vui/core.py
+++ b/joy/vui/core.py
@@ -1,3 +1,22 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2019 Simon Forman
+#
+# This file is part of Thun
+#
+# Thun is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Thun is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Thun. If not see .
+#
from sys import stderr
from traceback import format_exc
import pygame
diff --git a/joy/vui/default_joy_home/library.py b/joy/vui/default_joy_home/library.py
index 921acce..7f0cabb 100644
--- a/joy/vui/default_joy_home/library.py
+++ b/joy/vui/default_joy_home/library.py
@@ -16,7 +16,7 @@ from joy.library import (
SimpleFunctionWrapper,
)
from joy.utils.stack import list_to_stack, concat
-from vui import core, text_viewer, stack_viewer
+from joy.vui import core, text_viewer, stack_viewer
def install(command): D[command.name] = command
diff --git a/joy/vui/display.py b/joy/vui/display.py
index 20b044d..81f69a6 100644
--- a/joy/vui/display.py
+++ b/joy/vui/display.py
@@ -1,21 +1,21 @@
# -*- coding: utf-8 -*-
#
-# Copyright © 2018 Simon Forman
+# Copyright © 2019 Simon Forman
#
-# This file is part of joy.py
+# This file is part of Thun
#
-# joy.py is free software: you can redistribute it and/or modify
+# Thun is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
-# joy.py is distributed in the hope that it will be useful,
+# Thun is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with joy.py. If not see .
+# along with Thun. If not see .
#
'''
This module implements a simple visual display system modeled on Oberon.
@@ -29,13 +29,13 @@ from copy import copy
from sys import stderr
from traceback import format_exc
import pygame
-from core import (
+from .core import (
open_viewer_on_string,
GREY,
MOUSE_EVENTS,
)
-from viewer import Viewer
-import text_viewer
+from .viewer import Viewer
+from joy.vui import text_viewer
class Display(object):
diff --git a/joy/vui/main.py b/joy/vui/main.py
index 7557fc6..f1e14cb 100644
--- a/joy/vui/main.py
+++ b/joy/vui/main.py
@@ -1,8 +1,26 @@
-#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2019 Simon Forman
+#
+# This file is part of Thun
+#
+# Thun is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Thun is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Thun. If not see .
+#
import os, sys, traceback
import pygame
from joy.library import initialize, DefinitionWrapper, SimpleFunctionWrapper
-import core, display, persist_task
+from joy.vui import core, display, persist_task
FULLSCREEN = '-f' in sys.argv
@@ -107,7 +125,3 @@ def main(screen, clock, pt):
sys.stdout = old_stdout
return name_space['d']
-
-
-if __name__ == '__main__':
- main(*init())
diff --git a/joy/vui/persist_task.py b/joy/vui/persist_task.py
index ab3520f..84af526 100644
--- a/joy/vui/persist_task.py
+++ b/joy/vui/persist_task.py
@@ -1,8 +1,27 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2019 Simon Forman
+#
+# This file is part of Thun
+#
+# Thun is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Thun is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Thun. If not see .
+#
import os, pickle, traceback
from collections import Counter
from dulwich.errors import NotGitRepository
from dulwich.repo import Repo
-import core, init_joy_home
+from joy.vui import core, init_joy_home
def open_repo(repo_dir=None, initialize=False):
diff --git a/joy/vui/stack_viewer.py b/joy/vui/stack_viewer.py
index 74050ef..e03fcf6 100644
--- a/joy/vui/stack_viewer.py
+++ b/joy/vui/stack_viewer.py
@@ -1,5 +1,24 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2019 Simon Forman
+#
+# This file is part of Thun
+#
+# Thun is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Thun is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Thun. If not see .
+#
from joy.utils.stack import expression_to_string, iter_stack
-import core, text_viewer
+from joy.vui import core, text_viewer
MAX_WIDTH = 64
diff --git a/joy/vui/text_viewer.py b/joy/vui/text_viewer.py
index 451c363..1ffea26 100644
--- a/joy/vui/text_viewer.py
+++ b/joy/vui/text_viewer.py
@@ -1,7 +1,26 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2019 Simon Forman
+#
+# This file is part of Thun
+#
+# Thun is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Thun is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Thun. If not see .
+#
import string
import pygame
from joy.utils.stack import expression_to_string
-from core import (
+from joy.vui.core import (
ARROW_KEYS,
BACKGROUND as BG,
FOREGROUND as FG,
@@ -11,8 +30,8 @@ from core import (
SUCCESS,
push,
)
-import viewer, font_data
-reload(viewer)
+from joy.vui import viewer, font_data
+#reload(viewer)
MenuViewer = viewer.MenuViewer
diff --git a/joy/vui/viewer.py b/joy/vui/viewer.py
index 9b56467..e15d652 100644
--- a/joy/vui/viewer.py
+++ b/joy/vui/viewer.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# Copyright © 2018 Simon Forman
+# Copyright © 2019 Simon Forman
#
# This file is part of joy.py
#
@@ -18,7 +18,7 @@
# along with joy.py. If not see .
#
import pygame
-from core import BACKGROUND, FOREGROUND
+from joy.vui.core import BACKGROUND, FOREGROUND
class Viewer(object):
diff --git a/setup.py b/setup.py
index 4ca08b1..c0e58fd 100755
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,7 @@ setup(
author_email='forman.simon@gmail.com',
url='https://joypy.osdn.io',
license='GPLv3+',
- packages=['joy', 'joy.utils', 'joy.gui'],
+ packages=['joy', 'joy.utils', 'joy.gui', 'joy.vui'],
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',