Seite 1 von 1

py2exe bei import?

Verfasst: Montag 13. Juni 2005, 12:27
von hannes99
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!

Verfasst: Montag 13. Juni 2005, 13:05
von Leonidas
Ich seh grad dein Problem nicht:
first.py:

Code: Alles auswählen

#!/usr/bin/env python
# -*- encoding: latin-1 -*-
import second
second.isthere()
second.py:

Code: Alles auswählen

#!/usr/bin/env python
# -*- encoding: latin-1 -*-

def isthere():
    print "Yep, I'm here"
$ python first.py
Yep, I'm here
setup.py

Code: Alles auswählen

from distutils.core import setup
import py2exe

setup(
  console=['first.py'],
) 
$ python setup.py py2exe
$ cd dist
$ ./first
Yep, I'm here
(Wobei $ dein Shellprompt ist und du das ./ weglassen kannst)