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
22
app/main.py
22
app/main.py
|
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import webview
|
||||
|
||||
|
||||
class Api():
|
||||
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
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
api = Api()
|
||||
webview.create_window('Stardew Mod Launcher v0.0.1', '../assets/index.html', js_api=api, min_size=(600,400))
|
||||
webview.start(debug=True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue