schedule.pyという名前のファイルがあります。
class SchedGen:
""" Class creates a pseudo random Schedule.
With 3/4 of total credit point required for graduation"""
def __init__(self, nof_courses=40):
random.seed()
self.courses = {}
self.nof_courses = nof_courses
for i in xrange(nof_courses):
self.courses[i] = college.Course(i)
self.set_rand_cred()
self.set_rand_chance()
self.set_rand_preq_courses()
def set_rand_cred(self):
""" Set random credit to courses uniformly between 2 and 6"""
temp_dict = self.courses.copy()
スケジュールのコンテンツをインポートしている間、私はimport schedule
好きですか:
import schedule
それが正しい場合、SchedGen クラスから関数 set_rand_cred(self) にアクセスするにはどうすればよいですか?