Changeset 740 for CMIP6dreqbuild


Ignore:
Timestamp:
18/08/16 02:21:40 (3 years ago)
Author:
mjuckes
Message:

further for python 3 ... flexible imports

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/simpleCheck.py

    r739 r740  
    1 from .__init__ import DOC_DIR 
     1scr = __name__ == '__main__' 
     2if scr: 
     3  from __init__ import DOC_DIR 
     4else: 
     5  from .__init__ import DOC_DIR 
    26import string, os, sys, collections 
    37 
     
    7983class check1(checkbase): 
    8084  def _ch01_importDreq(self): 
    81     from . import dreq 
     85    if scr: 
     86      import dreq 
     87    else: 
     88      from . import dreq 
    8289    print ( 'Dreq software import checked' ) 
    8390    self.ok = True 
    8491 
    8592  def _ch02_importSample(self): 
    86     from . import dreq 
     93    if scr: 
     94      import dreq 
     95    else: 
     96      from . import dreq 
    8797    self.dq = dreq.loadDreq( manifest='%s/dreqManifest.txt' % self.docdir  ) 
    8898    print ( 'Dreq sample load checked' ) 
     
    90100 
    91101  def _ch03_linkCheck(self): 
     102    if scr: 
     103      import dreq 
     104    else: 
     105      from . import dreq 
     106 
    92107    nn = 0 
    93     from . import dreq 
    94108    self.dq = dreq.loadDreq( manifest='%s/dreqManifest.txt' % self.docdir  ) 
    95109    for section in self.dq.coll : 
Note: See TracChangeset for help on using the changeset viewer.