Editing Configuration Files For Python
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | This is an article started by Russ Hensel, see "http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles" About My Articles for a bit of info. | + | This is an article started by Russ Hensel, see "http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles" About My Articles for a bit of info. The page is only partly finished. |
− | |||
− | |||
− | |||
= Why Configuration Files = | = Why Configuration Files = | ||
Line 64: | Line 61: | ||
If you are asking why Parameters is not all defined at a Class level instead of instance level it is because I did not think of it then, I am now but have not changed the code so far ( requires more thought ). | If you are asking why Parameters is not all defined at a Class level instead of instance level it is because I did not think of it then, I am now but have not changed the code so far ( requires more thought ). | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== How: More Advanced == | == How: More Advanced == | ||
Line 192: | Line 182: | ||
=== My Overall Structure === | === My Overall Structure === | ||
− | + | * Meet the syntactic requirements for class creation. | |
− | |||
− | * Meet the syntactic requirements for class | ||
* Assign instance to AppGlobal | * Assign instance to AppGlobal | ||
− | * Call a subroutine that defaults all value as best it can | + | * Call a subroutine that defaults all value as best it can ( including getting OS and computer name ) |
− | * Call a subroutine that tweaks values according to | + | * Call a subroutine that tweaks values according to OS |
− | * Call a subroutine at give a value to mode and sets the mode of operation that has the name self.mode | + | * Call a subroutine that tweaks values according to computer name |
+ | * Call a subroutine at give a value to mode and sets the mode of operation that has the name self.mode | ||
* Done | * Done | ||
− | Code discipline is such that other code never | + | Code discipline is such that other code never touches these values again ( except for some cute little monkey patching that I currently do not use and do not want to explain ). |
+ | |||
== Why Advantages/Features == | == Why Advantages/Features == | ||
Line 226: | Line 216: | ||
= Editing and Editors = | = Editing and Editors = | ||
− | |||
− | |||
− | |||
You need a text editor suitable for .py files to manage the parameter file ( parameters.py ) | You need a text editor suitable for .py files to manage the parameter file ( parameters.py ) | ||
This includes most text editors. I particularity like: | This includes most text editors. I particularity like: | ||
Line 247: | Line 234: | ||
= Other Links = | = Other Links = | ||
*'''Check out link to left "What links here" This will, in part, link to projects using this type of configuration''' | *'''Check out link to left "What links here" This will, in part, link to projects using this type of configuration''' | ||
− | |||
− | |||
*'''[https://param.pyviz.org/ Param — Param 1.9.0 documentation ]''' | *'''[https://param.pyviz.org/ Param — Param 1.9.0 documentation ]''' | ||
Line 270: | Line 255: | ||
-------------> | -------------> | ||
[[Category:Arduino/RaspberryPi]][[Category:Python]][[Category:SmartTerminal]][[Category:Python SmartPlug]] [[Category:Python Easy DB]] [[Category:Python Projects]] | [[Category:Arduino/RaspberryPi]][[Category:Python]][[Category:SmartTerminal]][[Category:Python SmartPlug]] [[Category:Python Easy DB]] [[Category:Python Projects]] | ||
− |