₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,327,733 members, 8,432,326 topics. Date: Tuesday, 23 June 2026 at 02:45 PM

Toggle theme

AbsoluteMadMan's Posts

Nairaland ForumAbsoluteMadMan's ProfileAbsoluteMadMan's Posts

1 (of 1 pages)

Christianity EtcRe: Pastor Chukwuemeka Ohanaemere Slams Man On The Ground For Deliverance (VIDEO) by AbsoluteMadMan: 4:07pm On May 26, 2018
Who needs WWE
ProgrammingRe: Python Programmers Please Help Out by AbsoluteMadMan: 4:02pm On May 26, 2018
Let's say you have a folder myprogram and this is your working directory. These are the ways you can import modules in that folder.

with a file myfolder/main.py
you can import using
import main
# or
from .main import x

with a file myfolder/myprogram/__init__.py, and another myfolder/myprogram/main.py
where the content of myfolder/myprogram/__init__.py is
from .main import MyClass


you can do:
import myprogram
cls = myprogram.MyClass()

# or
from myprogram import MyClass
cls = MyClass()

1 (of 1 pages)