"Fossies" - the Fresh Open Source Software Archive

Member "roundup-2.0.0/frontends/ZRoundup/__init__.py" (26 Aug 2019, 2037 Bytes) of package /linux/www/roundup-2.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "__init__.py": 1.6.1_vs_2.0.0.

    1 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
    2 # This module is free software, and you may redistribute it and/or modify
    3 # under the same terms as Python, so long as this copyright message and
    4 # disclaimer are retained in their original form.
    5 #
    6 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
    7 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
    8 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
    9 # POSSIBILITY OF SUCH DAMAGE.
   10 #
   11 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
   12 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
   13 # FOR A PARTICULAR PURPOSE.  THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
   14 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
   15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
   16 # 
   17 __version__='1.1'
   18 
   19 import os
   20 # figure where ZRoundup is installed
   21 here = None
   22 if 'INSTANCE_HOME' in os.environ:
   23     here = os.environ['INSTANCE_HOME']
   24     path = os.path.join(here, 'Products', 'ZRoundup')
   25     if not os.path.exists(path):
   26         path = os.path.join(here, 'lib', 'python', 'Products', 'ZRoundup')
   27         if not os.path.exists(path):
   28             here = None
   29 if here is None:
   30     from __main__ import here
   31     path = os.path.join(here, 'Products', 'ZRoundup')
   32     if not os.path.exists(path):
   33         path = os.path.join(here, 'lib', 'python', 'Products', 'ZRoundup')
   34         if not os.path.exists(path):
   35             raise ValueError("Can't determine where ZRoundup is installed")
   36 
   37 # product initialisation
   38 from .ZRoundup import ZRoundup, manage_addZRoundupForm, manage_addZRoundup
   39 def initialize(context):
   40     context.registerClass(
   41         ZRoundup,
   42         meta_type = 'Z Roundup',
   43         constructors = (
   44             manage_addZRoundupForm, manage_addZRoundup
   45         )
   46     )
   47 
   48 # set up the icon
   49 from ImageFile import ImageFile
   50 misc_ = {
   51     'icon': ImageFile('icons/tick_symbol.gif', path), 
   52 }
   53 
   54 
   55 # vim: set filetype=python ts=4 sw=4 et si