Changeset 387

Show
Ignore:
Timestamp:
Tue Mar 18 18:11:20 2008
Author:
Brian
Message:

Show whether running the script would change the report type. Improve the formatting.

Files:

Legend:

Unmodified
Added
Removed
Modified
  • scripts/trunk/Install/Analyze Install Scripts.py

    r386 r387  
    38 38  
    39 39 # create a Data name space to pass to scripts?  
    40   class LocalData:  
      40 class DataBox:  
    40 40     pass  
    41 41  
    42 42     @staticmethod  
    43 43     def SetUndo(string):  
    44           print '----------------------------------'  
      44         print  # '----------------------------------'  
    44 44  
    45 45     @staticmethod  
     
    68 68         if rtid:  
    69 69             prefix = '  '  # report type would not be added  
      70             rtype = db_rt[rtid]  
      71             prefix = '  '  # column type would not be changed  
      72             for k, v in reportType.iteritems():  
      73                 if k in rtype and v == rtype.get(k): continue  
      74                 prefix = 'c '  # column type would be changed  
      75                 break  
    70 76         else:  
    71 77             prefix = '+ '  # report type would be added  
     
    90 96                 prefix = '+ '  # column type would be added  
    91 97             print '----', prefix + ctname  
    92           print '-----------------'  
      98         print '-------'  # '-----------------'  
    92 98  
    93 99 # run the install scripts but hide the real Data module  
     
    97 103     """ Run a script file (.py) """  
    98 104     name_dict = {}  
    99       name_dict['Data'] = LocalData  
      105     name_dict['Data'] = DataBox  
    99 105 #    name_dict = GetModuleNames()  
    100 106 #    name_dict['self'] = OpenReports.get(ActiveReport)  
     
    122 128         print "Couldn't find the Scripts directory"  
    123 129         return  
    124       print 'Scripts directory', scripts  
      130     print  
      131     print 'Scripts Directory:\n----', scripts  
      132     print  
    125 133  
    126 134     for root, dirs, files in os.walk(scripts):