0

私は pylibnet ライブラリで自己紹介をしています。このコードにインポートされた定数を取得する方法をお尋ねしたいと思います。

import libnet
from libnet.constants import *

help(libnet) を試しましたが、問題に対する答えがありません。

ありがとうございました!!

4

1 に答える 1

1

試しましたdir(libnet.constants)か?

また、libnet.constants.__dict__動作するはずです。

あなたができるノイズを少し減らすために

[x for x in libnet.constants.__dict__ if x[:2] != '__' and not callable(libnet.constants.__dict__[x])]
于 2011-03-17T18:16:35.913 に答える