mirror of
https://github.com/csd4ni3l/browser.git
synced 2026-01-01 04:03:43 +01:00
Add backgrounds to finish layout tutorial, add inline and remote CSS support with a default of browser.css which currently supports fonts and backgrounds
This commit is contained in:
5
run.py
5
run.py
@@ -14,9 +14,12 @@ sys.excepthook = on_exception
|
||||
pyglet.resource.path.append(os.getcwd())
|
||||
pyglet.font.add_directory('./assets/fonts')
|
||||
|
||||
if not log_dir in os.listdir():
|
||||
if not os.path.exists(log_dir):
|
||||
os.makedirs(log_dir)
|
||||
|
||||
if not os.path.exists("http_cache"):
|
||||
os.makedirs("http_cache")
|
||||
|
||||
while len(os.listdir(log_dir)) >= 5:
|
||||
files = [(file, os.path.getctime(os.path.join(log_dir, file))) for file in os.listdir(log_dir)]
|
||||
oldest_file = sorted(files, key=lambda x: x[1])[0][0]
|
||||
|
||||
Reference in New Issue
Block a user