ironpython : create a ConfigurationManager


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. import clr
  2. clr.AddReference("System.Configuration")
  3. from System.Configuration import ConfigurationManager
  4.  
  5. ConfigurationManager.AppSettings.BaseClear()
  6. ConfigurationManager.AppSettings.BaseAdd("lang",ArrayList(["fr",]))
  7.  
  8. print ConfigurationManager.AppSettings["lang"] // -> fr

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.