why did GMPY change the names of its functions?

2012-03-25 Thread Mensanator
OK, GMPY is now called GMPY2. No big deal, I can import as GMPY. But why were scan0 and scan1 changed to bit_scan0 and bit_scan1? What's the justification for that? I use those functions extensively in my library of Collatz utilities and I had to re-edit them for no obvious reason. -- http://ma

Re: why did GMPY change the names of its functions?

2012-03-26 Thread Mensanator
On Mar 26, 10:39 am, Terry Reedy wrote: > On 3/26/2012 12:59 AM, Mensanator wrote: > > > OK, GMPY is now called GMPY2. No big deal, I can import as GMPY. > > > But why were scan0 and scan1 changed to bit_scan0 and bit_scan1? > > Guess: Either the functions changed or th

Re: why did GMPY change the names of its functions?

2012-03-26 Thread Mensanator
On Mar 26, 1:33 pm, cas...@gmail.com wrote: > On Sunday, March 25, 2012 9:59:56 PM UTC-7, Mensanator wrote: > > OK, GMPY is now called GMPY2. No big deal, I can import as GMPY. > > > But why were scan0 and scan1 changed to bit_scan0 and bit_scan1? > > > What's t

Re: Iteration for Factorials

2007-10-22 Thread Mensanator
In a message dated 10/22/2007 8:46:59 PM Central Daylight Time, [EMAIL PROTECTED] writes: > > Still, why do you want None instead of raisng an exception > > (as is the case in other factorial implementations)? > > A null value is as good/bad as raising an exception in my book. > Since you can'

Re: How about adding rational fraction to Python?

2008-02-24 Thread Mensanator
On Feb 24, 1:09�pm, Lie <[EMAIL PROTECTED]> wrote: > On Feb 25, 1:21 am, Mark Dickinson <[EMAIL PROTECTED]> wrote: > > > On Feb 24, 1:09 pm, Lie <[EMAIL PROTECTED]> wrote: > > > > And this limit is much lower than n!. I think it's sum(primes(n)), but > > > I've got no proof for this one yet. > > >

Re: How about adding rational fraction to Python?

2008-02-24 Thread Mensanator
On Feb 24, 4:50�pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 24 Feb 2008 11:09:32 -0800, Lie wrote: > > I decided to keep the num/den limit low (10) because higher values might > > obscure the fact that it do have limits. > > You do realise that by putting limits on t

Re: How about adding rational fraction to Python?

2008-02-24 Thread Mensanator
On Feb 24, 4:42�pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 24 Feb 2008 12:19:53 -0800, Mensanator wrote: > > Out of curiosity, of what use is denominator limits? > > > The problems where I've had to use rationals have never affor

Re: How about adding rational fraction to Python?

2008-02-24 Thread Mensanator
On Feb 24, 6:09 pm, Mel <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Feb 24, 1:09�pm, Lie <[EMAIL PROTECTED]> wrote: > >> I decided to keep the num/den limit low (10) because higher values > >> might obscure the fact that it do have limits. [ ... ]

Re: How about adding rational fraction to Python?

2008-02-24 Thread Mensanator
On Feb 24, 10:34�pm, casevh <[EMAIL PROTECTED]> wrote: > On Feb 24, 7:56 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > But that doesn't mean they become less manageable than > > other unlimited precision usages. Did you see my example > > of the

Re: How about adding rational fraction to Python?

2008-02-25 Thread Mensanator
On Feb 25, 12:58�am, Carl Banks <[EMAIL PROTECTED]> wrote: > On Feb 24, 10:56 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > But that doesn't mean they become less manageable than > > other unlimited precision usages. Did you see my example > > of the

Re: How about adding rational fraction to Python?

2008-02-26 Thread Mensanator
On Feb 26, 9:08 am, "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote: > On Tue, 26 Feb 2008 06:45:45 -0800 (PST) > > Carl Banks <[EMAIL PROTECTED]> wrote: > > On Feb 26, 9:29 am, "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote: > > > If 3/4 ever returned 0.75 in any language I would drop that language. >

sympy: nifty, but... (was: How about adding rational fraction to Python?)

2008-03-02 Thread Mensanator
On Mar 1, 12:29 pm, "Anand Patil" <[EMAIL PROTECTED]> wrote: > Not sure if this is common knowledge yet but > Sympy,http://code.google.com/p/sympy, has a rational type. I hadn't heard of this before, thanks for the link. Very nifty, lots of goodies not found in gmpy (although it seems to lack a

sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
Notice anything funny about the "random" choices? import sympy import time import random f = [i for i in sympy.primerange(1000,1)] for i in xrange(10): f1 = random.choice(f) print f1, f2 = random.choice(f) print f2, C = f1*f2 ff = None ff = sympy.factorint(C) print ff ## 73

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 2:49 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Mar 3, 3:40 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > > > Notice anything funny about the "random" choices? > > > import sympy > > import time > > import ran

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 4:08 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Mar 3, 2:49 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > >> It's just a bug--probably sympy is messing with the internals of the > >> random number generator.  It woul

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 4:53 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Mar 3, 4:47 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > > > On Mar 3, 2:49 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > > > > On Mar 3, 3:40 pm, Mensanator <[EMAIL PRO

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 6:21 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Mar 3, 4:08 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > >> Mensanator wrote: > >>> On Mar 3, 2:49 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > >>>> I

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 6:49 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Mar 3, 4:53 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > >> 3. You must be terribly naive if you expect a freeware program with a > >> version number of 0.5.12 not to ha

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 8:31 pm, [EMAIL PROTECTED] wrote: > > All software has bugs. > > Good software has bugs. > > Therefore, good software is software. > > > This makes sympy worse than worthless, as it f***s up other modules. > > What is it still good for? Lots. The problem is when the total is less than th

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 11:58 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > While we're on the subject of English, the word "worthless" > > means "has no value". So, a program that doesn't work would > > generally be "w

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Mensanator
On Mar 4, 2:44 am, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Mar 3, 11:58 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote: > >> Mensanator wrote: > >>> I'm not hard to please at all. > >> No, of course not

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Mensanator
On Mar 4, 10:50 am, Lie <[EMAIL PROTECTED]> wrote: > On Mar 4, 1:12 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > > > On Mar 3, 11:58 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote: > > > > Mensanator wrote: > > > > While w

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Mensanator
On Mar 4, 12:32 pm, Nanjundi <[EMAIL PROTECTED]> wrote: > On Mar 3, 3:40 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > > > Notice anything funny about the "random" choices? > > > import sympy > > import time > > import random

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Mensanator
On Mar 4, 3:00 pm, Istvan Albert <[EMAIL PROTECTED]> wrote: > On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > But what if _I_ wanted to make a repeatable sequence for test > > purposes? Wouldn't factorint() destroy my attempt by reseeding > &

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Mensanator
On Mar 4, 4:40 pm, Mensanator <[EMAIL PROTECTED]> wrote: > On Mar 4, 3:00 pm, Istvan Albert <[EMAIL PROTECTED]> wrote: > > > On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > But what if _I_ wanted to make a repeatable sequence for test &g

Re: sympy: what's wrong with this picture?

2008-03-05 Thread Mensanator
On Mar 5, 9:29 am, Nanjundi <[EMAIL PROTECTED]> wrote: > On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > On Mar 4, 12:32 pm, Nanjundi <[EMAIL PROTECTED]> wrote: > > > > Does seeding ( random.seed ) random with time fix this? It should. &

Re: Bit twiddling floating point numbers

2008-03-05 Thread Mensanator
On Mar 5, 2:25 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi All > > Is there a simple way to twiddle the bits of a float? In particular, I > would like to round my float to the n most significant bits. > > For example - 0.123 in binary is 0.00011 > Rounding to 4 bits I get 0.0001. >

Re: How to factor using Python?

2008-03-10 Thread Mensanator
On Mar 10, 12:48 am, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > On 10 mar, 02:08, Nathan Pinno <[EMAIL PROTECTED]> wrote: > > > How do I factor a number? If factoring is actually what you want, the sympy module can do it. >>> n = 85085**3 >>> print n 615969217989125 >>> import sympy >>> f = s

Re: How to factor using Python?

2008-03-10 Thread Mensanator
On Mar 10, 6:32 pm, Nathan Pinno <[EMAIL PROTECTED]> wrote: > On Mar 10, 12:10 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > > > On Mar 10, 12:48 am, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > > > > On 10 mar, 02:08, Nathan Pinno

Re: Why does my compiler say invalid syntax then highlight...?

2008-03-10 Thread Mensanator
On Mar 10, 10:44�pm, Nathan Pinno <[EMAIL PROTECTED]> wrote: > Why does my compiler say invalid syntax and then highlight the > quotation marks in the following code: > > # This program is to find primes. Needs work. ## Do you want to calculate primes? 1 = yes and 2 = no. 1 ## What number do yo

Re: Why does my compiler say invalid syntax then highlight...?

2008-03-11 Thread Mensanator
On Mar 11, 3:36 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Mensanator <[EMAIL PROTECTED]> wrote: > > On Mar 10, 10:44‹¨«pm, Nathan Pinno <[EMAIL PROTECTED]> wrote: > >> Why does my compiler say invalid syntax and then highlight the > >> quotati

Re: How to factor using Python?

2008-03-11 Thread Mensanator
On Mar 11, 10:57 am, Mike Hansen <[EMAIL PROTECTED]> wrote: > If one wants to do serious math using Python, the best bet is to use > Sage (http://www.sagemath.org).  Here are some examples: > > sage: def f(x, bits=53): > :     R = RealField(bits); z = R(x) > :     return cos(R(pi) * factori

Re: Why does my compiler say invalid syntax then highlight...?

2008-03-11 Thread Mensanator
On Mar 11, 9:50 pm, Nathan Pinno <[EMAIL PROTECTED]> wrote: > On Mar 11, 1:12 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > > > On Mar 11, 3:36 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > > > > Mensanator <[EMAIL PROTECTED]>

Re: Spaces in path name

2008-03-13 Thread Mensanator
On Mar 13, 5:16 pm, "David S" <[EMAIL PROTECTED]> wrote: > Hi, > > I have some code in which I have to change some path names to get it to > work. The original code seems to have assumed that path names would not have > any embedded spaces. > > I am not sure how to write the following line so when

Re: Basics of Python,learning

2008-03-16 Thread Mensanator
On Mar 16, 11:25 am, Guido van Brakel <[EMAIL PROTECTED]> wrote: > Hello > > Why is this not working, Why is _what_ not working? > and how can I correct it? Start over. > > > > > > > #!/usr/bin/env python > > #coding=utf-8 > > > z = raw_input ('Give numbers') > > y = z.split() > > b=[] > > > fo

Re: First Program Bug (Newbie)

2008-03-17 Thread Mensanator
On Mar 17, 7:03 pm, Benjamin Serrato <[EMAIL PROTECTED]> wrote: > I Found It!! The following was a post asking for help finding a bug. I > thought I needed help with my syntax, but just before sending I found > the bug on line 13. Line 13 should read: "base = 2". I would still > appreciate any comm

Re: First Program Bug (Newbie)

2008-03-18 Thread Mensanator
ere's one in the math module. Use the one in gmpy if you have it. > I couldn't find the fact.py demo > script. I didn't mean return I meant 'continue'. > > > > Mensanator wrote: > > On Mar 17, 7:03 pm, Benjamin Serrato <[EMAIL PROTECTED]> > > wrote:

Re: slicing a list but in downward fashion

2008-03-19 Thread Mensanator
On Mar 19, 6:37 pm, Lee Sander <[EMAIL PROTECTED]> wrote: > hi, > i have a list and i can get elements form it via slicing > L[start:stop] > but sometimes the start is > stop i.e. I want to go in the opposite > direction,eg > L[10:2], > > mattab lets you do L(10:-1:2) to achive this, is there a way

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Mensanator
On Mar 22, 11:29�pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 22 Mar 2008 21:11:51 -0700, sturlamolden wrote: > > On 22 Mar, 23:42, 7stud <[EMAIL PROTECTED]> wrote: > > >> Beginning programmers in grades 9-12 are not going to understand issues > >> like that, and it w

Re: List question

2008-03-22 Thread Mensanator
On Mar 22, 8:40�pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sat, 22 Mar 2008 14:55:39 -0700 (PDT), Zentrader > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > is funny and not mean. �In the words of whoever it was in "Gone With > > The Wind", frankly I don't give a

Re: Filtering a Python list to uniques

2008-03-25 Thread Mensanator
On Mar 25, 6:30 pm, kellygreer1 <[EMAIL PROTECTED]> wrote: > What is the best way to filter a Python list to its unique members? > I tried some method using Set but got some "unhashable" error. > > lstone = [ 1, 2, 3, 3, 4, 5, 5, 6 ] > # how do i reduce this to > lsttwo = [ 1, 2, 3, 4, 5, 6 ] > > I

Re: Python strings and coding conventions

2009-01-10 Thread Mensanator
On Jan 10, 10:26�pm, Robert Kern wrote: > koranth...@gmail.com wrote: > > Hi, > > � �Python Coding Convention (PEP 8) suggests : > > � Maximum Line Length > > > � � Limit all lines to a maximum of 79 characters. > > > � I have a string which is ~110 char long. It is a string which I am > > going t

Re: Python strings and coding conventions

2009-01-11 Thread Mensanator
On Jan 11, 3:56�am, Marc 'BlackJack' Rintsch wrote: > On Sat, 10 Jan 2009 20:48:21 -0800, Mensanator wrote: > > Damn! I didn't know you could do that! And if I saw it in a program > > listing, such would never occur to me. I was going to suggest the stupid > >

Re: Python strings and coding conventions

2009-01-11 Thread Mensanator
On Jan 11, 12:12�pm, Roy Smith wrote: > In article > <5db6181f-d6f6-4bdc-88c8-e12ad228c...@r41g2000prr.googlegroups.com>, > > �Mensanator wrote: > > > What are all those line continuation characters ('\') for? ?You are aware > > > that they are unnec

Re: Python strings and coding conventions

2009-01-11 Thread Mensanator
On Jan 11, 2:37�pm, John Machin wrote: > On Jan 12, 5:34�am, Mensanator wrote: > > > > > > > On Jan 11, 12:12 pm, Roy Smith wrote: > > > > In article > > > <5db6181f-d6f6-4bdc-88c8-e12ad228c...@r41g2000prr.googlegroups.com>, > >

Re: Two questions about style and some simple math

2009-01-19 Thread Mensanator
On Jan 19, 7:44 pm, "Rhodri James" wrote: > On Tue, 20 Jan 2009 01:15:47 -, Spoofy wrote: > > Hello everybody! > > > Though I'm a hobby programmer for years now (mainly small hackery   > > things) I still have big problems getting "real" things to work. > > > I'm currently trying to write a s

Re: Cartesian Product of two lists (itertools)

2009-01-25 Thread Mensanator
On Jan 25, 3:12�pm, Thorsten Kampe wrote: > Hi, > > is there a way to make itertools.product generate triples instead of > pairs from two lists? > > For example:>>> list1 = [1, 2]; list2 = [4, 5]; list3 = [7, 8] > >>> from itertools import product > >>> list(product(list1, list2, list3)) > > [(1,

Re: How many followers of comp.lang.python

2009-01-27 Thread Mensanator
On Jan 27, 11:53 am, rantingrick wrote: > On Jan 27, 10:12 am, Bruno Desthuilliers > 42.desthuilli...@websiteburo.invalid> wrote: > > All you can say is that he didn't *post* here (at least under his real > > identity...) for the 9 past years - this doesn't mean he never *reads* > > (and this, yo

Re: nth root

2009-01-31 Thread Mensanator
On Jan 31, 8:05 am, Mark Dickinson wrote: > On Jan 31, 1:23 pm, Steve Holden wrote: > > > Much more significant points, given the limited precision of the doubles > > Python will be using. Could gmpy do this better, I wonder? > > Almost certainly, if exact results are wanted!  At least, GMP has >

Re: nth root

2009-01-31 Thread Mensanator
On Jan 31, 10:53 am, Mensanator wrote: > On Jan 31, 8:05 am, Mark Dickinson wrote: > > > On Jan 31, 1:23 pm, Steve Holden wrote: > > > > Much more significant points, given the limited precision of the doubles > > > Python will be using. Could gmpy do th

Re: nth root

2009-02-01 Thread Mensanator
On Feb 1, 2:27 am, casevh wrote: > On Jan 31, 9:36 pm, "Tim Roberts" wrote: > > > Actually, all I'm interested in is whether the 100 digit numbers have an > > exact integral root, or not.  At the moment, because of accuracy concerns, > > I'm doing something like > > >                     for ro

Re: nth root

2009-02-01 Thread Mensanator
On Feb 1, 8:20�pm, casevh wrote: > On Feb 1, 1:04�pm, Mensanator wrote: > > > > > On Feb 1, 2:27�am, casevh wrote: > > > > On Jan 31, 9:36�pm, "Tim Roberts" wrote: > > > > > Actually, all I'm interested in is whether the 100 digit n

Re: nth root

2009-02-02 Thread Mensanator
On Feb 2, 1:01 am, casevh wrote: > On Feb 1, 10:02 pm, Mensanator wrote: > > > > > > > On Feb 1, 8:20 pm, casevh wrote: > > > > On Feb 1, 1:04 pm, Mensanator wrote: > > > > > On Feb 1, 2:27 am, casevh wrote: > > > > > > On J

Re: Is c.l.py becoming less friendly?

2009-02-05 Thread Mensanator
On Feb 5, 4:20 pm, Terry Reedy wrote: > mk wrote: > > > (duck) > > > 542 comp.lang.python rtfm > > What is so unfriendly about 'read the fine manual'? You've seen a fine manual? -- http://mail.python.org/mailman/listinfo/python-list

Re: Flattening lists

2009-02-06 Thread Mensanator
On Feb 6, 3:23 pm, Rhamphoryncus wrote: > On Feb 5, 1:16 pm, Michele Simionato > wrote: > > > On Feb 5, 7:24 pm, a...@pythoncraft.com (Aahz) wrote: > > > > In article > > > , > > > Michele Simionato   wrote: > > > > >Looks fine to me. In some situations you may also use hasattr(el, > > > >'__ite

Re: Breaking Python list into set-length list of lists

2009-02-11 Thread Mensanator
On Feb 11, 10:58�pm, Jason wrote: > Hey everyone-- > > I'm pretty new to Python, & I need to do something that's incredibly > simple, but combing my Python Cookbook & googling hasn't helped me out > too much yet, and my brain is very, very tired & flaccid @ the > moment > > I have a list of ob

Re: number theory libraries / project euler

2009-02-18 Thread Mensanator
On Feb 18, 2:18 pm, eliben wrote: > Hello, > > What are some good & recommended number theory libs for Python (or > accessible interfaces to C libs), for things like primes, > factorization, etc. Naturally, speed is of utmost importance here. > > In other words, which Python libraries and tools to

Re: Newbie Q about Turtle Gfx

2009-02-18 Thread Mensanator
On Feb 18, 4:16 pm, "Neil" wrote: > Hello > > Sorry if this is not an appropriate newsgroup for this problem. I am very > new to Python but not new to programming. > > I am hoping to use Python to teach a class and have been looking at the > online book 'Snake Wrangling for Kids'. > > I have follo

Re: iterating through files

2009-02-19 Thread Mensanator
On Feb 19, 4:56 pm, Steve Holden wrote: > Chris Rebert wrote: > > On Thu, Feb 19, 2009 at 2:28 PM, Mike Driscoll wrote: > >> On Feb 19, 4:22 pm, Mike Driscoll wrote: > >>> On Feb 19, 3:56 pm, oamram wrote: > > Hi Pythonist, > new to python. i have a directory with about 50 text file a

Re: Will multithreading make python less popular?

2009-02-19 Thread Mensanator
On Feb 19, 2:18 pm, Paul Rubin wrote: > sturlamolden writes: > > Yes, the GIL prevents Python threads from being used in a certain way. > > But do you really need to use threads like that? Or do you just think > > you do? > > How old is your computer, why did you buy

Re: Will multithreading make python less popular?

2009-02-19 Thread Mensanator
On Feb 19, 7:18 pm, Steve Holden wrote: > Mensanator wrote: > > On Feb 19, 2:18 pm, Paul Rubin <http://phr...@nospam.invalid> wrote: > [...] > > When I run I Python program, the Windows task manager shows both > > cores running (usually a 60/40 split) for an over

Re: Will multithreading make python less popular?

2009-02-20 Thread Mensanator
On Feb 20, 4:36�am, sturlamolden wrote: > On Feb 20, 12:19 am, Mensanator wrote: > > > What am I actually seeing? If Python only uses one of the cores, > > why do both light up? > > Because of OS scheduling. You have more than one process running. The > Python proces

Re: RELEASED Python 3.0rc3

2008-11-22 Thread Mensanator
On Nov 22, 9:32�am, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > > Mensanator �<[EMAIL PROTECTED]> wrote: > > >So, if the IDLE from ActiveState comes up and says 2.6 (indicating > >final release), shouldn't the copywrite message a

Re: Convert hexadecimal characters to ascii

2008-11-29 Thread Mensanator
On Nov 29, 2:39�pm, Durand <[EMAIL PROTECTED]> wrote: > Hi, > > I've got this weird problem where in some strings, parts of the string are in > hexadecimal, or thats what I think they are. I'm not exactly sure...I get > something like this: 's\x08 \x08Test!' from parsing a log file. From what I

Re: "as" keyword woes

2008-12-03 Thread Mensanator
On Dec 3, 4:38 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Wed, 03 Dec 2008 22:02:24 +, Martin P. Hellwig wrote: > > Warren DeLano wrote: > >> A bottom line / pragmatic question... hopefully not a FAQ. > > >> Why was it necessary to make "as" a reserved keyword? > >

Re: "as" keyword woes

2008-12-06 Thread Mensanator
On Dec 6, 8:16�am, Wolfgang Strobl <[EMAIL PROTECTED]> wrote: > Dennis Lee Bieber <[EMAIL PROTECTED]>: > > >On 05 Dec 2008 05:21:25 GMT, Steven D'Aprano > ><[EMAIL PROTECTED]> declaimed the following in > >comp.lang.python: > > >> On Thu, 04 Dec 2008 08:44:19 -0800, Matimus wrote: > > >> > The poin

Re: RELEASED Python 3.0 final

2008-12-06 Thread Mensanator
On Dec 5, 12:29 pm, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "Ben Finney" <[EMAIL PROTECTED]> wrote: > >I hereby recommend “pish and tosh” for use by anyone who wants to > >counter someone's point. It beats by a country furlong the invective > >that has become regrettably common here in re

Re: "as" keyword woes

2008-12-06 Thread Mensanator
On Dec 6, 2:09�pm, Wolfgang Strobl <[EMAIL PROTECTED]> wrote: > Mensanator <[EMAIL PROTECTED]>: > > > > > > >On Dec 6, 8:16?am, Wolfgang Strobl <[EMAIL PROTECTED]> wrote: > >> Dennis Lee Bieber <[EMAIL PROTECTED]>: > > >>

Re: "as" keyword woes

2008-12-06 Thread Mensanator
On Dec 6, 6:25�pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 06 Dec 2008 14:36:07 -0800, Mensanator wrote: > > It was extremely simple for me to fix the sympy module where I noticed > > it. I'm not saying it wasn't a problem, I&

Re: "as" keyword woes

2008-12-06 Thread Mensanator
On Dec 6, 9:09�pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 06 Dec 2008 18:09:07 -0800, Mensanator wrote: > > On Dec 6, 6:25 pm, Steven D'Aprano <[EMAIL PROTECTED] > > cybersource.com.au> wrote: > >> On Sat, 06 Dec 2008 1

Re: How to parsing a sequence of integers

2008-12-19 Thread Mensanator
On Dec 19, 9:23�am, Joe Strout wrote: > Peter Otten wrote: > > If you are using Python 2.x: > > ... > > So you better throw in a float(...): > > Or, add > > � �from __future__ import division > > at the top of the file. �I put this at the top of all my Python files, > whether I expect to be dividi

Re: TypeError: list indices must be integers

2008-12-30 Thread Mensanator
On Dec 30, 7:46�pm, dubux wrote: > here is a function i wrote that doesnt work. i wrote to parse a "news" > file that is going to work in conjunction with a website via mod_wsgi. > my head hurts from looking at it so long. please help! i will further > explain in the post. > > def news(x,y): > � �

Re: list iteration if statement

2009-01-02 Thread Mensanator
On Jan 2, 8:43�pm, "alex goretoy" wrote: > rather, how do I suppress the output of the list with all None in it? > > >>> l=[['3'], ['0', '4'], ['0', '1'], ['0']] > >>> v=[] > >>> [[v.append(j)for j in i if j != "0"] for i in l] > > [[None], [None], [None], []] > > >>> v > ['39', '32', '1'] > Assi

Re: Port of python stdlib to other languages.

2009-01-03 Thread Mensanator
On Jan 3, 10:15�pm, vk wrote: > > AFAIK not. You could try elmer > > Elmer looks very interesting, but not really what I was getting at. > > > What do you need C for anyway? Or, to put it the other way round - why > > not expose whatever you need in C as python extension, and write your > > app in

Re: Oh! The people of all over the world!

2009-01-06 Thread Mensanator
On Jan 6, 7:51�pm, "Obaid R." wrote: > On Jan 7, 2:53�am, Mensanator wrote: > > > But the OP isn't trying to get sympathy for the Isrealis, he's > > trying to get sympathy for his own cause. > > > Which is hard to do given the provocation that

Re: An idea of how to identify Israeli owned software companies

2009-01-07 Thread Mensanator
On Jan 7, 8:45 am, Terje wrote: > Is there a web service/API out there identifying Israel owned > software/software companies/web sites/web services? If I am about to buy > a piece of software, but don't want to support the Israeli economy, it > would have been handy if I could just poll a web ser

Re: An idea of how to identify Israeli owned software companies

2009-01-07 Thread Mensanator
On Jan 7, 3:52 pm, Marc 'BlackJack' Rintsch wrote: > On Wed, 07 Jan 2009 10:17:55 -0800, Mensanator wrote: > > On Jan 7, 8:45 am, Terje wrote: > >> Is there a web service/API out there identifying Israel owned > >> software/software companies/web sites/web

Re: Python 2.6, GUI not working on vista?

2008-10-07 Thread Mensanator
On Oct 7, 12:40 pm, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > * Lawrence D'Oliveiro (Mon, 06 Oct 2008 23:18:10 +1300) > > > In message <[EMAIL PROTECTED]>, Thorsten Kampe > > wrote: > > > * Lawrence D'Oliveiro (Sun, 05 Oct 2008 22:13:46 +1300) > > > >> In message <[EMAIL PROTECTED]>, Michel Clave

Re: Python 2.6, GUI not working on vista?

2008-10-09 Thread Mensanator
On Oct 9, 12:36 pm, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > * Mensanator (Tue, 7 Oct 2008 10:58:24 -0700 (PDT)) > > > > > > > On Oct 7, 12:40 pm, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > > > * Lawrence D'Oliveiro (Mon, 06 Oct 2008 23

Re: Efficient Bit addressing in Python.

2008-10-09 Thread Mensanator
On Oct 9, 5:30 pm, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > Is there a canonical way to address the bits in a structure > like an array or string or struct? > > Or alternatively, is there a good way to combine eight > ints that represent bits into one of the bytes in some > array or string

Re: Python 2.6, GUI not working on vista?

2008-10-09 Thread Mensanator
On Oct 9, 2:09 pm, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > * Mensanator (Thu, 9 Oct 2008 11:03:45 -0700 (PDT)) > > > > > > > On Oct 9, 12:36 pm, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > > > * Mensanator (Tue, 7 Oct 2008 10:58:24 -0700 (PDT

Re: Python 2.6, GUI not working on vista?

2008-10-09 Thread Mensanator
On Oct 9, 4:41 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > You can believe what you want. The people who developed UAC don't have > > to support it. > > I know for a fact that the implementation is incomplete. In Windows > Installer, there is no way (that I know of) to create an MSI file >

Re: Python 2.6, GUI not working on vista?

2008-10-09 Thread Mensanator
On Oct 9, 5:48 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > I posted a problem with Vista on Jul 6 concerning not being > > able to run IDLE in 2.6b1. No replies. > > Where did you post that? On python-dev? No, right here on comp.lang.python. I don't even know what you're referring to. >

Re: Upgrading from 2.5 to 2.6

2008-10-12 Thread Mensanator
On Oct 12, 11:22�pm, "Martin v. L�wis" <[EMAIL PROTECTED]> wrote: > > Are there any guidelines for upgrading from 2.5 to 2.6? > > Dear Daniel, > > Python 2.5 and 2.6 can coexist, so there isn't any need for some > kind of upgrade procedure. Installing 2.6 will not affect your > 2.5 installation. >

Re: gmpy and counting None

2008-10-13 Thread Mensanator
On Oct 13, 2:43 pm, <[EMAIL PROTECTED]> wrote: > Hi, > > I just stumbled upon the following issue (I am running Debian): > > $ python > Python 2.5.2 (r252:60911, Sep 29 2008, 21:15:13) > [GCC 4.3.2] on linux2 > Type "help", "copyright", "credits" or "license" for more information.>>> [2, > None].c

Re: gmpy and counting None

2008-10-14 Thread Mensanator
On Oct 13, 5:16 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Oct 13, 2:43 pm, <[EMAIL PROTECTED]> wrote: > >> Hi, > > >> I just stumbled upon the following issue (I am running Debian): > > >> $ python > >> P

Re: gmpy and counting None

2008-10-14 Thread Mensanator
On Oct 14, 12:14 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Oct 13, 5:16 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > >> Mensanator wrote: > >>> On Oct 13, 2:43 pm, <[EMAIL PROTECTED]> wrote: > >>>> Hi, >

Re: algorizm to merge nodes

2008-10-17 Thread Mensanator
On Oct 17, 3:20 pm, JD <[EMAIL PROTECTED]> wrote: > Hi, > > I need help for a task looks very simple: > > I got a python list like: > > [['a', 'b'], ['c', 'd'], ['e', 'f'], ['a', 'g'], ['e', 'k'], ['c', > 'u'], ['b', 'p']] > > Each item in the list need to be merged. > > For example, 'a', 'b' will

Re: algorizm to merge nodes

2008-10-17 Thread Mensanator
'f'], \ >      ['a', 'g'], \ >      ['e', 'k'], \ >      ['c', 'u'], \ >      ['b', 'p'],\ >      ['e', 'd']] > > The result is > set(['a', 'p'

Re: What happened to python-dev's Google Group?

2008-10-23 Thread Mensanator
On Oct 23, 10:13�pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Oct 24, 12:58�pm, Robert Kern <[EMAIL PROTECTED]> wrote: > > > Giampaolo Rodola' wrote: > > >http://groups.google.com/group/python-dev2 > > > It seems it no longer exists. What happened? > > > I don't know, but something happened

Re: how to get the thighest bit position in big integers?

2008-10-29 Thread Mensanator
On Oct 29, 1:26 am, Nick Mellor <[EMAIL PROTECTED]> wrote: > On Oct 6, 3:40 am, Gary Herron <[EMAIL PROTECTED]> wrote: > > > > > > > [EMAIL PROTECTED] wrote: > > > Hi, > > > > I'm using python to develop some proof-of-concept code for a > > > cryptographic application. My code makes extended use of

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Mensanator
On Oct 29, 2:44 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > Guilherme Polo wrote: > > On 10/29/08, Stef Mientki <[EMAIL PROTECTED]> wrote: > > >> hello, > > >>  Why gives "k = 09"  a syntax error ? > > > 09 is not a valid octal number. Instead use 011. > > > Ok, I guess you were not aware that pr

Re: how to get the thighest bit position in big integers?

2008-10-29 Thread Mensanator
On Oct 29, 4:16 pm, Glenn Linderman <[EMAIL PROTECTED]> wrote: > On approximately 10/29/2008 11:51 AM, came the following characters from > the keyboard of Mensanator: > > > or in 2.6 > > > print 'highest bit position: %d' % (len(bin(3328)[2:])-1) > >

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Mensanator
On Oct 29, 4:25 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > Stef Mientki wrote: > > hello, > > > Why gives "k = 09"  a syntax error ? > > You have gotten the 2.x answer.  In 3.0, 0b,0o,0x prefixes are valid and > required for binary, octal, and hexadecimal literals.  0digits is invalid. > > tjr I

Re: Filter function and lists

2008-10-29 Thread Mensanator
On Oct 29, 4:28 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > John Townsend wrote: > > I’m trying to figure out how to use filter to walk through a list. > > > If I try a simple scripts like this: > > > def greaterthanten (number): > >                 #pdb.set_trace() > >                 if (number

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Mensanator
On Oct 29, 4:17�pm, [EMAIL PROTECTED] (Cameron Laird) wrote: > In article <[EMAIL PROTECTED]>, > > > > Mensanator �<[EMAIL PROTECTED]> wrote: > >On Oct 29, 2:44�pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > >> Guilherme Polo wrote: > >&

Re: Simple textual calendar

2008-11-03 Thread Mensanator
On Nov 3, 7:31 am, ostra pikula <[EMAIL PROTECTED]> wrote: > On Mon, 03 Nov 2008 14:14:00 +0100, ostra pikula > > > > > > <[EMAIL PROTECTED]> wrote: > >Hello everyone, > > >please, I need your help. I'm a beginner in python and this is > >probably elemental to you, but represents quote a goggle for

Re: Python IF THEN chain equivalence

2008-11-13 Thread Mensanator
On Nov 13, 4:39 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-11-13, jzakiya <[EMAIL PROTECTED]> wrote: > > > I'm translating a program in Python that has this IF Then chain > > > IF  x1 < limit:   --- do a --- > >     IF  x2 < limit:  --- do b --- > >         IF x3 < limit:  --- do c ---

Re: To throw or to throw not?

2008-11-13 Thread Mensanator
On Nov 13, 7:11 pm, "Emanuele D'Arrigo" <[EMAIL PROTECTED]> wrote: > I'm pondering on what is a bit of a philosophical dilemma. > When should I throw an exception and when should I not? > > Suppose I have myFunc1() calling myFunc2() which in turn calls myFunc3 > (). > Suppose myFunc3() has detected

Re: find() a larger string within a smaller string

2008-11-14 Thread Mensanator
On Nov 14, 1:20 pm, korean_dave <[EMAIL PROTECTED]> wrote: > stringa = "hi" > stringb = "hiy" > > I'd like it to return -1 when I do: > > returnVal = stringa.find(stringb); > > Instead, it treats stringa as "hi" and stringb as "hi". > > How do I solve this? Try this: >>> stringa = 'hi' >>> st

  1   2   3   4   5   6   >