Пример #1
0
def f_module():
    print("f_module()")
    mymodule.myfunc()

    mymod.myfunc()
    my = mymod.MyClass()
    my.mymethod()
Пример #2
0
from mymodule import myfunc

# the moment we import a module all the indentetion level 0 codes will run
# so here mymoodule has __name__ == __main__ check at indentation level 0  which runs

print("I am at indentation 0 ")

myfunc()

if __name__ == '__main__':
    print("mymainpy am getting executed as main file")
    #myfunc()
def test_1():  
    from mymodule import myfunc
    print("testing...")
    assert myfunc() 
Пример #4
0
#!/usr/bin/env python
# -*- coding: utf8 -*-
"""De fortran à python avec f2py"""


# Importation et aide
import mymodule
help(mymodule)
print mymodule.myfunc.__doc__


# Utilisation
import numpy as N
a = N.arange(3.)
print mymodule.myfunc(a)
Пример #5
0
from mymodule import myfunc
myfunc() # this is the first commit
#comment added in new folder
#One more line added to check the add command of git

Пример #6
0
# Importing hand-made modules.
# The name of the module corresponds to the 'mymodule.py' file in current directory.

import mymodule

mymodule.myfunc()
print(mymodule.s(8, 9))

# __name__ gives you the name of the current package. For the main script, it will be set to '__main__'.
# Inside a module, it will keep the name of a module (which is its namespace).
print(__name__)
Пример #7
0
#!/usr/bin/env python
# -*- coding: utf8 -*-
"""De fortran à python avec f2py"""

# Importation et aide
import mymodule
help(mymodule)
print mymodule.myfunc.__doc__

# Utilisation
import numpy as N
a = N.arange(3.)
print mymodule.myfunc(a)