Re: [Tutor] Using python's smtp server

2013-12-13 Thread Vincent Davis
Mark, Thanks mark, It had been about 15hr since I posted to python-list@python.organd had not seen a response so I thought I would try tutor.python.org. Well I got a response now, not that it helped, but I respond on that list. Thanks again. Vincent Davis 720-301-3003 On Fri, Dec 13, 2013 at 10

[Tutor] Using python's smtp server

2013-12-13 Thread Vincent Davis
would initiate a SMTP server, send the attachment and shutdown the SMTP after. Vincent Davis 720-301-3003 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] parse text file

2010-06-03 Thread Vincent Davis
> print lengthz > > > > > > > > > Seems to me for such a large file you'd have to use > bz2.BZ2Decompressor. I have no experience with it, but its purpose is > for sequential decompression -- decompression where not all the data is > simultaneously available

Re: [Tutor] (no subject)

2010-05-11 Thread Vincent Davis
pment Engineering > Amkor Technology (S) Pte Ltd > 1 Kaki Bukit View > #03-28 TechView Building > Singapore 415941 > Tel: (65) 6347 1131 > Fax: (65) 6746 4815 > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change

Re: [Tutor] Newbie & Unittest ...

2010-05-06 Thread Vincent Davis
lf.assertEqual(self.file.tags[k], v, "Failure with key "+k)" I think this is the best(how I would do it) solution, 1 test for files with a meaningful report as to which file is the problem. *Vincent Davis 720-301-3003 * vinc...@vincentdavis.net my blog <http://vincentdavis.net&

Re: [Tutor] Newbie & Unittest ...

2010-05-06 Thread Vincent Davis
By they way you shouldn't need to use str(file) as I did. Unlessit is not a string already. Bad habit. I am used to numbers vincet On Thursday, May 6, 2010, Vincent Davis wrote: > I can't think of a way to do what you ask, without defining a test for each. > ButI think what yo

Re: [Tutor] Newbie & Unittest ...

2010-05-06 Thread Vincent Davis
k)+', '+str(v) I am not ecpert on unittests *Vincent Davis 720-301-3003 * vinc...@vincentdavis.net my blog <http://vincentdavis.net> | LinkedIn<http://www.linkedin.com/in/vincentdavis> On Wed, May 5, 2010 at 6:37 PM, Damon Timm wrote: > Hi - am trying to write some unit

Re: [Tutor] New class, how return value of x in interactive shell

2010-04-05 Thread Vincent Davis
ring """ _bstring_constructor = biostrings.BString @classmethod def new(cls, x): """ :param x: a (biological) string """ res = cls(cls._bstring_constructor(conversion.py2ri(x))) _setExtractDelegators(res) re

Re: [Tutor] New class, how return value of x in interactive shell

2010-04-05 Thread Vincent Davis
). I have tried a few combinations but not the right one. in >>>b out >>>21-letter "BString" instance seq: I am a BString object *Vincent Davis 720-301-3003 * vinc...@vincentdavis.net my blog <http://vincentdavis.net> | LinkedIn<http://www.linked

[Tutor] New class, how return value of x in interactive shell

2010-04-05 Thread Vincent Davis
nting me in the right direction or to documentation is as useful as the correct code. Thanks *Vincent Davis 720-301-3003 * vinc...@vincentdavis.net my blog <http://vincentdavis.net> | LinkedIn<http://www.linkedin.com/in/vincentdavis> ___ Tutor ma

Re: [Tutor] Difflib comparing string sequnces

2010-03-10 Thread Vincent Davis
. Thanks again, http://stackoverflow.com/questions/2420412/search-for-string-allowing-for-one-mismatches-in-any-location-of-the-string-pyth *Vincent Davis 720-301-3003 * vinc...@vincentdavis.net my blog <http://vincentdavis.net> | LinkedIn<http://www.linkedin.com/in/vincentdavis>

[Tutor] Difflib comparing string sequnces

2010-03-09 Thread Vincent Davis
this. The only thing I can think of is using a wildcard and performing the search with a wildcard in each position. ie 25 time. For example AGCCTCCCATGATTGAACAGATCAT AGCCTCCCATGATAGAACAGATCAT close match with a miss-match at position 13 *Vincent Davis 720-301-3003 * vinc...@vincentdavis.net my

Re: [Tutor] list to numpy record array

2010-02-23 Thread Vincent Davis
@Skipper Thanks I will post over on the scipy list *Vincent Davis 720-301-3003 * vinc...@vincentdavis.net my blog <http://vincentdavis.net> | LinkedIn<http://www.linkedin.com/in/vincentdavis> On Tue, Feb 23, 2010 at 10:55 AM, Skipper Seabold wrote: > On Mon, Feb 22, 2

Re: [Tutor] list to numpy record array

2010-02-23 Thread Vincent Davis
of each normal array [' 0', ' 0', '234.0', '24.0', ' 25'] Record array [(3153952, 0, 0.0, 0.0, 0) *Vincent Davis 720-301-3003 * vinc...@vincentdavis.net my blog <http://vincentdavis.net> | LinkedIn<http://www.linkedin.com/in/vincentda

[Tutor] list to numpy record array

2010-02-22 Thread Vincent Davis
I must be missing something simple. I have a list of lists data = "[[' 0', ' 0', '234.0', '24.0', ' 25'], [' 1', ' 0', '22428.0', '2378.1', ' 25'],.." and what to make a record array from it but it gets screwed up or I don't get it, maybe both. Notice that at this stage the items are string

Re: [Tutor] Structure of my simulation / monte-carlo

2009-11-01 Thread Vincent Davis
Thanks again for all your help Kent and Dave. I think you won't here from me for a week or more as I digest your advise and work on my project. Thanks Vincent Davis 720-301-3003 On Sun, Nov 1, 2009 at 6:34 PM, Dave Angel wrote: > Kent Johnson wrote: > >> On Sun, Nov 1,

Re: [Tutor] Structure of my simulation / monte-carlo

2009-11-01 Thread Vincent Davis
with a distributions set at the applicant and institution level. Thanks Vincent Davis On Sun, Nov 1, 2009 at 9:58 AM, Kent Johnson wrote: > On Sun, Nov 1, 2009 at 10:47 AM, Vincent Davis > wrote: > > Kent Johsnon writes > > "This class has a lot of responsibilities:

Re: [Tutor] Structure of my simulation / monte-carlo

2009-11-01 Thread Vincent Davis
figured out once I have the Simulations class setup to do the whole thing. The only part with CherryPy I am still working on is displaying progress on the browser as the simulations runs, it can take several minutes. Thanks Vincent Davis 720-301-3003 On Sun, Nov 1, 2009 at 6:02 AM, Dave Angel w

[Tutor] Structure of my simulation / monte-carlo

2009-10-31 Thread Vincent Davis
RepeatMatch(50,15….)" This is way I had ask the earlier question "class attribute to initiate more classes" Thanks Vincent Davis ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] class attribute to initiate more classes

2009-10-31 Thread Vincent Davis
> > > Vincent Davis wrote: > >> DaveA posted >> import random, functools >> >> class Person: >>def __init__(self, size): >>self.size = size >> >>def __str__(self): >>return "Person of size %s&qu

Re: [Tutor] class attribute to initiate more classes

2009-10-31 Thread Vincent Davis
to add, I would not have confidence in applying this to new situations and it seems. Also I thank DaveA improving my Python conventions. I am really bad about that. Is there a cheat sheet for Python conventions. Like class (Capitals), def (two_words), I guess I should make my own. Thanks Vincen

[Tutor] class attribute to initiate more classes

2009-10-30 Thread Vincent Davis
don't think it does anyway. I hope this makes sense, I am sure there is a term for what I am trying to do but I don't know it. Thanks Vincent Davis ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription opt

Re: [Tutor] calculating a sort key and operator.attrgetter()

2009-07-01 Thread Vincent Davis
Thanks for the help, Looks like I will define a function. And yes you are right self.does_observe is constant so it will not affect the outcome. Thanks again Vincent Davis On Tue, Jun 30, 2009 at 11:15 PM, Kent Johnson wrote: > On Tue, Jun 30, 2009 at 11:39 PM, Vincent Davis > wrote:

[Tutor] calculating a sort key and operator.attrgetter()

2009-06-30 Thread Vincent Davis
;quality')) But I want to sort like this. self.rank_list.sort(key=(operator.attrgetter('quality') * operator.attrgetter('is_observed') * self.does_observe)) Will this work or is there a better way? Thanks Vincent Davis ___ Tutor

Re: [Tutor] list of instance objects, access attribute

2009-06-19 Thread Vincent Davis
Thanks to all for the comments, It was much more than I expected. Vincent On Fri, Jun 19, 2009 at 4:30 PM, Lie Ryan wrote: > Alan Gauld wrote: >> >> "Vincent Davis" wrote >> >> class B(): >>  def __init__(self, b1, b2): >>     self.fooa = b1 &g

[Tutor] list of instance objects, access attribute

2009-06-18 Thread Vincent Davis
than 5. How do I do this, what I am unclear about is how I iterate over the values of fooa. As I write this I am thinking of trying For x in alist: if x.fooa > 5 : print(x.fooa) Is that the right way or is there a better? will this work for methods? Thanks Vincent Da

Re: [Tutor] 3.0 on Mac

2009-06-15 Thread Vincent Davis
ins for this. Part of the problem Is that it seems that most instruction assume some understanding of terminal than I had. I know little more that what allows me to follow clear instructions. Thanks Vincent Davis 720-301-3003 On Thu, Jun 11, 2009 at 9:54 PM, Dave Angel wrote: > acfleck w

Re: [Tutor] question about class

2009-06-09 Thread Vincent Davis
school" def __init__(self, mquality = 0, sdquality = 0, mobserve = 0, sdobserve = 0): self. quality = normalvariate(mquality, sdquality) self. observe = normalvariate(mobserve, sdobserve) Thanks Vincent Davis 720-301-3003 On Tue, Jun 9, 2009 at 7:02 AM,

Re: [Tutor] question about class

2009-06-09 Thread Vincent Davis
/algorithms.html Thanks Again Vincent Davis On Tue, Jun 9, 2009 at 1:12 AM, spir wrote: > Le Mon, 8 Jun 2009 17:31:23 -0600, > Vincent Davis s'exprima ainsi: > >> Accidentally sent I have added the rest >> (by the way I refrain from using the terms attribute, method, as

Re: [Tutor] question about class

2009-06-08 Thread Vincent Davis
Accidentally sent I have added the rest (by the way I refrain from using the terms attribute, method, as I will likely miss use them) > I am reading several tutorials about classes and trying to figure out > how to apply it to my project. I have a working program that basically > matches up ap

[Tutor] question about class

2009-06-08 Thread Vincent Davis
in the applicant and schools class Thanks Vincent Davis 720-301-3003 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor