while going with config switching, you can include some common values from
third file, will save some copy-paste work:
config1.py:
myPlatform="windows"
execfile("common-config.py")
config2.py:
myPlatform="linux"
execfile("common-config.py")
common-config.py:
echo "my current platform is:",myPlatform
normally, execfile() is not a prefered way include module in python, but in
this case it will save some trouble of exchanging values from caller
config. going the "normal" way (using import statements) you'd have to
declare everything from common-config.py as function(s), and call them from
config1/config2 with config-specific arguments.
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sphinx-dev/-/GDcYMgUPKl0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en.