python convert pyc files to py

python -m py_compile lib/ylpy.py

python -m py_compile lib/ylpy.py

How a python .py file called classes and functions to another .py file

A.py file:

 

  1.  
    def add(x,y):
  2.  
    Print ( 'and is:% d'% (x + y))


B.py file:

 

    1.   import A
    2.  
      A.add(1,2)
    3.  

Guess you like

Origin www.cnblogs.com/gisoracle/p/11360737.html