Hi everyone,
I have 4 .py files : main.py , file1.py , file2.py , file3.py
as :
main.py:
import sys
import file1
import file2
import file3
def main(a,b):
c=file1.somme(a,b)
d=file2.mul(a,b)
file3.div(a,b)
print c,d
if __name__ == '__main__':
a,b=sys.argv[1:]
a=int(a)
b=int(b)
main(a,b)
file1.py:
def somme(i1,i2):
return i1+i2
file2.py:
def mul(i1,i2):
return i1*i2
file3.py:
def div(i1,i2):
return i1/i2
I would like to create main.exe so I tried to write the following setup.py file:
from distutils.core import setup
import py2exe
import sys
includes=['src/file1.py','src/file2.py','src/file3.py']
setup(
options = {"py2exe": {"compressed": 2,
"optimize": 2,
'bundle_files': 3,
'dist_dir': 'dist',
"includes":includes,
}
},
console=['src/main.py']
)
but when I tried to run : python setup.py py2exe I get this error
ImportError: No module named src/file1
can someone help me please ?
PS: I'm using python 2.7 , windows 64
Thanks