Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5006
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!feeder1.cambriumusenet.nl!feeder2.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ethan@stoneleaf.us> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; '%s"': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:gator410.hostgator.com': 0.09; 'subject:Problem': 0.09; '~ethan~': 0.09; 'def': 0.13; 'wrote:': 0.14; "'w')": 0.16; 'guessing': 0.16; 'received:72.11': 0.16; 'received:72.11.125': 0.16; 'received:72.11.125.166': 0.16; 'subject:split': 0.16; 'why.': 0.19; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.20; 'header:In-Reply-To:1': 0.22; 'cc:addr:python-list': 0.22; 'index': 0.25; 'creating': 0.26; "i'm": 0.26; 'subject:?': 0.29; 'cc:addr:python.org': 0.31; "skip:' 10": 0.32; 'skip:e 20': 0.33; 'using': 0.34; 'file': 0.35; 'header:User-Agent:1': 0.35; 'point': 0.35; 'wright': 0.35; 'hello,': 0.36; 'report': 0.37; 'data': 0.37; 'subject:with': 0.37; 'add': 0.39; 'header:Received:5': 0.40; 'simple': 0.60; 'received:hostgator.com': 0.64; 'received:websitewelcome.com': 0.71; 'received:gateway14.websitewelcome.com': 0.84; 'subject:Package': 0.84; 'received:69.93': 0.91 |
| Date | Mon, 09 May 2011 11:56:13 -0700 |
| From | Ethan Furman <ethan@stoneleaf.us> |
| User-Agent | Thunderbird 1.5.0.10 (Windows/20070221) |
| MIME-Version | 1.0 |
| To | James Wright <jamfwright@gmail.com> |
| Subject | Re: Inconsistency with split() - Script, OS, or Package Problem? |
| References | <BANLkTi=g2h_BxZDdTdLqyB3nZCukD+Dupw@mail.gmail.com> |
| In-Reply-To | <BANLkTi=g2h_BxZDdTdLqyB3nZCukD+Dupw@mail.gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - gator410.hostgator.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - stoneleaf.us |
| X-Source | |
| X-Source-Args | |
| X-Source-Dir | |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1340.1304966663.9059.python-list@python.org> (permalink) |
| Lines | 27 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1304966663 news.xs4all.nl 81474 [::ffff:82.94.164.166]:60566 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:5006 |
Show key headers only | View raw
James Wright wrote:
> Hello,
Howdy!
> def create_report_index(report): #Here we are creating a simple
> index.html file from data in a text file
> newfile = open(report + '.html', 'w') #Create the index file using
> report name
> for each_value in D4[report]:
> [clean_name, _] = each_value.split('_', 1)
> newfile.write('<a href="' + report +'//' + each_value +
> '/index.htm">' + clean_name + '</a><BR>\n')
Add the line
print("current each_value is: %s" % each_value)
just before the line
[clean_name, _] = each_value.split('_', 1)
I'm guessing you'll see a value with no '_' in it -- at that point you
can track down why.
~Ethan~
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Inconsistency with split() - Script, OS, or Package Problem? Ethan Furman <ethan@stoneleaf.us> - 2011-05-09 11:56 -0700
csiph-web