This commit is contained in:
沈瑗杰 2021-05-25 21:15:43 +08:00
parent 4a294edd5a
commit 0a19076af3
5 changed files with 5 additions and 6 deletions

View File

@ -27,7 +27,7 @@ print("os.getcwd() = ", os.getcwd())
if __name__ == '__main__': if __name__ == '__main__':
from bin import main from bin import main
os.chdir(sys.path[0]) # TODO 没做完.ing
print(hi) print(hi)
game = main.Game() game = main.Game()
game.start() game.start()

View File

@ -7,7 +7,6 @@ import multiprocessing as mp
import os import os
import sys import sys
import time import time
sys.path.append('./bin/libs/') sys.path.append('./bin/libs/')
sys.path.append('./') sys.path.append('./')
import pyglet import pyglet

View File

@ -250,7 +250,8 @@ def config(file_name, stack=None): # // TODO 加上.config的读取+解析
return xml_load return xml_load
elif (f_type == 'config') or (f_type == 'conf'): elif (f_type == 'config') or (f_type == 'conf'):
cp = configparser.ConfigParser() # cp -> config parser cp = configparser.ConfigParser() # cp -> config parser
cf = cp.read(file_name) # cf -> config file cp.read(file_name) # config parser -> reader
def get_At(name, in_xml, need_type=str): def get_At(name, in_xml, need_type=str):

View File

@ -13,7 +13,7 @@
'visible': 'true', 'visible': 'true',
// bool // bool
'style': 'None', 'style': 'None',
'fps': 30, 'fps': 120,
'views': [ 'views': [
'space', 'space',
'map', 'map',

View File

@ -13,4 +13,3 @@ for c in configs.sections():
conf = configparser.ConfigParser() conf = configparser.ConfigParser()
conf.read('test_config.config') conf.read('test_config.config')
print(type(conf)) print(type(conf))
print(conf[:])