Split main.py to separate packages and classes
This commit is contained in:
parent
a4894d612a
commit
64c9a96491
6 changed files with 29 additions and 11 deletions
13
app/webview_api/WebviewApi.py
Normal file
13
app/webview_api/WebviewApi.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import os
|
||||
|
||||
|
||||
class WebviewApi():
|
||||
def hello(self):
|
||||
print('Received hello()!')
|
||||
print('Returning "meow"!')
|
||||
return "meow"
|
||||
|
||||
def list_mods(self):
|
||||
sdv_root_dir = "/data/Games/SteamLibrary/steamapps/common/Stardew Valley"
|
||||
mod_list = os.listdir(sdv_root_dir + "/Mods")
|
||||
return mod_list
|
||||
1
app/webview_api/__init__.py
Normal file
1
app/webview_api/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from .WebviewApi import WebviewApi
|
||||
Loading…
Add table
Add a link
Reference in a new issue