[Python-de] Paket Modul import Problem.
Hermann Riemann <[email protected]> Sun, 16 Jun 2024 12:32:42 +0200
| Newsgroups | gmane.comp.python.general.german |
|---|---|
| Message-ID | <[email protected]> |
Gegeben 3 Dateien im Verzeichnis /irgendwas
test.py mit Inhalt:
print("test start")
import grr
print("test ende")
grr/__init__.py mit Inhalt:
print("start init grr")
import bla
print("ende init grr")
und grr/bla/__init__.py mit Inhalt:
print("in init bla")
python3 grr/__init__.py liefert wie gedacht:
start init grr
in init bla
ende init grr
python3 test.py liefert allerdings:
test start
start init grr
Traceback (most recent call last):
File "test.py", line 2, in <module>
import grr
File "/irgendwas/grr/__init__.py", line 2, in <module>
import bla
Warum wird da bla nicht gefunden?
( Im Gegensatz zum Aufruf bei python3 grr/__init__.py )
--
<http://www.hermann-riemann.de>
_______________________________________________
python-de Mailingliste -- [email protected]
Zur Abmeldung von dieser Mailingliste senden Sie eine Nachricht an [email protected]
https://mail.python.org/mailman3/lists/python-de.python.org/
Mitgliedsadresse: [email protected]