Re: People still using Tkinter?

2008-05-09 Thread Marc 'BlackJack' Rintsch
On Sat, 10 May 2008 00:20:33 -0500, Kenneth McDonald wrote: > Any guesses as to how many people are still using Tkinter? And can > anyone direct me to good, current docs for Tkinter? AFAIK `Tkinter` hasn't changed much over time, so "old" documentation is still current. Ciao, Marc 'Bla

Find more than one error at once

2008-05-09 Thread Joseph Turian
Is it possible to coax python to find more than one error at once? Thanks, Joseph -- http://mail.python.org/mailman/listinfo/python-list

implementation for Parsing Expression Grammar?

2008-05-09 Thread [EMAIL PROTECTED]
In the past weeks i've been thinking over the problem on the practical problems of regex in its matching power. For example, often it can't be used to match anything of nested nature, even the most simple nesting. It can't be used to match any simple grammar expressed by BNF. Some rather very regul

Re: PyXml

2008-05-09 Thread Stefan Behnel
Martin v. Löwis wrote: >> Can anyone recommend a Python validating parser that validates vs Xml >> Schema? > > The libxml bindings for Python can do that. ... although the OP will likely prefer using lxml, where it's three lines of Python (ok, plus an import), compared to quite a bit of code in t

People still using Tkinter?

2008-05-09 Thread Kenneth McDonald
Any guesses as to how many people are still using Tkinter? And can anyone direct me to good, current docs for Tkinter? Thanks, Ken -- http://mail.python.org/mailman/listinfo/python-list

How to call a file

2008-05-09 Thread Chris Sprinkles
I'm still having trouble with calling a text file and I know its so simple here is the code work = open('C:\Documents and Settings\Administrator\My Documents\Chris\Python\Python\work.txt', 'r') for line in work.txt: print line ---

Re: multiple Python versions, but on Windows (how to handle registry updates)

2008-05-09 Thread Banibrata Dutta
Thanks, Gabriel and Terry, for your responses. Another somewhat realted, but very noob'ish question -- given that I already have Python2.5 installed & will install Python2.4, will copying the ../Lib/site-packages/ from 2.5 into 2.4's, work ? i think the answer is "no", but still asking. is it pac

Re: regexp help

2008-05-09 Thread Paul McGuire
On May 9, 6:52 pm, John Machin <[EMAIL PROTECTED]> wrote: > Paul McGuire wrote: > > from re import * > > Perhaps you intended "import re". Indeed I did. > > > > Both print "prince". > > No they don't. The result is "NameError: name 're' is not defined". Dang, now how did that work in my script?

Re: regexp help

2008-05-09 Thread John Machin
globalrev wrote: The inner pair of () are not necessary. yes they are? You are correct. I was having a flashback to a dimly remembered previous incarnation during which I used regexp software in which something like & or \0 denoted the whole match (like MatchObject.group(0)) :-) -- http://

Re: The Importance of Terminology's Quality

2008-05-09 Thread Rob Warnock
George Neuner wrote: +--- | Common Lisp doesn't have "filter". +--- Of course it does! It just spells it REMOVE-IF-NOT!! ;-} ;-} > (remove-if-not #'oddp (iota 10)) (1 3 5 7 9) > (remove-if-not (lambda (x) (> x 4)) (iota 10)) (5 6 7 8 9) > -Rob

Re: anagram finder / dict mapping question

2008-05-09 Thread dave
On 2008-05-09 18:53:19 -0600, George Sakkis <[EMAIL PROTECTED]> said: On May 9, 5:19 pm, [EMAIL PROTECTED] wrote: What would be the best method to print the top results, the one's that had the highest amount of anagrams??  Create a new histogram dict? You can use the max() function to fin

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-09 Thread Tim Roberts
Brian Vanderburg II <[EMAIL PROTECTED]> wrote: >D'Arcy J.M. Cain wrote: >> Brian Vanderburg II <[EMAIL PROTECTED]> wrote: >> >>> This is sort of related, but I'm wondering what is different between >>> "#!/usr/bin/env python" and "#!python". Wouldn't the second do the same >>> thing, since an

Re: regexp help

2008-05-09 Thread globalrev
> The inner pair of () are not necessary. yes they are? ty anyway, got it now. -- http://mail.python.org/mailman/listinfo/python-list

Python and the Bartender

2008-05-09 Thread castironpi
Incidentally, now that everyone knows English, writer would like to critique his behavior. I have leaned to the group for approval, at times by disparaging the efforts of others, but other times not. I have expressed negative emotion. Is anyone in earshot getting work done that I am interfering

Re: RELEASED Python 2.6a3 and 3.0a5

2008-05-09 Thread George Sakkis
On May 8, 7:50 pm, Barry Warsaw <[EMAIL PROTECTED]> wrote: > On behalf of the Python development team and the Python community, I   > am happy to announce the third alpha release of Python 2.6, and the   > fifth alpha release of Python 3.0. > > Please note that these are alpha releases, and as suc

Re: RELEASED Python 2.6a3 and 3.0a5

2008-05-09 Thread castironpi
On May 9, 7:55 pm, Stéphane Larouche <[EMAIL PROTECTED]> wrote: > > On 9 Mai, 01:50, Barry Warsaw <[EMAIL PROTECTED]> wrote: > > > On behalf of the Python development team and the Python community, I > > > am happy to announce the third alpha release of Python 2.6, and the > > > fifth alpha release

Re: regexp help

2008-05-09 Thread John Machin
globalrev wrote: ty. that was the decrypt function. i am slo writing an encrypt function. def encrypt(phrase): pattern = re.compile(r"([bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ])") The inner pair of () are not necessary. return pattern.sub(r"1\o\1", phrase) doesnt work though, h b

Re: Property in derived class

2008-05-09 Thread George Sakkis
On May 9, 5:20 pm, Joseph Turian <[EMAIL PROTECTED]> wrote: > If I have a property in a derived class, it is difficult to override > the get and set functions: the property's function object had early > binding, whereas the overriden method was bound late. > This was previously discussed: >    http

Re: RELEASED Python 2.6a3 and 3.0a5

2008-05-09 Thread Stéphane Larouche
> On 9 Mai, 01:50, Barry Warsaw <[EMAIL PROTECTED]> wrote: > > On behalf of the Python development team and the Python community, I > > am happy to announce the third alpha release of Python 2.6, and the > > fifth alpha release of Python 3.0. After I installer Python 2.6a3, Matlab R2007a began ha

Re: anagram finder / dict mapping question

2008-05-09 Thread George Sakkis
On May 9, 5:19 pm, [EMAIL PROTECTED] wrote: > > > What would be the best method to print the top results, the one's that > > > had the highest amount of anagrams??  Create a new histogram dict? > > > You can use the max() function to find the biggest list of anagrams: > > > top_results = max(anagra

Protect yourself against Operation Sudden Fall

2008-05-09 Thread Georgina . Hindall
Law enforcement is now intercepting text messages, as proven by Operation Sudden Fall in San Diego. http://www.usdoj.gov/dea/pubs/states/newsrel/sd050608.html http://www.signonsandiego.com/news/education/20080506-1338-bn06sdsu2.html Don't let your personal SMS/text messages fall into the wrong ha

Re: regexp help

2008-05-09 Thread globalrev
ty. that was the decrypt function. i am slo writing an encrypt function. def encrypt(phrase): pattern = re.compile(r"([bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ])") return pattern.sub(r"1\o\1", phrase) doesnt work though, h becomes 1\\oh. def encrypt(phrase): pattern = re.compile(r

Re: regexp help

2008-05-09 Thread John Machin
Paul McGuire wrote: from re import * Perhaps you intended "import re". vowels = "aAeEiIoOuU" cons = "bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ" encodeRe = re.compile(r"([%s])[%s]\1" % (cons,vowels)) print encodeRe.sub(r"\1",s) This is actually a little more complex than you asked - it will

Problem with help() in python/ipython interpreters

2008-05-09 Thread Casey
I'm running python 2.5.2 on WinXP. I've always used a GUI for interactive development, but I wanted to try out ipython which better supports matplotlib in this mode. Unfortunately, whenever I try to use help() I get the following error: (Sys) The system cannot find the file specified. "C:\docum

Re: PyXml

2008-05-09 Thread Martin v. Löwis
> What's the story with PyXml? Is it stable/complete or has effort moved > elsewhere? Large parts of PyXML are now part of the standard library. When I stepped back as a maintainer, nobody volunteered to take over. > Can anyone recommend a Python validating parser that validates vs Xml > Schema?

Re: regexp help

2008-05-09 Thread Matimus
On May 9, 3:19 pm, globalrev <[EMAIL PROTECTED]> wrote: > i want to a little stringmanipulationa nd im looking into regexps. i > couldnt find out how to do: > s = 'poprorinoncoce' > re.sub('$o$', '$', s) > should result in 'prince' > > $ is obv the wrng character to use bu what i mean the pattern i

Re: Property in derived class

2008-05-09 Thread Ian Kelly
On Fri, May 9, 2008 at 3:20 PM, Joseph Turian <[EMAIL PROTECTED]> wrote: > Could someone demonstrate how to implement the proposed solutions that > allow the property to be declared in the abstract base class, and > refer to a get function which is only implemented in derived classes? One way is t

Re: regexp help

2008-05-09 Thread Paul McGuire
On May 9, 5:19 pm, globalrev <[EMAIL PROTECTED]> wrote: > i want to a little stringmanipulationa nd im looking into regexps. i > couldnt find out how to do: > s = 'poprorinoncoce' > re.sub('$o$', '$', s) > should result in 'prince' > > $ is obv the wrng character to use bu what i mean the pattern i

Re: anagram finder / dict mapping question

2008-05-09 Thread Kam-Hung Soh
On Sat, 10 May 2008 07:19:38 +1000, <[EMAIL PROTECTED]> wrote: > What would be the best method to print the top results, the one's that > had the highest amount of anagrams?? Create a new histogram dict? You can use the max() function to find the biggest list of anagrams: top_results = max(an

regexp help

2008-05-09 Thread globalrev
i want to a little stringmanipulationa nd im looking into regexps. i couldnt find out how to do: s = 'poprorinoncoce' re.sub('$o$', '$', s) should result in 'prince' $ is obv the wrng character to use bu what i mean the pattern is "consonant o consonant" and should be replace by just "consonant".

Re: Property in derived class

2008-05-09 Thread Larry Bates
Joseph Turian wrote: If I have a property in a derived class, it is difficult to override the get and set functions: the property's function object had early binding, whereas the overriden method was bound late. This was previously discussed: http://groups.google.com/group/comp.lang.python/br

Re: The Importance of Terminology's Quality

2008-05-09 Thread George Neuner
On Thu, 8 May 2008 22:38:44 -0700, "Waylen Gumbal" <[EMAIL PROTECTED]> wrote: >Sherman Pendley wrote: >> [EMAIL PROTECTED] writes: >> > >> > > PLEASE DO NOT | :.:\:\:/:/:.: >> > > FEED THE TROLLS | :=.' - - '.=: >> > >> > I don't think Xah is trolling here (contrary to his/her habit) >> > but posi

BEST VIDEO sex!

2008-05-09 Thread ddda
Best Viedo! SEXI *-*!! http://rozrywka.yeba.pl/show.php?id=2079 http://rozrywka.yeba.pl/show.php?id=2073 -- http://mail.python.org/mailman/listinfo/python-list

Property in derived class

2008-05-09 Thread Joseph Turian
If I have a property in a derived class, it is difficult to override the get and set functions: the property's function object had early binding, whereas the overriden method was bound late. This was previously discussed: http://groups.google.com/group/comp.lang.python/browse_thread/thread/e13a

Re: anagram finder / dict mapping question

2008-05-09 Thread umpsumps
> > What would be the best method to print the top results, the one's that > > had the highest amount of anagrams?? Create a new histogram dict? > > You can use the max() function to find the biggest list of anagrams: > > top_results = max(anagrams.itervalues(), key=len) > > -- > Arnaud That is t

PyXml

2008-05-09 Thread kdwyer
Hello Everyone, I've been looking into writing a utility to compare/analyse xml files, and thought I'd have a look at PyXml, but the Sourceforge page says it's no longer maintained. Two questions: What's the story with PyXml? Is it stable/complete or has effort moved elsewhere? Can anyone recom

Re: Not able to get utf8 encoded string into a document

2008-05-09 Thread Tim Golden
Lawrence, Anna K (US SSA) wrote: I am working on a web application using Pylons .0.9.6, SQLAlchemy 0.4.4, MySQLdb 1.2.2 and Python 2.4.4. We want to use utf8 encoding throughout and as far as I can see everything is set properly between components and I’ve got a sitecustomize.py in my site-pa

Re: slicing lists

2008-05-09 Thread castironpi
On May 9, 10:11 am, Yves Dorfsman <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > The only thing is, is there is another natural meaning to [a,b:c]. > > > Counting grids on the diagonals, the rational set is well defined: > > > 0: 0, 0 > > 1: 1, 0 > > 2: 0, 1 > > 3: 2, 0 > > 4: 1, 1 > > 5

Re: How to modify meaning of builtin function "not" to "!"?

2008-05-09 Thread Terry Reedy
"grbgooglefan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I am creating functions, the return result of which I am using to make | decisions in combined expressions. | In some expressions, I would like to inverse the return result of | function. | | E.g. function contains(source

how to call a text file

2008-05-09 Thread Chris Sprinkles
I need to know how to call a text file called txt_file.do I just put the directory that it is in like C:\documnet\blah\blah ??? cars_file = open() # i will be our line counter so we know when to pause i = 0 print for line in cars_file: i = i + 1 # increment i by 1 at each line prin

Re: multiple Python versions, but on Windows (how to handle registry updates)

2008-05-09 Thread Terry Reedy
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] En Fri, 09 May 2008 07:58:33 -0300, Banibrata Dutta <[EMAIL PROTECTED]> escribió: |> I already have Python25, and need to install Python24. I would prefer not to |> remove Python25, but each Python version seems to

Re: RELEASED Python 2.6a3 and 3.0a5

2008-05-09 Thread Terry Reedy
"Christian Heimes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Kay Schluehr schrieb: | > http://www.python.org/ftp/python/3.0/python-3.0a5.msi | | > Error 404: File Not Found | | > http://www.python.org/ftp/python/3.0/python-3.0a5.amd64.msi | | > Error 404: File Not Found | | Th

Re: the lvalue curse? let's play with this crazy idea ;)

2008-05-09 Thread Terry Reedy
"XLiIV" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Pipelining works best when all functions have just one input. But that is a small subset of actual programs. -- http://mail.python.org/mailman/listinfo/python-list

Re: Am I missing something with Python not having interfaces?

2008-05-09 Thread Daniel Marcel Eichler
Am Freitag 09 Mai 2008 10:19:45 schrieb Bruno Desthuilliers: > >> very often sees do-nothing catch-all try/catch blocks in Java - > >> which is way worse than just letting the exception propagate. I > >> find all this totally pointless, because there's just no way for a > >> compiler to check if y

Re: anagram finder / dict mapping question

2008-05-09 Thread Arnaud Delobelle
[EMAIL PROTECTED] writes: > On May 9, 1:45 am, [EMAIL PROTECTED] wrote: >> >>> key = ''.join(sorted(word)) >> >> I tend to strip and lower the word as well, otherwise "Hello" and >> "hello" do not compare...depends on what you want though! >> Plus you might get a lot of "word\n" as keys... >> >> M

Re: Mathematics in Python are not correct

2008-05-09 Thread Terry Reedy
"Lou Pecora" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | In article <[EMAIL PROTECTED]>, | "Terry Reedy" <[EMAIL PROTECTED]> wrote: | | > "Luis Zarrabeitia" <[EMAIL PROTECTED]> wrote in message | > news:[EMAIL PROTECTED] | > | Btw, there seems to be a math problem in python with

Not able to get utf8 encoded string into a document

2008-05-09 Thread Lawrence, Anna K (US SSA)
Hi all, This is my first post and I'm really at a loss for how to fix my problem, so I really hope someone can help me out. I am working on a web application using Pylons .0.9.6, SQLAlchemy 0.4.4, MySQLdb 1.2.2 and Python 2.4.4. We want to use utf8 encoding throughout and as far as I ca

Re: anagram finder / dict mapping question

2008-05-09 Thread umpsumps
On May 9, 1:45 am, [EMAIL PROTECTED] wrote: > >>> key = ''.join(sorted(word)) > > I tend to strip and lower the word as well, otherwise "Hello" and > "hello" do not compare...depends on what you want though! > Plus you might get a lot of "word\n" as keys... > > My technique is the this way > > def

Re: Wanted: Citation supporting Duck Typing

2008-05-09 Thread Paddy
On May 9, 6:30 pm, Paddy <[EMAIL PROTECTED]> wrote: > Hi, > The wikipedia article on Duck Typing has this criticism section that > needs a citation: > (Fron:http://en.wikipedia.org/wiki/Duck_typing#Criticism) > > An often cited criticism is this: > One issue with duck typing is that it forces t

Re: Web Framework suggestions for a RIA type application for managing lab specimens

2008-05-09 Thread Larry Bates
rynt wrote: Hello all. I'm Looking for suggestions for which Python web framework(e.g. Django, Turbogears,etc.) would work best to develop a cross platform browser based system to manage lab specimens. Requirements are: a. highly secure b. run on internet or intranet e. RDBMS read/write intensi

Special Track “Computational Bioimaging and Visual ization” within the ISVC08 USA - Announce & Call for Papers

2008-05-09 Thread [EMAIL PROTECTED]
- (Apologies for cross-posting) Special Track “Computational Bioimaging and Visualization” International Symposium on Visual Computing (ISVC08) Las Vegas, Nevada

Wanted: Citation supporting Duck Typing

2008-05-09 Thread Paddy
Hi, The wikipedia article on Duck Typing has this criticism section that needs a citation: (Fron: http://en.wikipedia.org/wiki/Duck_typing#Criticism) An often cited criticism is this: One issue with duck typing is that it forces the programmer to have a much wider understanding of the code he

Re: the lvalue curse? let's play with this crazy idea ;)

2008-05-09 Thread XLiIV
On May 9, 11:52 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > Maybe it's also harder to read than this:: > >   print '-'.join(map(str, time.localtime()[:3])) I like this concept, it's so, .. ziped :) > Of course, if you don't mind the extra padding zeroes in day and month:: > >   prin

Re: Feature suggestion: sum() ought to use a compensated summationalgorithm

2008-05-09 Thread Duncan Booth
"Terry Reedy" <[EMAIL PROTECTED]> wrote: > > "Szabolcs Horvát" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >| Gabriel Genellina wrote: >| > >| > Python doesn't require __add__ to be associative, so this should >| > not be > used as a general sum replacement. >| >| It does not

BEST VIDEO

2008-05-09 Thread tobik0000
Best Video sexi !! *-*!! http://rozrywka.yeba.pl/show.php?id=2073 http://rozrywka.yeba.pl/show.php?id=2079 -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature suggestion: sum() ought to use a compensated summationalgorithm

2008-05-09 Thread Rhamphoryncus
On May 8, 3:09 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "Szabolcs Horvát" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED]| Gabriel Genellina wrote: > > | > > | > Python doesn't require __add__ to be associative, so this should not be > used as a general sum replacement. > | >

Books for a new generation of Pythoneers (was: Newbie to python --- why should i learn !)

2008-05-09 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, maxinbjohn <[EMAIL PROTECTED]> wrote: >Hi Raxit, > >One of the the tempting features of Python is that it is fun to code >in Python. If you are really trying to learn python, you should read >Adventures with Neko (http://gnuvision.com/books/pybook/) . It is an >intr

Re: A question about python and xml

2008-05-09 Thread J. Cliff Dyer
On Fri, 2008-05-09 at 08:39 -0700, Holden wrote: > Hello everyone I heard this was a good community to go too for help > and advice. I want to make a web site that uses the python programming > language which I am VERY new at. This website would store simple data > such as names in a form. At first

Re: A question about python and xml

2008-05-09 Thread Stefan Behnel
Holden wrote: > I want to make a web site that uses the python programming > language which I am VERY new at. This website would store simple data > such as names in a form. At first I wanted to use mysql to store the > data but I want to export the data using xml. > > So say if a user logged in t

Re: Cannot install Pypvm (Python Parallel Virtual Machine)

2008-05-09 Thread Paul Boddie
On 9 Mai, 17:22, [EMAIL PROTECTED] wrote: > Thanks for the reply. > > I've found and installed the package containing pvm3.h. (The file is > now located under "share/pvm3/include/pvm3.h".) But Pypvm can't find > it. There is a pvm-dev package in Ubuntu, but it looks like Fedora employs a different

Re: Grabbing previous iteration in a dict

2008-05-09 Thread dannywebster
On May 9, 4:09 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > On May 9, 10:10 am, [EMAIL PROTECTED] wrote: > > > Hello all, > > > I have a dictionary of which i'm itervalues'ing through, and i'll be > > performing some logic on a particular iteration when a condition is > > met with trusty .startswit

Re: threading - race condition?

2008-05-09 Thread skunkwerk
On May 9, 12:12 am, John Nagle <[EMAIL PROTECTED]> wrote: > skunkwerk wrote: > > i'm getting the wrong output for the 'title' attributes for this > > data.  the queue holds a data structure (item name, position, and list > > to store results in).  each thread takes in an item name and queries a > >

Re: Free Memory

2008-05-09 Thread Patrick Mullen
I had some very interesting results with this code to do what is asked: for key in globals().keys(): del globals()[key] for key in locals().keys(): del locals()[key] It might be better to reverse the two steps, I didn't give it much thought. Anyway, when this is done, all of the builtins

Re: python newbie: some surprises

2008-05-09 Thread J. Cliff Dyer
On Fri, 2008-05-09 at 15:08 +, Yves Dorfsman wrote: > Gabriel Genellina wrote: > > >> I see the point of the OP. Couldn't the new-line be used as an > >> equivalent of ':', for example, do you find this difficult to read: > >> > >> if a == 3 > >>do_something() > >> > >> > >> if a == 3:

A question about python and xml

2008-05-09 Thread Holden
Hello everyone I heard this was a good community to go too for help and advice. I want to make a web site that uses the python programming language which I am VERY new at. This website would store simple data such as names in a form. At first I wanted to use mysql to store the data but I want to ex

Re: the lvalue curse? let's play with this crazy idea ;)

2008-05-09 Thread Bruno Desthuilliers
XLiIV a écrit : I started playing with Python and love it since the very beginning, programming using Python is so ...human-like? but one thing returns to me almost everytime when I see/write the code Let's take a look at two ways of thinking... the standard one which is well-known and loved by

Re: Mathematics in Python are not correct

2008-05-09 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "Luis Zarrabeitia" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > | Btw, there seems to be a math problem in python with exponentiation... > | >>> 0**0 > | 1 > | That 0^0 should be a nan or exception, I g

Re: Cannot install Pypvm (Python Parallel Virtual Machine)

2008-05-09 Thread spectrumdt
Thanks for the reply. I've found and installed the package containing pvm3.h. (The file is now located under "share/pvm3/include/pvm3.h".) But Pypvm can't find it. Someone recommended that I install the equivalent of what is called "build-essential" in Ubuntu. I was told that the equivalent can b

No one will ever know

2008-05-09 Thread pakodagu86146
You will not find a better watch copy for less Every type and style http://cunidezetoc62.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

RE: Newbie to python --- why should i learn !

2008-05-09 Thread Sells, Fred
write working programs > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Behalf Of [EMAIL PROTECTED] > Sent: Thursday, May 08, 2008 6:25 AM > To: python-list@python.org > Subject: Newbie to python --- why should i learn ! > > > Hi, > > i was reading/learning s

Re: Mathematics in Python are not correct

2008-05-09 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, Michael Torrie <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Have a look at this: > > > -123**0 > > -1 > > > > > > The result is not correct, because every number (positive or negative) > > raised to the power of 0 is ALWAYS 1 (a positive number

Re: Function creation (what happened?)

2008-05-09 Thread Bruno Desthuilliers
Viktor a écrit : This completely slipped of my mind... :) I'm trying to change the: http://wordaligned.org/svn/etc/echo/echo.py So if the function is method it prints ClassName.MethodName instead of MethodName(self|klass|cls=<... ClassName>). But it turned out that in the decorator, the wrappe

Re: slicing lists

2008-05-09 Thread Yves Dorfsman
[EMAIL PROTECTED] wrote: The only thing is, is there is another natural meaning to [a,b:c]. Counting grids on the diagonals, the rational set is well defined: 0: 0, 0 1: 1, 0 2: 0, 1 3: 2, 0 4: 1, 1 5: 0, 2 6: 3, 0 7: 2, 1 ... Thencefore ( 2, 0 ) : ( 3, 0 ) is well defined. Thencefore, a,b:

Re: Grabbing previous iteration in a dict

2008-05-09 Thread Paul Hankin
On May 9, 10:10 am, [EMAIL PROTECTED] wrote: > Hello all, > > I have a dictionary of which i'm itervalues'ing through, and i'll be > performing some logic on a particular iteration when a condition is > met with trusty .startswith('foo').  I need to grab the previous > iteration if this condition i

Re: python newbie: some surprises

2008-05-09 Thread Yves Dorfsman
Gabriel Genellina wrote: I see the point of the OP. Couldn't the new-line be used as an equivalent of ':', for example, do you find this difficult to read: if a == 3 do_something() if a == 3: do_something() Yes, it could be done, there are no technical reasons to always force to use

Re: Grabbing previous iteration in a dict

2008-05-09 Thread Yves Dorfsman
[EMAIL PROTECTED] wrote: You cannot rely on the elements of a dictionary being in any particular order (dicts are internally hash tables), so the above is almost certainly ont what you want. Hi - thanks for your reply. How about if I made the dict into a list (of which I have done). How woul

Re: Grabbing previous iteration in a dict

2008-05-09 Thread Hyuga
On May 9, 5:10 am, [EMAIL PROTECTED] wrote: > I have a dictionary of which i'm itervalues'ing through, and i'll be > performing some logic on a particular iteration when a condition is > met with trusty .startswith('foo'). I need to grab the previous > iteration if this condition is met. I can do

Re: Grabbing previous iteration in a dict

2008-05-09 Thread Gary Herron
[EMAIL PROTECTED] wrote: On May 9, 10:48 am, Paul Rubin wrote: [EMAIL PROTECTED] writes: I have a dictionary of which i'm itervalues'ing through, and i'll be performing some logic on a particular iteration when a condition is met with trusty .startswith('foo')

Re: Function creation (what happened?)

2008-05-09 Thread Gabriel Genellina
En Fri, 09 May 2008 10:02:01 -0300, Viktor <[EMAIL PROTECTED]> escribió: > This completely slipped of my mind... :) > > I'm trying to change the: > http://wordaligned.org/svn/etc/echo/echo.py > > So if the function is method it prints ClassName.MethodName instead of > MethodName(self|klass|cls=<..

Re: The del statement

2008-05-09 Thread Michael Torrie
George Sakkis wrote: > I think you're trying to imply that it is consistent with setting a > value (same with getting). I guess what bugs me about "del" is that > it's a keyword and not some universally well-known punctuation. Do you > you feel that Python misses a "pop" keyword and respective > ex

Re: Newbie to python --- why should i learn !

2008-05-09 Thread Marcelo de Moraes Serpa
I sincerely think that most languages in existence today have its place. Java has some great libraries and programs that were written in it. Try writing an Eclipse clone in Python, I don't think it would go well. On Fri, May 9, 2008 at 11:08 AM, hdante <[EMAIL PROTECTED]> wrote: > On May 8, 7:2

Re: Can I "delete" the namespace of a module that i import?

2008-05-09 Thread Mike Driscoll
On May 9, 9:06 am, "gbin,Zhou" <[EMAIL PROTECTED]> wrote: > Hi,all. >    I see from "http://docs.python.org/tut/node11.html"; that "Name > spaces are created at different moments and have different lifetimes. > The namespace containing the built-in names is created when the Python > interpreter sta

Re: Grabbing previous iteration in a dict

2008-05-09 Thread dannywebster
On May 9, 10:48 am, Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > I have a dictionary of which i'm itervalues'ing through, and i'll be > > performing some logic on a particular iteration when a condition is > > met with trusty .startswith('foo'). I need to grab the p

Re: observer pattern (notification chain synchronization)

2008-05-09 Thread J. Cliff Dyer
That looks like a good approach to me. Alternative to a dict would just be a count of reported stocks tested against the total number of stocks, but if one stock reports twice before another reports at all, you'll get funny results. Your method is probably better, in the general case. Cheers, Cl

Re: Web Framework suggestions for a RIA type application for managing lab specimens

2008-05-09 Thread Bruno Desthuilliers
rynt a écrit : Hello all. I'm Looking for suggestions for which Python web framework(e.g. Django, Turbogears,etc.) would work best to develop a cross platform browser based system to manage lab specimens. Requirements are: a. highly secure b. run on internet or intranet e. RDBMS read/write inte

Re: multiple Python versions, but on Windows (how to handle registry updates)

2008-05-09 Thread Gabriel Genellina
En Fri, 09 May 2008 07:58:33 -0300, Banibrata Dutta <[EMAIL PROTECTED]> escribió: > I already have Python25, and need to install Python24. I would prefer not to > remove Python25, but each Python version seems to update the registry, I > guess (not sure), overwriting each other's entries. Any way

Re: Newbie to python --- why should i learn !

2008-05-09 Thread hdante
On May 8, 7:25 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > i was reading/learning some hello world program in python. > I think its very simillar to Java/C++/C#. What's different (except > syntax) ? All the languages have similar "power", in a theoretical sense. If you can solve

Re: help needed!

2008-05-09 Thread Mike Driscoll
On May 9, 8:54 am, drjekil <[EMAIL PROTECTED]> wrote: > i have a script which will do a specific task for a file in a folder,now i > would like to do the same task  for the all files in that folder(25 > files).how can i do that? > > Thanks in advance. > > -- > View this message in > context:http:/

Can I "delete" the namespace of a module that i import?

2008-05-09 Thread gbin,Zhou
Hi,all. I see from "http://docs.python.org/tut/node11.html"; that "Name spaces are created at different moments and have different lifetimes. The namespace containing the built-in names is created when the Python interpreter starts up, and is never deleted. The global namespace for a module is c

Re: help needed!

2008-05-09 Thread Mike Driscoll
On May 9, 8:54 am, drjekil <[EMAIL PROTECTED]> wrote: > i have a script which will do a specific task for a file in a folder,now i > would like to do the same task  for the all files in that folder(25 > files).how can i do that? > > Thanks in advance. > > -- > View this message in > context:http:/

Re: Pythonwin

2008-05-09 Thread Mike Driscoll
On May 9, 9:02 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 09 May 2008 10:40:38 -0300, Clive_S <[EMAIL PROTECTED]> escribió: > > > I downloaded (from Python) and installed python-2.4.4.msi > > > I have python and pythonw.exe in the Python 24 folder (but not in my > > start menu). >

Re: How to modify meaning of builtin function "not" to "!"?

2008-05-09 Thread Bruno Desthuilliers
grbgooglefan a écrit : I am creating functions, the return result of which I am using to make decisions in combined expressions. In some expressions, I would like to inverse the return result of function. E.g. function contains(source,search) will return true if "search" string is found in sourc

Re: How to modify meaning of builtin function "not" to "!"?

2008-05-09 Thread castironpi
On May 9, 8:41 am, grbgooglefan <[EMAIL PROTECTED]> wrote: > I am creating functions, the return result of which I am using to make > decisions in combined expressions. > In some expressions, I would like to inverse the return result of > function. > > E.g. function contains(source,search) will ret

RE: How to modify meaning of builtin function "not" to "!"?

2008-05-09 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of grbgooglefan > Sent: Friday, May 09, 2008 9:41 AM > To: python-list@python.org > Subject: How to modify meaning of builtin function "not" to "!"? > > I am creating functions, the return result o

Dynamic generation of images (was Re: Custom Classes?)

2008-05-09 Thread J. Cliff Dyer
On Thu, 2008-05-08 at 10:33 -0500, Victor Subervi wrote: > Okay, trying this again with everything working and no ValueError or > any other errors, here we go: > > Load this code. Unless you use a similar login() script, you will want > to edit your own values into the user, passwd, db and host: >

Re: Pythonwin

2008-05-09 Thread Gabriel Genellina
En Fri, 09 May 2008 10:40:38 -0300, Clive_S <[EMAIL PROTECTED]> escribió: > I downloaded (from Python) and installed python-2.4.4.msi > > I have python and pythonw.exe in the Python 24 folder (but not in my > start menu). > When I click on the pythonw.exe it is not launched?? pythonw.exe is NOT P

Re: How to modify meaning of builtin function "not" to "!"?

2008-05-09 Thread Ivan Voras
grbgooglefan wrote: > I am creating functions, the return result of which I am using to make > decisions in combined expressions. > In some expressions, I would like to inverse the return result of > function. > > E.g. function contains(source,search) will return true if "search" > string is found

observer pattern (notification chain synchronization)

2008-05-09 Thread Alan Isaac
A question related to the observer pattern... Suppose I have a variant: there are stocks, mutual funds, and investors. Let us say that funds are observers for multiple stocks, and investors are observers for funds. Once a "month" all stocks notify their observing funds of their end-of-month pri

help needed!

2008-05-09 Thread drjekil
i have a script which will do a specific task for a file in a folder,now i would like to do the same task for the all files in that folder(25 files).how can i do that? Thanks in advance. -- View this message in context: http://www.nabble.com/help-needed%21-tp17148388p17148388.html Sent from t

RE: Pythonwin

2008-05-09 Thread Ahmed, Shakir
You need to install the same version on your pc, if you have 2.5 already installed you need to download 2.5 pythonwin from http://sourceforge.net Hope it will work for you. Thanks sk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clive_S Sent: Friday,

  1   2   >