is "common" module in Standard Library?
I got this script for my program. The program uses python for scripting. Anyway, the script has this line
from common import Struct
Is this part of开发者_如何转开发 Python's standard library? because my python seems to be missing it. Maybe it is deprecated? The script didn't include anything else but that one python file, so i guessed it's not a module made by the script creator.
I would suggest you check for a common.py file and add it to your PYTHONPATH.
if you are using some sort of unix/bsd you could try to do a "locate common.py" and check if it has a Struct somewhere.
Hope this helps
In your script, just add after the line you quoted:
import sys
print sys.modules['common']
And it will show you the path where the module common
was imported from.
Based on this you could easily see if it is a Python standard library or not.
Alternatively if you go to any page like https://docs.python.org/3/library/index.html you can see the list of modules included with Python.
In both cases I think you can come to the conclusion that there is no common
module shipped with Python, and I would find it to be a very bad name if it existed like that.
精彩评论