File: __init__.py

package info (click to toggle)
fs-uae-arcade 3.1.63-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 24,456 kB
  • sloc: python: 56,011; makefile: 170
file content (32 lines) | stat: -rw-r--r-- 607 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import sys
import platform
import webbrowser


def default_url_open_function(url: str):
    webbrowser.open(url)


_url_open_function = default_url_open_function


def open_url_in_browser(url: str) -> None:
    if _url_open_function:
        _url_open_function(url)


def set_open_url_in_browser_function(func):
    global _url_open_function
    _url_open_function = func


def is_running_gnome_3():
    import fstd.desktop.gnome3

    return fstd.desktop.gnome3.running_in_gnome_3()


def is_running_windows_10():
    if sys.platform != "win32":
        return False
    return platform.uname()[2] == "10"