Writing a package

Paulo da Silva p_d_a_s_i_l_v_a_ns at nonetnoaddress.pt
Fri Feb 4 19:37:24 EST 2022


Hello!

Let's say I have a dir src containing another dir named foo and a script 
test.py.

So, I have
src/foo (dir)
src/test.py (script)

test.py has the folloing code:

import foo as f
c=f.C()

I am inside src and want to run python test.py.

How can I create the class C inside src/foo dir if it is possible at all?

Thanks.


More information about the Python-list mailing list