Hello,

I have Python package tst in my workspace.

tst has files:
__init__.py
tst.py


content of __init__.py:
print("importing Tst")


content of tst.py:
class Tst:
    def __init__(self):
        print("init Tst")


I run python console in workspace directory. I do
>>>import tst
Run without errors. I was expected "importing Tst" to be printed, but nothing 
happened. Why?


I run
t=tst.tst.Tst()

and got error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'tst' has no attribute 'tst'

Wh it not finds Tst class?
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to