[Python-de] Externe Datein einlesen
Gerald Klix
Gerald.Klix at klix.ch
Die Jul 5 11:38:01 CEST 2005
sowieso!
aber das war ja nicht das Problem, nachdem gefragt wurde.
Mir scheint im Fall der Fälle die Lösung relativ zum aktuellen Modul
am sinnvollsten.
import os, sys
sys.path.insert( 0, os.path.abspath( os.path.join( os.path.dirname(
__file__ ), "classes" ) ) )
HTH,
Gerald
Hartmut Goebel schrieb:
> Gerald Klix schrieb:
>
>
>>für paranoiker gibts noch:
>>sys.path.insert( 0, os.path.join( os.getcwd, "classes" ) )
>
>
> Scheidert, wenn das CWD sonstwo ist. Tipp: Modul 'inspect'
>
--
GPG-Key: http://keyserver.veridis.com:11371/search?q=0xA140D634