Newbie packages Q

MarkyMarc marcsgbrevkonto at
Sun Oct 7 13:10:40 CEST 2007

Hi All,

I do not understand the packages system in python. I have read this a 100 times and I can not get it
to work.

I make a test app like this:
Test/ (a empty file)
      (a empty file)
      (a empty file)
from Test.bpack import btest

def printA():
	print "This is Atest from Apack"

def printbtest():
	print btest.printB()

print printA()
print printbtest()
from Test.apack import atest

def printB():
	print "This is Btest from Bpack"

def printatest():
	print atest.printA()

print printatest()

All I get is an import error: ImportError: cannot import name x

I can remove the import statements an use the Test package quit normal
but when I try to make intra-pacage references I get the import error.

I must be missing something, could any one point me at what.

Thank you.

More information about the Python-list mailing list