Re: [Tutor] group txt files by month

2012-04-10 Thread questions anon
Thank you for this response it was a tremedous help. It still took me awhile to work it all out and thought I would post what worked for me. Thanks again GLOBTEMPLATE = r"e:/rainfall-{year}/r{year}{month:02}??.txt" def accumulate_month(year, month): files = glob.glob(GLOBTEMPLATE.format(year=

Re: [Tutor] Biopython

2012-04-10 Thread Alan Gauld
On 10/04/12 21:25, Laura Scearce wrote: Hello, I am using Linux version 2.6 and python version 2.6.6 (gcc version 4.4.5). I have a list of protein names and am trying to get their sequences. OK, That's not unusual and there is a forum somewhere for Python users doing bio type work. However, it

Re: [Tutor] Biopython

2012-04-10 Thread Walter Prins
Hi Laura, On 10 April 2012 22:25, Laura Scearce wrote: > I am using Linux version 2.6 and python version 2.6.6 (gcc version 4.4.5). > What distribution of Linux? (Ubuntu, Debian, Centos or something else?) I followed the instructions and it seemed to work (see below error > messages). > > [s

Re: [Tutor] Biopython

2012-04-10 Thread Emile van Sebille
On 4/10/2012 1:25 PM Laura Scearce said... Hello, I am using Linux version 2.6 and python version 2.6.6 (gcc version 4.4.5). I have a list of protein names and am trying to get their sequences. I thought I would download Biopython, and am having troubles. Your best source for answers pertaining

[Tutor] Biopython

2012-04-10 Thread Laura Scearce
Hello, I am using Linux version 2.6 and python version 2.6.6 (gcc version 4.4.5). I have a list of protein names and am trying to get their sequences. I thought I would download Biopython, and am having troubles. I first downloaded and installed easyinstall from http://pypi.python.org/pypi/setuptoo

Re: [Tutor] ADO with python 2.6 without additional installs

2012-04-10 Thread Alan Gauld
On 10/04/12 10:13, Bakkestuen Roger wrote: Is there a way to access and query trough for instance ADO without having to install the Win32 package? Yes, you can use ctypes to access the Microsoft DLL functions and Win32 API directly. But thats going to be non trivial and probably painful! Th

Re: [Tutor] summing lists

2012-04-10 Thread Hs Hs
thanks all for quick reply.  In my previous e-mail I send adding using lambda function. I now know that I am using too much functionality where simple ways to solve exist. That's python! thanks again.  Hs. From: Evert Rol To: Hs Hs Cc: "tutor@python.org" S

Re: [Tutor] summing lists

2012-04-10 Thread Dave Angel
On 04/10/2012 11:28 AM, Hs Hs wrote: > sorry I did this following, please advise if any better way exist: > You top-posted, so we lose the context you were using. You never really say why you're using lists with exactly one element in them, but presuming that the real lists consist of something l

Re: [Tutor] summing lists

2012-04-10 Thread Evert Rol
> I have 4 lists: > > >>> a > [40] > >>> b > [2] > >>> c > [23] > >>> d > [12] > Why are you using lists with a single element, instead of single integer variables? (thus, a=40, b=2, c=23, d=12.) > how is it possible to do add elements in list. sum() > I can do this using tupples, but I do

Re: [Tutor] summing lists

2012-04-10 Thread James Reynolds
On Tue, Apr 10, 2012 at 11:22 AM, Hs Hs wrote: > Hi: > > I have 4 lists: > > >>> a > [40] > >>> b > [2] > >>> c > [23] > >>> d > [12] > > > how is it possible to do add elements in list. I can do this using > tupples, but I do not know how to append elements to tuple, thats the > reason I am usin

Re: [Tutor] summing lists

2012-04-10 Thread Hs Hs
sorry I did this following, please advise if any better way exist: gc = lambda x,y: x[0]+y[0] atgc = lambda x,y,k,l: x[0]+y[0]+k[0]+l[0] >>> gc(a,b)/atgc(a,b,c,d) 0.54545454545454541 Hi: I have 4 lists: >>> a [40] >>> b [2] >>> c [23] >>> d [12] how is it possible to do add eleme

[Tutor] summing lists

2012-04-10 Thread Hs Hs
Hi: I have 4 lists: >>> a [40] >>> b [2] >>> c [23] >>> d [12] how is it possible to do add elements in list. I can do this using tupples, but I do not know how to append elements to tuple, thats the reason I am using list.  I want to find the value of a+c/a+b+c+d - which is 40+23/40+2+23+12

Re: [Tutor] ADO with python 2.6 without additional installs

2012-04-10 Thread bob gailer
Please always reply-all so a copy goes to the list On 4/10/2012 5:13 AM, Bakkestuen Roger wrote: Hi I'm struggling with finding a way to access and query an MSAccess base in an organisation with a very standardised environment. I gather from your other comments this means no installing of

Re: [Tutor] Game of python, help please.

2012-04-10 Thread bob gailer
On 4/9/2012 10:56 PM, Dave Angel wrote: On 04/09/2012 10:33 PM, bob gailer wrote: On 4/9/2012 2:26 AM, leo degon wrote: Hello all, Im trying to learn python and programming in my free time, and I'm trying to do a little personal project to trying and gain some skills. Im trying to do version of

Re: [Tutor] ADO with python 2.6 without additional installs

2012-04-10 Thread Christian Witts
On 2012/04/10 03:07 PM, Bakkestuen Roger wrote: This requires install of pyodbc. I was looking for modules in std python 2.6 or higher. Med hilsen Roger Bakkestuen *Telefon:* +47 61271236 *Mobil:* +47 94833636 *e-post:* roger.bakkest...@vegvesen.no ---

Re: [Tutor] ADO with python 2.6 without additional installs

2012-04-10 Thread Christian Witts
On 2012/04/10 11:13 AM, Bakkestuen Roger wrote: Hi I’m struggling with finding a way to access and query an MSAccess base in an organisation with a very standardised environment. Python 2.6 is available and Office 2010. Is there a way to access and query trough for instance ADO without hav

[Tutor] ADO with python 2.6 without additional installs

2012-04-10 Thread Bakkestuen Roger
Hi I'm struggling with finding a way to access and query an MSAccess base in an organisation with a very standardised environment. Python 2.6 is available and Office 2010. Is there a way to access and query trough for instance ADO without having to install the Win32 package? Any suggestions or e