Skip to content

Commit

Permalink
os_utils.py: remove unused click_website and my_url_show
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Oct 23, 2023
1 parent 3172b8c commit 226bf27
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions pyglossary/os_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import shutil
import sys
from pathlib import Path
from typing import TYPE_CHECKING, Any, Callable, Union
from typing import TYPE_CHECKING, Callable, Union

from pyglossary import core

Expand Down Expand Up @@ -154,29 +154,3 @@ def showMemoryUsage() -> None:
return
usage = psutil.Process(os.getpid()).memory_info().rss // 1024
core.trace(log, f"Memory Usage: {usage:,} kB")


def my_url_show(link: str) -> None:
import subprocess
for path in (
'/usr/bin/gnome-www-browser',
'/usr/bin/firefox',
'/usr/bin/iceweasel',
'/usr/bin/konqueror',
):
if os.path.isfile(path):
subprocess.call([path, link])
break


# try:
# from gnome import url_show
# except:
# try:
# from gnomevfs import url_show
# except:
# url_show = my_url_show


def click_website(widget: "Any", link: str) -> None:
my_url_show(link)

0 comments on commit 226bf27

Please sign in to comment.