public PyConverter NewMyDictConverter()
 {
     using (Py.GIL())
     {
         var converter = new PyConverter();  //create a instance of PyConverter
         converter.AddListType();
         converter.Add(new StringType());
         converter.Add(new Int64Type());
         converter.Add(new Int32Type());
         converter.Add(new FloatType());
         converter.Add(new DoubleType());
         converter.AddDictType <string, object>();
         return(converter);
     }
 }
Example #2
0
        public PyConverter GetConverter()
        {
            //using (Py.GIL())
            //{
            var converter = new PyConverter();

            converter.AddListType();
            converter.Add(new StringType());
            converter.Add(new Int64Type());
            converter.Add(new Int32Type());
            converter.Add(new FloatType());
            converter.Add(new DoubleType());
            converter.AddDictType <object, object>();
            return(converter);

            //}
        }