保存设置 [英] saving settings

查看:74
本文介绍了保存设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我想知道如何制作单个.exe文件,说某种od时钟,

并且能够保存一些设置(例如报警)进入相同的

文件?基本上让代码重写自己...


谢谢!

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!

推荐答案

2006年5月29日星期一09:05:36 +0200,SuperHik写道:
On Mon, 29 May 2006 09:05:36 +0200, SuperHik wrote:


我想知道如何制作单个.exe文件,说某种od时钟,
并能够将一些设置(例如警报)保存到同一个
文件中?基本上让代码重写自己...

谢谢!
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!




哎呀!!!


我强烈建议你阅读ConfigParser的doco,然后在os.path.join中加载/保存你的配置文件
(os.path.expanduser("〜") )。


另一种选择 - 将你的东西保存在Windows注册表中


-


干杯

aum



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

--

Cheers
aum


aum写道:
2006年5月29日星期一09:05:36 +0200, SuperHik写道:
On Mon, 29 May 2006 09:05:36 +0200, SuperHik wrote:


我想知道如何制作单个.exe文件,说某种od时钟,
并且能够将某些设置(例如警报)保存到同一个
文件中?基本上让代码重写自己......

谢谢!
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 !!!

我强烈建议你读取ConfigParser的doco,并将配置文件加载/保存到os.path.join(os.path.expanduser("〜))。

另一个选项 - 保存你的东西在Windows注册表中



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...

< br>

SuperHik写道:
SuperHik wrote:
aum写道:
On Mon,29 May 2006 09:05:36 +0200,SuperHik写道:
On Mon, 29 May 2006 09:05:36 +0200, SuperHik wrote:


我想知道如何制作单个.exe文件,说某种od时钟,
并能够保存一些设置(例如报警)进入同一个文件?基本上让代码重写自己......

谢谢!
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 !!!

我强烈建议你读取ConfigParser的doco,并将配置文件加载/保存到os.path.join(os.path.expanduser("〜))。

另一个选项 - 保存你的东西在Windows注册表



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...




它_might_让你感到震惊,但是当你安装eg在另一台

计算机上写字,没有任何文件随之而来。特别是你在其他机器上写的




说真的:谁会复制可执行文件?你知道其他任何类似的行为吗?


Diez



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


这篇关于保存设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆