Changes

Jump to navigation Jump to search
no edit summary
Line 81: Line 81:  
       #Print out a boolean value that tells us whether we are on an XO or not.  
 
       #Print out a boolean value that tells us whether we are on an XO or not.  
 
       print os.path.exists('/sys/power/olpc-pm')
 
       print os.path.exists('/sys/power/olpc-pm')
 +
</pre>
 +
 +
=== How do I know the current language setting on my XO? ===
 +
The system variable 'LANG' tells you which language is currently active on the XO. The following code shows how to look at the value of this variable.
 +
 +
<pre>
 +
import os
 +
...
 +
      _logger.debug(os.environ['LANG'])
 
</pre>
 
</pre>
    
= Notes =
 
= Notes =
 
<references />
 
<references />
Anonymous user

Navigation menu