June 2019
Beginner to intermediate
770 pages
19h 24m
English
The properties files are often used with Java programs. However, there's no reason why we can't use them with Python. They're relatively easy to parse and allow us to encode the configuration parameters in a handy, easy-to-use format. For more information about the format, you can refer to http://en.wikipedia.org/wiki/.properties and https://docs.oracle.com/javase/10/docs/api/java/util/Properties.html#load(java.io.Reader).
Here's what a properties file might look like:
# Example Simulation Setup player.betting: Flat player.play: SomeStrategy player.rounds: 100 player.stake: 50 table.dealer: Hit17 table.decks: 6 table.limit: 50 table.payout: (3,2) table.split: NoResplitAces simulator.outputfile ...
Read now
Unlock full access