Hallo,
ich habe eine python datei 123.py in der 456.py importiert wird. Wie mache ich es nun mit py2exe, dass 123.exe auch auf die Datei 456 zurückgreift?
Wenn ich es ganz normal mit py2exe mache klappt es nicht.
Vielen Dank!
py2exe bei import?
-
- Python-Forum Veteran
- Beiträge: 16025
- Registriert: Freitag 20. Juni 2003, 16:30
- Kontaktdaten:
Ich seh grad dein Problem nicht:
first.py:
second.py:
first.py:
Code: Alles auswählen
#!/usr/bin/env python
# -*- encoding: latin-1 -*-
import second
second.isthere()
Code: Alles auswählen
#!/usr/bin/env python
# -*- encoding: latin-1 -*-
def isthere():
print "Yep, I'm here"
setup.py$ python first.py
Yep, I'm here
Code: Alles auswählen
from distutils.core import setup
import py2exe
setup(
console=['first.py'],
)
(Wobei $ dein Shellprompt ist und du das ./ weglassen kannst)$ python setup.py py2exe
$ cd dist
$ ./first
Yep, I'm here
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice