tmpspacer.py¶
The template “tmpspacer.py” can be used to add a section spacer to a script list.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | #!/usr/bin/env python
##############################################################################
##
## Copyright (C) 2021 Narda Safety Test Solutions GmbH.
## Contact: http://www.narda-sts.de
##
## Redistribution and use in source and binary forms,
## with or without modification, are permitted provided that the following
## conditions are met:
##
## 1.) Redistributions of source code must retain the above copyright notice,
## this list of conditions and the following disclaimer.
##
## 2.) Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in the
## documentation and/or other materials provided with the distribution.
##
## 3.) Neither the name of the copyright holder nor the names of its
## contributors may be used to endorse or promote products derived from this
## software without specific prior written permission.
##
## 4.) EXPORT CONTROL
## The Software, including technical data /cryptographic software,
## may be subject to, German, European Union and U.S. export controls and
## may be subject to import or export controls in other countries.
## The Licensee agrees to strictly comply with all applicable import and
## export regulations. He specifically agrees, that he must not disclose or
## otherwise export or re-export the Licensed Software or any part thereof
## delivered under this end user license agreement (EULA) to any country
## (including a national or resident of such country) without a valid export
## or import license. Please be aware that the Software may contain
## US-Content, therefor the Licensee represent and warrant that he is not a
## citizen of, or otherwise located within, an embargoed nation (including
## without limitation Iran, Syria, Sudan, Cuba, North Korea) and that he is
## not otherwise prohibited under the Export Laws from receiving the Software.
## All rights to Use the Software are granted on condition that such rights
## are forfeited if the Licensee fails to comply with
## the terms of this Agreement.
##
## 5.) SEVERABILITY
## Should any provision of this Agreement be or become invalid, ineffective
## or unenforceable, the remaining provisions of this Agreement shall be
## valid. The parties agree to replace the invalid, ineffective or
## unenforceable provision by a valid, effective and enforceable provision
## which best meets the commercial intention of the parties.
## The same shall apply in case of omissions.
##
## 6.) APPLICABLE LAW AND PLACE OF JURISTICATION
## This Agreement shall be constituted under the law of Germany.
## The United Nations Convention on the International Sale of Goods
## shall not apply to this Agreement. The Place of Jurisdiction for any
## dispute between the Parties shall be Tübingen (Germany).
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Narda Safety Test Solutions GmbH
## BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
## POSSIBILITY OF SUCH DAMAGE.
##
##############################################################################
import wx
from nardascripting.base.signalsharkdev import *
from nardascripting.base.usrscriptbase import *
"""Note
A module can contain several spacer classes.
"""
class Spacer01(UsrScriptBase):
"""User script spacer class"""
def __init__(self, main_gui, dev=SignalSharkDev()):
"""Initialization. Please leave this line unchanged"""
super().__init__(main_gui, dev, __file__)
# Script settings.
# Please adapt the following lines of code according to your script:
self._is_list_spacer = True # This line makes the user script a spacer
self._tab_name = "Templates"
self._scr_title = "Spacer"
self._list_prio = 1
def _run_script(self, args):
"""
Since it is a spacer, there is nothing to do here.
"""
pass
|