[Python-de] include von config-files

Georg Brandl g.brandl at gmx.net
Di Aug 14 21:51:51 CEST 2007


Georg Mischler schrieb:
> Georg Brandl wrote:
> 
>> Roland M. Kruggel schrieb:
>> > Hallo Liste,
>> >
>> > kann ich einen, z.b. Konfigurationsfile, mit include laden der nicht
>> > die endung .py hat und z.b. im /etc liegt?
>>
>> Dazu empfehle ich execfile().
> 
> execfile() startet einen neuen Prozess, was den Zugriff auf die
> geladenen Konfigurationsinformationen etwas umständlich macht...

Einen neuen Prozess? Wie kommst du darauf?

Georg


-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.





Mehr Informationen über die Mailingliste python-de