Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5006 > unrolled thread
| Started by | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| First post | 2011-05-09 11:56 -0700 |
| Last post | 2011-05-09 11:56 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Inconsistency with split() - Script, OS, or Package Problem? Ethan Furman <ethan@stoneleaf.us> - 2011-05-09 11:56 -0700
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Date | 2011-05-09 11:56 -0700 |
| Subject | Re: Inconsistency with split() - Script, OS, or Package Problem? |
| Message-ID | <mailman.1340.1304966663.9059.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web