
guten morgen allerseits, ist es möglich aus einem hidden directory zu importieren. from .hidden import * gibt einen syntax error danke robert _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

robert rottermann wrote:
Du musst .hidden in sys.path aufnehmen, dann sollte es funktionieren. Ciao, Martin _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

--On 25. Mai 2006 08:38:02 +0200 "\"Martin v. Löwis\"" <martin@v.loewis.de> wrote:
huh? das löst nicht wirklich das "Problem" mit dem Syntaxerror. -aj _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

Andreas Jung wrote:
Nein, man muss dann schreiben import foo falls .hidden die Datei foo.py enthält. Mir ist allerdings nicht ganz klar, wie Robert die Dateien strukturiert hat. ".hidden" ist vermutlich ein Verzeichnis, aber was ist der Inhalt dieses Verzeichnisses? Ciao, Martin _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

--On 25. Mai 2006 09:13:18 +0200 "\"Martin v. Löwis\"" <martin@v.loewis.de> wrote:
Ok, das allmorgentliche Stehen auf der Leitung ... :-)
Ich würde sagen: obskurer Usecase. -aj _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

Martin v. Löwis wrote:
ich kann diese natürlich durch anpassen von sys.path importieren. aber ich "wollte es halt wissen" hat sich insofern gelohnt, dass ich pep 328 gelesen habe merci einewäg robert _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

robert rottermann wrote:
Ach so. Diese Datei würde ich mit execfile einlesen. Ciao, Martin _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

--On 25. Mai 2006 08:27:33 +0200 robert rottermann <robert@redcor.ch> wrote:
Das ist die Syntax für relative Importe gemäß PEP 328. Ansonsten schau Dir das "imp" Modul an. -aj _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

robert rottermann wrote:
Du musst .hidden in sys.path aufnehmen, dann sollte es funktionieren. Ciao, Martin _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

--On 25. Mai 2006 08:38:02 +0200 "\"Martin v. Löwis\"" <martin@v.loewis.de> wrote:
huh? das löst nicht wirklich das "Problem" mit dem Syntaxerror. -aj _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

Andreas Jung wrote:
Nein, man muss dann schreiben import foo falls .hidden die Datei foo.py enthält. Mir ist allerdings nicht ganz klar, wie Robert die Dateien strukturiert hat. ".hidden" ist vermutlich ein Verzeichnis, aber was ist der Inhalt dieses Verzeichnisses? Ciao, Martin _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

--On 25. Mai 2006 09:13:18 +0200 "\"Martin v. Löwis\"" <martin@v.loewis.de> wrote:
Ok, das allmorgentliche Stehen auf der Leitung ... :-)
Ich würde sagen: obskurer Usecase. -aj _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

Martin v. Löwis wrote:
ich kann diese natürlich durch anpassen von sys.path importieren. aber ich "wollte es halt wissen" hat sich insofern gelohnt, dass ich pep 328 gelesen habe merci einewäg robert _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

robert rottermann wrote:
Ach so. Diese Datei würde ich mit execfile einlesen. Ciao, Martin _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

--On 25. Mai 2006 08:27:33 +0200 robert rottermann <robert@redcor.ch> wrote:
Das ist die Syntax für relative Importe gemäß PEP 328. Ansonsten schau Dir das "imp" Modul an. -aj _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
participants (3)
-
"Martin v. Löwis"
-
Andreas Jung
-
robert rottermann