Hello,

I have

MyPackage

  __init__.py

  fct1.py

  fct2.py


I use __init__.py to declare the public element of MyPackage:

import fct1 as internal1

import fct2 as internal2


def fct1():

   internal1.fct1()


def fct2():

  internal2.fct2()


So, I add the sphinx commands:

.. automodule:: MyPackage.fct1
   :members:
.. automodule:: MyPackage.fct2
   :members:


This works without any problem.

In fact, there is a runtime iniatialization code in the __init__.py like:


do_init_with_runtime_paramter(runtime_parameter)


Now, when I generate the sphinx documentation, sphinx says:

- Hello, I read the MyPackage.__init__.py file

- Hello, I execute do_init_with_runtime_paramter(runtime_parameter) that fails 
because runtime_parameter is not defined !


The question is it possible to generate sphinx documentation where there is a 
__init__.py with active code ?


Thanks,

PHL.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to