Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #107995
| Path | csiph.com!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Terry Reedy <tjreedy@udel.edu> |
| Newsgroups | comp.lang.python |
| Subject | Re: You gotta love a 2-line python solution |
| Date | Mon, 2 May 2016 02:46:27 -0400 |
| Lines | 19 |
| Message-ID | <mailman.310.1462171608.32212.python-list@python.org> (permalink) |
| References | <ng6hur$tiu$1@dont-email.me> <1462163501.1158885.595255233.34023BE4@webmail.messagingengine.com> <ng6t45$ape$1@ger.gmane.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de X3OVBWJJA9igWDmgHqp5twttONfvYWFkgdcFqAnDXp6g== |
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'paths': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'jan': 0.11; 'subject:python': 0.14; 'dfs': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'slashes': 0.16; 'urllib': 0.16; 'wrote:': 0.16; 'windows': 0.20; 'issue.': 0.20; 'file:': 0.22; 'stephen': 0.22; 'am,': 0.23; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'header :User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'skip:u 20': 0.28; 'anywhere': 0.30; 'skip:- 30': 0.32; 'skip:/ 20': 0.33; 'windows.': 0.33; 'file': 0.34; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'received:org': 0.37; 'names': 0.38; 'does': 0.39; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'save': 0.60; 'avoid': 0.61; 'received:96': 0.63; 'webpage': 0.66; 'forward': 0.66; 'received:fios.verizon.net': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| X-Gmane-NNTP-Posting-Host | pool-96-227-207-81.phlapa.fios.verizon.net |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
| In-Reply-To | <1462163501.1158885.595255233.34023BE4@webmail.messagingengine.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.22 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <ng6t45$ape$1@ger.gmane.org> |
| X-Mailman-Original-References | <ng6hur$tiu$1@dont-email.me> <1462163501.1158885.595255233.34023BE4@webmail.messagingengine.com> |
| Xref | csiph.com comp.lang.python:107995 |
Show key headers only | View raw
On 5/2/2016 12:31 AM, Stephen Hansen wrote:
> On Sun, May 1, 2016, at 08:39 PM, DFS wrote:
>> To save a webpage to a file:
>> -------------------------------------
>> 1. import urllib
>> 2. urllib.urlretrieve("http://econpy.pythonanywhere.com
>> /ex/001.html","D:\file.html")
>> -------------------------------------
>
> Note, for paths on windows you really want to use a rawstring. Ie,
> r"D:\file.html".
Or use forward slashes "D:/file.html" and avoid the issue. I don't know
of anywhere this does not work for file names sent from python directly
to Windows.
--
Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
You gotta love a 2-line python solution DFS <nospam@dfs.com> - 2016-05-01 23:39 -0400
Re: You gotta love a 2-line python solution Stephen Hansen <me+python@ixokai.io> - 2016-05-01 21:31 -0700
Re: You gotta love a 2-line python solution DFS <nospam@dfs.com> - 2016-05-02 00:51 -0400
Re: You gotta love a 2-line python solution Stephen Hansen <me+python@ixokai.io> - 2016-05-01 22:02 -0700
Re: You gotta love a 2-line python solution DFS <nospam@dfs.com> - 2016-05-02 01:08 -0400
Re: You gotta love a 2-line python solution Stephen Hansen <me+python@ixokai.io> - 2016-05-01 22:21 -0700
Re: You gotta love a 2-line python solution Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-02 15:51 +1000
Re: You gotta love a 2-line python solution DFS <nospam@dfs.com> - 2016-05-02 01:23 -0400
Re: You gotta love a 2-line python solution Stephen Hansen <me+python@ixokai.io> - 2016-05-01 22:37 -0700
Re: You gotta love a 2-line python solution DFS <nospam@dfs.com> - 2016-05-02 02:13 -0400
Re: You gotta love a 2-line python solution Terry Reedy <tjreedy@udel.edu> - 2016-05-02 02:46 -0400
Re: You gotta love a 2-line python solution BartC <bc@freeuk.com> - 2016-05-02 10:26 +0100
Re: You gotta love a 2-line python solution Marko Rauhamaa <marko@pacujo.net> - 2016-05-02 13:12 +0300
Re: You gotta love a 2-line python solution Steven D'Aprano <steve@pearwood.info> - 2016-05-02 22:05 +1000
Re: You gotta love a 2-line python solution DFS <nospam@dfs.com> - 2016-05-02 11:15 -0400
Re: You gotta love a 2-line python solution Larry Martell <larry.martell@gmail.com> - 2016-05-02 11:24 -0400
Re: You gotta love a 2-line python solution Manolo MartÃnez <manolo@austrohungaro.com> - 2016-05-02 17:32 +0200
Re: You gotta love a 2-line python solution jfong@ms4.hinet.net - 2016-05-02 17:45 -0700
Re: You gotta love a 2-line python solution DFS <nospam@dfs.com> - 2016-05-02 21:12 -0400
Re: You gotta love a 2-line python solution jfong@ms4.hinet.net - 2016-05-02 20:27 -0700
Re: You gotta love a 2-line python solution Stephen Hansen <me+python@ixokai.io> - 2016-05-02 20:49 -0700
Re: You gotta love a 2-line python solution jfong@ms4.hinet.net - 2016-05-02 20:57 -0700
Re: You gotta love a 2-line python solution Stephen Hansen <me+python@ixokai.io> - 2016-05-03 09:09 -0700
Re: You gotta love a 2-line python solution DFS <nospam@dfs.com> - 2016-05-02 23:56 -0400
Re: You gotta love a 2-line python solution Steven D'Aprano <steve@pearwood.info> - 2016-05-04 11:20 +1000
Re: You gotta love a 2-line python solution Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-05-03 08:14 -0400
csiph-web