コード例 #1
0
ファイル: eqexam.py プロジェクト: simlmx/pytextron
 def __init__(self, problem_list, **kwargs):
     if isinstance(problem_list, Problem):
         problem_list = [problem_list]
     super(Exam, self).__init__(stack(problem_list))
コード例 #2
0
ファイル: test_blocks.py プロジェクト: simlmx/pytextron
 def test_stack(self):
     self.assertEqual(
         stack(['patate', 'poil']), 'patate\npoil')
     a = Block('patate')
     b = Block('poil')
     self.assertEqual(stack([a,b]), 'patate\npoil')
コード例 #3
0
ファイル: base.py プロジェクト: simlmx/pytextron
 def formated_content(self):
     if hasattr(self.content, '__iter__'):
         return stack(self.content)
     return self.content
コード例 #4
0
ファイル: latex_document.py プロジェクト: simlmx/pytextron
 def __init__(self, content=None, nb_compile_times=1):
     if content is not None:
         self.content = content
     if hasattr(self.content, '__iter__'):
         self.content = stack(self.content)
     self.nb_compile_times = nb_compile_times