Update imports, copyright notices.
This commit is contained in:
parent
d3b413493f
commit
9292d00534
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
from sys import stderr
|
from sys import stderr
|
||||||
from traceback import format_exc
|
from traceback import format_exc
|
||||||
import pygame
|
import pygame
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ from joy.library import (
|
||||||
SimpleFunctionWrapper,
|
SimpleFunctionWrapper,
|
||||||
)
|
)
|
||||||
from joy.utils.stack import list_to_stack, concat
|
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
|
def install(command): D[command.name] = command
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
# (at your option) any later version.
|
# (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
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with joy.py. If not see <http://www.gnu.org/licenses/>.
|
# along with Thun. If not see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
'''
|
'''
|
||||||
This module implements a simple visual display system modeled on Oberon.
|
This module implements a simple visual display system modeled on Oberon.
|
||||||
|
|
@ -29,13 +29,13 @@ from copy import copy
|
||||||
from sys import stderr
|
from sys import stderr
|
||||||
from traceback import format_exc
|
from traceback import format_exc
|
||||||
import pygame
|
import pygame
|
||||||
from core import (
|
from .core import (
|
||||||
open_viewer_on_string,
|
open_viewer_on_string,
|
||||||
GREY,
|
GREY,
|
||||||
MOUSE_EVENTS,
|
MOUSE_EVENTS,
|
||||||
)
|
)
|
||||||
from viewer import Viewer
|
from .viewer import Viewer
|
||||||
import text_viewer
|
from joy.vui import text_viewer
|
||||||
|
|
||||||
|
|
||||||
class Display(object):
|
class Display(object):
|
||||||
|
|
|
||||||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
import os, sys, traceback
|
import os, sys, traceback
|
||||||
import pygame
|
import pygame
|
||||||
from joy.library import initialize, DefinitionWrapper, SimpleFunctionWrapper
|
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
|
FULLSCREEN = '-f' in sys.argv
|
||||||
|
|
@ -107,7 +125,3 @@ def main(screen, clock, pt):
|
||||||
sys.stdout = old_stdout
|
sys.stdout = old_stdout
|
||||||
|
|
||||||
return name_space['d']
|
return name_space['d']
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main(*init())
|
|
||||||
|
|
|
||||||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
import os, pickle, traceback
|
import os, pickle, traceback
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
from dulwich.errors import NotGitRepository
|
from dulwich.errors import NotGitRepository
|
||||||
from dulwich.repo import Repo
|
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):
|
def open_repo(repo_dir=None, initialize=False):
|
||||||
|
|
|
||||||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
from joy.utils.stack import expression_to_string, iter_stack
|
from joy.utils.stack import expression_to_string, iter_stack
|
||||||
import core, text_viewer
|
from joy.vui import core, text_viewer
|
||||||
|
|
||||||
|
|
||||||
MAX_WIDTH = 64
|
MAX_WIDTH = 64
|
||||||
|
|
|
||||||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
import string
|
import string
|
||||||
import pygame
|
import pygame
|
||||||
from joy.utils.stack import expression_to_string
|
from joy.utils.stack import expression_to_string
|
||||||
from core import (
|
from joy.vui.core import (
|
||||||
ARROW_KEYS,
|
ARROW_KEYS,
|
||||||
BACKGROUND as BG,
|
BACKGROUND as BG,
|
||||||
FOREGROUND as FG,
|
FOREGROUND as FG,
|
||||||
|
|
@ -11,8 +30,8 @@ from core import (
|
||||||
SUCCESS,
|
SUCCESS,
|
||||||
push,
|
push,
|
||||||
)
|
)
|
||||||
import viewer, font_data
|
from joy.vui import viewer, font_data
|
||||||
reload(viewer)
|
#reload(viewer)
|
||||||
|
|
||||||
|
|
||||||
MenuViewer = viewer.MenuViewer
|
MenuViewer = viewer.MenuViewer
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright © 2018 Simon Forman
|
# Copyright © 2019 Simon Forman
|
||||||
#
|
#
|
||||||
# This file is part of joy.py
|
# This file is part of joy.py
|
||||||
#
|
#
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
# along with joy.py. If not see <http://www.gnu.org/licenses/>.
|
# along with joy.py. If not see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
import pygame
|
import pygame
|
||||||
from core import BACKGROUND, FOREGROUND
|
from joy.vui.core import BACKGROUND, FOREGROUND
|
||||||
|
|
||||||
|
|
||||||
class Viewer(object):
|
class Viewer(object):
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -36,7 +36,7 @@ setup(
|
||||||
author_email='forman.simon@gmail.com',
|
author_email='forman.simon@gmail.com',
|
||||||
url='https://joypy.osdn.io',
|
url='https://joypy.osdn.io',
|
||||||
license='GPLv3+',
|
license='GPLv3+',
|
||||||
packages=['joy', 'joy.utils', 'joy.gui'],
|
packages=['joy', 'joy.utils', 'joy.gui', 'joy.vui'],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 4 - Beta',
|
'Development Status :: 4 - Beta',
|
||||||
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
|
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue