In Python's Imp, "importerror: No Frozen Submodule Named ..."
I'm trying to write a script which searches a directory for a module with a given name. I'd like to use the find_module method of Python's imp. However, I don't quite understand wh
Solution 1:
Following this issue on bugs.python.org, the path
argument needs to be embedded within a list:
In [4]: imp.find_module('iclib',[os.getcwd()])
Out[4]: (None, '/home/kurt/dev/ipercron-compose/furion/iclib', ('', '', 5))
With square brackets around the os.getcwd()
, the function returns the expected output.
Post a Comment for "In Python's Imp, "importerror: No Frozen Submodule Named ...""