對於任何尋求正式答案的人來說,這是「不」。 PythonDotNet遍歷Python對象的內部工作。
/// <summary>
/// TypeFlags(): The actual bit values for the Type Flags stored
/// in a class.
/// Note that the two values reserved for stackless have been put
/// to good use as PythonNet specific flags (Managed and Subclass)
/// </summary>
internal class TypeFlags {
public static int HaveGetCharBuffer = (1 << 0);
public static int HaveSequenceIn = (1 << 1);
public static int GC = 0;
public static int HaveInPlaceOps = (1 << 3);
public static int CheckTypes = (1 << 4);
public static int HaveRichCompare = (1 << 5);
public static int HaveWeakRefs = (1 << 6);
public static int HaveIter = (1 << 7);
public static int HaveClass = (1 << 8);
public static int HeapType = (1 << 9);
public static int BaseType = (1 << 10);
public static int Ready = (1 << 12);
public static int Readying = (1 << 13);
public static int HaveGC = (1 << 14);
// 15 and 16 are reserved for stackless <- quote from the python source
public static int HaveStacklessExtension = 0;
/* XXX Reusing reserved constants */
public static int Managed = (1 << 15); // PythonNet specific
public static int Subclass = (1 << 16); // PythonNet specific
不好的建議,不幸的是,這將不適用於我們的應用程序。可能還有另外一種可能性。如果能解決問題,將會發布。謝謝。 – 2012-03-07 21:58:41
2016更新 - 做這種事情的自然Python「方式」是芹菜(http://www.celeryproject.org/) – jsbueno 2016-02-04 11:59:56