Changeset 781


Ignore:
Timestamp:
03/04/11 02:11:08 (8 years ago)
Author:
technomage
Message:

Patch by Technomage

  • Amended PARPGApplication in parpg/application.py to look for a "FifePath?" entry in the "fife" category of the settings.ini file. This setting can point PARPG to the directory where the fife package can be found;
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/active/character_customization/game/parpg/application.py

    r775 r781  
    1414and the basic Listener for PARPG """ 
    1515 
     16import sys 
    1617import os 
    1718 
     
    111112        """Initialise the instance. 
    112113           @return: None""" 
    113         self._setting = setting  
     114        self._setting = setting 
     115        fife_path = getattr(self._setting.fife, 'FifePath', None) 
     116        if fife_path is not None: 
     117            if 'fife' in os.listdir(os.path.abspath(fife_path)): 
     118                sys.path.append(fife_path) 
     119            else: 
     120                error_message = 'could not find fife package in {0}' 
     121                raise ValueError(error_message.format(fife_path)) 
    114122        self.engine = fife.Engine() 
    115123        self.loadSettings() 
Note: See TracChangeset for help on using the changeset viewer.