0

Considering a namespace package in python 3.7, how would I pass an argument to my package when I initialise it?

my_package
  __init__.py

I wish to be able to call my_package(arg).

Thank you,

Kourosh
  • 608
  • 2
  • 14
  • 34
  • Does this answer your question? [Callable modules](https://stackoverflow.com/questions/1060796/callable-modules) – blueteeth Dec 09 '19 at 15:51
  • @blueteeth so should I just add "def__call__(arg)" to my__init__.py? – Kourosh Dec 09 '19 at 16:05
  • No. This answer. https://stackoverflow.com/a/48100440/1904146 It won't work in an interpreter either, only when called from a file. – blueteeth Dec 10 '19 at 12:23

0 Answers0