{
if (stream) {
delete py;
- ccprintf(*stream, "if __name__ == '__main__':\n");
+ ccprintf(*stream, "\n\nif __name__ == '__main__':\n");
ccprintf(*stream, " program_display()\n");
stream->close();
delete stream;
++i;
}
}
- py->next();
+// py->next();
}
void
Data::python(const string &name, const string &subname, const string &bin)
{
- py->start("collections.append");
- py->start("Collection");
+ py->name("collections.append");
+ py->newline();
+ py->name("Collection");
+ py->newline();
py->qarg(name);
+ py->newline();
py->qarg(subname);
+ py->newline();
py->qarg(bin);
+ py->newline();
py->qarg(hostname());
+ py->newline();
py->qarg(Time::start.date());
- py->startList();
+ py->newline();
+ py->list();
list_t::iterator i = allStats.begin();
list_t::iterator end = allStats.end();
while (i != end) {
StatData *stat = *i;
+ py->newline();
stat->python(*py);
++i;
}
- py->endList();
- py->end();
- py->end();
+ py->newline();
+ py->listEnd();
+ py->newline();
+ py->nameEnd();
+ py->newline();
+ py->nameEnd();
+ py->newline();
}
StatData *
void
ScalarDataBase::python(Python &py) const
{
- py.start("Scalar");
+ py.name("Scalar");
py.qarg(name);
py.qqqarg(desc);
py.kwarg("binned", binned());
if (prereq)
py.qkwarg("prereq", prereq->name);
py.kwarg("value", val());
- py.end();
+ py.nameEnd();
}
void
{
const_cast<VectorDataBase *>(this)->update();
- py.start("Vector");
+ py.name("Vector");
py.qarg(name);
py.qqqarg(desc);
py.kwarg("binned", binned());
py.qkwarg("subnames", subnames);
if (!subdescs.empty())
py.qkwarg("subdescs", subdescs);
- py.end();
+ py.nameEnd();
}
void
else
s += "FullDist";
- py.start(s);
+ py.name(s);
py.arg(sum);
py.arg(squares);
py.arg(samples);
py.arg(bucket_size);
py.arg(size);
}
- py.end();
+ py.nameEnd();
}
void
{
const_cast<FormulaDataBase *>(this)->update();
- py.start("Formula");
+ py.name("Formula");
py.qarg(name);
py.qqqarg(desc);
py.kwarg("binned", binned());
py.qkwarg("subnames", subnames);
if (!subdescs.empty())
py.qkwarg("subdescs", subdescs);
- py.end();
+ py.nameEnd();
}
void
{
const_cast<DistDataBase *>(this)->update();
- py.start("Dist");
+ py.name("Dist");
py.qarg(name);
py.qqqarg(desc);
py.kwarg("binned", binned());
if (prereq)
py.qkwarg("prereq", prereq->name);
data.python(py, "dist");
- py.end();
+ py.nameEnd();
}
void
{
const_cast<VectorDistDataBase *>(this)->update();
- py.start("VectorDist");
+ py.name("VectorDist");
py.qarg(name);
py.qqqarg(desc);
py.kwarg("binned", binned());
i->python(py, "");
++i;
}
- py.endTuple();
- py.end();
+ py.tupleEnd();
+ py.nameEnd();
}
void
{
const_cast<Vector2dDataBase *>(this)->update();
- py.start("Vector2d");
+ py.name("Vector2d");
py.qarg(name);
py.qqqarg(desc);
py.kwarg("binned", binned());
py.kwarg("x", x);
py.kwarg("y", y);
- py.end();
+ py.nameEnd();
}
void