Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Christopher Arndt Newsgroups: de.comp.lang.python Subject: Re: [Python-de] import und vollqalifizierter Dateiname Date: Wed, 24 Aug 2016 16:58:27 +0200 Lines: 80 Message-ID: References: <20372e6f-34da-037f-50b7-b85d09e83e44@chrisarndt.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oRclPRqrrKn72hu07PTdnDILle3BP9Mmf" X-Trace: news.uni-berlin.de sQWOX0d4whnybMEJoT7apQYn2bWyfUHzIZW7rknpiTGg== Return-Path: X-Original-To: python-de@python.org Delivered-To: python-de@mail.python.org X-Virus-Scanned: Debian amavisd-new at mx1.0x20.eu Openpgp: id=F0BA1EAE86651989C0A1C9901E0D97B33A4E1F31 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 In-Reply-To: X-BeenThere: python-de@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Die Deutsche Python Mailingliste List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <20372e6f-34da-037f-50b7-b85d09e83e44@chrisarndt.de> Xref: csiph.com de.comp.lang.python:4517 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --oRclPRqrrKn72hu07PTdnDILle3BP9Mmf Content-Type: multipart/mixed; boundary="5cJUxXTojA2gQOElBm70vAe83SF33CEE5" From: Christopher Arndt To: python-de@python.org Message-ID: Subject: Re: [Python-de] import und vollqalifizierter Dateiname References: <20372e6f-34da-037f-50b7-b85d09e83e44@chrisarndt.de> In-Reply-To: --5cJUxXTojA2gQOElBm70vAe83SF33CEE5 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Am 24.08.2016 um 15:56 schrieb Hermann Riemann: > Bei import geht kein vollqualifizierter Dateiname, > der den Buchstabe / enth=E4lt. https://docs.python.org/3/tutorial/modules.html https://docs.python.org/3/reference/import.html Merke: Python ist nicht C und ein Python-Modul keine Header-Datei. ;) So geht's (Voraussetzung: alle Verzeichnisse enthalten ein '__init__.py' Datei): import a.b.c.p1 import u.v.w.p2 import u.v.w.p3 import x.y.z.p2 import x.y.z.p3 a.b.c.p1.foo() u.v.w.p2.foo() u.v.w.p2.bar() usw. Oder so: from .a.b.c import p from .u.v.w import p as p2 usw. --5cJUxXTojA2gQOElBm70vAe83SF33CEE5-- --oRclPRqrrKn72hu07PTdnDILle3BP9Mmf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Puzzled by the all these strange characters? Comment: See http://tinyurl.com/cehoa7 for an introduction Comment: to public key encryption and signing. iQIcBAEBCAAGBQJXvbYTAAoJEB4Nl7M6Th8xjJYQAKbP2fXdVhpvElseHX695Q1b 6vCABG0prfcxInVM5A1hgxs5Feapy2IIhhbd3Lws755QDwi7loVIQehDwZM2leAn BnSUbx/00+xw5zh2ss9Cz/pto7EYycQP0VqsEy6Fnpi+amTCMef0I04y6DWwpwU5 OoiqsZwnym4B2isMAUvIwL3Ja1suajd0AzwTcn/h+sWW3gOY+VB8tSGG5EoF9vRu Sifi8aSrONkDWdXo9rMoaNWnIf71kRfhFJ/w2qDzyEqCRg19XzF/FIXVozan6LD0 4sIMiCFhZqCSwomaCzMVuVU1MFd0qd/fq6tNd1/AyfEwEoac0TgJRQHHHB/wH1+H haKXNAc+rendODVw1CSvYp53lts9h6tsK7XZLBJDeB31H2wh4DAkdk7f1fTo19aM lwKw/bA26fUx7sJNo9Tg20vHFBvDcAHQ3hWY6pIsEWbgVW/xCg6VaEnD8/VIzYAD fQAexqwu8/Ode7jrpJbb0AWMXkZGMIsXzOkGrTii4ReDC/b+8Mtpy209JeOFWt7y +Q5DQp8HtD8iMmAP27836irUs06lMBXzj5zMCon+ag1L5H/RoJKy8PLMeGfiy0wf 2HY34gwisyPt6i78AMBTvfcGGyP9zs8p8U3VGqGiLK4et2bUd+8tmZHiVkKlzXrn 5/SXRWOy++HIb4wuuaJE =KxGZ -----END PGP SIGNATURE----- --oRclPRqrrKn72hu07PTdnDILle3BP9Mmf--