I made file called thread.py and if I want to import it, it doesn't work. When I use a filename like cheese.py it works fine
import json
from thread import Thread
class Board:
name = ""
shortcode = ""
threads = []
url = ""
api_url = ""
json = ""
def __init__(self, board, api_url, json):
self.shortcode = board
self.api_url = api_url
self.json = json
self.__getPosts()
def __getPosts(self):
i = 0
for thread in self.json[0]['threads']:
thread = Thread()
self.threads[i] = thread
i+=1
thread.py
class Thread:
def __init__(self):
i = 1