用python编写最简单的记事本,使用Python读写记事本文件

Hai I am beginner in python programming

I want to read and write a notepad file using

a class and method in python.

Can anyone help me to do so ?

Any help will be appreciated.

I have pasted the notepad file content to be processed below

since I don''t find any attachment option, please note down for

the verification.

filename : FileToRW.txt

Content of Notepad File

-------------------

RED; BLACK; GREEN; WHITE; PINK; ORANGE;

R100; B100; G100; W100; P100; O100;

R200; B200 G200 W200 P200 O200

R300; B300; G300; W300; P300; O300;

R400; B400; G400; W400; P400; O400;

"RUN 100"

"EXECUTE COLOR CODES"

"RESULT 1100"

解决方案There is no such thing as "notepad file".

Python file read/write is so simple (even for an absolute beginner) that I have no idea what answer you may need, except perhaps writing the code for you.

No, this is not how CodeProject works. Please read the code and ask a question if you face any problems. And it''s better for you. Beginners are those who begin.

I never used anything but this: http://www.python.org/doc/[^]

I''m not talking about WSGI, this is different story. Do you do Web development with Python? This is a bit tricky (but very nice after you learn WSGI techniques and documentation. For me, all I needed is well covered here: http://webpython.codepoint.net/wsgi_tutorial[^].

—SA

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值