← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

 

Creating such a view isn't as difficult. Problematic would be to redirect the output to such a view. So for now i would suggest another approach: Setting DISPLAY through update_help.py: 

# Because wl_map_object_info needs access to a graphical server, which is running at
# DISPLAY :1 we have to set the environment variable accordingly.

if not 'DISPLAY' in os.environ:   # No DISPLAY set -> default on the server console
    display_set = True
    os.environ['DISPLAY']=":1"

# Here is the call to wl_map_object_info

if display_set:                  # Unset DISPLAY
    os.environ.pop('DISPLAY')


This is testet on the alpha site and works fine. A button could be implemented later on.

I think documenting any server related spacial things in the readme would blow it up without a need for normal users which may just want to look into the code and runs the widelands homepage local. Documenting this in the code is imho better.
-- 
https://code.launchpad.net/~widelands-dev/widelands-website/encyclopedia/+merge/287410
Your team Widelands Developers is subscribed to branch lp:widelands-website.


References