Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #45761
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <carlosnepomuceno@outlook.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.026 |
| X-Spam-Evidence | '*H*': 0.95; '*S*': 0.00; 'subject:file': 0.07; 'f.close()': 0.09; 'def': 0.12; 'subject:arithmetic': 0.16; 'import': 0.22; 'to:name:python-list@python.org': 0.22; 'print': 0.22; 'received:65.55.116': 0.24; 'subject:/': 0.26; 'header:In- Reply-To:1': 0.27; 'skip:- 40': 0.29; 'url:mailman': 0.30; 'url:python': 0.33; 'url:listinfo': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'email addr:gmail.com': 0.63 |
| X-TMN | [YFL3IwBxzAOkJvABrBQ4vwEL3AbGef2Q] |
| X-Originating-Email | [carlosnepomuceno@outlook.com] |
| From | Carlos Nepomuceno <carlosnepomuceno@outlook.com> |
| To | "python-list@python.org" <python-list@python.org> |
| Subject | RE: file I/O and arithmetic calculation |
| Date | Thu, 23 May 2013 03:02:09 +0300 |
| Importance | Normal |
| In-Reply-To | <knjlr4$v6m$6@dont-email.me> |
| References | <knjlr4$v6m$6@dont-email.me> |
| Content-Type | text/plain; charset="iso-8859-1" |
| Content-Transfer-Encoding | quoted-printable |
| MIME-Version | 1.0 |
| X-OriginalArrivalTime | 23 May 2013 00:02:09.0917 (UTC) FILETIME=[C54442D0:01CE5748] |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| 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.1982.1369267337.3114.python-list@python.org> (permalink) |
| Lines | 34 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1369267337 news.xs4all.nl 15990 [2001:888:2000:d::a6]:60921 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:45761 |
Show key headers only | View raw
---------------------------------------- > From: denismfmcmahon@gmail.com [...] > > import re > def v(s): > l=len(s) > t=0. > for i in range(l): > t=t+(abs(ord(s[i]))*1.) > return t/(l*1.) > for n in range(5): > m="c:/test/"+str(n+1)+".txt" > f=open(m,"r") > d=[] > t=0. > for l in range(10): > d=d+[re.findall(r"[0-9.eE+-]+",f.readline())] > t=t+v(d[l][0]) > f.close() > c=t/10. > if c==50.: > t=0. > for u in range(10): > t=t+v(d[0][u]) > r=t/10. > print "%s C1: %f R1: %f"%(m,c,r) > > -- > Denis McMahon, denismfmcmahon@gmail.com > -- > http://mail.python.org/mailman/listinfo/python-list Can you send it again without tabs?
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
file I/O and arithmetic calculation Keira Wilson <wilkeira@gmail.com> - 2013-05-23 01:13 +0900
Re: file I/O and arithmetic calculation Denis McMahon <denismfmcmahon@gmail.com> - 2013-05-22 23:54 +0000
RE: file I/O and arithmetic calculation Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-23 03:02 +0300
csiph-web