[Tutor] sefl modifing script

Vladimir Strycek vladoportos at vladoportos.sk
Tue Feb 6 19:13:51 CET 2007


Christopher Arndt  wrote / napísal(a):
> Vladimir Strycek schrieb:
>   
>> Hi all,
>>
>> Is it possible to do self modifing script ? I think like variables which 
>> are defined in the beginning of script could be modified by it self on 
>> the run... like saving setting but not to external file but directly to 
>> it self...
>>     
>
> While what you propose is certainly possible -- after all, a Python script is
> just a file and can be therefore read and altered by Python, but for the
> scenario you mention it is not the best solution. What if the script is
> installed read-only? What if different users on the system where the script is
> installed want different settings?
>
> There was a thread on this list titled "The best way to implement a config file
> ???". I would look in this direction for a solution.
>
> Chris
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
> __________ NOD32 2040 (20070206) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
>   
Thanks i'll check that thread...


More information about the Tutor mailing list