C:\Code \06 Fall \Other \Seagame C \Conch (conch.py is in here) My program, the one I'm running \Shining Sea \Conch (another copy is in here)
So apparently, even though I'm running a program in "Seagame C", which says "import Conch", Python is loading a completely different copy of Conch from another directory! What gives?
Put the conch.py you want to use in the same directory as your program if you want to be able to just import it.
Otherwise, you'll have to tell python where it is.
Apparently Python knows about the other conch somehow, but it doesn't recursively search subdirectories for modules (afaik)
import ConchTraceback (most recent call last): File "<pyshell#0>", line 1, in ? import Conch File "C:\Code\06 Fall\Shining Sea\Conch\__init__.py", line 1, in ? from conch import * File "C:\Code\06 Fall\Other\Seagame C\Conch\conch.py", line 18, in ? print "42"+42 TypeError: cannot concatenate 'str' and 'int' objects
Traceback (most recent call last): File "C:\Code\06 Fall\Other\Seagame C\main.py", line 360, in ? Conch.j.LoadSound("18403_inferno_xplosm.wav","cannon") File "C:\Code\06 Fall\Other\Seagame C\Conch\conch.py", line 150, in LoadSound new_sound = pygame.mixer.Sound( os.path.join(SOUND_DIRECTORY,filename) ) error: Unknown WAVE data format: 0x4x
So now it's loading the correct copy! Weird.
Kris