★ wanayoo — archive 1999 https://github.com/hackorama/java-props-in-pythonNouvelle recherche | Portail wanayoo
Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Read a java properties file in python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
jprops.py

README.md

java-props-in-python

Read the key, element pairs from a java properties file

Follows the java properties file format and tested against the Java 6 version of java.util.Properties

Args:
  propfile: a valid file object (as returned by open(filename))
Returns:
  The property key and elements as a dict
Raises:
  IOError: if file operation fails with I/O related reason
  Corresponds to java IOException in Properties.load()
UnicodeDecodeError: if the property file has malformed \uxxxx encoding,
  Corresponds to java IllegalArgumentException in Properties.load()
AttributeError: if invalid object was provided for file object
  Corresponds to java NullPointerException
Something went wrong with that request. Please try again.