Creating a python module

Viewed 4148

I create two files: test.py and test1234.py

test.py contains:

import test1234
t = test1234.test()

test1234.py contains:

class test():
    def __init__(self):

When put in the same directory, python test.py runs without error.

However, if I create a directory test1234 and put test1234.py and a blank init.py in this directory, python test.py gives the error:

AttributeError: 'module' object has no attribute 'test'

What do I need to do for test.py to be able to see the test class in test1234.py?

1 Answers
Related