Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > de.comp.lang.python > #6050

[Python-de] Re: Pfade, Modulnamen und import-Statements

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Hartmut Goebel <h.goebel@crazy-compilers.com>
Newsgroups de.comp.lang.python
Subject [Python-de] Re: Pfade, Modulnamen und import-Statements
Date Sat, 4 May 2024 19:22:52 +0200
Organization crazy-compilers.com
Lines 15
Message-ID <a1b0c3e8-9e07-4cde-9b19-2bc800d51db0@crazy-compilers.com> (permalink)
References <ZjYYBgoIiqLkxkB3@torres.zugschlus.de>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding base64
X-Trace news.uni-berlin.de u6CGESro0dP/5hO3pjeh7QW18ndtfqfF1/gU1lxmXlqg==
Cancel-Lock sha1:MLisxsS2jJkMLJ84D9RROrnp92I= sha256:YrbvNXQ7t6M2U2o+Y2SfYO4TmwtF8AUr3+V18C0LTSY=
Authentication-Results mail.python.org; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral
User-Agent Mozilla Thunderbird
Content-Language de-DE, en-US
In-Reply-To <ZjYYBgoIiqLkxkB3@torres.zugschlus.de>
X-Noris-IP 79.211.178.78
Message-ID-Hash 25FRYARXWXXFPLBZ6TZOVGHI26WWKVE2
X-Message-ID-Hash 25FRYARXWXXFPLBZ6TZOVGHI26WWKVE2
X-MailFrom h.goebel@crazy-compilers.com
X-Mailman-Rule-Misses dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-python-de.python.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Content-Filtered-By Mailman/MimeDel 3.3.10b1
X-Mailman-Version 3.3.10b1
Precedence list
List-Id Die Deutsche Python Mailingliste <python-de.python.org>
Archived-At <https://mail.python.org/archives/list/python-de@python.org/message/25FRYARXWXXFPLBZ6TZOVGHI26WWKVE2/>
List-Archive <https://mail.python.org/archives/list/python-de@python.org/>
List-Help <mailto:python-de-request@python.org?subject=help>
List-Owner <mailto:python-de-owner@python.org>
List-Post <mailto:python-de@python.org>
List-Subscribe <mailto:python-de-join@python.org>
List-Unsubscribe <mailto:python-de-leave@python.org>
Xref csiph.com de.comp.lang.python:6050

Show key headers only | View raw


Am 04.05.24 um 13:12 schrieb Marc Haber:
> Wnn ich in d/mc1.py dasselbe tun möchte,
> muss ich dort "from mc2 import MyClass2" schreiben,

Ich vermute, Du musst "from ..mc2 import …" schreiben, da Du das Modul 
relativ zu mc1 "adressieren" musst. Falls es bei Dir ohne ".." ist 
irgendwas faul.

> kann also Code, der
> "verwandte" Module benutzt, nicht frei verschieben.
Ganz verstehe ich Deine Frage nicht, aber ich sag mal: Ja, das ist so 
gedacht. Woher sollte python denn sonst wissen, wo es "MyClass2" findet? 
Und in "keks" muss Du ja auch den "Pfad" zum Modul angeben - warum 
wollte das in einem Modul anders sein?

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          |h.goebel@crazy-compilers.com                |
|www.crazy-compilers.com  | compilers which you thought are impossible |

Back to de.comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

[Python-de] Pfade, Modulnamen und import-Statements Marc Haber <mh+python-de@zugschlus.de> - 2024-05-04 13:12 +0200
  [Python-de] Re: Pfade, Modulnamen und import-Statements Hartmut Goebel <h.goebel@crazy-compilers.com> - 2024-05-04 19:22 +0200
    [Python-de] Re: Pfade, Modulnamen und import-Statements Marc Haber <mh+python-de@zugschlus.de> - 2024-05-05 10:21 +0200
      Re: [Python-de] Re: Pfade, Modulnamen und import-Statements Bastian Blank <usenet@waldi.eu.org> - 2024-05-05 10:32 +0000
        [Python-de] Re: Pfade, Modulnamen und import-Statements Marc Haber <mh+python-de@zugschlus.de> - 2024-05-10 11:37 +0200
          [Python-de] Re: Pfade, Modulnamen und import-Statements Hartmut Goebel <h.goebel@crazy-compilers.com> - 2024-05-11 17:49 +0200
  Re: [Python-de] Pfade, Modulnamen und import-Statements "Peter J. Holzer" <hjp-usenet4@hjp.at> - 2024-05-05 02:26 +0200
    [Python-de] Re: Pfade, Modulnamen und import-Statements Marc Haber <mh+python-de@zugschlus.de> - 2024-05-05 10:25 +0200
      Re: [Python-de] Re: Pfade, Modulnamen und import-Statements "Peter J. Holzer" <hjp-usenet4@hjp.at> - 2024-05-05 12:38 +0200
        [Python-de] Re: Pfade, Modulnamen und import-Statements Marc Haber <mh+python-de@zugschlus.de> - 2024-05-10 11:39 +0200
          Re: [Python-de] Re: Pfade, Modulnamen und import-Statements "Peter J. Holzer" <hjp-usenet4@hjp.at> - 2024-05-10 19:25 +0200
  Re: [Python-de] Pfade, Modulnamen und import-Statements Hermann Riemann <nospam.ng@hermann-riemann.de> - 2024-05-05 12:02 +0200
    [Python-de] Re: Pfade, Modulnamen und import-Statements Marc Haber <mh+python-de@zugschlus.de> - 2024-05-05 12:35 +0200
  Re: [Python-de] Pfade, Modulnamen und import-Statements Hermann Riemann <nospam.ng@hermann-riemann.de> - 2024-05-10 20:05 +0200
    [Python-de] Re: Pfade, Modulnamen und import-Statements Christopher Arndt <chris@chrisarndt.de> - 2024-05-11 15:18 +0200
    [Python-de] Re: Pfade, Modulnamen und import-Statements Hartmut Goebel <h.goebel@goebel-consult.de> - 2025-01-26 21:21 +0100

csiph-web