Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.python > #6067 > unrolled thread

Paket Modul import Problem.

Started byHermann Riemann <nospam.ng@hermann-riemann.de>
First post2024-06-16 12:32 +0200
Last post2024-06-16 12:32 +0200
Articles 1 — 1 participant

Back to article view | Back to de.comp.lang.python


Contents

  Paket Modul import Problem. Hermann Riemann <nospam.ng@hermann-riemann.de> - 2024-06-16 12:32 +0200

#6067 — Paket Modul import Problem.

FromHermann Riemann <nospam.ng@hermann-riemann.de>
Date2024-06-16 12:32 +0200
SubjectPaket Modul import Problem.
Message-ID<ld7taaFa0pcU1@mid.individual.net>
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>

[toc] | [standalone]


Back to top | Article view | de.comp.lang.python


csiph-web