Changeset 4266

Show
Ignore:
Timestamp:
07/06/07 17:12:59 (6 years ago)
Author:
jgaeddert
Message:

removing Amara from MainFrame?.py

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • WaveDev/branches/WaveDevNoAmara/wavedev/MainFrame.py

    r4265 r4266  
    3131import importNode 
    3232import NodeDialog 
    33 from amara import binderytools 
     33import xml.dom.minidom 
     34from xml.dom.minidom import Node 
    3435import generate.genNode as genNode 
    3536import webbrowser 
     
    20632064###############################################################################                 
    20642065def LoadConfiguration(frame_obj): 
    2065     doc_cfg = binderytools.bind_file('../wavedev.cfg') 
    2066     frame_obj.version = str(doc_cfg.owdconfiguration.version) 
     2066    '''Extracts information from configuration file''' 
     2067 
     2068    doc_cfg = xml.dom.minidom.parse('../wavedev.cfg') 
     2069 
     2070    # version 
     2071    try: 
     2072        frame_obj.version = \ 
     2073                str(doc_cfg.getElementsByTagName("version")[0].firstChild.data) 
     2074    except: 
     2075        frame_obj.version = "unknown" 
    20672076     
    2068     frame_obj.installPath = str(doc_cfg.owdconfiguration.installpath) 
    2069     if frame_obj.installPath[len(frame_obj.installPath)-1] != '/': 
    2070         frame_obj.installPath = frame_obj.installPath + '/' 
     2077    # install path 
     2078    try: 
     2079        frame_obj.installPath = \ 
     2080                str(doc_cfg.getElementsByTagName("installpath")[0].firstChild.data) 
     2081        if frame_obj.installPath[len(frame_obj.installPath)-1] != '/': 
     2082            frame_obj.installPath = frame_obj.installPath + '/' 
     2083    except: 
     2084        frame_obj.installPath = "" 
    20712085     
    2072     frame_obj.stdIdlPath = str(doc_cfg.owdconfiguration.stdidlpath) 
     2086    # standard IDL path 
     2087    try: 
     2088        frame_obj.stdIdlPath = str(doc_cfg.getElementsByTagName("stdidlpath")[0].firstChild.data) 
     2089    except: 
     2090        frame_obj.stdIdlPath = "" 
    20732091    if len(frame_obj.stdIdlPath) > 0: 
    20742092        if frame_obj.stdIdlPath[len(frame_obj.stdIdlPath)-1] != '/': 
     
    20862104            tmpstr += "in the wavedev.cfg file located in the top directory." 
    20872105            errorMsg(frame_obj,tmpstr) 
    2088              
    2089     frame_obj.ossieIncludePath = str(doc_cfg.owdconfiguration.ossieincludepath) 
     2106     
     2107    # ossie include path 
     2108    try: 
     2109        frame_obj.ossieIncludePath = \ 
     2110                str(doc_cfg.getElementsByTagName("ossieincludepath")[0].firstChild.data) 
     2111    except: 
     2112        frame_obj.ossieIncludePath = "" 
     2113 
    20902114    if len(frame_obj.ossieIncludePath) > 0: 
    20912115        if frame_obj.ossieIncludePath[len(frame_obj.ossieIncludePath)-1] != '/': 
     
    21042128            tmpstr += "wavedev.cfg file located in the top directory." 
    21052129            errorMsg(frame_obj,tmpstr) 
    2106          
    2107     if hasattr(doc_cfg.owdconfiguration,'homedir'): 
    2108         frame_obj.homeDir = str(doc_cfg.owdconfiguration.homedir) 
    2109         if len(frame_obj.homeDir) > 0: 
    2110             if frame_obj.homeDir[len(frame_obj.homeDir)-1] != '/': 
    2111                 frame_obj.homeDir = frame_obj.homeDir + '/' 
    2112     else: 
    2113         frame_obj.homeDir = '' 
    2114  
    2115              
    2116  
    2117  
     2130 
     2131    # home directory 
     2132    try: 
     2133        frame_obj.homeDir = str(doc_cfg.getElementsByTagName("homedir")[0].firstChild.data) 
     2134    except: 
     2135        frame_obj.homeDir = "" 
     2136 
     2137    if len(frame_obj.homeDir) > 0: 
     2138        if frame_obj.homeDir[len(frame_obj.homeDir)-1] != '/': 
     2139            frame_obj.homeDir = frame_obj.homeDir + '/' 
     2140 
     2141