Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: How can I export data from a website and write the contents to a text file? Date: Wed, 18 Nov 2015 16:38:30 -0500 Lines: 7 Message-ID: References: <9365cf2f-e9c7-4338-83b4-ce3d1d7ce1d6@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain X-Trace: news.uni-berlin.de mmhzVN3hKspTInrmNapqzgJgdIBipCKqh1ZlT2jtD21g== Cancel-Lock: sha1:h3PgAViSmZKcc85ZPP4+StJKwYg= Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:text': 0.04; 'omit': 0.07; 'skip:o 50': 0.07; 'subject:file': 0.07; 'subject:How': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'causing': 0.13; '"b"': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:export': 0.16; 'translation': 0.16; 'windows': 0.20; 'recognize': 0.22; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'subject:website': 0.29; 'received:comcast.net': 0.33; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'means': 0.39; 'subject:from': 0.39; 'subject:the': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'subject:write': 0.84 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: c-68-39-146-59.hsd1.in.comcast.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:99000 ryguy7272 writes: > text_file = open("C:/Users/rshuell001/Desktop/excel/Text1.txt", "wb") Remove the "b" from this line. This is causing it to omit the platform-specific translation of "\n", which means some Windows applications will not recognize the line endings.