refactor samples, remove OS dependencies
Issue #35
resolved
In Windows wie have HOMEPATH while in linux it is HOME
We should check the examples to use sys.platform
Comments (4)
-
-
reporter With the refactoring of mss to use a json config file and also start without that in place we have now a tempdir in place. Other places may also call tempfile.gettempdir()
wms_cache=config_loader(dataset="wms_cache", default=os.path.join(tempfile.gettempdir(), "mui_wms_cache")))
The default can be overwritten by the entry in the json file.
-
reporter - changed milestone to 1.2.0
-
reporter - changed status to resolved
This was during many commits solved, most was done by refactoring mss to use a json config file with sane defaults and the other parts with refactoring the server code and configs.
- Log in to comment
Sounds good to take this into account. On my Windows7 system HOMEPATH does not give an absolute path...
There may be something in a python standard module to help us: This from os.path import expanduser home = expanduser("~") is supposed to work on all platforms. From quick testing, it works on my Windows7 machine and ob debian Lenny.