Changeset 2351 for trunk/source/api.py

Show
Ignore:
Timestamp:
08/19/08 12:17:15 (5 months ago)
Author:
pvagner
Message:

* speechDicts: fixing a problem where NVDA was unable to save dictionary entries for particular voices. Thanks Moodley, Deenadayalan

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/api.py

    r2314 r2351  
    268268                text = "" 
    269269        return text + " ".join(chunk for child in obj.children for chunk in (child.name, child.value) if chunk and isinstance(chunk, basestring) and not chunk.isspace()) 
     270 
     271def validateFile(name): 
     272        """Replaces invalid characters in a given string to make a windows compatible filename. 
     273@returns: A string holding altered name. 
     274@rtype: string 
     275@param name: text to makea file name of 
     276@type text: string 
     277""" 
     278        invalidChars=':?*\|<>/"' 
     279        for c in invalidChars: 
     280                name=name.replace(c,'_') 
     281        return name