Examples

Easy first Examples

Read the interesting URL from the user. At the second run, nothing is asked to the user.

1
2
3
4
5
6
7
import upref

user_data = upref.get_pref(
    {"url": {"label": "The application url"}},
    "example01")

print("URL is {}".format(user_data['url']))

Here is the created file. The is located in the user folder.

example01.conf
1
2
3
url:
  label: The application url
  value: http://www.test.org/