public PyObject Encode()
        {
            PyTuple header = new PyTuple();
            PyTuple args = new PyTuple();
            PyToken exception = new PyToken(exception_type);
            PyDict keywords = new PyDict();

            args.Items.Add(new PyString(reason));

            keywords.Set("reasonArgs", reasonArgs);
            keywords.Set("clock", new PyLongLong(clock));
            keywords.Set("region", new PyString(region));
            keywords.Set("reason", new PyString(reason));
            keywords.Set("version", new PyFloat(version));
            keywords.Set("build", new PyInt(build));
            keywords.Set("codename", new PyString(codename));
            keywords.Set("machoVersion", new PyInt(machoVersion));

            header.Items.Add(exception);
            header.Items.Add(args);
            header.Items.Add(keywords);

            return new PyObjectEx(false, header);
        }
Exemplo n.º 2
0
 private static string PrintToken(PyToken token)
 {
     return "[PyToken " + token.Token + "]";
 }
Exemplo n.º 3
0
 private static string PrintToken(PyToken token)
 {
     return("[PyToken " + token.Token + "]");
 }
Exemplo n.º 4
0
 public PyObjectEx_Type1(PyToken type, PyTuple args)
     : base(false, CreateHeader(type, args))
 {
 }