I’m using Python 2.7. I’m rather new to the python langauge. I have two python modules – “Trailcrest.py” and “Glyph.py”, both in the same folder, but not in the Python27 folder.
I need to import “Trailcrest.py” into “Glyph.py”, but I am getting the message that “no such module exists”.
Additionally, whatever means I use to import the module needs to not be dependent on a solid-state path. This program is cross-platform, and the path can be changed depending on the user’s preferences. However, these two modules will always be in the same folder together.
How do I do this?
If you have
Trailcrest.pyandGlyph.pyin the same folder, importing one into the other is as simple as:If this does not work, there seems to be something wrong with your Python setup. You might want to check what’s in
sys.path.