Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,156,719 members, 7,831,286 topics. Date: Friday, 17 May 2024 at 04:33 PM |
Nairaland Forum / AbsoluteMadMan's Profile / AbsoluteMadMan's Posts
(1) (of 1 pages)
Religion / Re: Pastor Chukwuemeka Ohanaemere Slams Man On The Ground For Deliverance (VIDEO) by AbsoluteMadMan: 4:07pm On May 26, 2018 |
Who needs WWE |
Programming / Re: 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)
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 3 |