hi created a simple python program that reads the source code of a url and stores into a variable then saves the sourcecode into a file on the computer but the problem that i have that is when python reads the sourcecode it stores it all in one line in a variable is there a way to keep formatting of the source code as it suppose to be ??
moroccanplaya
0
Junior Poster
Recommended Answers
Jump to PostThere are problems sometimes with the interpretation of end of line characters, depending on your platform and the program which opens your file. If your output file was written using opening mode 'wb', try mode 'w', it may solve the issue.
All 2 Replies
Reply to this topic
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.