--- a/Utilities/__init__.py Sat Jul 02 18:19:03 2011 +0200 +++ b/Utilities/__init__.py Sun Jul 03 18:01:53 2011 +0200 @@ -531,6 +531,21 @@ return flags +def extractFlagsFromFile(filename): + """ + Function to extract eric specific flags out of the given file. + + @param filename name of the file to be scanned (string) + @return dictionary of string, boolean, complex, float and int + """ + try: + source, encoding = readEncodedFile(filename) + except (UnicodeError, IOError): + return {} + + return extractFlags(source) + + def toNativeSeparators(path): """ Function returning a path, that is using native separator characters.