Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > de.comp.lang.python > #6062
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Hermann Riemann <nospam.ng@hermann-riemann.de> |
| Newsgroups | de.comp.lang.python |
| Subject | Re: [Python-de] Pfade, Modulnamen und import-Statements |
| Date | Fri, 10 May 2024 20:05:56 +0200 |
| Lines | 22 |
| Message-ID | <la7604FdslU1@mid.individual.net> (permalink) |
| References | <ZjYYBgoIiqLkxkB3@torres.zugschlus.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Trace | individual.net 3/oVTjreuDP7L09INXFabQhWw4hFMrWOX51wvv0NGZhFABnKsX |
| Cancel-Lock | sha1:VG09adO3YrIpxpnVibm3FxcrEaE= sha256:JvzcwbDYODcV1mbPY6CepyHORlp+bHi9tJNSvaWps3o= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 |
| In-Reply-To | <ZjYYBgoIiqLkxkB3@torres.zugschlus.de> |
| Content-Language | de-DE |
| Xref | csiph.com de.comp.lang.python:6062 |
Show key headers only | View raw
Am 04.05.24 um 13:12 schrieb Marc Haber: > ich hab mal eine Verständnisfrage. > > Gegeben sei ein Verzeichnis . und ein Programm ./keks. > Weiterhin sei die Klasse MyClass1 in d/mc1.py und die Klasse MyClass2 in > d/mc2.py definierrt. > > Wenn ich nun in keks die Klasse MyClass2 benutzen möchte, schreibe ich > "from d.mc2 import MyClass2". Wenn ich in d/mc1.py dasselbe tun möchte, > muss ich dort "from mc2 import MyClass2" schreiben, kann also Code, der > "verwandte" Module benutzt, nicht frei verschieben. > > Ist das so gedacht, oder verpass ich da was? Ein wenig lässt sich mit sys.path.append erreichen. Ich benutze das für meine Hilfsprogramme, die von mehreren Programme verwendet werden. -- <http://www.hermann-riemann.de>
Back to de.comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
[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