introduce secop.core for easy imports

Change-Id: I559d537ba480e1c20f8e11fb259da6e17da53059
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/22892
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
Enrico Faulhaber 2020-04-07 11:40:11 +02:00
parent 9215fefdfa
commit 7ba5f6f8ed
3 changed files with 39 additions and 2 deletions

37
secop/core.py Normal file
View File

@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
# *****************************************************************************
# Copyright (c) 2015-2016 by the authors, see LICENSE
#
# This program 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 2 of the License, or (at your option) any later
# version.
#
# This program 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
# this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Module authors:
# Alexander Lenz <alexander.lenz@frm2.tum.de>
# Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
# Markus Zolliker <markus.zolliker@psi.ch>
#
# *****************************************************************************
# allow to import the most important classes from 'secop'
# pylint: disable=unused-import
from secop.datatypes import FloatRange, IntRange, ScaledInteger, \
BoolType, EnumType, BLOBType, StringType, TupleOf, ArrayOf, StructOf
from secop.lib.enum import Enum
from secop.modules import Module, Readable, Writable, Drivable, Communicator, Attached
from secop.params import Parameter, Command, Override
from secop.metaclass import Done
from secop.iohandler import IOHandler, IOHandlerBase
from secop.stringio import StringIO, HasIodev
from secop.proxy import SecNode, Proxy, proxy_class

View File

@ -20,7 +20,7 @@
# ***************************************************************************** # *****************************************************************************
"""Andeen Hagerling capacitance bridge""" """Andeen Hagerling capacitance bridge"""
from secop import Readable, Parameter, Override, FloatRange, HasIodev, StringIO, Done from secop.core import Readable, Parameter, Override, FloatRange, HasIodev, StringIO, Done
class Ah2700IO(StringIO): class Ah2700IO(StringIO):

View File

@ -22,7 +22,7 @@
not tested yet""" not tested yet"""
from secop import Writable, Module, Parameter, Override, Attached,\ from secop.core import Writable, Module, Parameter, Override, Attached,\
BoolType, FloatRange, EnumType, HasIodev, StringIO BoolType, FloatRange, EnumType, HasIodev, StringIO