MAJOR CANADIAN CHRISTIAN MISSIONARY CONVERTS TO ISLAM !!!!!!!!!!!!!!

2012-02-26 Thread BV
MAJOR CANADIAN CHRISTIAN MISSIONARY CONVERTS TO ISLAM By: Dr Garry Miller: A very important Christian missionary converted to Islam and became a major herald for Islam, he was a very active missionary and was very knowledgeable about the Bible... This man likes mathematics so much, that's why he l

Re: namespace question

2012-02-26 Thread Ben Finney
Steven D'Aprano writes: > The preferred terms in Python circles are class and instance > *attributes*, not variables. Yes, full ACK. > An integer variable is a variable holding an integer. > A string variable is a variable holding a string. > A list variable is a variable holding a list. And P

Re: [RELEASED] Release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3

2012-02-26 Thread Ben Finney
Benjamin Peterson writes: > We're pleased to announce the immediate availability of release candidates for > Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3 . If you're pleased to announce their immediate availability, then please do that! Putting “RELEASED” in the subject, when they're not released and

Re: [RELEASED] Release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3

2012-02-26 Thread Chris Angelico
On Sun, Feb 26, 2012 at 7:51 PM, Ben Finney wrote: > Benjamin Peterson writes: > >> We're pleased to announce the immediate availability of release candidates >> for >> Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3 . > > If you're pleased to announce their immediate availability, then please > do that!

MAJOR CANADIAN CHRISTIAN MISSIONARY CONVERTS TO ISLAM !!!!!!!!!!!!!!

2012-02-26 Thread BV
MAJOR CANADIAN CHRISTIAN MISSIONARY CONVERTS TO ISLAM By: Dr Garry Miller: A very important Christian missionary converted to Islam and became a major herald for Islam, he was a very active missionary and was very knowledgeable about the Bible... This man likes mathematics so much, that's why he l

Re: Python math is off by .000000000000045

2012-02-26 Thread jmfauth
On 25 fév, 23:51, Steven D'Aprano wrote: > On Sat, 25 Feb 2012 13:25:37 -0800, jmfauth wrote: > (2.0).hex() > > '0x1.0p+1' > (4.0).hex() > > '0x1.0p+2' > (1.5).hex() > > '0x1.8p+0' > (1.1).hex() > > '0x1.1999ap+0' > > > jmf > > What's

Question about circular imports

2012-02-26 Thread Frank Millman
Hi all I seem to have a recurring battle with circular imports, and I am trying to nail it once and for all. Let me say at the outset that I don't think I can get rid of circular imports altogether. It is not uncommon for me to find that a method in Module A needs to access something in Module

Re: Question about circular imports

2012-02-26 Thread Peter Otten
Frank Millman wrote: > I seem to have a recurring battle with circular imports, and I am trying > to nail it once and for all. > > Let me say at the outset that I don't think I can get rid of circular > imports altogether. It is not uncommon for me to find that a method in > Module A needs to acc

Re: Question about circular imports

2012-02-26 Thread Frank Millman
"Frank Millman" wrote in message news:jid2a9$n21$1...@dough.gmane.org... > Hi all > > I seem to have a recurring battle with circular imports, and I am trying > to nail it once and for all. > [...] > > The second solution is - > > in formats/__init__.py >import sys >sys.path.insert(0, _

Re: Question about circular imports

2012-02-26 Thread Frank Millman
"Peter Otten" <__pete...@web.de> wrote in message news:jid424$vfp$1...@dough.gmane.org... > Frank Millman wrote: > > > To cut a long story short, why should circular imports be unavoidable? > > Paths into packages are recipe for desaster. You may end up with multiple > instances of the same modul

Re: generate Windows exe on Linux

2012-02-26 Thread Albert van der Horst
In article , Gelonida N wrote: >On 02/22/2012 07:05 PM, Alec Taylor wrote: >> http://www.pyinstaller.org/ >> >> or >> >> http://cx-freeze.sourceforge.net/ >> >> You can also run py2exe in WINE >> > >You want to say, that I could install python 2.6 >some packages like win32api >PyQt and tand py2ex

Re: OT: Entitlements [was Re: Python usage numbers]

2012-02-26 Thread Albert van der Horst
In article , Rick Johnson wrote: >On Feb 18, 1:28=A0am, Ian Kelly wrote: >> On Fri, Feb 17, 2012 at 6:13 PM, Rick Johnson > > >> If I were to [sum my tax burden], it would >> probably come to around 30%, which still doesn't bother me, in part >> because I know that it comes back to benefit the s

Re: pickle handling multiple objects ..

2012-02-26 Thread Chris Rebert
On Sun, Feb 26, 2012 at 3:25 AM, Smiley 4321 wrote: > If I have a sample python code to be executed on Linux. How should  I handle > multiple objects with 'pickle' as below - > > --- > #!/usr/bin/python > > import pickle > > #my_list = {'a': 'Apple', 'b': 'Mango', 'c': 'Orange', 'd': 'Pineappl

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Wolfgang Meiners
Am 25.02.12 18:54, schrieb MRAB: >> If there is no limit for len(string), why not simply use >> >> # get_limit() returns None if there is no limit >> maxlength = get_limit() >> if maxlength and (len(string)<= maxlength): >> allow_passage() >> else: >> deny_passage() >> > That should be: >

Re: pickle handling multiple objects ..

2012-02-26 Thread Peter Otten
Smiley 4321 wrote: > If I have a sample python code to be executed on Linux. How should I > handle multiple objects with 'pickle' as below - > > --- > #!/usr/bin/python > > import pickle > > #my_list = {'a': 'Apple', 'b': 'Mango', 'c': 'Orange', 'd': 'Pineapple'} > #my_list = ('Apple', 'Ma

Re: [RELEASED] Release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3

2012-02-26 Thread Ben Finney
Chris Angelico writes: > On Sun, Feb 26, 2012 at 7:51 PM, Ben Finney > wrote: > > If you're pleased to announce their immediate availability, then > > please do that! > > Isn't it perfectly accurate to say that the RCs are now available? Yes. What's not reasonable is to say that a candidate f

Re: OT: Entitlements [was Re: Python usage numbers]

2012-02-26 Thread Albert van der Horst
In article <40af8461-1583-4496-9d81-d52d6905d...@b23g2000yqn.googlegroups.com>, Rick Johnson wrote: >Because the Jews allowed themselves to be subjected. Sad, but true. Actually Jew stands for (relative) coward. Let me explain. Jew comes from Juda, one of the 12 tribes. At some time Israel was s

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Chris Angelico
On Sun, Feb 26, 2012 at 10:56 PM, Wolfgang Meiners wrote: > That means: > if maxlength and (len(string) <= maxlength): > > is equivalent to > if (maxlength is not None) and (len(string) <= maxlength): On the contrary, it means they are distinctly NOT equivalent. The shorter form would treat a max

Re: pickle handling multiple objects ..

2012-02-26 Thread Chris Angelico
On Sun, Feb 26, 2012 at 11:04 PM, Peter Otten <__pete...@web.de> wrote: > This is however a bit errorprone. If you accidentally write the loading code > as > > fruit, beverages, vegetables = pickle.load(f) > > you'll end up drinking potatoes. You mean vodka? :) Additionally, you'll get a weird cr

Re: [RELEASED] Release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3

2012-02-26 Thread Chris Angelico
On Sun, Feb 26, 2012 at 11:21 PM, Ben Finney wrote: > Unless “release candidate” means nothing like what those words imply, it > can't be both a release candidate *and* released. > > Either it's released, or it's not. If it's a release candidate, it's not > released yet. If it's released, it's no

Re: [RELEASED] Release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3

2012-02-26 Thread Steven D'Aprano
On Sun, 26 Feb 2012 23:21:07 +1100, Ben Finney wrote: > Chris Angelico writes: > >> On Sun, Feb 26, 2012 at 7:51 PM, Ben Finney >> wrote: > >> > If you're pleased to announce their immediate availability, then >> > please do that! >> >> Isn't it perfectly accurate to say that the RCs are now a

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Wolfgang Meiners
Am 25.02.12 21:35, schrieb Rick Johnson: > On Feb 25, 11:54 am, MRAB wrote: >> [...] >> That should be: >> if maxlength is not None and len(string) <= maxlength: > > Using "imaginary" infinity values defiles the intuitive nature of your > code. What is more intuitive? > > def confine_length(stri

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Steven D'Aprano
On Sun, 26 Feb 2012 12:56:46 +0100, Wolfgang Meiners wrote: > That means: > if maxlength and (len(string) <= maxlength): > > is equivalent to > if (maxlength is not None) and (len(string) <= maxlength): > > which is more complicated to type and -in my opinion- not so intuitive. > But because it

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Wolfgang Meiners
Am 26.02.12 13:52, schrieb Chris Angelico: > On Sun, Feb 26, 2012 at 10:56 PM, Wolfgang Meiners > wrote: >> That means: >> if maxlength and (len(string) <= maxlength): >> >> is equivalent to >> if (maxlength is not None) and (len(string) <= maxlength): > > On the contrary, it means they are disti

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Wolfgang Meiners
Am 26.02.12 14:16, schrieb Wolfgang Meiners: > > I just had a closer look at it. It seems to be more complicated than i > thougth: You will have to write Obviously not close enough, as i just learned. > > def confine_length(string, maxlength=None): > if maxlength: # maxlength exists, compar

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Arnaud Delobelle
On 26 February 2012 13:38, Wolfgang Meiners wrote: >      do_it = (len(str) <= maxlength) if maxlength is not None else True That's a funny way to spell: do_it = maxlength is None or len(str) <= maxlength -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list

Re: namespace question

2012-02-26 Thread Steven D'Aprano
On Sun, 26 Feb 2012 19:47:49 +1100, Ben Finney wrote: >> An integer variable is a variable holding an integer. A string variable >> is a variable holding a string. A list variable is a variable holding a >> list. > > And Python has none of those. Its references don't “hold” anything. Ah, but the

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Steven D'Aprano
On Sun, 26 Feb 2012 14:16:24 +0100, Wolfgang Meiners wrote: > I just had a closer look at it. It seems to be more complicated than i > thougth: You will have to write > > def confine_length(string, maxlength=None): > if maxlength: # maxlength exists, comparison possible > if len(strin

Software Engineer - Storage, Python, C++, Java

2012-02-26 Thread Blue Line Talent
Blue Line Talent is looking for a mid-level software engineer with experience in a combination of Python, C/C++ and/or Java. Experience developing middleware is helpful. The Engineer will join an exciting start-up environment in a newly established location. This is an outstanding opportunity fo

Re: Question about circular imports

2012-02-26 Thread OKB (not okblacke)
Frank Millman wrote: > The first solution is - > > in wavread.py - > import formats.wavwrite > > in wavwrite.py - > import formats.wavread > > I then have to use the full path to reference any attribute inside > the imported module, which I find cumbersome. This isn't really tr

Re: OT: Entitlements [was Re: Python usage numbers]

2012-02-26 Thread Rick Johnson
On Feb 26, 6:44 am, Albert van der Horst wrote: > I don't blame them for the attitude of "live to fight another day" > or even for plain survival. If the Jews hadn't allow themselves > to be subjected, there would be no Jews. And may i borrow your time machine now that you are finished researchin

Re: OT: Entitlements

2012-02-26 Thread Ben Finney
Albert van der Horst writes: > In article > <40af8461-1583-4496-9d81-d52d6905d...@b23g2000yqn.googlegroups.com>, > Rick Johnson wrote: > >Because the Jews allowed themselves to be subjected. Sad, but true. > > Actually Jew stands for (relative) coward. Let me explain. No, please don't. Slande

Re: OT: Entitlements [was Re: Python usage numbers]

2012-02-26 Thread Chris Angelico
On Mon, Feb 27, 2012 at 7:35 AM, Rick Johnson wrote: >  1. you could fight each bully on a case by case bases. >  2. you could empower people to fight bullies as a united group. > > Adopt a public policy that bullying will NOT be > allowed and the perp WILL be punished, and bulling disappears > fo

Re: Question about circular imports

2012-02-26 Thread Terry Reedy
On 2/26/2012 6:12 AM, Peter Otten wrote: Frank Millman wrote: I seem to have a recurring battle with circular imports, and I am trying to nail it once and for all. ... This should be import sound.formats.wavread To avoid the tedious reference, follow this with read = sound.formats.wavread

Re: [RELEASED] Release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3

2012-02-26 Thread Terry Reedy
On 2/26/2012 3:51 AM, Ben Finney wrote: Benjamin Peterson writes: We're pleased to announce the immediate availability of release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3 . If you're pleased to announce their immediate availability, then please do that! Putting “RELEASED” in the

Re: OT: Entitlements [was Re: Python usage numbers]

2012-02-26 Thread Rick Johnson
On Feb 26, 2:50 pm, Chris Angelico wrote: > Hmm, I wonder how you go about adopting that policy... oh! I know! By > fighting each bully on a case-by-case basis! Funny though, you just > said that won't work. It's a two-pronged solution Chris. Compound. -- http://mail.python.org/mailman/listinfo

MAJOR JAVA EVANGELIST CONVERTS TO PYTHON !!!!!!!!!!!!!!

2012-02-26 Thread John Ladasky
On Feb 26, 12:29 am, BV wrote: > MAJOR CANADIAN CHRISTIAN MISSIONARY CONVERTS TO ISLAM MAJOR JAVA EVANGELIST CONVERTS TO PYTHON !! ...Hey, someone has to keep the spam around here on-topic. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python math is off by .000000000000045

2012-02-26 Thread John Ladasky
Curiosity prompts me to ask... Those of you who program in other languages regularly: if you visit comp.lang.java, for example, do people ask this question about floating-point arithmetic in that forum? Or in comp.lang.perl? Is there something about Python that exposes the uncomfortable truth ab

Re: Python math is off by .000000000000045

2012-02-26 Thread Terry Reedy
On 2/26/2012 7:24 PM, John Ladasky wrote: > I always found it helpful to ask someone who is confused by this issue > to imagine what the binary representation of the number 1/3 would be. > > 0.011 to three binary digits of precision: > 0.0101 to four: > 0.01011 to five: > 0.010101 to six: > 0.010

Re: MAJOR JAVA EVANGELIST CONVERTS TO PYTHON !!!!!!!!!!!!!!

2012-02-26 Thread Tamer Higazi
AND PYTHON IS REALLY COOL! Especially this beautiful JPype Bridge that makes it possible to push requests between PYTHON and JAVA. really really really cool! Am 27.02.2012 01:05, schrieb John Ladasky: On Feb 26, 12:29 am, BV wrote: MAJOR CANADIAN CHRISTIAN MISSIONARY CONVERTS TO ISLAM

Abort an HTTP request before the request timed out

2012-02-26 Thread Gelonida N
Hi, I'm working in a small application, which tries to access data on a web server. Normally the request has a timeout of for example 60 seconds conn = httplib.HTTPConnection(server_name, server_port, timeout=60) while True: conn.request("GET", "/my_url.php") try: resp = conn.get

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread alex23
On Feb 26, 6:29 am, Rick Johnson wrote: > Sure there are float INFINITIES that work fine for ints and floats, > but where is the consistency? Sure, there are all of the COMPLEXITIES of floating point arithmetic but I want to ignore all of that and demand ridiculous consistencies. Why should I hav

Re: Python math is off by .000000000000045

2012-02-26 Thread Steven D'Aprano
On Sun, 26 Feb 2012 16:24:14 -0800, John Ladasky wrote: > Curiosity prompts me to ask... > > Those of you who program in other languages regularly: if you visit > comp.lang.java, for example, do people ask this question about > floating-point arithmetic in that forum? Or in comp.lang.perl? Yes.

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Steven D'Aprano
On Sun, 26 Feb 2012 18:32:27 -0800, alex23 wrote: > On Feb 26, 6:29 am, Rick Johnson wrote: >> Sure there are float INFINITIES that work fine for ints and floats, but >> where is the consistency? > > Sure, there are all of the COMPLEXITIES of floating point arithmetic but > I want to ignore all

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread Chris Angelico
On Mon, Feb 27, 2012 at 2:51 PM, Steven D'Aprano wrote: > I can see some value for this as a convenience, but not enough to make it > a built-in language feature. Every developer should have at least one > utility module with all the trivial code snippets they frequently use. +1. I used to call m

Re: Question about circular imports

2012-02-26 Thread Frank Millman
> > To avoid the tedious reference, follow this with > read = sound.formats.wavread # choose the identifier you prefer > @Terry and OKB I tried that, but it does not work. a.py /b __init__.py c.py d.py a.py - from b import c c.py - import b.d d.py - import b.c If I run a

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-26 Thread alex23
On Feb 27, 1:51 pm, Steven D'Aprano wrote: > Ints and floats can be compared directly, no need to convert the int to a > float first Ah, cheers. You can see how often I use the two interchangeably :) > > Please provide a non-contrived use case of an "infinite string". > > Any lazy stream of char

How can I make an instance of a class act like a dictionary?

2012-02-26 Thread John Salerno
Hi everyone. I created a custom class and had it inherit from the "dict" class, and then I have an __init__ method like this: def __init__(self): self = create() The create function creates and returns a dictionary object. Needless to say, this is not working. When I create an instance of

Re: How can I make an instance of a class act like a dictionary?

2012-02-26 Thread Chris Rebert
On Sun, Feb 26, 2012 at 11:24 PM, John Salerno wrote: > Hi everyone. I created a custom class and had it inherit from the > "dict" class, and then I have an __init__ method like this: > > def __init__(self): >        self = create() > > The create function creates and returns a dictionary object.