Hi all. I am very new at python and so i am having trouble with the simplest things, and i dont understand why this:
newfile = raw_input('what do you want to name your new file?')
text_file = open (newfile, "w")
isn't working. Can somebody explain it? Thankyou
Fetch 0 Newbie Poster
Recommended Answers
Jump to PostThere are certain characters a file name can not have, might depend on the OS. On Unix you have to have permission to write to some of the directories.
Jump to Postos.path.exists(filename) will return True or False.
All 5 Replies

masterofpuppets
pythopian 10 Junior Poster in Training
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
Fetch 0 Newbie Poster
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.