count strangeness

2011-05-21 Thread James Stroud
tal 65% python2.7 Python 2.7.1 (r271:86832, May 21 2011, 22:52:14) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. py> class C(object): ... def __init__(self): ... self.data = [] ... def doit(self, count=0): ...

Re: count strangeness

2011-05-21 Thread James Stroud
Chris Rebert wrote: WTF? Assuming your question is "Why is 1024 there twice?", the answer is The question is "Why is 1024 there at all?" It should be 10. James -- http://mail.python.org/mailman/listinfo/python-list

Re: count strangeness

2011-05-21 Thread James Stroud
Peter Otten wrote: James Stroud wrote: WTF? Put the code into a file, run it -- and be enlightened ;) tal 72% python2.7 eraseme.py 1 2 4 8tal 73% cat eraseme.py #! /usr/bin/env python class C: def __init__(self): self.data = [] def doit(self, count=0): for c in self.data

Re: count strangeness

2011-05-21 Thread James Stroud
James Stroud wrote: Chris Rebert wrote: WTF? Assuming your question is "Why is 1024 there twice?", the answer is The question is "Why is 1024 there at all?" It should be 10. James I mean 11, not 10--but you get the point. James -- http://mail.python.org/mailman/listinfo/python-list

Re: count strangeness

2011-05-22 Thread James Stroud
Peter Otten wrote: James Stroud wrote: WTF? Put the code into a file, run it -- and be enlightened ;) Compare the follower to the last. tal 77% cat eraseme.py #! /usr/bin/env python class C: def __init__(self): self.data = [] def doit(self, count=[0]): for c in self.data

Re: count strangeness

2011-05-22 Thread James Stroud
Chris Rebert wrote: On Sat, May 21, 2011 at 11:32 PM, James Stroud wrote: Chris Rebert wrote: WTF? Assuming your question is "Why is 1024 there twice?", the answer is The question is "Why is 1024 there at all?" It should be 10. Ah. This is why it's better to be

Re: Anyone else getting posts back as email undeliverable bounces?

2005-09-22 Thread James Stroud
8C4871E4013 > for <[EMAIL PROTECTED]>; Fri, 23 Sep 2005 01:50:10 +0200 (CEST) > _ > ... > > > Regards, > Bengt Richter -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: What is "self"?

2005-09-22 Thread James Stroud
ay 22 September 2005 18:36, Wayne Sutton wrote: > OK, I'm a newbie... > I'm trying to learn Python & have had fun with it so far. But I'm having > trouble following the many code examples with the object "self." Can > someone explain this usage in plain engl

Re: Simple Dialogs

2005-09-23 Thread James Stroud
: MsgBox() and InputBox() > EasyGui seemed perfect, but a "Hello World" application takes nearly a > minute to execute after the program has been compiled by py2exe. > > There appear to be dozens of windowing toolkits avilable for Python, > could someone point me in the dire

Re: Using '__mul__' within a class

2005-09-24 Thread James Stroud
t.c = self.b * other.b + self.c * other.c > return result > > def Square( self ): > self *= self > > > A = FibonacciMatrix() > A.Square() > > print A.a #prints '1' > > A = FibonacciMatrix() > B = A * A > > print B.a #prints '

Re: Using '__mul__' within a class

2005-09-24 Thread James Stroud
t; result.a = self.a * other.a + self.b * other.b > result.b = self.a * other.b + self.b * other.c > result.c = self.b * other.b + self.c * other.c > return result > > def Square( self ): > self *= self > > > A = FibonacciMatrix() > A.Squa

Re: Using '__mul__' within a class

2005-09-24 Thread James Stroud
Shoot, Square() should be: def Square(self): self.Multiply(self) Forgot to proofread before hitting send. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman

Re: Using '__mul__' within a class

2005-09-24 Thread James Stroud
tending to help a neophyte: py> 1*1 1 See what I mean? James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposal: add sys to __builtins__

2005-09-25 Thread James Stroud
just stating your proposal didn't really solve anything. A good > editor/template and .pythonrc already save you the typing of 'import > sys' in scripts for the former and shell command for the latter. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box

Re: What tools are used to write and generate Python Library documentation.

2005-09-26 Thread James Stroud
ReStructureText is pretty cool. Try it out. http://docutils.sourceforge.net/rst.html On Monday 26 September 2005 20:24, Kenneth McDonald wrote: > I have a module I'd like to document using the same style... > > Thanks, > Ken -- James Stroud UCLA-DOE Institute for Genomics a

Re: How can I set the size of a window with tkinter?

2005-09-27 Thread James Stroud
window-size to make sure the canvas fits? > > regards tores -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Moronicity Xha Lee, Jargonizer

2005-09-29 Thread James Stroud
* Xah Lee post as spam, he still > manages to get most of his posts classified as 0% or 1% spam. > > It's very annoying - I've maxxed out the rules I can use in Outlook (my > work account) so I can't afford to add a specific one to trash his > emails... > > T

Re: A Moronicity of Guido van Rossum

2005-09-29 Thread James Stroud
spam bayes can't figure this out, then either it is not properly implemented or Bayes himself was out to lunch. James On Thursday 29 September 2005 16:39, Tony Meyer wrote: > > To fight this sort of message, I think spambayes would have to be > able to understand the context more

Re: Moronicity Xha Lee, Jargonizer

2005-09-30 Thread James Stroud
men would just not be greedy. If there could just be a rapper v. country & western gangster-style-everybody-dies-shootout, then music might return to MTV. I vote for the filter I described instead, seems more grounded in reality. James -- James Stroud UCLA-DOE Institute for Genomics and

Recursive Property of Octal Numbers

2005-10-01 Thread James Stroud
py> b[0][0][0] '\xb6' py> b[0][0][0][0] '\xb6' py> b[0][0][0][0][0] '\xb6' James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie Text Processing Question

2005-10-04 Thread James Stroud
it, and write it > back out. As far as I know there's no way to edit a file "in place" which > I'm assuming is what you're asking? -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Daisy Daisy, give me your answer do

2005-10-08 Thread James Stroud
not help...unless, of course, he marks it up with "Rich Backspace Formatting" (RBF). Ideally, he would backspace once for every character. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with creating a dict from list and range

2005-10-14 Thread James Stroud
: 1, 'third': 2, 'first': 0} > > regards > Steve > -- > Steve Holden +44 150 684 7255 +1 800 494 3119 > Holden Web LLC www.holdenweb.com > PyCon TX 2006 www.python.org/pycon/ -- James Stroud UCLA

Intersection of lists/sets -- with a catch

2005-10-18 Thread James Stroud
personal opinion that such a modification to the set type would make it vastly more flexible, if it does not already have this ability. Any thoughts on how I might accomplish either technique or any thoughts on how to make my code more straightforward would be greatly appreciated. James -- Jam

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-19 Thread James Stroud
e types of operating systems enough and is basing conclusions on limited information...Or is a troll. The OP probably works for microsoft. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.o

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-19 Thread James Stroud
'll be a > little while before > I start using it :-) ). End of matter, except for those who wish to > discuss further > Pythonish/shell related issues. Why this demands an OS comparison and an > insult is beyond my understanding. > > Ken > > On 19-Oct-05, at 2:22 PM,

Re: what does 0 mean in MyApp(0)

2005-10-19 Thread James Stroud
frame = wxFrame(NULL, -1, "winApp", size = (800,640)) > frame.Show(true) > self.SetTopWindow(frame) > return true > > app = MyApp(0) > app.MainLoop() > > Everything is explained nicely except the zero parameter in MyApp(0). > Anybody k

Re: TK question

2005-10-20 Thread James Stroud
:16, MBW wrote: > class optWin: > >     def __init__(self): >         return None > >     def __call__(self): >         self.root = tk() >         self.root.title("My title") >         self.root.mainloop() >         return None -- James Stroud UCLA-DOE Instit

Re: TK question

2005-10-20 Thread James Stroud
def __init__(self): > return None > > def __call__(self): > self.root = tk() > self.root.title("My title") > self.root.mainloop() > return None > > 1)Why doesn't this work when I go to call optWin > 2)What i

Module Importing Question

2005-10-21 Thread James Stroud
thought out dependencies, but in my defense, have you seen just about anything else in this world (California Freeways, Tax Forms, A Flow-Chart of Human Metabolic Pathways, umm...whatever)? James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 L

Re: access dictionary with preferred order ?

2005-10-21 Thread James Stroud
t using items/keys etc. ? > > An example: > > a=dict(a=dict(), c=dict(), h=dict()) > prefer=['e','h', 'a'] > > for x in a.values: print x > > would give me > {h:dict()}, {a:dict()}, then the rest which I don't care about the > order

Re: Would there be support for a more general cmp/__cmp__

2005-10-24 Thread James Stroud
uot;the complex numbers are a two dimensional field"? If you mean real numbers, please do explain. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: namespace dictionaries ok?

2005-10-24 Thread James Stroud
, kwds.shape etc > > foo( color='red', size='large', shape='ball', etc..) > > > It just seems awkward to have to use "string keys" in this situation. > This is easy and still retains the dictionary so it can be modified and &

Re: Importing at runtime

2005-10-24 Thread James Stroud
e is how can I import the code in all of the .py > files without knowing the file names in advance. > > Can this be done ?? > > TIA -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: namespace dictionaries ok?

2005-10-24 Thread James Stroud
Oops. Answered before I finished reading the question. James On Monday 24 October 2005 19:53, Ron Adam wrote: > James Stroud wrote: > > Here it goes with a little less overhead: > > > > > > py> class namespace: > > ... def __init__(self, adict): &g

Top-quoting defined [was: namespace dictionaries ok?]

2005-10-25 Thread James Stroud
they may even be strong enough to legitimize the practice: http://alpage.ath.cx/toppost/toppost.htm In light of these arguments, I hereby reserve the right to revert to top-posting if the compulsion overwhelms me. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Bo

Re: Top-quoting defined [was: namespace dictionaries ok?]

2005-10-25 Thread James Stroud
On Tuesday 25 October 2005 14:27, Mike Meyer wrote: > That's your right. Be aware that people will ignore, correct and/or > complain about you doing so. If I may be a complete ass: That should be "correct and/or complain about *your* doing so." James -- James Stroud U

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread James Stroud
your windows machine probably wont get zombified. Or you could just do the reasonable thing and erase the hard drive and install Linux. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread James Stroud
for an_el in alist: try_something(an_el) See also <http://www.artima.com/intv/dry.html>. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter Frame Size

2005-10-28 Thread James Stroud
ate command that I saw to use, but made the window even > smaller... What can I do? Thanks! Here is a very simple way: from Tkinter import * app = Tk() app.geometry("%dx%d%+d%+d" % (600, 400, 0, 0)) f = Frame(app) f.pack() app.mainloop() -- James Stroud UCLA-DOE Institute for Gen

Re: Scanning a file

2005-10-28 Thread James Stroud
ount > > That's a lot of lines. This is a bit off topic, but I just can't stand > unnecessary local variables. > > print file("filename", "rb").read().count("\x00\x00\x01\x00") The "f" is not terribly unnecessary, because the part o

Re: Tkinter Frame Size

2005-10-28 Thread James Stroud
the frame then pack the frame in the Tk(). However do not mix grid and pack in the same frame or it will lock up your app. E.g. *dont* do this: L1 = Label(f, text="Bob & Carol & Ted & Alice") L1.grid(row=0, column=0, columnspan=2) L2 = Label(f, text="Barney&

Re: newstyle classes and __getattribute__

2005-10-28 Thread James Stroud
. return None ... else: ... return object.__getattribute__(self, key) ... py> t = T(name="test123",port=443) py> dir(t) ['__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__'

WTF?

2005-11-01 Thread James Stroud
Why do my posts get held for suspcious headers and troll Xha Lee gets to post all sorts of profanity and ranting without any problem? -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman

Re: WTF?

2005-11-01 Thread James Stroud
On Tuesday 01 November 2005 14:26, Grant Edwards wrote: > On 2005-11-01, James Stroud <[EMAIL PROTECTED]> wrote: > > Why do my posts get held for suspcious headers ... > Held? It's not a moderated group... And I quoteth (that's King James for "cuteth-and-pastet

Re: Python's website does a great disservice to the language

2005-11-02 Thread James Stroud
the php logo looks better. For a real cool logo, check biopython.org. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Hexadecimal Conversion in Python

2005-11-02 Thread James Stroud
as you can, but it will take some time. You will also do well to avoid typos and grammatical errors in your communications. Also, you need to answer Fredrik's question. Let me restate it. What do you mean by ''? This encodes in hex to '2e2e2e2e'. Is this the

Re: I need Motivation

2005-11-04 Thread James Stroud
for classic macs. Very easy to program in, if you can find a quadra. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter- New Window

2005-11-04 Thread James Stroud
;t even > tried to get it to read the value of the label, but I think that it > will be a similar type problem. Any nice ways around this problem? I do > want these values only to be called when the function is called. Thanks! Looks like you are reinventing the wheel. Check out the tkMess

__new__

2005-11-05 Thread James Stroud
x ... x = 2 ... py> class carol(object): ... def __new__(cls): ... return b ... py> b=bob() py> b.x 2 py> c = carol() # should print "2" py> c <__main__.bob object at 0x404333cc> -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Lo

Re: newbie questions

2005-11-05 Thread James Stroud
work. It outputs the results and return values of commands as it goes. Try this: def printlines(): print "firstline" makeline() print "secondline" printlines() Again, idle may work more like you want. Play with it for a few hours. > Anybody help here?? thanks -xra

Re: text widget example?

2005-11-06 Thread James Stroud
activeforeground='blue', command=atext.set_from_file) open_button.pack() tk.mainloop() if __name__ == "__main__": main() -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular expression question -- exclude substring

2005-11-07 Thread James Stroud
7;00 noise1 01 noise2 00 target 01 target_mark 00 dowhat 01'] py> rgx = re.compile(r"(00.*?01) target_mark") py> rgx.findall('00 noise1 01 noise2 00 target 01 target_mark 00 dowhat 01') ['00 noise1 01 noise2 00 target 01', '00 dowhat 01'] My understandi

Re: how to modify code while debugging it without having to stop and then restart debugger

2005-11-07 Thread James Stroud
On Monday 07 November 2005 16:56, python wrote: > > so how can i use python to debug code and change that code without having > to restart the code. look into reload() -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90

Re: Regular expression question -- exclude substring

2005-11-07 Thread James Stroud
On Monday 07 November 2005 17:31, Kent Johnson wrote: > James Stroud wrote: > > On Monday 07 November 2005 16:18, [EMAIL PROTECTED] wrote: > >>Ya, for some reason your non-greedy "?" doesn't seem to be taking. > >>This works: > >> > &g

overloading *something

2005-11-07 Thread James Stroud
, how about the "**something" operator? James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: overloading *something

2005-11-07 Thread James Stroud
On Monday 07 November 2005 20:21, Robert Kern wrote: > James Stroud wrote: > > Hello All, > > > > How does one make an arbitrary class (e.g. class myclass(object)) behave > > like a list in method calls with the "*something" operator? What I mean > >

Re: overloading *something

2005-11-07 Thread James Stroud
.. print args ... py> doit(*n) (1, 2, 3) py> for x in iter(n): ... print x ... 8 9 10 -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: overloading *something

2005-11-08 Thread James Stroud
On Monday 07 November 2005 20:36, Alex Martelli wrote: > Ron Adam <[EMAIL PROTECTED]> wrote: > > James Stroud wrote: > > > Hello All, > > > > > > How does one make an arbitrary class (e.g. class myclass(object)) > > > behave like a list in method

Re: overloading *something

2005-11-09 Thread James Stroud
On Tuesday 08 November 2005 22:54, Robert Kern wrote: > James Stroud wrote: > > Does anyone else find the following annoying: > > > > py> from UserDict import UserDict > > py> aud = UserDict({"a":1, "b":2}) > > py> def doit(**kwargs):

Re: append to non-existing list

2005-11-09 Thread James Stroud
On Wednesday 09 November 2005 07:00, Yves Glodt wrote: > > I will never mention any p-language except python in this list anymore... +1 QOTW -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.pyth

Re: new in programing

2005-12-09 Thread James Stroud
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Mike C. Fletcher <[EMAIL PROTECTED]> wrote: > >>Python iterates over "things" (objects), of which integer numbers are >>just one possible choice. The range built-in command produces ranges of >>integers which are useful for tasks such as

Re: new in programing

2005-12-09 Thread James Stroud
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Mike C. Fletcher <[EMAIL PROTECTED]> wrote: > >>Python iterates over "things" (objects), of which integer numbers are >>just one possible choice. The range built-in command produces ranges of >>integers which are useful for tasks such as

Re: newby question: Splitting a string - separator

2005-12-09 Thread James Stroud
Thomas Liesner wrote: > Hi all, > > i am having a textfile which contains a single string with names. > I want to split this string into its records an put them into a list. > In "normal" cases i would do something like: > > >>#!/usr/bin/python >>inp = open("file") >>data = inp.read() >>names =

Make a generator from a recursive function

2005-12-09 Thread James Stroud
This was my answer to the thread "new in programing": def do_something(*args): print args def do_deeply(first, depth, lim, doit=True, *args): if depth < lim: do_deeply(first+1, depth+1, lim, False, *args) if first <= depth: do_deeply(first+1, depth, lim, True, *args + (first,))

Re: puzzled about class attribute resolution and mangling

2005-12-09 Thread James Stroud
Brian van den Broek wrote: > Hi all, > > I've the following code snippet that puzzles me: > > class Base(object): > __v, u = "Base v", "Base u" > def __init__(self): > print self.__v, self.u > > class Derived(Base): > __v, u = "Derived v", "Derived u" > def __init__(self)

Re: Make a generator from a recursive function

2005-12-09 Thread James Stroud
Alex Martelli wrote: > James Stroud <[EMAIL PROTECTED]> wrote: >... > >>This was my answer to the thread "new in programing": >> >>def do_something(*args): >> print args >> >>def do_deeply(first, depth, lim, doit=True, *args)

Re: newby question: Splitting a string - separator

2005-12-09 Thread James Stroud
Kent Johnson wrote: > James Stroud wrote: > >> The one I like best goes like this: >> >> py> data = "Guido van Rossum Tim Peters Thomas Liesner" >> py> names = [n for n in data.split() if n] >> py> names >> ['Guido', &#x

Re: newby question: Splitting a string - separator

2005-12-09 Thread James Stroud
Steven D'Aprano wrote: > On Fri, 09 Dec 2005 18:02:02 -0800, James Stroud wrote: > > >>Thomas Liesner wrote: >> >>>Hi all, >>> >>>i am having a textfile which contains a single string with names. >>>I want to split this string in

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread James Stroud
and gIvEnThAtwEiNcLuDEsOmEhElPfUlfORmaTtInGInOuRcOdEFroMtImEtOtiME. So I think that being fearful of new additions to the language (read "more ability for expression") is mainly fear of abuse by poor programmers--and that is akin to being afraid of the dark. James -- James S

Re: a new Perl/Python a day

2005-01-09 Thread James Stroud
at? It certainly isn't Perl. Very dry humor indeed! bob = [1,2,3,4] carol = [bob,bob] # not inane dereferencing print carol[1][3] $bob = [1,2,3,4] ; $carol = [ $bob, $bob ] ; # inane dereferencing print "$carol->[1][3]\n" ; -- James Stroud, Ph.D. UCLA-DOE Institute

Re: What strategy for random accession of records in massive FASTA file?

2005-01-12 Thread James Stroud
Don't fight it, lite it! You should parse the fasta and put it into a database: http://www.sqlite.org/index.html Then index by name and it will be superfast. James -- http://mail.python.org/mailman/listinfo/python-list

Re: What's so funny? WAS Re: rotor replacement

2005-01-24 Thread James Stroud
Martin v. Löwi said > Hmm. Most applications don't have any crypto needs. Any program where one stores data would have crypto needs. Here are some examples: Database, wordprocessor, spreadsheet, address book, mail program, (should I go on?). What would be the alternative to encryption to satisfy

Re: What's so funny? WAS Re: rotor replacement

2005-01-24 Thread James Stroud
lsely reason that "if I don't need it, the user doesn't", which is up there with "if I can't see them, then they can't see me" in terms of bad logic. James On Mon, 2005-01-24 at 17:17, James Stroud wrote: > I was purposefully making an illogical statement

Tuple Unpacking in raise

2005-06-20 Thread James Stroud
py> e = MyErr(sometup) py> print e Error with 1-2 James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Want to learn a language - is Python right?

2005-06-20 Thread James Stroud
ay 20 June 2005 07:47 am, Aziz McTang wrote: > What I'm looking for is more to learn one good, comprehensive > programming language well than several approximately on an ad hoc > basis. What I also failed to mention is the desire to develop my > presently limited computer skill

Re: Tuple Unpacking in raise

2005-06-20 Thread James Stroud
t; ... > py> raise E, ((1, 2),) > Traceback (most recent call last): >File "", line 1, in ? > E: Error with 1-2 > > But that seems a lot less elegant than simply using the one argument > version. > > [1] http://docs.python.org/ref/raise.html -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-24 Thread James Stroud
iss it and it > would be nice to have in Python. class color:# americanized red = 0 blue = 255 green = 0 Less typing than pascal. Also avoids those stupid little colons. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 h

Re: Favorite non-python language trick?

2005-06-25 Thread James Stroud
ons are absolutely unecessary. I thought they were pointless 18 years ago when I learned pascal in highschool and after 20 years, I still think they are still pointless. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-25 Thread James Stroud
On Saturday 25 June 2005 06:44 pm, James Stroud wrote: > I thought they were > pointless 18 years ago when I learned pascal in highschool and after 20 > years, I still think they are still pointless. I think that fails "==". -- James Stroud UCLA-DOE Institute for Genomics

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread James Stroud
need to know. Should we try to change the way we > speak? Are there certain words that sound particularly goofy? Please > help us with your advice on this awkward matter. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread James Stroud
On Thursday 30 June 2005 01:46 pm, Bill wrote: > James Stroud wrote: > > Frankly, I can't watch Shakespeare or movies like "the full monty" or > > "trainspotting" because I can't understand a damn word they say. British > > talk sounds like gibbe

Re: Regular Expression for pattern substitution

2005-07-02 Thread James Stroud
x27;that(\D*)this' > where the middle part of the strings remains > unmodified. > > Any suggestions? > > Peace. > Vibha > > PS. How do I avoid getting my email ID web-published > for this mailing list.? > > > > _

Re: f*cking re module

2005-07-04 Thread James Stroud
that they remember the frustration of being new to programming. Those "wasted" 1.5 hr sessions getting nowhere add up pretty fast and then the explicatives begin to flow. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple checkboxes highlighted when one clicked = not good

2005-07-05 Thread James Stroud
eckbutton(self.frame2, variable = self.InUse[t]).grid(row= i, column = t) should this last line read "self.InUse[i]" ? -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple checkboxes highlighted when one clicked = not good

2005-07-05 Thread James Stroud
eckbutton(self.frame2, variable = self.InUse[t]).grid(row= i, column = t) should this last line read "self.InUse[i]" ? What I mean to say is that t is always 0 when you assign variable. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://

Re: any thing to do???

2005-07-27 Thread James Stroud
this practice will make me a lot better. but if anybody > else has any ideas than that would be good too . -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Dabo in 30 seconds?

2005-07-30 Thread James Stroud
er is just pain. I think this is a developer trick, to keep you at war with yourself. The more you have internal conflict the more you will be looking for an App framework to solve your inner problems, and that keeps these guys in business--the business of wrecking souls. Go with yourself. James

Re: Dabo in 30 seconds?

2005-07-31 Thread James Stroud
import editwindow File "/data10/users/jstroud/Programs/lib/python2.3/site-packages/wx-2.6-gtk2-ansi/wx/py/editwindow.py", line 8, in ? from wx import stc File "/data10/users/jstroud/Programs/lib/python2.3/site-packages/wx-2.6-gtk2-ansi/wx/stc.py",

Re: Dabo in 30 seconds?

2005-07-31 Thread James Stroud
On Sunday 31 July 2005 05:14 pm, Robert Kern wrote: > You can't blame Dabo for this one. Your wxPython install is broken. Yes, but my Tkinter install works just fine. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesst

Re: Dabo in 30 seconds?

2005-08-01 Thread James Stroud
On Monday 01 August 2005 05:30 am, Ed Leafe wrote: > Should we have defensive code for every possible broken installation? We > use a lot of the Python standard library modules, many dbapi-compliant > modules, and, of course, wxPython. If someone mis-installs one of the > pre-requisites, do you ex

Re: Dabo in 30 seconds?

2005-08-01 Thread James Stroud
s in mind, and we kind of keep that mentality when evaluating modules our code uses. Do your end-users really want to figure out that the need to and how to install stylized text controls, whatever that is? -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Ange

Re: Dabo in 30 seconds?

2005-08-01 Thread James Stroud
es of the www documentation. It is probably there, hidden in a very obvious place that someone would be expected to read if they wanted to use it enough to dig for something they don't know there looking for. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 L

using httplib for authentication

2005-08-02 Thread James Stroud
point me in the right direction? I have discovered httplib and read the documentation and looked at the examples, but they don't seem helpful for this. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ --

Re: using httplib for authentication

2005-08-03 Thread James Stroud
Thank you Fuzzy, I will look into these things. Maybe the site is setting a cookie, as you have suggested. I have never delved into the ways of http except to configure apache and write some very bare-bones web pages, so I have to say that some very obvious things do not occur to me. James On

Re: Idiots guide to fonts with tKinter

2005-08-04 Thread James Stroud
ous. But that's my goal for Python. > Sowhat's the easiest way to get there? What steps should I take? > I'm not in any rush, I just want some help along the way... -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: World's largest Python caught!:)

2005-08-08 Thread James Stroud
rial from any system and destroy any copies. Please note > that the views or opinions expressed in this message may be those of the > individual and not necessarily those of Tegel Foods Ltd. > > This email was scanned and cleared by NetIQ MailMarshal. > #

Re: Jargons of Info Tech industry

2005-08-11 Thread James Stroud
Xah Lee is a known troll. You are retarded to reply to his drivel. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: list to tuple

2005-08-11 Thread James Stroud
thon > application such as >a1 = [1,5,3,2,5,...], the len(a1) varies. Same to b1, c1, > >With python, I would like to reorganize them into a tuple like > >t1 = ((a1[0],b1[0],c1[0],...),(a1[1],b1[1],c1[1],...),...) > > Anybody knows how to do that. Tha

Re: robust html parser

2005-08-15 Thread James Stroud
http://www.crummy.com/software/BeautifulSoup/ On Monday 15 August 2005 03:33 pm, BRA_MIK wrote: > I'm looking for a good and robust html parser that could parse complex > html/xhtml document without crashing (possibly free) > > Could you help me please ? > > TIA > MB

  1   2   3   4   5   6   7   8   9   10   >