Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Python only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
Python
how do i write to files and open with notepad?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Nnabu Ree Rebaone
New Member
Join Date:
Sep 2010
Posts:
1
#1
how do i write to files and open with notepad?
Sep 1 '10, 08:07 AM
I want to learn how to write to file and open with notepad
melissajean
New Member
Join Date:
Aug 2010
Posts:
6
#2
Sep 1 '10, 06:00 PM
you can use the open command. Try this:
Code:
file = open('myfile.txt', 'w') s = "My String of Text I want In the File" file.write(s)
you can then find the file you just created and open it with notepad.
check this out for more info:
7. Input and Output
http://docs.python.org/tutorial/inputoutput.html
There are several ways to present the output of a program; data can be printed in a human-readable form, or written to a file for future use. This chapter will discuss some of the possibilities. Fa...
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment