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: 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

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: huh??? weird problem

2010-05-14 Thread Mensanator
On May 14, 7:14 pm, cerr wrote: > Hi There, > > I got following code: > start=time.time() > print 'warnTimeout '+str(WarnTimeout) > print 'critTimeout '+str(CritTimeout) > print 'start',str(start) > while wait: >     passed =  time.time()-start >     print 'passed ',str(passed) >     if passed >=

Re: stopping execution window on error - newbie

2010-05-13 Thread Mensanator
On May 13, 4:00 pm, a wrote: > I'm coding on an old windows laptop > > i write the code and double click the icon.   Don't do that. > it runs the program and > writes results to a window. > > when the code finishes, the window closes, i do a time.sleep(10) to > see what has happened. > > unfortu

Re: How to test whether bit is set within a flag with Python ?

2010-05-12 Thread Mensanator
On May 12, 1:40 pm, MRAB wrote: > robert somerville wrote: > > I am trying to determine how to test whether variors bits are set within > > a byte (or larger flag) , the python 'and' and 'or' do not seem to be > > doing what i want .. does anybody have some sample code showing how to > > do it ??

Re: Why the inconsistent of those two base64 methods?

2010-05-12 Thread Mensanator
On May 12, 4:20 am, Maarten wrote: > On May 12, 6:04 am, Leo Jay wrote: > > > I'd like to encode a string in base64, but I found a inconsistent of > > two methods: > > > >>> 'aaa'.encode('base64') > > 'YWFh\n' > > >>> import base64 > > >>> base64.b64encode('aaa') > > 'YWFh' > > > as you can see,

Re: First Timer

2010-05-11 Thread Mensanator
On May 11, 9:32 pm, Terry Reedy wrote: > On 5/11/2010 7:03 PM, Mensanator wrote: > > > On May 11, 4:37 pm, Terry Reedy  wrote: > > >> In the command line interpreter, you should be able to hit up > >> arrow and have the line above copied to the current entry

Re: First Timer

2010-05-11 Thread Mensanator
On May 11, 4:37 pm, Terry Reedy wrote: > On 5/11/2010 3:28 PM, Donna Lane wrote: > > > I have downloaded Python and I'm a beginner in every sense. > > Welcome. I hope you enjoy Python too. > >  > What I want to> know now is when I am in Idle and have made a syntax error > how do I repair? > > Aft

Re: Help running Windows programs from Python

2010-05-07 Thread Mensanator
On May 7, 2:14 pm, Scott wrote: > I want to write a script to automate log archiving/compressing on a > Win2003 server. I have Python 2.6 installed. I am planning to use 7- > zip for compression (because I have been using it manually for a while > now). For now all operations will be local in the

Re: long int computations

2010-05-04 Thread Mensanator
On May 3, 10:17 am, s...@sig.for.address (Victor Eijkhout) wrote: > I have two long ints, both too long to convert to float, but their ratio > is something reasonable. How can I compute that? The obvious "(1.*x)/y" > does not work. You could try using the gmpy module. It supports arbitrary precisi

Re: Performance of list.index - how to speed up a silly algorithm?

2010-04-29 Thread Mensanator
On Apr 29, 5:21 pm, Laszlo Nagy wrote: > I have some ten thousand rows in a table. E.g. > > columns = ["color","size","weight","value"] > rows = [ >      [ "Yellow", "Big", 2, 4 ], >      [ "Blue", "Big", 3, -4 ], >      [ "Blue", "Small", 10, 55 ], >      ... > ] > > Some columns are dimensions,

Re: Deleting more than one element from a list

2010-04-21 Thread Mensanator
On Apr 21, 2:56 pm, candide wrote: > Is the del instruction able to remove _at the same_ time more than one > element from a list ? > > For instance, this seems to be correct : > >  >>> z=[45,12,96,33,66,'c',20,99] >  >>> del z[2], z[6],z[0] >  >>> z > [12, 33, 66, 'c', 20] >  >>> > > Howe

Re: 2.7 beta 1

2010-04-12 Thread Mensanator
On Apr 12, 11:39 am, Terry Reedy wrote: > On 4/12/2010 1:57 AM, Mensanator wrote: > > > Likewise, I usually don't shut down > > when I leave work, so I can't allow orphaned processes to accumulate > > eating up CPU and memory. > > So don't. I don

Re: 2.7 beta 1

2010-04-12 Thread Mensanator
On Apr 12, 3:51 am, alex23 wrote: > Mensanator wrote: > > You think the right thing to do is just quietly work > > around the problem and sit back and laugh knowing sooner > > or later someone else will get burned by it? > > Haven't we covered argument from fal

Re: 2.7 beta 1

2010-04-11 Thread Mensanator
On Apr 11, 6:08 pm, Steven D'Aprano wrote: > On Sun, 11 Apr 2010 11:54:04 -0700, Mensanator wrote: > > On Apr 11, 11:53 am, Steven D'Aprano > cybersource.com.au> wrote: > >> On Sat, 10 Apr 2010 21:08:44 -0700, Mensanator wrote: > >> >> > 3.x wo

Re: 2.7 beta 1

2010-04-11 Thread Mensanator
On Apr 11, 11:33 pm, Lie Ryan wrote: > On 04/12/10 04:54, Mensanator wrote: > > > On Apr 11, 11:53 am, Steven D'Aprano > cybersource.com.au> wrote: > >> On Sat, 10 Apr 2010 21:08:44 -0700, Mensanator wrote: > >>>>> 3.x won't be

Re: 2.7 beta 1

2010-04-11 Thread Mensanator
On Apr 11, 12:00�pm, Terry Reedy wrote: > On 4/11/2010 12:08 AM, Mensanator wrote: > > > On Apr 10, 7:15 pm, Chris Rebert �wrote: > >> On Sat, Apr 10, 2010 at 4:47 PM, Mensanator �wrote: > >>> 3.x won't be adopted by developers until it's fixed.

Re: 2.7 beta 1

2010-04-11 Thread Mensanator
On Apr 11, 11:53�am, Steven D'Aprano wrote: > On Sat, 10 Apr 2010 21:08:44 -0700, Mensanator wrote: > >> > 3.x won't be adopted by developers until it's fixed. As of now, it's > >> > seriously broken and unsuitable for production. > > >&g

Re: 2.7 beta 1

2010-04-11 Thread Mensanator
On Apr 10, 11:51�pm, alex23 wrote: > Mensanator wrote: > > 3.x won't be adopted by WINDOWS developers WHO USE IDLE until it's fixed. > > I think you left your hyperbole level too high so I turned it down for > you. I don't know of _anyone_ who uses IDLE to run p

Re: 2.7 beta 1

2010-04-10 Thread Mensanator
On Apr 10, 7:15�pm, Chris Rebert wrote: > On Sat, Apr 10, 2010 at 4:47 PM, Mensanator wrote: > > On Apr 10, 5:45�pm, Michael Str�der wrote: > >> average wrote: > >> >> On behalf of the Python development team, I'm merry to announce the > >&

Re: [RELEASED] 2.7 beta 1

2010-04-10 Thread Mensanator
On Apr 10, 5:45 pm, Michael Ströder wrote: > average wrote: > >> On behalf of the Python development team, I'm merry to announce the first > >> beta > >> release of Python 2.7. > > >> Python 2.7 is scheduled (by Guido and Python-dev) to be the last major > >> version > >> in the 2.x series.  Tho

Re: off topic but please forgive me me and answer

2010-04-03 Thread Mensanator
On Apr 3, 9:03 pm, Steven D'Aprano wrote: > On Sat, 03 Apr 2010 09:35:34 -0700, Mensanator wrote: > > On Apr 3, 10:17 am, Steven D'Aprano > cybersource.com.au> wrote: > >> On Sat, 03 Apr 2010 15:43:41 +0100, Martin P. Hellwig wrote: > >> > I am re

Re: off topic but please forgive me me and answer

2010-04-03 Thread Mensanator
On Apr 3, 10:17 am, Steven D'Aprano wrote: > On Sat, 03 Apr 2010 15:43:41 +0100, Martin P. Hellwig wrote: > > I am replying to this post not because I disagree but because it > > postalogically  fits the best (I am by no means an expert either). > > > IMHO, the crackpot in this regard is actually

Re: off topic but please forgive me me and answer

2010-04-03 Thread Mensanator
On Apr 3, 8:00 am, superpollo wrote: > Patrick Maupin ha scritto: > > > > > > > On Apr 2, 2:41 pm, Andreas Waldenburger > > wrote: > > >> While everyone else is mocking you: Can you please elaborate on why you > >> want to know and what kind of problem you're trying to solve with this? > >> Also,

Re: off topic but please forgive me me and answer

2010-04-02 Thread Mensanator
On Apr 2, 7:32 pm, Patrick Maupin wrote: > On Apr 2, 6:50 pm, Mensanator wrote: > > > On Apr 2, 2:34 pm, Patrick Maupin wrote: > > > > Methinks the OP is fluent in the way of choosing newsgroups. > > > According to google, he has posted 6855 messages in 213 gr

Re: off topic but please forgive me me and answer

2010-04-02 Thread Mensanator
On Apr 2, 2:34 pm, Patrick Maupin wrote: > On Apr 2, 2:41 pm, Andreas Waldenburger > wrote: > > > While everyone else is mocking you: Can you please elaborate on why you > > want to know and what kind of problem you're trying to solve with this? > > Also, don't you think you should have picked a

Re: off topic but please forgive me me and answer

2010-04-02 Thread Mensanator
On Apr 2, 6:07 pm, Steven D'Aprano wrote: > On Fri, 02 Apr 2010 12:35:55 -0700, Mensanator wrote: > >> If you want an exact result when multiplying arbitrary fractions, you > >> need to avoid floats and decimals and use Fractions: > > >> >>> Fractio

Re: off topic but please forgive me me and answer

2010-04-02 Thread Mensanator
On Apr 1, 9:44 pm, Steven D'Aprano wrote: > On Thu, 01 Apr 2010 19:49:43 -0500, Tim Chase wrote: > > David Robinow wrote: > >> $ python -c "print 1/2 * 1/2" > >> 0 > > >>  But that's not what I learned in grade school. > >> (Maybe I should upgrade to 3.1?) > > > That's because you need to promote

Re: Binary Decimals in Python

2010-03-30 Thread Mensanator
On Mar 30, 1:52 pm, MRAB wrote: > John Nagle wrote: > > aditya wrote: > >> On Mar 30, 10:49 am, Raymond Hettinger wrote: > >>> On Mar 30, 8:13 am, aditya wrote: > > To get the decimal representation of a binary number, I can just do > this: > int('11',2) # returns 3 > But dec

Re: Binary Decimals in Python

2010-03-30 Thread Mensanator
On Mar 30, 10:49 am, Raymond Hettinger wrote: > On Mar 30, 8:13 am, aditya wrote: > > > To get the decimal representation of a binary number, I can just do > > this: > > > int('11',2) # returns 3 > > > But decimal binary numbers throw a ValueError: > > > int('1.1',2) # should return 1.5, throws e

Re: OT: Meaning of "monkey"

2010-03-29 Thread Mensanator
On Mar 29, 5:31 pm, Gib Bogle wrote: > I prefer to think of myself as a code-ape - I look down on code-monkeys. Why? They have prehensile tails. -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: Meaning of "monkey"

2010-03-26 Thread Mensanator
On Mar 26, 2:44 pm, Phlip wrote: > On Mar 26, 6:14 am, Luis M. González wrote: > > > Webmonkey, Greasemonkey, monkey-patching, Tracemonkey, Jägermonkey, > > Spidermonkey, Mono (monkey in spanish), codemonkey, etc, etc, etc... > > > Monkeys everywhere. > > Sorry for the off topic question, but wha

Re: Have you embraced Python 3.x yet?

2010-03-26 Thread Mensanator
On Mar 26, 8:23 am, Harishankar wrote: > Have you people embraced Python 3.x or still with 2.5 or 2.6? 3.1. The only module I use regularly is gmpy and that's one that has been updated. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.1.2 release candidate

2010-03-08 Thread Mensanator
On Mar 6, 4:13 pm, Benjamin Peterson wrote: > On behalf of the Python development team, I'm pleased to announce a release > candidate for the second bugfix release of the Python 3.1 series, Python > 3.1.2. > > This bug fix release fixes numerous issues found in 3.1.1.  This release > candidate ha

Re: Slicing [N::-1]

2010-03-05 Thread Mensanator
On Mar 5, 6:34 pm, Gary Herron wrote: > Mensanator wrote: > > On Mar 5, 3:42 pm, Gary Herron wrote: > > >> Mensanator wrote: > > >>> The only way to get a 0 from a reverse range() is to have a bound of > >>> -1. > > >> Not quit

Re: Slicing [N::-1]

2010-03-05 Thread Mensanator
On Mar 5, 3:42 pm, Gary Herron wrote: > Mensanator wrote: > > > The only way to get a 0 from a reverse range() is to have a bound of > > -1. > > Not quite.  An empty second bound goes all the way to the zero index: Not the same thing. You're using the bounds of the s

Re: Slicing [N::-1]

2010-03-05 Thread Mensanator
On Mar 5, 12:28 pm, Steven D'Aprano wrote: > On Fri, 05 Mar 2010 18:12:05 +, Arnaud Delobelle wrote: > l = range(10) > l > > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] > l[7::-1] > > [7, 6, 5, 4, 3, 2, 1, 0] > [l[i] for i in range(7, -1, -1)] > > [7, 6, 5, 4, 3, 2, 1, 0] > > Where does

Re: Slicing [N::-1]

2010-03-05 Thread Mensanator
On Mar 5, 12:01 pm, Joan Miller wrote: > What does a slice as [N::-1] ? Starts at position N and returns all items to the start of the list in reverse order. > > It looks that in the first it reverses the slice and then it shows > only N items, right? Wrong. It shows N+1 items. Remember, counti

Re: _winreg and access registry settings of another user

2010-03-04 Thread Mensanator
On Mar 4, 3:24 pm, News123 wrote: > Hi, > > I habe administrator privilege  on a window host and would like to write > a script setting some registry entries for other users. Why? Are you writing a virus? > > There are potentially at least two wo ways of doing this: > > 1.) start a subprocess as

Re: Question about typing: ints/floats

2010-03-03 Thread Mensanator
On Mar 3, 5:45 pm, Wells wrote: > This seems sort of odd to me: > > >>> a = 1 > >>> a += 1.202 > >>> a > > 2.202 > > Indicates that 'a' was an int that was implicitly casted to a float. > But: > > >>> a = 1 > >>> b = 3 > >>> a / b > > 0 > > This does not implicitly do the casting, it treats 'a' an

Re: When will Java go mainstream like Python?

2010-02-25 Thread Mensanator
On Feb 25, 6:41 pm, "Alf P. Steinbach" wrote: > * Chris Gray: > > > Lawrence D'Oliveiro writes: > > >> In message , Wanja Gayk wrote: > > >>> Reference counting is about the worst technique for garbage collection. > >> It avoids the need for garbage collection. It means I can write things like >

Re: Walking lists

2010-02-25 Thread Mensanator
On Feb 25, 7:02 am, Tim Chase wrote: > Python 3 introduced a variable tuple assignment which I > suspect[*] would work in this context: > >    for first, *rest in L: # note the asterisk >      print first >      for x in rest: >        do_stuff(x) > > [*] not having py3 on this machine, I can't re

Re: DreamPie - The Python shell you've always dreamed about!

2010-02-21 Thread Mensanator
On Feb 21, 7:39 pm, rantingrick wrote: > Mensanator snipped: """Yeah, I saw that. Funny that something > important like that wasn't part of the announcement. I notice no > mention of Mac OS, so visiting the website was a complete waste of > time on my part, wasn

Re: DreamPie - The Python shell you've always dreamed about!

2010-02-21 Thread Mensanator
On Feb 21, 12:14 pm, Paul Boddie wrote: > On 21 Feb, 17:32, Mensanator wrote: > > > On Feb 21, 10:30 am, Mensanator wrote: > > > > What versions of Python does it suuport? > > > What OS are supported? > > From the Web site referenced in the announcem

Re: DreamPie - The Python shell you've always dreamed about!

2010-02-21 Thread Mensanator
On Feb 21, 10:30�am, Mensanator wrote: > On Feb 21, 3:42 am, Noam Yorav-Raphael wrote:> I'm > pleased to announce DreamPie 1.0 - a new graphical interactive > > Python shell! > > What versions of Python does it suuport? What OS are supported? -- http://mail.python.o

Re: DreamPie - The Python shell you've always dreamed about!

2010-02-21 Thread Mensanator
On Feb 21, 3:42�am, Noam Yorav-Raphael wrote: > I'm pleased to announce DreamPie 1.0 - a new graphical interactive > Python shell! > What versions of Python does it suuport? -- http://mail.python.org/mailman/listinfo/python-list

Re: Stephen -- Bruce?

2010-02-08 Thread Mensanator
On Feb 8, 3:02 am, Stefan Behnel wrote: > Mensanator, 05.02.2010 00:36: > > > On Feb 4, 5:13 pm, "Alf P. Steinbach" wrote: > >> What's this about all the Stephen'ses here? > > >> Shouldn't it be Bruce? > > > Of course. We just ca

Re: Stephen -- Bruce?

2010-02-06 Thread Mensanator
On Feb 4, 5:13 pm, "Alf P. Steinbach" wrote: > What's this about all the Stephen'ses here? > > Shouldn't it be Bruce? Of course. We just call everyone Stephen to avoid confusion. > > - Alf (wondering) -- http://mail.python.org/mailman/listinfo/python-list

Re: Last M digits of expression A^N

2010-02-05 Thread Mensanator
On Feb 5, 2:18 pm, Mark Dickinson wrote: > On Feb 5, 8:14 pm, mukesh tiwari wrote: > > > Hello everyone. I am kind of new to python so pardon me if i sound > > stupid. > > I have to find out the last M digits of expression.One thing i can do > > is (A**N)%M but my  A and N are too large (10^100)

Re: ANN: GMPY 1.11 released

2010-02-03 Thread Mensanator
On Feb 3, 12:36 pm, casevh wrote: > On Feb 3, 10:22 am, Mensanator wrote: > > > Historically, gmpy really didn't have alpha/beta/rc versions and > gmpy.version() just had the version "number" and didn't indicate the > status. If I change it, I'd rath

Re: ANN: GMPY 1.11 released

2010-02-03 Thread Mensanator
On Feb 3, 10:37 am, casevh wrote: > On Feb 2, 10:03 pm, Mensanator wrote: > > > > > > > On Feb 2, 12:45 am, casevh wrote: > > > > Everyone, > > > > I'm pleased to annouce the final release of GMPY 1.11. > > > GMPY is a wrapper f

Re: ANN: GMPY 1.11 released

2010-02-02 Thread Mensanator
On Feb 2, 12:45 am, casevh wrote: > Everyone, > > I'm pleased to annouce the final release of GMPY 1.11. > GMPY is a wrapper for the MPIR or GMP multiple-precision > arithmetic library. GMPY 1.11 is available for download from: > > http://code.google.com/p/gmpy/ > > In addition to support for Pyth

Re: PEP 3147 - new .pyc format

2010-01-30 Thread Mensanator
On Jan 30, 4:14 pm, John Roth wrote: > PEP 3147 has just been posted, proposing that, beginning in release > 3.2 (and possibly 2.7) compiled .pyc and .pyo files be placed in a > directory with a .pyr extension. The reason is so that compiled > versions of a program can coexist, which isn't possibl

Re: myths about python 3

2010-01-28 Thread Mensanator
On Jan 28, 11:35 am, Ethan Furman wrote: > Steven D'Aprano wrote: > > 4. Python 3 will make you irresistible to women. > > >     FALSE > > What?!?  Drat!!!  Guess I'll have to learn Lisp...  ;) Irresisible? Ha! The chicks will think you have a harelip. > > ~Ethan~ -- http://mail.python.org/mai

Re: Need help with a program

2010-01-28 Thread Mensanator
On Jan 28, 12:28 pm, Steven Howe wrote: > On 01/28/2010 09:49 AM, Jean-Michel Pichavant wrote: > > > > > > > evilweasel wrote: > >> I will make my question a little more clearer. I have close to 60,000 > >> lines of the data similar to the one I posted. There are various > >> numbers next to the s

Re: myths about python 3

2010-01-27 Thread Mensanator
On Jan 27, 2:56 pm, John Nagle wrote: > Daniel Fetchinson wrote: > > Hi folks, > > > I was going to write this post for a while because all sorts of myths > > periodically come up on this list about python 3. I don't think the > > posters mean to spread false information on purpose, they simply ar

Re: chr(12) Form Feed in Notepad (Windows)

2010-01-15 Thread Mensanator
On Jan 15, 6:40 pm, "W. eWatson" wrote: > Tim Chase wrote: > > W. eWatson wrote: > >> Tim Chase wrote: > >>> The pseudo-pipeline comparison would be > > >>>   type file.txt > lpt1: > > >>> which would send the raw text file to the printer (assuming it's set > >>> up on LPT1, otherwise, use whateve

Re: Clarifications on compiling for Windows

2010-01-07 Thread Mensanator
On Jan 8, 12:19 am, peteshinners wrote: > My presentation for Pycon is coming together, but I need to make sure > my information about compiling Python and Python extensions for > Windows is correct. I'm really only experienced with this on the Linux > side of things. > > First of all, is the Wind

Re: it gets worse (was: How do you configure IDLE on a Mac...)

2010-01-05 Thread Mensanator
On Jan 5, 4:03 pm, Ned Deily wrote: > In article > <6672dad2-26ba-458b-8075-21bac6506...@e37g2000yqn.googlegroups.com>, Mensanator > wrote: > > [...] > > > > > > > So, for all practical purposes, the macports install is broken also. > > > ID

Re: twenty years ago Guido created Python

2010-01-05 Thread Mensanator
On Jan 5, 8:22 am, n00m wrote: > Stick your English into your ass Most people would say "up your ass". And use a period at the end of the sentence. Got any more funny insults? -- http://mail.python.org/mailman/listinfo/python-list

Re: parsing an Excel formula with the re module

2010-01-05 Thread Mensanator
On Jan 5, 12:35 pm, MRAB wrote: > vsoler wrote: > > Hello, > > > I am acessing an Excel file by means of Win 32 COM technology. > > For a given cell, I am able to read its formula. I want to make a map > > of how cells reference one another, how different sheets reference one > > another, how work

it gets worse (was: How do you configure IDLE on a Mac...)

2010-01-05 Thread Mensanator
On Jan 5, 12:32 am, Ned Deily wrote: > In article > <0d70cb54-3d77-4176-b621-e764ecf61...@26g2000yqo.googlegroups.com>, > > > > > >  Mensanator wrote: > > I assume I've been using the IDLE from macports. From the command > > prompt I've &g

Re: How do you configure IDLE on a Mac, seeing as there's no Configure Option...

2010-01-04 Thread Mensanator
On Jan 4, 9:17 am, "Alf P. Steinbach" wrote: > * Mensanator: > > > ...because there's no [Options] menu on the shell window? > > > Or at least give me a clue to how to use Courier New font? > > > For some inscrutable reason, depite the plethora

Re: How do you configure IDLE on a Mac, seeing as there's no Configure Option...

2010-01-04 Thread Mensanator
On Jan 4, 10:44 pm, Mensanator wrote: > On Jan 4, 10:05 am, Benjamin Kaplan wrote: > > > On Sun, Jan 3, 2010 at 8:42 PM, Mensanator wrote: > > > ...because there's no [Options] menu on the shell window? > > > > Or at least give me a clue to how to

Re: How do you configure IDLE on a Mac, seeing as there's no Configure Option...

2010-01-04 Thread Mensanator
On Jan 4, 2:25 pm, Ned Deily wrote: > In article > , >  Benjamin Kaplan wrote: > > > On Sun, Jan 3, 2010 at 8:42 PM, Mensanator wrote: > > > ...because there's no [Options] menu on the shell window? > > > > Or at least give me a clue to how to use Co

Re: How do you configure IDLE on a Mac, seeing as there's no Configure Option...

2010-01-04 Thread Mensanator
On Jan 4, 10:05 am, Benjamin Kaplan wrote: > On Sun, Jan 3, 2010 at 8:42 PM, Mensanator wrote: > > ...because there's no [Options] menu on the shell window? > > > Or at least give me a clue to how to use Courier New font? > > > For some inscrutable reason, depite

Re: twenty years ago Guido created Python

2010-01-04 Thread Mensanator
On Jan 4, 4:20 pm, n00m wrote: > Ben, go away from here. With all your stupids sigs. > Do you think are you original? > You are a stupid animal. > Guido, Tim Peters, Raymond Hettinger are geniuis. > I don't know exactly Python mob. Maybe forgot someone. > You is only a source of depspise for them

How do you configure IDLE on a Mac, seeing as there's no Configure Option...

2010-01-04 Thread Mensanator
...because there's no [Options] menu on the shell window? Or at least give me a clue to how to use Courier New font? For some inscrutable reason, depite the plethora of formatting tools, someone decided that proportional spaced fonts ought to be the default for IDLE. -- http://mail.python.org/ma

Re: Significant whitespace

2010-01-03 Thread Mensanator
On Jan 1, 4:02�pm, Dan Stromberg wrote: > I put together a page about significant whitespace (and the lack thereof). The real problem is your use of proportional spaced fonts. > > You're invited to check it out: > > http://stromberg.dnsalias.org/~dstromberg/significant-whitespace.html -- http:

Re: Significant whitespace

2010-01-02 Thread Mensanator
On Jan 2, 4:19 pm, Emile van Sebille wrote: > On 1/1/2010 5:05 PM Steven D'Aprano said... > > > In Python terms, imagine if we could write > > >      foriinrange(10): > > > instead of the usual > > >      for i in range(10): > > > Since the colon makes it unambiguous that it is some sort of block

Re: the need for 64 bits

2009-12-29 Thread Mensanator
On Dec 28, 9:04 pm, Roy Smith wrote: > In article <034921cf$0$1277$c3e8...@news.astraweb.com>, >  Steven D'Aprano wrote: > > > On Sun, 27 Dec 2009 22:50:11 -0800, Mensanator wrote: > > > > I routinely use large numbers in my Collatz Conjecture work. > &g

Re: the need for 64 bits

2009-12-29 Thread Mensanator
On Dec 28, 6:48 pm, Steven D'Aprano wrote: > On Mon, 28 Dec 2009 16:27:58 -0800, Mensanator wrote: > > And if I were ice fishing on the retention pond near my house and > > someone came up and said "You know, blue whales can achieve a length of > > up to 108 f

Re: the need for 64 bits

2009-12-29 Thread Mensanator
On Dec 28, 4:44 pm, Steven D'Aprano wrote: > On Sun, 27 Dec 2009 22:50:11 -0800, Mensanator wrote: > > I routinely use large numbers in my Collatz Conjecture work. > > > Really large. As in a quarter million bits. > > That's not large. Perhaps not in the absol

Re: the need for 64 bits

2009-12-28 Thread Mensanator
On Dec 28, 9:08 am, casevh wrote: > On Dec 28, 2:13 am, Mark Dickinson wrote: > > > > > > > On Dec 28, 6:50 am, Mensanator wrote: > > > > But with a 64-bit processor, that limitation no longer stops me. > > > > i: 11   bits: 10,460,353,2

the need for 64 bits

2009-12-27 Thread Mensanator
I routinely use large numbers in my Collatz Conjecture work. Really large. As in a quarter million bits. You wouldn't think that the processor would make all that much difference. But using the number is a doddle. The real trick is getting there. There is a limitation that few encounter. In an ex

Re: How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1? -SOLVED!

2009-12-27 Thread Mensanator
On Dec 27, 8:19 am, Steve Holden wrote: > Mensanator wrote: > > On Dec 26, 10:02 pm, Benjamin Kaplan wrote: > >> On Sat, Dec 26, 2009 at 9:21 PM, Mensanator wrote: > >>> On Dec 26, 4:20 pm, Mensanator wrote: > >>>> On Dec 26, 3:57 pm, Benjamin Kap

Re: How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1? -SOLVED!

2009-12-26 Thread Mensanator
On Dec 26, 10:02 pm, Benjamin Kaplan wrote: > On Sat, Dec 26, 2009 at 9:21 PM, Mensanator wrote: > > On Dec 26, 4:20 pm, Mensanator wrote: > >> On Dec 26, 3:57 pm, Benjamin Kaplan wrote: > > >> > On Sat, Dec 26, 2009 at 4:36 PM, Mensanator wrote: > > >

Re: How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1? -SOLVED!

2009-12-26 Thread Mensanator
On Dec 26, 4:20�pm, Mensanator wrote: > On Dec 26, 3:57�pm, Benjamin Kaplan wrote: > > > On Sat, Dec 26, 2009 at 4:36 PM, Mensanator wrote: > > > > I guess the point here is NEVER use the disk image on python.org, > > > ALWAYS use macports to install P

Re: How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1? -SOLVED!

2009-12-26 Thread Mensanator
On Dec 26, 3:57 pm, Benjamin Kaplan wrote: > On Sat, Dec 26, 2009 at 4:36 PM, Mensanator wrote: > > > I guess the point here is NEVER use the disk image on python.org, > > ALWAYS use macports to install Python 3.1. > > > At least until python.org fixes it. > > Ha

Re: How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1? -SOLVED!

2009-12-26 Thread Mensanator
On Dec 26, 2:07 pm, Benjamin Kaplan wrote: PROBLEM RESOLVED! Yes, it does appear that the disk image on pytho.ord is defective (maybe they made the image from an obsolete version?) I installed Python 3.1 from macports and everything seems to work now. (I never would have figured it out, althoug

Re: How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1?

2009-12-26 Thread Mensanator
On Dec 25, 8:59�pm, Benjamin Kaplan wrote: > On Fri, Dec 25, 2009 at 1:19 PM, Mensanator wrote: > > On Dec 25, 9:25�am, Benjamin Kaplan wrote: > >> On Fri, Dec 25, 2009 at 1:48 AM, Mensanator wrote: > >> > On Dec 24, 10:18�pm, Benjamin Kaplan wrote: > >

Re: How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1?

2009-12-25 Thread Mensanator
On Dec 25, 9:25 am, Benjamin Kaplan wrote: > On Fri, Dec 25, 2009 at 1:48 AM, Mensanator wrote: > > On Dec 24, 10:18 pm, Benjamin Kaplan wrote: > >> On Thu, Dec 24, 2009 at 9:11 PM, Mensanator wrote: > >> > Ok, so I got a MacBook Air. > > >> >

Re: How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1?

2009-12-25 Thread Mensanator
On Dec 25, 9:25 am, Benjamin Kaplan wrote: > On Fri, Dec 25, 2009 at 1:48 AM, Mensanator wrote: > > On Dec 24, 10:18 pm, Benjamin Kaplan wrote: > >> On Thu, Dec 24, 2009 at 9:11 PM, Mensanator wrote: > >> > Ok, so I got a MacBook Air. > > >> >

Re: How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1?

2009-12-24 Thread Mensanator
On Dec 24, 10:18 pm, Benjamin Kaplan wrote: > On Thu, Dec 24, 2009 at 9:11 PM, Mensanator wrote: > > Ok, so I got a MacBook Air. > > > Has OS X 10.6 (Snow Leopard) and Python 2.6.1 already installed. > > > So I install Xcode, download macports and download gmpy-1

How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1?

2009-12-24 Thread Mensanator
Ok, so I got a MacBook Air. Has OS X 10.6 (Snow Leopard) and Python 2.6.1 already installed. So I install Xcode, download macports and download gmpy-1.11rc1. Following the instructions in mac_build.txt, I do the following: - sudo /opt/local/bin/port install gmp This works fine. Then I do - p

Re: force non-exponential representation for Decimal?

2009-12-23 Thread Mensanator
On Dec 23, 4:03 am, jh...@gmx.de wrote: > (cc-ing the list) > > > > Is there a convenient way to force a decimal.Decimal representation to > > not use exponential representation? > > > Which Python version are you using?  For Python 2.6 (and 3.1), the > > answer's yes.  For earlier Python verions,

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Mensanator
On Dec 19, 12:21 am, "Alf P. Steinbach" wrote: > * Mensanator: > > > > >> That said, and a bit off-tangent to your comment's main thrust, the time > >> spent > >> on coding that repeated-division-by-2 optimization would, I think, b

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Mensanator
On Dec 18, 6:25 pm, "Alf P. Steinbach" wrote: > * Mensanator: > > >> The second deviation is that since most names are constants, > > > Really? Does that mean you don't use literals, to save the time > > required to convert them to integers? Isn'

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Mensanator
> The second deviation is that since most names are constants, Really? Does that mean you don't use literals, to save the time required to convert them to integers? Isn't that done at compile time? So, instead of doing the Collatz Conjecture as while a>1: f = gmpy.scan1(a,0) if f>0: a =

Re: More stuff added to ch 2 of my programming intro

2009-12-17 Thread Mensanator
On Dec 17, 1:40 am, geremy condra wrote: > On Thu, Dec 17, 2009 at 2:25 AM, Mensanator wrote: > > On Dec 16, 8:45 pm, Ned Deily wrote: > >> In article > >> <88bab2c0-d27c-4081-a703-26b353b9e...@9g2000yqa.googlegroups.com>, > > >> Mensanator wrote

Re: More stuff added to ch 2 of my programming intro

2009-12-17 Thread Mensanator
On Dec 17, 10:12 am, Benjamin Kaplan wrote: > On Thu, Dec 17, 2009 at 5:33 AM, Ned Deily wrote: > > >> > or (for MacPorts fans): > > >> > $ sudo port install python31 > > >> And since I haven't got one, this also tells me nothing. > > >http://www.macports.org/ > > > "The MacPorts Project is an op

Re: More stuff added to ch 2 of my programming intro

2009-12-17 Thread Mensanator
On Dec 17, 4:33 am, Ned Deily wrote: > In article > <183af5d2-e157-4cd6-bec6-8997809e1...@d21g2000yqn.googlegroups.com>, > >  Mensanator wrote: > > Oh, I don't know, maybe because I'm thinking about > > buying one and seeing 2.3, 2.4 and 2.5 directories &g

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Mensanator
On Dec 16, 8:45�pm, Ned Deily wrote: > In article > <88bab2c0-d27c-4081-a703-26b353b9e...@9g2000yqa.googlegroups.com>, > > �Mensanator wrote: > > Oh, and about Chapter 1. > > > If you're going to use version 3.1.1 as your standard, shouldn't > >

Re: Using Python to Execute a C or FORTRAN Program (Windows)

2009-12-16 Thread Mensanator
On Dec 16, 8:41 pm, "W. eWatson" wrote: > Mensanator wrote: > > On Dec 14, 8:14 pm, "W. eWatson" wrote: > >> I think Python is capable of executing a compiled C or FORTRAN program, > > > Sure, if it was compiled to an .exe file. > >

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Mensanator
On Dec 16, 5:45 pm, "Alf P. Steinbach" wrote: > * Mensanator: > > > > > > > On Dec 16, 4:41 pm, Mensanator wrote: > >> On Dec 14, 1:23 am, "Alf P. Steinbach" wrote: > > >>> * Alf P. Steinbach: > >>>>   Form

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Mensanator
On Dec 16, 4:41 pm, Mensanator wrote: > On Dec 14, 1:23 am, "Alf P. Steinbach" wrote: > > > > > > > * Alf P. Steinbach: > > > >   Format: PDF > > >   http://preview.tinyurl.com/ProgrammingBookP3> > > > > The new stuff,

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Mensanator
On Dec 14, 1:23 am, "Alf P. Steinbach" wrote: > * Alf P. Steinbach: > > > > > > >   Format: PDF > >   http://preview.tinyurl.com/ProgrammingBookP3> > > > The new stuff, section 2.7, is about programs as simulations and > > handling data, focusing on modeling things. It includes some Python GUI > >

Re: Apple Mac OS X 10.6 support & compatability with Python 3 ?

2009-12-16 Thread Mensanator
On Dec 16, 11:41 am, pdlem...@earthlink.net wrote: > I've been given a MAC AIR laptop with OS X 10.6 "Snow Leopard". > On my desktop I dual boot with XP - Ubuntu and have Python on both. > Unfortunately all my Python programs are written on Windows XP and > I heavily rely on WConio for console I/O.

Re: Using Python to Execute a C or FORTRAN Program (Windows)

2009-12-14 Thread Mensanator
On Dec 14, 8:14�pm, "W. eWatson" wrote: > I think Python is capable of executing a compiled C or FORTRAN program, Sure, if it was compiled to an .exe file. > and maybe even getting some parameters passed back. Sure, if the program prints to stdout. > Does anyone have a > example of how this mi

  1   2   3   4   5   6   >