Walnut/Advanced Topics/E Properties File

From Erights

(Difference between revisions)
Jump to: navigation, search
(E Properties File)
(E Properties File: formatting)
 
(One intermediate revision not shown)
Line 1: Line 1:
[[Category:Walnut|7]]
[[Category:Walnut|7]]
-
===E Properties File===
+
==='''''E''''' Properties File===
-
E installations include the props.txt properties file, chock full of information that is occasionally useful. You can access it through the interp object. In this example, we get the home directory for the<span class="e">'' E ''</span>installation, which can be useful if you wish to store data in a known location to be shared by multiple<span class="e">'' E ''</span>programs:
+
'''''E''''' installations include the props.txt properties file, chock full of information that is occasionally useful. You can access it through the interp object. In this example, we get the home directory for the ''''' E ''''' installation, which can be useful if you wish to store data in a known location to be shared by multiple '''''E ''''' programs:
<pre>
<pre>

Latest revision as of 19:11, 31 December 2006


E Properties File

E installations include the props.txt properties file, chock full of information that is occasionally useful. You can access it through the interp object. In this example, we get the home directory for the E installation, which can be useful if you wish to store data in a known location to be shared by multiple E programs:

pragma.syntax("0.9")
def ehomePath := (interp.getProps()) ["e.home"]

The properties are stored in a map which can be accessed in the usual manner. For a complete listing of the information in the props.txt file, open yours up and take a look.

Personal tools
more tools