make empty window open
This commit is contained in:
parent
ed8c496856
commit
1e814ba553
5 changed files with 16 additions and 10 deletions
|
@ -1,3 +1,3 @@
|
|||
import data
|
||||
import config
|
||||
import screen
|
||||
from . import data
|
||||
from . import config
|
||||
from . import screen
|
|
@ -2,7 +2,7 @@ import json
|
|||
from collections import UserDict
|
||||
import os
|
||||
import sys
|
||||
import data
|
||||
from . import data
|
||||
|
||||
class SettingsLoader(UserDict):
|
||||
def __init__(self: object, file: str) -> None:
|
||||
|
@ -11,9 +11,9 @@ class SettingsLoader(UserDict):
|
|||
|
||||
def load_settings_file(self: object, file: str) -> None:
|
||||
ext = os.path.splitext(file)[1]
|
||||
with data.open('conf', file) as fd:
|
||||
with data.data_open('conf', file) as fd:
|
||||
if ext == '.json':
|
||||
self.data.extend(json.load(fd))
|
||||
self.data.update(json.load(fd))
|
||||
else:
|
||||
raise ValueError("Cannot open this type of settings file")
|
||||
|
||||
|
|
|
@ -10,8 +10,7 @@ def program_path() -> str:
|
|||
|
||||
return g_pp
|
||||
|
||||
def open(vault: str, path: str) -> object:
|
||||
def data_open(vault: str, path: str) -> object:
|
||||
fp = os.path.join(program_path(), vault, path)
|
||||
with open(fp, 'r') as fd:
|
||||
return fd.read()
|
||||
return open(fp, 'r')
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
import pyglet
|
||||
import engine
|
||||
|
||||
pyglet.window
|
||||
engine.screen.init_window()
|
||||
|
||||
|
||||
pyglet.app.run()
|
|
@ -0,0 +1,3 @@
|
|||
patch==1.16
|
||||
pyglet==2.0.10
|
||||
unoconv==0.9.0
|
Loading…
Add table
Reference in a new issue