Skip to content

Commit

Permalink
Clean up license language and usage
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Feb 12, 2017
1 parent f98fd5b commit 59144d3
Show file tree
Hide file tree
Showing 16 changed files with 486 additions and 521 deletions.
23 changes: 4 additions & 19 deletions LICENSE.txt
@@ -1,22 +1,7 @@
oct2py v0.3
=============
Copyright (C) 2012 by Steven Silvester
Copyright (c) 2017, oct2py developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38 changes: 12 additions & 26 deletions oct2py/__init__.py
@@ -1,6 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) oct2py developers.
# Distributed under the terms of the MIT License.

"""
Oct2Py is a means to seamlessly call M-files and GNU Octave functions from Python.
Oct2Py is a means to seamlessly call M-files and GNU Octave functions from
Python.
It manages the Octave session for you, sharing data behind the scenes using
MAT files. Usage is as simple as:
Expand All @@ -17,32 +21,18 @@
If you want to run legacy m-files, do not have MATLAB(TM), and do not fully
trust a code translator, this is your library.
"""
from __future__ import absolute_import, print_function, division

__title__ = 'oct2py'
__version__ = '3.9.2'
__author__ = 'Steven Silvester'
__license__ = 'MIT'
__copyright__ = 'Copyright 2014-2016 Steven Silvester'
__all__ = ['Oct2Py', 'Oct2PyError', 'octave', 'Struct', 'demo', 'speed_check',
'thread_check', '__version__', 'get_log']


import imp
import functools
import os
import ctypes

try:
import thread
except ImportError:
import _thread as thread

from .core import Oct2Py, Oct2PyError
from .utils import Struct, get_log
from .core import Oct2Py
from .io import Struct
from .utils import get_log, Oct2PyError
from .demo import demo
from .speed_check import speed_check
from .thread_check import thread_check

__version__ = '4.0-dev'
__all__ = ['Oct2Py', 'Oct2PyError', 'octave', 'Struct', 'demo', 'speed_check',
'thread_check', '__version__', 'get_log']

try:
octave = Oct2Py()
Expand All @@ -63,7 +53,3 @@ def kill_octave():
os.system('killall -9 octave')
os.system('killall -9 octave-cli')
octave.restart()


# clean up namespace
del functools, imp, os, ctypes, thread
3 changes: 3 additions & 0 deletions oct2py/compat.py
@@ -1,4 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright (c) oct2py developers.
# Distributed under the terms of the MIT License.

import sys
import ctypes
import os
Expand Down
14 changes: 5 additions & 9 deletions oct2py/core.py
@@ -1,11 +1,7 @@
"""
.. module:: core
:synopsis: Main module for oct2py package.
Contains the core session object Oct2Py
# -*- coding: utf-8 -*-
# Copyright (c) oct2py developers.
# Distributed under the terms of the MIT License.

.. moduleauthor:: Steven Silvester <steven.silvester@ieee.org>
"""
from __future__ import print_function, absolute_import, division

import logging
Expand All @@ -17,8 +13,8 @@
from metakernel.pexpect import EOF, TIMEOUT
from octave_kernel.kernel import OctaveEngine, STDIN_PROMPT

from .matwrite import write_file
from .utils import get_nout, Oct2PyError, get_log, read_file
from .io import read_file, write_file
from .utils import get_nout, Oct2PyError, get_log
from .compat import unicode, input, string_types
from .dynamic import (
_make_function_ptr_instance, _make_variable_ptr_instance,
Expand Down
11 changes: 4 additions & 7 deletions oct2py/demo.py
@@ -1,11 +1,8 @@
"""
.. module:: demo
:synopsis: Play a demo script showing most of the p2oct api features.
# -*- coding: utf-8 -*-
# Copyright (c) oct2py developers.
# Distributed under the terms of the MIT License.

.. moduleauthor:: Steven Silvester <steven.silvester@ieee.org>
"""
from __future__ import print_function
from __future__ import print_function, absolute_import
import time
from .compat import PY2

Expand Down
10 changes: 8 additions & 2 deletions oct2py/dynamic.py
@@ -1,12 +1,18 @@
# -*- coding: utf-8 -*-
# Copyright (c) oct2py developers.
# Distributed under the terms of the MIT License.

from __future__ import absolute_import, print_function, division

import types
import warnings
import weakref

import numpy as np
from scipy.io.matlab.mio5 import MatlabObject

from oct2py.compat import PY2
from oct2py.utils import get_nout
from .compat import PY2
from .utils import get_nout


class OctavePtr(object):
Expand Down

0 comments on commit 59144d3

Please sign in to comment.