私信  •  关注

jgoday

jgoday 最近创建的主题
jgoday 最近回复了
6 年前
回复了 jgoday 创建的主题 » 使用python脚本的docker中的尾部堆栈

打印后尝试使用sys.stdout.flush(),以强制在屏幕上打印输出缓冲区。似乎对我有用(同样的dockerfile和script)

6 年前
回复了 jgoday 创建的主题 » 使用python访问.net核心dll

我正在试用Fedora29,使用Mono5.18、Python3.7和NetCore3.0.100-Preview-009812, 如果使用绝对路径解析netcore dll

import clr
import os

clr.AddReference(os.path.abspath('./bin/Debug/netstandard2.0/sample.dll'))
import sample
p = sample.Person(name='Peter')

netcore项目就是这样产生的

dotnet new classlib -o sample

个人类别

using System;

namespace sample
{
    public class Person
    {
            public string Name { get; set; }
    }
}

更新

基于@smhp提供的数据,main.net framework/mono(pythonnet runtime)和以.netcoreapp 2.0为目标的库之间似乎不兼容。

enter image description here

enter image description here