473,403 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

how do i write to files and open with notepad?

I want to learn how to write to file and open with notepad
Sep 1 '10 #1
1 1907
you can use the open command. Try this:

Expand|Select|Wrap|Line Numbers
  1. file = open('myfile.txt', 'w')
  2. s = "My String of Text I want In the File"
  3. file.write(s)
  4.  
you can then find the file you just created and open it with notepad.

check this out for more info:
http://docs.python.org/tutorial/inputoutput.html
Sep 1 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: crispy | last post by:
I just upgraded to Office 2003 and none of my .mdb files open! Double-clicking an mdb file opens Access, but the database never opens. No error messages. No hourglass This happens to any mdb file I...
3
by: LarsJ | last post by:
Hi! I'm developing a special backup application in VB.NET that shall backup files to a CD-R. When the target is XP it's obvious that the IMAPI should solve the problem. But the target is Windows...
22
by: Matthias Braun | last post by:
Help! I am using SuSE 9.3, php5 and Apache2 on Linux. I try to write files to the hard drive using the following command: $filename = "test.txt"; if (!file_exists($filename))...
2
by: google.groups.tr | last post by:
I have an Access 97 database that has a routine to generate a unique report as a PDF file and email it to one person, and loops about 300 times. Each instance through the loop uses a registry...
7
by: Tyrone Showers | last post by:
I have a problem of getting the error "too many files open" and would like to trace my application. However, I have found nothing about how to display the current number of open files. Does...
0
by: tony | last post by:
hi. the web server company block all the write permission for the IUSER . they told me to change the settings in my side, to upload and write files throught FTP user permissions. I add the <...
8
by: someone | last post by:
I'm making an program that encodes text, and then writes it into another text file. The problem is that I can't seem to get the "file exists" checking right. If I use the command (coder is the...
6
by: Daniel | last post by:
Hi I have a server programme and it writes any errors quietly to a logfile so that the server keeps running and only dies on a critical problem. I'd like to have a menu item saying View Log that...
2
by: asenthil | last post by:
i'm trying to read and write files using java... some errors occurs when i'm trying this code.. Error in java: Cannot find symbol location: class java.io.FileOutputStream FileOutputStream...
0
by: arunrsivaram | last post by:
Hi, I am using visual studio.net 2003 and I am working on a windows application project.I would like to know if it is possible to open a notepad inside a windows form.I tried both shell and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.