saving settings
Diez B. Roggisch
deets at nospam.web.de
Mon May 29 08:20:57 EDT 2006
SuperHik wrote:
> aum wrote:
>> On Mon, 29 May 2006 09:05:36 +0200, SuperHik wrote:
>>
>>> Hi,
>>>
>>> I was wondering how to make a single .exe file, say some kind od clock,
>>> and be able to save some settings (alarm for example) into the same
>>> file? Basically make code rewrite it self...
>>>
>>> thanks!
>>
>> Yikes!!!
>>
>> I'd strongly suggest you read the doco for ConfigParser, and load/save
>> your config file to/from os.path.join(os.path.expanduser("~")).
>>
>> Another option - save your stuff in the Windows Registry
>>
>
> but if I copy this file on the other computer settings will be lost...
It _might_ come as a shock to you, but when you install e.g. Word on another
computer, there aren't any documents coming with it. Especially not the
ones you wrote on that other machine.
Seriously: Who is going to copy a executable around? Do you know of any
other program that behaves like that?
Diez
More information about the Python-list
mailing list