Saturday, 14 December 2019

import subfolder in python

I have folder structure as follows:



/foo/trunk/mss/cloud



and



/foo/trunk/mss/model


my python file is located at subfolder model with name test.py I want to import all modules located in subfolder cloud so my code in test.py is:



import mss.cloud as cloud



but I got an error:




ImportError: No module named mss.clould




should I make any change on PYTHONPATH or anything else? any help is really appreciated.

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...