다른 python 파일의 변수를 가져와서 비교하려는 데 비교가 안되네요

조회수 565회
#test.py
NOW_TIME = "23:35:00"
#Discord.py
import discord
from discord.ext import commands
from discord.utils import get
import datetime
import asyncio
import time
import load_json_variable as variable
import test
import Timetable as ttb

class MyClass:
    TimetableStop = False
    tn = datetime.datetime.now()
    st = tn.strftime("%H:%M:%S")
    pass

#... 중략
@bot.command(name="test2")
async def react_test2(ctx):
    MyClass.TimetableStop = True
    await sends(ctx, test.NOW_TIME + "로 읽었습니다.")
    while stop:
        await asyncio.sleep(1)
        timeSet()
        if MyClass.st == str(test.NOW_TIME):
            await sends(ctx, "py파일을 정상적으로 읽었습니다.")
            break
        elif not MyClass.TimetableStop:
            break

이렇게 import도 제대로 됐고
await sends(ctx, test.NOW_TIME + "로 읽었습니다.")도 잘 불러오는데,

 if str(st) == str(test.NOW_TIME):
            await sends(ctx, "py파일을 정상적으로 읽었습니다.")
            break

여기 부분이 실행이 안됩니다. 어떻게 해야 될까요?

전체코드 필요하시면 드릴게요

1 답변

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)