Made the main path properly independent
This commit is contained in:
parent
8552874e7d
commit
188b0497cb
2 changed files with 12 additions and 6 deletions
|
@ -1,13 +1,19 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
from PIL import Image, ImageFont
|
||||
from settings import *
|
||||
from settings import font_boldness
|
||||
import os
|
||||
im_open = Image.open
|
||||
|
||||
path = ''
|
||||
path = os.path.dirname(os.path.relpath(__file__)).replace("\\", "/")
|
||||
if path != "" and path[-1] != "/":
|
||||
path += "/"
|
||||
|
||||
wpath = path+'weather-icons/'
|
||||
opath = path+'other/'
|
||||
fpath = path+'fonts/'
|
||||
fpath = 'fonts/'
|
||||
print(fpath)
|
||||
print(os.getcwd())
|
||||
|
||||
tempicon = im_open(opath+'temperature.jpeg')
|
||||
humicon = im_open(opath+'humidity.jpeg')
|
||||
|
|
|
@ -9,11 +9,11 @@ Copyright by aceisace
|
|||
"""
|
||||
from datetime import datetime
|
||||
from time import sleep
|
||||
from Assets import datetime_locals
|
||||
from Assets import datetime_locals, path
|
||||
from LoopTimer import LoopTimer
|
||||
import locale
|
||||
from DebugConsole import DebugConsole
|
||||
from settings import *
|
||||
from settings import language, render_to_display, render_to_file, display_colours, location, api_key, owm_paid_subscription, choosen_design, ical_urls, highlighted_ical_urls, rss_feeds, update_interval, calibrate_hours
|
||||
from MonthOvPanel import MonthOvPanel
|
||||
from DayListPanel import DayListPanel
|
||||
from DayViewPanel import DayViewPanel
|
||||
|
@ -28,7 +28,7 @@ output_adapters = []
|
|||
|
||||
if render_to_file:
|
||||
import ImageFileAdapter
|
||||
epd = ImageFileAdapter.ImageFileAdapter()
|
||||
epd = ImageFileAdapter.ImageFileAdapter(path)
|
||||
output_adapters.append(epd)
|
||||
|
||||
if render_to_display:
|
||||
|
|
Loading…
Reference in a new issue