betterSIS Web Utilities Documentation¶
BETTERSIS.WEB_UTILS: web utilities used to manage web pages
- bettersis.web_utils.open_browser(t_url, t_details='')[source]¶
Tries to open
<t_url>page with a browser.If the user is root, browsers will fail to open: the function will print a message to the user to open the url manually
<t_details>is shown before “page” inside messages.Example:
>>> details = "tutorials" >>> tutorials_page = "http://www.example.com/index.html" >>> open_browser(tutorials_page, details) Trying to open the tutorials page on a browser... Done, the webpage is open # if running as root: Trying to open the tutorials page on a browser... can't open the browser because you are running betterSIS as root! You can find the tutorials page at this URL: http://www.example.com/index.html
- Parameters
t_url (str) – url to open
t_details (str) – details about the page
- Return bool success
True if the browser was opened successfully